commit 3c26b78bbed6f86cc88f201e49da11d93069592b Author: zhengchengqiang Date: Mon Nov 11 09:53:47 2024 +0800 first commit diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..cd0e690 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml new file mode 100644 index 0000000..f90b31b --- /dev/null +++ b/.idea/dataSources.local.xml @@ -0,0 +1,19 @@ + + + + + + #@ + ` + + + master_key + root + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..f9c7c1b --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,12 @@ + + + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://114.55.92.182:3306/vpp_hf + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d.xml b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d.xml new file mode 100644 index 0000000..d2718f9 --- /dev/null +++ b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d.xml @@ -0,0 +1,10109 @@ + + + + + lower/lower + InnoDB + InnoDB + |root||root||ALTER|G +|root||root||ALTER ROUTINE|G +|root||root||CREATE|G +|root||root||CREATE ROUTINE|G +|root||root||CREATE TABLESPACE|G +|root||root||CREATE TEMPORARY TABLES|G +|root||root||CREATE USER|G +|root||root||CREATE VIEW|G +|root||root||DELETE|G +|root||root||DROP|G +|root||root||EVENT|G +|root||root||EXECUTE|G +|root||root||FILE|G +|root||root||INDEX|G +|root||root||INSERT|G +|root||root||LOCK TABLES|G +|root||root||PROCESS|G +|root||root||REFERENCES|G +|root||root||RELOAD|G +|root||root||REPLICATION CLIENT|G +|root||root||REPLICATION SLAVE|G +|root||root||SELECT|G +|root||root||SHOW DATABASES|G +|root||root||SHOW VIEW|G +|root||root||SHUTDOWN|G +|root||mysql.session|localhost|SUPER|G +|root||root||SUPER|G +|root||root||TRIGGER|G +|root||root||UPDATE|G +|root||root||grant option|G +performance_schema|schema||mysql.session|localhost|SELECT|G +sys|schema||mysql.sys|localhost|TRIGGER|G + 5.7.28 + + + armscii8 + + + armscii8 + 1 + + + ascii + + + ascii + 1 + + + big5 + + + big5 + 1 + + + binary + 1 + + + cp1250 + + + cp1250 + + + cp1250 + + + cp1250 + 1 + + + cp1250 + + + cp1251 + + + cp1251 + + + cp1251 + 1 + + + cp1251 + + + cp1251 + + + cp1256 + + + cp1256 + 1 + + + cp1257 + + + cp1257 + 1 + + + cp1257 + + + cp850 + + + cp850 + 1 + + + cp852 + + + cp852 + 1 + + + cp866 + + + cp866 + 1 + + + cp932 + + + cp932 + 1 + + + dec8 + + + dec8 + 1 + + + eucjpms + + + eucjpms + 1 + + + euckr + + + euckr + 1 + + + gb18030 + + + gb18030 + 1 + + + gb18030 + + + gb2312 + + + gb2312 + 1 + + + gbk + + + gbk + 1 + + + geostd8 + + + geostd8 + 1 + + + greek + + + greek + 1 + + + hebrew + + + hebrew + 1 + + + hp8 + + + hp8 + 1 + + + keybcs2 + + + keybcs2 + 1 + + + koi8r + + + koi8r + 1 + + + koi8u + + + koi8u + 1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + + + latin1 + 1 + + + latin2 + + + latin2 + + + latin2 + + + latin2 + 1 + + + latin2 + + + latin5 + + + latin5 + 1 + + + latin7 + + + latin7 + + + latin7 + 1 + + + latin7 + + + macce + + + macce + 1 + + + macroman + + + macroman + 1 + + + sjis + + + sjis + 1 + + + swe7 + + + swe7 + 1 + + + tis620 + + + tis620 + 1 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + 1 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ucs2 + + + ujis + + + ujis + 1 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + 1 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16 + + + utf16le + + + utf16le + 1 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + 1 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf32 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + 1 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + 1 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4 + + + utf8mb4_general_ci + + + utf8mb4_general_ci + + + utf8_general_ci + + + utf8mb4_general_ci + + + utf8mb4_general_ci + + + utf8mb4_general_ci + + + latin1_swedish_ci + + + utf8_general_ci + + + utf8_general_ci + + + utf8mb4_general_ci + + + 1 + utf8mb4_general_ci + + + utf8mb4_general_ci + + + utf8mb4_general_ci + + + localhost + + + localhost + + + +
+ 设备--96点负荷数据 +
+ +
+
+
+
+
+ 绿舟平台-用户总负荷数据 +
+ + 代码生成业务表 + utf8_general_ci +
+ + 代码生成业务表字段 + utf8_general_ci +
+ + 需求侧响应-签约用户负荷曲线表 +
+ + 需求侧响应-聚合商负荷曲线表 +
+ + 需求响应事件用户执行表 +
+ + 需求响应事件执行表 +
+ + 需求响应-执行结果-电力用户 +
+ + 需求响应-执行结果-聚合商 +
+ + 需求响应事件用户邀约表 +
+ + 需求响应事件表 +
+ + 需求响应-事件执行效果 +
+ + 需求响应-项目签约信息 +
+ + 需求响应-项目签约信息-聚合商 +
+ + 需求响应-项目签约信息-聚合商-明细 +
+ + 需求响应-项目签约信息-电力用户 +
+ + 需求响应-项目签约信息-电力用户-明细 +
+ + 需求响应-补贴推送-电力用户 +
+ + 设备--24点电量数据 +
+ +
+ 设备--288点负荷数据 +
+ + 调峰调频-聚合商负荷曲线表 +
+ + 调峰事件用户邀约表 +
+ + 调峰事件表 +
+ + 聚合方案 +
+ + 聚合方案用户关联表 +
+ + 档案管理--聚合商 + utf8_general_ci +
+ + 档案管理-代理客户 +
+ + 档案管理--设备 + utf8_general_ci +
+ + 设备预警记录 +
+ + 档案管理--附件 + utf8_general_ci +
+ + 档案管理--电力用户 + utf8_general_ci +
+ + 辅助决策申报-用户曲线聚合 +
+ + 辅助决策申报-用户曲线聚合-快照 +
+ + 辅助决策申报-现货申报拟合表 +
+ + 现货交易-合同 +
+ + 设备--96点负荷数据 +
+ + 现货交易-合同-月分日 +
+ + 现货交易-合同-年分月 +
+ + 现货交易—附件 + utf8_general_ci +
+ + Blob类型的触发器表 + utf8_general_ci +
+ + 日历信息表 + utf8_general_ci +
+ + Cron类型的触发器表 + utf8_general_ci +
+ + 已触发的触发器表 + utf8_general_ci +
+ + 任务详细信息表 + utf8_general_ci +
+ + 存储的悲观锁信息表 + utf8_general_ci +
+ + 暂停的触发器表 + utf8_general_ci +
+ + 调度器状态表 + utf8_general_ci +
+ + 简单触发器的信息表 + utf8_general_ci +
+ + 同步机制的行锁表 + utf8_general_ci +
+ + 触发器详细信息表 + utf8_general_ci +
+ + 全国各城市数据 + utf8_general_ci +
+ + 参数配置表 + utf8_general_ci +
+ + 部门表 + utf8_general_ci +
+ + 字典数据表 + utf8_general_ci +
+ + 字典类型表 + utf8_general_ci +
+ + 定时任务调度表 + utf8_general_ci +
+ + 定时任务调度日志表 + utf8_general_ci +
+ + 系统访问记录 + utf8_general_ci +
+ + 菜单权限表 + utf8_general_ci +
+ + 通知公告表 + utf8_general_ci +
+ + 操作日志记录 + utf8_general_ci +
+ + 岗位信息表 + utf8_general_ci +
+ + 角色信息表 + utf8_general_ci +
+ + 角色和部门关联表 + utf8_general_ci +
+ + 角色和菜单关联表 + utf8_general_ci +
+ + 用户信息表 + utf8_general_ci +
+ + 用户与岗位关联表 + utf8_general_ci +
+ + 用户和角色关联表 + utf8_general_ci +
+ +
+ 首页-模拟数据-汇总数据 +
+ + 首页-模拟数据-左侧按类型统计 +
+ + 1 + int(11)|0s + 1 + 1 + + + 户号 + varchar(255)|0s + 2 + + + 设备编号 + varchar(255)|0s + 3 + + + 设备类型 + varchar(255)|0s + 4 + + + 安装地址 + varchar(255)|0s + 5 + + + 设备型号 + varchar(255)|0s + 6 + + + 额定电压 + varchar(255)|0s + 7 + + + 额定电流 + varchar(255)|0s + 8 + + + 额定功率 + varchar(255)|0s + 9 + + + 设备状态 + varchar(255)|0s + 10 + + + 更新时间 + varchar(255)|0s + 11 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 设备id + varchar(32)|0s + 2 + + + 数据检测时间 + date|0s + 3 + + + decimal(20,4 digit)|0s + 4 + + + decimal(20,4 digit)|0s + 5 + + + decimal(20,4 digit)|0s + 6 + + + decimal(20,4 digit)|0s + 7 + + + decimal(20,4 digit)|0s + 8 + + + decimal(20,4 digit)|0s + 9 + + + decimal(20,4 digit)|0s + 10 + + + decimal(20,4 digit)|0s + 11 + + + decimal(20,4 digit)|0s + 12 + + + decimal(20,4 digit)|0s + 13 + + + decimal(20,4 digit)|0s + 14 + + + decimal(20,4 digit)|0s + 15 + + + decimal(20,4 digit)|0s + 16 + + + decimal(20,4 digit)|0s + 17 + + + decimal(20,4 digit)|0s + 18 + + + decimal(20,4 digit)|0s + 19 + + + decimal(20,4 digit)|0s + 20 + + + decimal(20,4 digit)|0s + 21 + + + decimal(20,4 digit)|0s + 22 + + + decimal(20,4 digit)|0s + 23 + + + decimal(20,4 digit)|0s + 24 + + + decimal(20,4 digit)|0s + 25 + + + decimal(20,4 digit)|0s + 26 + + + decimal(20,4 digit)|0s + 27 + + + decimal(20,4 digit)|0s + 28 + + + decimal(20,4 digit)|0s + 29 + + + decimal(20,4 digit)|0s + 30 + + + decimal(20,4 digit)|0s + 31 + + + decimal(20,4 digit)|0s + 32 + + + decimal(20,4 digit)|0s + 33 + + + decimal(20,4 digit)|0s + 34 + + + decimal(20,4 digit)|0s + 35 + + + decimal(20,4 digit)|0s + 36 + + + decimal(20,4 digit)|0s + 37 + + + decimal(20,4 digit)|0s + 38 + + + decimal(20,4 digit)|0s + 39 + + + decimal(20,4 digit)|0s + 40 + + + decimal(20,4 digit)|0s + 41 + + + decimal(20,4 digit)|0s + 42 + + + decimal(20,4 digit)|0s + 43 + + + decimal(20,4 digit)|0s + 44 + + + decimal(20,4 digit)|0s + 45 + + + decimal(20,4 digit)|0s + 46 + + + decimal(20,4 digit)|0s + 47 + + + decimal(20,4 digit)|0s + 48 + + + decimal(20,4 digit)|0s + 49 + + + decimal(20,4 digit)|0s + 50 + + + decimal(20,4 digit)|0s + 51 + + + decimal(20,4 digit)|0s + 52 + + + decimal(20,4 digit)|0s + 53 + + + decimal(20,4 digit)|0s + 54 + + + decimal(20,4 digit)|0s + 55 + + + decimal(20,4 digit)|0s + 56 + + + decimal(20,4 digit)|0s + 57 + + + decimal(20,4 digit)|0s + 58 + + + decimal(20,4 digit)|0s + 59 + + + decimal(20,4 digit)|0s + 60 + + + decimal(20,4 digit)|0s + 61 + + + decimal(20,4 digit)|0s + 62 + + + decimal(20,4 digit)|0s + 63 + + + decimal(20,4 digit)|0s + 64 + + + decimal(20,4 digit)|0s + 65 + + + decimal(20,4 digit)|0s + 66 + + + decimal(20,4 digit)|0s + 67 + + + decimal(20,4 digit)|0s + 68 + + + decimal(20,4 digit)|0s + 69 + + + decimal(20,4 digit)|0s + 70 + + + decimal(20,4 digit)|0s + 71 + + + decimal(20,4 digit)|0s + 72 + + + decimal(20,4 digit)|0s + 73 + + + decimal(20,4 digit)|0s + 74 + + + decimal(20,4 digit)|0s + 75 + + + decimal(20,4 digit)|0s + 76 + + + decimal(20,4 digit)|0s + 77 + + + decimal(20,4 digit)|0s + 78 + + + decimal(20,4 digit)|0s + 79 + + + decimal(20,4 digit)|0s + 80 + + + decimal(20,4 digit)|0s + 81 + + + decimal(20,4 digit)|0s + 82 + + + decimal(20,4 digit)|0s + 83 + + + decimal(20,4 digit)|0s + 84 + + + decimal(20,4 digit)|0s + 85 + + + decimal(20,4 digit)|0s + 86 + + + decimal(20,4 digit)|0s + 87 + + + decimal(20,4 digit)|0s + 88 + + + decimal(20,4 digit)|0s + 89 + + + decimal(20,4 digit)|0s + 90 + + + decimal(20,4 digit)|0s + 91 + + + decimal(20,4 digit)|0s + 92 + + + decimal(20,4 digit)|0s + 93 + + + decimal(20,4 digit)|0s + 94 + + + decimal(20,4 digit)|0s + 95 + + + decimal(20,4 digit)|0s + 96 + + + decimal(20,4 digit)|0s + 97 + + + decimal(20,4 digit)|0s + 98 + + + decimal(20,4 digit)|0s + 99 + + + decimal(20,4 digit)|0s + 100 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 项目编号 + varchar(255)|0s + 2 + + + 项目名称 + varchar(255)|0s + 3 + + + 开始日期 + varchar(255)|0s + 4 + + + 截止日期 + varchar(255)|0s + 5 + + + 参与条件 + varchar(255)|0s + 6 + + + 激励标准 + varchar(255)|0s + 7 + + + 有效性判定 + varchar(255)|0s + 8 + + + 基线计算规则 + varchar(255)|0s + 1 + 9 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 用户编号 + varchar(255)|0s + 2 + + + 第一联系人 + varchar(255)|0s + 3 + + + 第一联系人联系方式 + varchar(255)|0s + 4 + + + 第二联系人 + varchar(255)|0s + 5 + + + 第二联系人联系方式 + varchar(255)|0s + 6 + + + 代理协议 + varchar(255)|0s + 1 + 7 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + varchar(255)|0s + 2 + + + varchar(255)|0s + 3 + + + varchar(255)|0s + 4 + + + varchar(255)|0s + 5 + + + varchar(255)|0s + 6 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + varchar(255)|0s + 2 + + + varchar(255)|0s + 3 + + + varchar(255)|0s + 4 + + + varchar(255)|0s + 5 + + + varchar(255)|0s + 6 + + + varchar(255)|0s + 7 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 用户编号 + varchar(255)|0s + 2 + + + 事件编号 + varchar(255)|0s + 3 + + + 是否参与 + varchar(255)|0s + 4 + + + 反馈响应量 + varchar(255)|0s + 5 + + + 反馈途径 + varchar(255)|0s + 6 + + + 反馈时间 + varchar(255)|0s + 7 + + + 运行负荷 + varchar(255)|0s + 8 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 代理用户户号 + varchar(255)|0s + 2 + + + 运行日期 + varchar(255)|0s + 3 + + + 事件编号 + varchar(255)|0s + 4 + + + 1 + 1 + id + + + 1 + 编号 + bigint(20)|0s + 1 + 1 + + + 表名称 + varchar(200)|0s + '' + 2 + + + 表描述 + varchar(500)|0s + '' + 3 + + + 关联子表的表名 + varchar(64)|0s + 4 + + + 子表关联的外键名 + varchar(64)|0s + 5 + + + 实体类名称 + varchar(100)|0s + '' + 6 + + + 使用的模板(crud单表操作 tree树表操作) + varchar(200)|0s + 'crud' + 7 + + + 生成包路径 + varchar(100)|0s + 8 + + + 生成模块名 + varchar(30)|0s + 9 + + + 生成业务名 + varchar(30)|0s + 10 + + + 生成功能名 + varchar(50)|0s + 11 + + + 生成功能作者 + varchar(50)|0s + 12 + + + 生成代码方式(0zip压缩包 1自定义路径) + char(1)|0s + '0' + 13 + + + 生成路径(不填默认项目路径) + varchar(200)|0s + '/' + 14 + + + 其它生成选项 + varchar(1000)|0s + 15 + + + 创建者 + varchar(64)|0s + '' + 16 + + + 创建时间 + datetime|0s + 17 + + + 更新者 + varchar(64)|0s + '' + 18 + + + 更新时间 + datetime|0s + 19 + + + 备注 + varchar(500)|0s + 20 + + + 1 + 1 + table_id + + + 1 + 编号 + bigint(20)|0s + 1 + 1 + + + 归属表编号 + varchar(64)|0s + 2 + + + 列名称 + varchar(200)|0s + 3 + + + 列描述 + varchar(500)|0s + 4 + + + 列类型 + varchar(100)|0s + 5 + + + JAVA类型 + varchar(500)|0s + 6 + + + JAVA字段名 + varchar(200)|0s + 7 + + + 是否主键(1是) + char(1)|0s + 8 + + + 是否自增(1是) + char(1)|0s + 9 + + + 是否必填(1是) + char(1)|0s + 10 + + + 是否为插入字段(1是) + char(1)|0s + 11 + + + 是否编辑字段(1是) + char(1)|0s + 12 + + + 是否列表字段(1是) + char(1)|0s + 13 + + + 是否查询字段(1是) + char(1)|0s + 14 + + + 查询方式(等于、不等于、大于、小于、范围) + varchar(200)|0s + 'EQ' + 15 + + + 显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件) + varchar(200)|0s + 16 + + + 字典类型 + varchar(200)|0s + '' + 17 + + + 排序 + int(11)|0s + 18 + + + 创建者 + varchar(64)|0s + '' + 19 + + + 创建时间 + datetime|0s + 20 + + + 更新者 + varchar(64)|0s + '' + 21 + + + 更新时间 + datetime|0s + 22 + + + 1 + 1 + column_id + + + 1 + int(11)|0s + 1 + 1 + + + 需求响应事件编号 + varchar(64)|0s + 2 + + + 签约用户户号 + varchar(64)|0s + 3 + + + 基线类型:0-4.12 用户基线,1-4.8 用户总负荷 + tinyint(4)|0s + 4 + + + 日期 + date|0s + 1 + 5 + + + decimal(20,4 digit)|0s + 6 + + + decimal(20,4 digit)|0s + 7 + + + decimal(20,4 digit)|0s + 8 + + + decimal(20,4 digit)|0s + 9 + + + decimal(20,4 digit)|0s + 10 + + + decimal(20,4 digit)|0s + 11 + + + decimal(20,4 digit)|0s + 12 + + + decimal(20,4 digit)|0s + 13 + + + decimal(20,4 digit)|0s + 14 + + + decimal(20,4 digit)|0s + 15 + + + decimal(20,4 digit)|0s + 16 + + + decimal(20,4 digit)|0s + 17 + + + decimal(20,4 digit)|0s + 18 + + + decimal(20,4 digit)|0s + 19 + + + decimal(20,4 digit)|0s + 20 + + + decimal(20,4 digit)|0s + 21 + + + decimal(20,4 digit)|0s + 22 + + + decimal(20,4 digit)|0s + 23 + + + decimal(20,4 digit)|0s + 24 + + + decimal(20,4 digit)|0s + 25 + + + decimal(20,4 digit)|0s + 26 + + + decimal(20,4 digit)|0s + 27 + + + decimal(20,4 digit)|0s + 28 + + + decimal(20,4 digit)|0s + 29 + + + decimal(20,4 digit)|0s + 30 + + + decimal(20,4 digit)|0s + 31 + + + decimal(20,4 digit)|0s + 32 + + + decimal(20,4 digit)|0s + 33 + + + decimal(20,4 digit)|0s + 34 + + + decimal(20,4 digit)|0s + 35 + + + decimal(20,4 digit)|0s + 36 + + + decimal(20,4 digit)|0s + 37 + + + decimal(20,4 digit)|0s + 38 + + + decimal(20,4 digit)|0s + 39 + + + decimal(20,4 digit)|0s + 40 + + + decimal(20,4 digit)|0s + 41 + + + decimal(20,4 digit)|0s + 42 + + + decimal(20,4 digit)|0s + 43 + + + decimal(20,4 digit)|0s + 44 + + + decimal(20,4 digit)|0s + 45 + + + decimal(20,4 digit)|0s + 46 + + + decimal(20,4 digit)|0s + 47 + + + decimal(20,4 digit)|0s + 48 + + + decimal(20,4 digit)|0s + 49 + + + decimal(20,4 digit)|0s + 50 + + + decimal(20,4 digit)|0s + 51 + + + decimal(20,4 digit)|0s + 52 + + + decimal(20,4 digit)|0s + 53 + + + decimal(20,4 digit)|0s + 54 + + + decimal(20,4 digit)|0s + 55 + + + decimal(20,4 digit)|0s + 56 + + + decimal(20,4 digit)|0s + 57 + + + decimal(20,4 digit)|0s + 58 + + + decimal(20,4 digit)|0s + 59 + + + decimal(20,4 digit)|0s + 60 + + + decimal(20,4 digit)|0s + 61 + + + decimal(20,4 digit)|0s + 62 + + + decimal(20,4 digit)|0s + 63 + + + decimal(20,4 digit)|0s + 64 + + + decimal(20,4 digit)|0s + 65 + + + decimal(20,4 digit)|0s + 66 + + + decimal(20,4 digit)|0s + 67 + + + decimal(20,4 digit)|0s + 68 + + + decimal(20,4 digit)|0s + 69 + + + decimal(20,4 digit)|0s + 70 + + + decimal(20,4 digit)|0s + 71 + + + decimal(20,4 digit)|0s + 72 + + + decimal(20,4 digit)|0s + 73 + + + decimal(20,4 digit)|0s + 74 + + + decimal(20,4 digit)|0s + 75 + + + decimal(20,4 digit)|0s + 76 + + + decimal(20,4 digit)|0s + 77 + + + decimal(20,4 digit)|0s + 78 + + + decimal(20,4 digit)|0s + 79 + + + decimal(20,4 digit)|0s + 80 + + + decimal(20,4 digit)|0s + 81 + + + decimal(20,4 digit)|0s + 82 + + + decimal(20,4 digit)|0s + 83 + + + decimal(20,4 digit)|0s + 84 + + + decimal(20,4 digit)|0s + 85 + + + decimal(20,4 digit)|0s + 86 + + + decimal(20,4 digit)|0s + 87 + + + decimal(20,4 digit)|0s + 88 + + + decimal(20,4 digit)|0s + 89 + + + decimal(20,4 digit)|0s + 90 + + + decimal(20,4 digit)|0s + 91 + + + decimal(20,4 digit)|0s + 92 + + + decimal(20,4 digit)|0s + 93 + + + decimal(20,4 digit)|0s + 94 + + + decimal(20,4 digit)|0s + 95 + + + decimal(20,4 digit)|0s + 96 + + + decimal(20,4 digit)|0s + 97 + + + decimal(20,4 digit)|0s + 98 + + + decimal(20,4 digit)|0s + 99 + + + decimal(20,4 digit)|0s + 100 + + + decimal(20,4 digit)|0s + 101 + + + decimal(20,4 digit)|0s + 102 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 103 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 104 + utf8_general_ci + + + 创建时间 + datetime|0s + 105 + + + 更新者 + varchar(64)|0s + '' + 106 + utf8_general_ci + + + 更新时间 + datetime|0s + 107 + + + event_no + btree + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 需求响应事件编号 + varchar(64)|0s + 2 + + + 聚合商编号 + varchar(64)|0s + 3 + + + 基线类型:0-负荷聚合商基线 + tinyint(4)|0s + 4 + + + 日期 + date|0s + 1 + 5 + + + decimal(20,4 digit)|0s + 6 + + + decimal(20,4 digit)|0s + 7 + + + decimal(20,4 digit)|0s + 8 + + + decimal(20,4 digit)|0s + 9 + + + decimal(20,4 digit)|0s + 10 + + + decimal(20,4 digit)|0s + 11 + + + decimal(20,4 digit)|0s + 12 + + + decimal(20,4 digit)|0s + 13 + + + decimal(20,4 digit)|0s + 14 + + + decimal(20,4 digit)|0s + 15 + + + decimal(20,4 digit)|0s + 16 + + + decimal(20,4 digit)|0s + 17 + + + decimal(20,4 digit)|0s + 18 + + + decimal(20,4 digit)|0s + 19 + + + decimal(20,4 digit)|0s + 20 + + + decimal(20,4 digit)|0s + 21 + + + decimal(20,4 digit)|0s + 22 + + + decimal(20,4 digit)|0s + 23 + + + decimal(20,4 digit)|0s + 24 + + + decimal(20,4 digit)|0s + 25 + + + decimal(20,4 digit)|0s + 26 + + + decimal(20,4 digit)|0s + 27 + + + decimal(20,4 digit)|0s + 28 + + + decimal(20,4 digit)|0s + 29 + + + decimal(20,4 digit)|0s + 30 + + + decimal(20,4 digit)|0s + 31 + + + decimal(20,4 digit)|0s + 32 + + + decimal(20,4 digit)|0s + 33 + + + decimal(20,4 digit)|0s + 34 + + + decimal(20,4 digit)|0s + 35 + + + decimal(20,4 digit)|0s + 36 + + + decimal(20,4 digit)|0s + 37 + + + decimal(20,4 digit)|0s + 38 + + + decimal(20,4 digit)|0s + 39 + + + decimal(20,4 digit)|0s + 40 + + + decimal(20,4 digit)|0s + 41 + + + decimal(20,4 digit)|0s + 42 + + + decimal(20,4 digit)|0s + 43 + + + decimal(20,4 digit)|0s + 44 + + + decimal(20,4 digit)|0s + 45 + + + decimal(20,4 digit)|0s + 46 + + + decimal(20,4 digit)|0s + 47 + + + decimal(20,4 digit)|0s + 48 + + + decimal(20,4 digit)|0s + 49 + + + decimal(20,4 digit)|0s + 50 + + + decimal(20,4 digit)|0s + 51 + + + decimal(20,4 digit)|0s + 52 + + + decimal(20,4 digit)|0s + 53 + + + decimal(20,4 digit)|0s + 54 + + + decimal(20,4 digit)|0s + 55 + + + decimal(20,4 digit)|0s + 56 + + + decimal(20,4 digit)|0s + 57 + + + decimal(20,4 digit)|0s + 58 + + + decimal(20,4 digit)|0s + 59 + + + decimal(20,4 digit)|0s + 60 + + + decimal(20,4 digit)|0s + 61 + + + decimal(20,4 digit)|0s + 62 + + + decimal(20,4 digit)|0s + 63 + + + decimal(20,4 digit)|0s + 64 + + + decimal(20,4 digit)|0s + 65 + + + decimal(20,4 digit)|0s + 66 + + + decimal(20,4 digit)|0s + 67 + + + decimal(20,4 digit)|0s + 68 + + + decimal(20,4 digit)|0s + 69 + + + decimal(20,4 digit)|0s + 70 + + + decimal(20,4 digit)|0s + 71 + + + decimal(20,4 digit)|0s + 72 + + + decimal(20,4 digit)|0s + 73 + + + decimal(20,4 digit)|0s + 74 + + + decimal(20,4 digit)|0s + 75 + + + decimal(20,4 digit)|0s + 76 + + + decimal(20,4 digit)|0s + 77 + + + decimal(20,4 digit)|0s + 78 + + + decimal(20,4 digit)|0s + 79 + + + decimal(20,4 digit)|0s + 80 + + + decimal(20,4 digit)|0s + 81 + + + decimal(20,4 digit)|0s + 82 + + + decimal(20,4 digit)|0s + 83 + + + decimal(20,4 digit)|0s + 84 + + + decimal(20,4 digit)|0s + 85 + + + decimal(20,4 digit)|0s + 86 + + + decimal(20,4 digit)|0s + 87 + + + decimal(20,4 digit)|0s + 88 + + + decimal(20,4 digit)|0s + 89 + + + decimal(20,4 digit)|0s + 90 + + + decimal(20,4 digit)|0s + 91 + + + decimal(20,4 digit)|0s + 92 + + + decimal(20,4 digit)|0s + 93 + + + decimal(20,4 digit)|0s + 94 + + + decimal(20,4 digit)|0s + 95 + + + decimal(20,4 digit)|0s + 96 + + + decimal(20,4 digit)|0s + 97 + + + decimal(20,4 digit)|0s + 98 + + + decimal(20,4 digit)|0s + 99 + + + decimal(20,4 digit)|0s + 100 + + + decimal(20,4 digit)|0s + 101 + + + decimal(20,4 digit)|0s + 102 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 103 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 104 + utf8_general_ci + + + 创建时间 + datetime|0s + 105 + + + 更新者 + varchar(64)|0s + '' + 106 + utf8_general_ci + + + 更新时间 + datetime|0s + 107 + + + event_no + btree + + + 1 + 1 + id + + + 1 + 主键 + int(11)|0s + 1 + 1 + + + 需求响应事件id + int(11)|0s + 2 + + + 需求响应事件编号 + varchar(64)|0s + 3 + + + 用户编号 + varchar(64)|0s + 4 + + + 执行量,单位kW + varchar(16)|0s + 5 + + + 计划执行量 + varchar(16)|0s + 6 + + + 确认回复 + tinyint(4)|0s + 7 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 8 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 9 + utf8_general_ci + + + 创建时间 + datetime|0s + 10 + + + 更新者 + varchar(64)|0s + '' + 11 + utf8_general_ci + + + 更新时间 + datetime|0s + 12 + + + event_id + btree + + + event_no + btree + + + 1 + 1 + id + + + 1 + 主键 + int(11) unsigned zerofill|0s + 1 + 1 + + + 需求响应事件id + int(11)|0s + 2 + + + 事件编号 + varchar(64)|0s + 3 + + + 执行事件名 + varchar(64)|0s + 4 + + + 聚合商编号 + varchar(64)|0s + 5 + + + 响应类型 + varchar(4)|0s + 6 + + + 时间类型 + varchar(4)|0s + 7 + + + 提前通知时长 + varchar(4)|0s + 8 + + + 响应日期 + date|0s + 9 + + + 开始时间 + datetime|0s + 10 + + + 结束时间 + datetime|0s + 11 + + + 执行响应量,单位kW + varchar(16)|0s + 12 + + + 事件状态 + char(1)|0s + 13 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 14 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 15 + utf8_general_ci + + + 创建时间 + datetime|0s + 16 + + + 更新者 + varchar(64)|0s + '' + 17 + utf8_general_ci + + + 更新时间 + datetime|0s + 18 + + + event_id + btree + + + event_no + btree + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 事件编号 + varchar(255)|0s + 2 + + + 电力用户编号 + varchar(255)|0s + 3 + + + 认约负荷 + decimal(10,2 digit)|0s + 4 + + + 基线最大负荷 + decimal(10,2 digit)|0s + 5 + + + 基线最小负荷 + decimal(10,2 digit)|0s + 6 + + + 基线平均负荷 + decimal(10,2 digit)|0s + 7 + + + 实际最大负荷 + decimal(10,2 digit)|0s + 8 + + + 实际最小负荷 + decimal(10,2 digit)|0s + 9 + + + 实际平均负荷 + decimal(10,2 digit)|0s + 10 + + + 实际响应负荷 + decimal(10,2 digit)|0s + 11 + + + 有效影响时长 + decimal(10,2 digit)|0s + 12 + + + 是否有效响应 + varchar(255)|0s + 13 + + + varchar(255)|0s + 14 + + + datetime|0s + 15 + + + varchar(255)|0s + 16 + + + datetime|0s + 17 + + + varchar(255)|0s + 18 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 事件编号 + varchar(255)|0s + 2 + + + 聚合商编号 + varchar(255)|0s + 3 + + + 认约负荷 + decimal(10,2 digit)|0s + 4 + + + 基线最大负荷 + decimal(10,2 digit)|0s + 5 + + + 基线最小负荷 + decimal(10,2 digit)|0s + 6 + + + 基线平均负荷 + decimal(10,2 digit)|0s + 7 + + + 实际最大负荷 + decimal(10,2 digit)|0s + 8 + + + 实际最小负荷 + decimal(10,2 digit)|0s + 9 + + + 实际平均负荷 + decimal(10,2 digit)|0s + 10 + + + 实际响应负荷 + decimal(10,2 digit)|0s + 11 + + + 有效影响时长 + decimal(10,2 digit)|0s + 12 + + + 是否有效响应 + varchar(255)|0s + 13 + + + varchar(255)|0s + 14 + + + datetime|0s + 15 + + + varchar(255)|0s + 16 + + + datetime|0s + 17 + + + varchar(255)|0s + 18 + + + 1 + 1 + id + + + 1 + 主键 + int(11)|0s + 1 + 1 + + + 需求响应事件id + int(11)|0s + 2 + + + 需求响应事件编号 + varchar(64)|0s + 3 + + + 用户编号 + varchar(64)|0s + 4 + + + 邀约响应量,单位KW + varchar(16)|0s + 5 + + + 确认响应量,单位KW + varchar(16)|0s + 6 + + + 是否被选择:0未被选择,1被选择 + tinyint(4)|0s + 0 + 7 + + + 是否被邀约:0否,1是 + tinyint(4)|0s + 8 + + + 是否参与:0不参与,1参与 + tinyint(4)|0s + 9 + + + 反馈省公司标识 未反馈-1 已反馈-0 + varchar(1)|0s + 10 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 11 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 12 + utf8_general_ci + + + 创建时间 + datetime|0s + 13 + + + 更新者 + varchar(64)|0s + '' + 14 + utf8_general_ci + + + 更新时间 + datetime|0s + 15 + + + event_id + btree + + + event_no + btree + + + 1 + 1 + id + + + 1 + 主键 + int(11)|0s + 1 + 1 + + + 事件编号 + varchar(64)|0s + 2 + + + 事件名称 + varchar(128)|0s + 3 + + + 所属项目编号 + varchar(64)|0s + 4 + + + 负荷聚合商编号 + varchar(64)|0s + 5 + + + 响应类型 + varchar(4)|0s + 6 + + + 时间类型 + varchar(4)|0s + 7 + + + 提前通知时长 + varchar(4)|0s + 8 + + + 响应日期 + date|0s + 9 + + + 开始时间 + datetime|0s + 10 + + + 结束时间 + datetime|0s + 11 + + + 邀约时间 + datetime|0s + 12 + + + 反馈截止时间 + datetime|0s + 13 + + + 邀约响应量 + varchar(16)|0s + 14 + + + 反馈响应量 + varchar(16)|0s + 15 + + + 邀请反馈截止时间 + datetime|0s + 16 + + + 邀请方式:0短信邀请,1web端邀请,2移动端邀请 + tinyint(4)|0s + 17 + + + 是否可修改响应量:0否,1是 + tinyint(4)|0s + 18 + + + 事件状态 + tinyint(4)|0s + 19 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 20 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 21 + utf8_general_ci + + + 创建时间 + datetime|0s + 22 + + + 更新者 + varchar(64)|0s + '' + 23 + utf8_general_ci + + + 更新时间 + datetime|0s + 24 + + + 聚合方案id + varchar(64)|0s + 25 + + + event_no + btree + + + 1 + 1 + id + + + 1 + 主键 + int(11)|0s + 1 + 1 + + + 负荷聚合商编号 + varchar(64)|0s + 2 + + + 事件编号 + varchar(64)|0s + 3 + + + 运行时刻 + varchar(64)|0s + 4 + + + 基线负荷 + decimal(10,2 digit)|0s + 5 + + + 基线最大负荷 + decimal(10,2 digit)|0s + 6 + + + 基线最小负荷 + decimal(10,2 digit)|0s + 7 + + + 运行负荷 + decimal(10,2 digit)|0s + 8 + + + 实时执行负荷 + decimal(10,2 digit)|0s + 9 + + + 实时执行率 + decimal(10,2 digit)|0s + 10 + + + 是否越界:(是:Y,否:N) + char(1)|0s + 11 + + + 是否达标:(是:Y,否:N) + char(1)|0s + 12 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 13 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 14 + utf8_general_ci + + + 创建时间 + datetime|0s + 15 + + + 更新者 + varchar(64)|0s + '' + 16 + utf8_general_ci + + + 更新时间 + datetime|0s + 17 + + + cust_no + btree + + + event_no + btree + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 项目编号 + varchar(255)|0s + 2 + + + 项目名称 + varchar(255)|0s + 3 + + + 开始日期 + date|0s + 4 + + + 截止日期 + date|0s + 5 + + + 参与条件 + varchar(255)|0s + 6 + + + 激励标准 + varchar(255)|0s + 7 + + + 有效性判断 + varchar(255)|0s + 8 + + + 基线计算规则 + varchar(255)|0s + 9 + + + varchar(255)|0s + 10 + + + datetime|0s + 11 + + + varchar(255)|0s + 12 + + + datetime|0s + 13 + + + varchar(255)|0s + 14 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 项目编号 + varchar(255)|0s + 2 + + + 聚合商编号 + varchar(255)|0s + 3 + + + 第一联系人 + varchar(255)|0s + 4 + + + 第一联系人联系方式 + varchar(255)|0s + 5 + + + 第二联系人 + varchar(255)|0s + 6 + + + 第二联系人联系方式 + varchar(255)|0s + 7 + + + 项目协议 + varchar(255)|0s + 8 + + + varchar(255)|0s + 9 + + + datetime|0s + 10 + + + varchar(255)|0s + 11 + + + datetime|0s + 12 + + + varchar(255)|0s + 13 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 项目编号 + varchar(255)|0s + 2 + + + 聚合商编号 + varchar(255)|0s + 3 + + + 响应类型 + varchar(255)|0s + 4 + + + 时间类型 + varchar(255)|0s + 5 + + + 提前通知时长 + varchar(255)|0s + 6 + + + 签约容量 + varchar(255)|0s + 7 + + + 备用容量 + varchar(255)|0s + 8 + + + varchar(255)|0s + 9 + + + datetime|0s + 10 + + + varchar(255)|0s + 11 + + + datetime|0s + 12 + + + varchar(255)|0s + 13 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 项目编号 + varchar(255)|0s + 2 + + + 电力用户编号 + varchar(255)|0s + 3 + + + 第一联系人 + varchar(255)|0s + 4 + + + 第一联系人联系方式 + varchar(255)|0s + 5 + + + 第二联系人 + varchar(255)|0s + 6 + + + 第二联系人联系方式 + varchar(255)|0s + 7 + + + 项目协议 + varchar(255)|0s + 8 + + + varchar(255)|0s + 9 + + + datetime|0s + 10 + + + varchar(255)|0s + 11 + + + datetime|0s + 12 + + + varchar(255)|0s + 13 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 项目编号 + varchar(255)|0s + 2 + + + 电力用户编号 + varchar(255)|0s + 3 + + + 响应类型 + varchar(255)|0s + 4 + + + 时间类型 + varchar(255)|0s + 5 + + + 提前通知时长 + varchar(255)|0s + 6 + + + 签约容量 + varchar(255)|0s + 7 + + + 备用容量 + varchar(255)|0s + 8 + + + varchar(255)|0s + 9 + + + datetime|0s + 10 + + + varchar(255)|0s + 11 + + + datetime|0s + 12 + + + varchar(255)|0s + 13 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 事件编号 + varchar(255)|0s + 2 + + + 电力用户编号 + varchar(255)|0s + 3 + + + 实际响应负荷 + decimal(10,2 digit)|0s + 4 + + + 邀约反馈负荷 + decimal(10,2 digit)|0s + 5 + + + 核定响应符合 + decimal(10,2 digit)|0s + 6 + + + 负荷单价 + decimal(10,2 digit)|0s + 7 + + + 激励金额 + decimal(10,2 digit)|0s + 8 + + + 分成比例 + decimal(10,2 digit)|0s + 9 + + + 实际结算金额 + decimal(10,2 digit)|0s + 10 + + + 聚合商结算金额(由用户结算金额和分成比例倒推得出) + decimal(10,2 digit)|0s + 11 + + + varchar(255)|0s + 12 + + + datetime|0s + 13 + + + varchar(255)|0s + 14 + + + datetime|0s + 15 + + + varchar(255)|0s + 16 + + + 1 + 1 + id + + + int(11)|0s + 1 + + + 设备id + varchar(32)|0s + 1 + 2 + + + 数据检测时间 + date|0s + 1 + 3 + + + 电量类型 + varchar(255)|0s + 1 + 4 + + + decimal(20,4 digit)|0s + 5 + + + decimal(20,4 digit)|0s + 6 + + + decimal(20,4 digit)|0s + 7 + + + decimal(20,4 digit)|0s + 8 + + + decimal(20,4 digit)|0s + 9 + + + decimal(20,4 digit)|0s + 10 + + + decimal(20,4 digit)|0s + 11 + + + decimal(20,4 digit)|0s + 12 + + + decimal(20,4 digit)|0s + 13 + + + decimal(20,4 digit)|0s + 14 + + + decimal(20,4 digit)|0s + 15 + + + decimal(20,4 digit)|0s + 16 + + + decimal(20,4 digit)|0s + 17 + + + decimal(20,4 digit)|0s + 18 + + + decimal(20,4 digit)|0s + 19 + + + decimal(20,4 digit)|0s + 20 + + + decimal(20,4 digit)|0s + 21 + + + decimal(20,4 digit)|0s + 22 + + + decimal(20,4 digit)|0s + 23 + + + decimal(20,4 digit)|0s + 24 + + + decimal(20,4 digit)|0s + 25 + + + decimal(20,4 digit)|0s + 26 + + + decimal(20,4 digit)|0s + 27 + + + decimal(20,4 digit)|0s + 28 + + + decimal(20,4 digit)|0s + 29 + + + 1 + 1 + dev_id +elec_dt +elec_type + + + 指标名称 + varchar(255)|0s + 1 + 1 + + + 指标编码 + varchar(255)|0s + 1 + 2 + + + 指标值 + varchar(255)|0s + 3 + + + 保存时间 + datetime|0s + 1 + 4 + + + 1 + 1 + index_code +save_date + + + int(11)|0s + 1 + + + 设备id + varchar(32)|0s + 1 + 2 + + + 数据检测时间 + date|0s + 1 + 3 + + + decimal(16,4 digit)|0s + 4 + + + decimal(16,4 digit)|0s + 5 + + + decimal(16,4 digit)|0s + 6 + + + decimal(16,4 digit)|0s + 7 + + + decimal(16,4 digit)|0s + 8 + + + decimal(16,4 digit)|0s + 9 + + + decimal(16,4 digit)|0s + 10 + + + decimal(16,4 digit)|0s + 11 + + + decimal(16,4 digit)|0s + 12 + + + decimal(16,4 digit)|0s + 13 + + + decimal(16,4 digit)|0s + 14 + + + decimal(16,4 digit)|0s + 15 + + + decimal(16,4 digit)|0s + 16 + + + decimal(16,4 digit)|0s + 17 + + + decimal(16,4 digit)|0s + 18 + + + decimal(16,4 digit)|0s + 19 + + + decimal(16,4 digit)|0s + 20 + + + decimal(16,4 digit)|0s + 21 + + + decimal(16,4 digit)|0s + 22 + + + decimal(16,4 digit)|0s + 23 + + + decimal(16,4 digit)|0s + 24 + + + decimal(16,4 digit)|0s + 25 + + + decimal(16,4 digit)|0s + 26 + + + decimal(16,4 digit)|0s + 27 + + + decimal(16,4 digit)|0s + 28 + + + decimal(16,4 digit)|0s + 29 + + + decimal(16,4 digit)|0s + 30 + + + decimal(16,4 digit)|0s + 31 + + + decimal(16,4 digit)|0s + 32 + + + decimal(16,4 digit)|0s + 33 + + + decimal(16,4 digit)|0s + 34 + + + decimal(16,4 digit)|0s + 35 + + + decimal(16,4 digit)|0s + 36 + + + decimal(16,4 digit)|0s + 37 + + + decimal(16,4 digit)|0s + 38 + + + decimal(16,4 digit)|0s + 39 + + + decimal(16,4 digit)|0s + 40 + + + decimal(16,4 digit)|0s + 41 + + + decimal(16,4 digit)|0s + 42 + + + decimal(16,4 digit)|0s + 43 + + + decimal(16,4 digit)|0s + 44 + + + decimal(16,4 digit)|0s + 45 + + + decimal(16,4 digit)|0s + 46 + + + decimal(16,4 digit)|0s + 47 + + + decimal(16,4 digit)|0s + 48 + + + decimal(16,4 digit)|0s + 49 + + + decimal(16,4 digit)|0s + 50 + + + decimal(16,4 digit)|0s + 51 + + + decimal(16,4 digit)|0s + 52 + + + decimal(16,4 digit)|0s + 53 + + + decimal(16,4 digit)|0s + 54 + + + decimal(16,4 digit)|0s + 55 + + + decimal(16,4 digit)|0s + 56 + + + decimal(16,4 digit)|0s + 57 + + + decimal(16,4 digit)|0s + 58 + + + decimal(16,4 digit)|0s + 59 + + + decimal(16,4 digit)|0s + 60 + + + decimal(16,4 digit)|0s + 61 + + + decimal(16,4 digit)|0s + 62 + + + decimal(16,4 digit)|0s + 63 + + + decimal(16,4 digit)|0s + 64 + + + decimal(16,4 digit)|0s + 65 + + + decimal(16,4 digit)|0s + 66 + + + decimal(16,4 digit)|0s + 67 + + + decimal(16,4 digit)|0s + 68 + + + decimal(16,4 digit)|0s + 69 + + + decimal(16,4 digit)|0s + 70 + + + decimal(16,4 digit)|0s + 71 + + + decimal(16,4 digit)|0s + 72 + + + decimal(16,4 digit)|0s + 73 + + + decimal(16,4 digit)|0s + 74 + + + decimal(16,4 digit)|0s + 75 + + + decimal(16,4 digit)|0s + 76 + + + decimal(16,4 digit)|0s + 77 + + + decimal(16,4 digit)|0s + 78 + + + decimal(16,4 digit)|0s + 79 + + + decimal(16,4 digit)|0s + 80 + + + decimal(16,4 digit)|0s + 81 + + + decimal(16,4 digit)|0s + 82 + + + decimal(16,4 digit)|0s + 83 + + + decimal(16,4 digit)|0s + 84 + + + decimal(16,4 digit)|0s + 85 + + + decimal(16,4 digit)|0s + 86 + + + decimal(16,4 digit)|0s + 87 + + + decimal(16,4 digit)|0s + 88 + + + decimal(16,4 digit)|0s + 89 + + + decimal(16,4 digit)|0s + 90 + + + decimal(16,4 digit)|0s + 91 + + + decimal(16,4 digit)|0s + 92 + + + decimal(16,4 digit)|0s + 93 + + + decimal(16,4 digit)|0s + 94 + + + decimal(16,4 digit)|0s + 95 + + + decimal(16,4 digit)|0s + 96 + + + decimal(16,4 digit)|0s + 97 + + + decimal(16,4 digit)|0s + 98 + + + decimal(16,4 digit)|0s + 99 + + + decimal(16,4 digit)|0s + 100 + + + decimal(16,4 digit)|0s + 101 + + + decimal(16,4 digit)|0s + 102 + + + decimal(16,4 digit)|0s + 103 + + + decimal(16,4 digit)|0s + 104 + + + decimal(16,4 digit)|0s + 105 + + + decimal(16,4 digit)|0s + 106 + + + decimal(16,4 digit)|0s + 107 + + + decimal(16,4 digit)|0s + 108 + + + decimal(16,4 digit)|0s + 109 + + + decimal(16,4 digit)|0s + 110 + + + decimal(16,4 digit)|0s + 111 + + + decimal(16,4 digit)|0s + 112 + + + decimal(16,4 digit)|0s + 113 + + + decimal(16,4 digit)|0s + 114 + + + decimal(16,4 digit)|0s + 115 + + + decimal(16,4 digit)|0s + 116 + + + decimal(16,4 digit)|0s + 117 + + + decimal(16,4 digit)|0s + 118 + + + decimal(16,4 digit)|0s + 119 + + + decimal(16,4 digit)|0s + 120 + + + decimal(16,4 digit)|0s + 121 + + + decimal(16,4 digit)|0s + 122 + + + decimal(16,4 digit)|0s + 123 + + + decimal(16,4 digit)|0s + 124 + + + decimal(16,4 digit)|0s + 125 + + + decimal(16,4 digit)|0s + 126 + + + decimal(16,4 digit)|0s + 127 + + + decimal(16,4 digit)|0s + 128 + + + decimal(16,4 digit)|0s + 129 + + + decimal(16,4 digit)|0s + 130 + + + decimal(16,4 digit)|0s + 131 + + + decimal(16,4 digit)|0s + 132 + + + decimal(16,4 digit)|0s + 133 + + + decimal(16,4 digit)|0s + 134 + + + decimal(16,4 digit)|0s + 135 + + + decimal(16,4 digit)|0s + 136 + + + decimal(16,4 digit)|0s + 137 + + + decimal(16,4 digit)|0s + 138 + + + decimal(16,4 digit)|0s + 139 + + + decimal(16,4 digit)|0s + 140 + + + decimal(16,4 digit)|0s + 141 + + + decimal(16,4 digit)|0s + 142 + + + decimal(16,4 digit)|0s + 143 + + + decimal(16,4 digit)|0s + 144 + + + decimal(16,4 digit)|0s + 145 + + + decimal(16,4 digit)|0s + 146 + + + decimal(16,4 digit)|0s + 147 + + + decimal(16,4 digit)|0s + 148 + + + decimal(16,4 digit)|0s + 149 + + + decimal(16,4 digit)|0s + 150 + + + decimal(16,4 digit)|0s + 151 + + + decimal(16,4 digit)|0s + 152 + + + decimal(16,4 digit)|0s + 153 + + + decimal(16,4 digit)|0s + 154 + + + decimal(16,4 digit)|0s + 155 + + + decimal(16,4 digit)|0s + 156 + + + decimal(16,4 digit)|0s + 157 + + + decimal(16,4 digit)|0s + 158 + + + decimal(16,4 digit)|0s + 159 + + + decimal(16,4 digit)|0s + 160 + + + decimal(16,4 digit)|0s + 161 + + + decimal(16,4 digit)|0s + 162 + + + decimal(16,4 digit)|0s + 163 + + + decimal(16,4 digit)|0s + 164 + + + decimal(16,4 digit)|0s + 165 + + + decimal(16,4 digit)|0s + 166 + + + decimal(16,4 digit)|0s + 167 + + + decimal(16,4 digit)|0s + 168 + + + decimal(16,4 digit)|0s + 169 + + + decimal(16,4 digit)|0s + 170 + + + decimal(16,4 digit)|0s + 171 + + + decimal(16,4 digit)|0s + 172 + + + decimal(16,4 digit)|0s + 173 + + + decimal(16,4 digit)|0s + 174 + + + decimal(16,4 digit)|0s + 175 + + + decimal(16,4 digit)|0s + 176 + + + decimal(16,4 digit)|0s + 177 + + + decimal(16,4 digit)|0s + 178 + + + decimal(16,4 digit)|0s + 179 + + + decimal(16,4 digit)|0s + 180 + + + decimal(16,4 digit)|0s + 181 + + + decimal(16,4 digit)|0s + 182 + + + decimal(16,4 digit)|0s + 183 + + + decimal(16,4 digit)|0s + 184 + + + decimal(16,4 digit)|0s + 185 + + + decimal(16,4 digit)|0s + 186 + + + decimal(16,4 digit)|0s + 187 + + + decimal(16,4 digit)|0s + 188 + + + decimal(16,4 digit)|0s + 189 + + + decimal(16,4 digit)|0s + 190 + + + decimal(16,4 digit)|0s + 191 + + + decimal(16,4 digit)|0s + 192 + + + decimal(16,4 digit)|0s + 193 + + + decimal(16,4 digit)|0s + 194 + + + decimal(16,4 digit)|0s + 195 + + + decimal(16,4 digit)|0s + 196 + + + decimal(16,4 digit)|0s + 197 + + + decimal(16,4 digit)|0s + 198 + + + decimal(16,4 digit)|0s + 199 + + + decimal(16,4 digit)|0s + 200 + + + decimal(16,4 digit)|0s + 201 + + + decimal(16,4 digit)|0s + 202 + + + decimal(16,4 digit)|0s + 203 + + + decimal(16,4 digit)|0s + 204 + + + decimal(16,4 digit)|0s + 205 + + + decimal(16,4 digit)|0s + 206 + + + decimal(16,4 digit)|0s + 207 + + + decimal(16,4 digit)|0s + 208 + + + decimal(16,4 digit)|0s + 209 + + + decimal(16,4 digit)|0s + 210 + + + decimal(16,4 digit)|0s + 211 + + + decimal(16,4 digit)|0s + 212 + + + decimal(16,4 digit)|0s + 213 + + + decimal(16,4 digit)|0s + 214 + + + decimal(16,4 digit)|0s + 215 + + + decimal(16,4 digit)|0s + 216 + + + decimal(16,4 digit)|0s + 217 + + + decimal(16,4 digit)|0s + 218 + + + decimal(16,4 digit)|0s + 219 + + + decimal(16,4 digit)|0s + 220 + + + decimal(16,4 digit)|0s + 221 + + + decimal(16,4 digit)|0s + 222 + + + decimal(16,4 digit)|0s + 223 + + + decimal(16,4 digit)|0s + 224 + + + decimal(16,4 digit)|0s + 225 + + + decimal(16,4 digit)|0s + 226 + + + decimal(16,4 digit)|0s + 227 + + + decimal(16,4 digit)|0s + 228 + + + decimal(16,4 digit)|0s + 229 + + + decimal(16,4 digit)|0s + 230 + + + decimal(16,4 digit)|0s + 231 + + + decimal(16,4 digit)|0s + 232 + + + decimal(16,4 digit)|0s + 233 + + + decimal(16,4 digit)|0s + 234 + + + decimal(16,4 digit)|0s + 235 + + + decimal(16,4 digit)|0s + 236 + + + decimal(16,4 digit)|0s + 237 + + + decimal(16,4 digit)|0s + 238 + + + decimal(16,4 digit)|0s + 239 + + + decimal(16,4 digit)|0s + 240 + + + decimal(16,4 digit)|0s + 241 + + + decimal(16,4 digit)|0s + 242 + + + decimal(16,4 digit)|0s + 243 + + + decimal(16,4 digit)|0s + 244 + + + decimal(16,4 digit)|0s + 245 + + + decimal(16,4 digit)|0s + 246 + + + decimal(16,4 digit)|0s + 247 + + + decimal(16,4 digit)|0s + 248 + + + decimal(16,4 digit)|0s + 249 + + + decimal(16,4 digit)|0s + 250 + + + decimal(16,4 digit)|0s + 251 + + + decimal(16,4 digit)|0s + 252 + + + decimal(16,4 digit)|0s + 253 + + + decimal(16,4 digit)|0s + 254 + + + decimal(16,4 digit)|0s + 255 + + + decimal(16,4 digit)|0s + 256 + + + decimal(16,4 digit)|0s + 257 + + + decimal(16,4 digit)|0s + 258 + + + decimal(16,4 digit)|0s + 259 + + + decimal(16,4 digit)|0s + 260 + + + decimal(16,4 digit)|0s + 261 + + + decimal(16,4 digit)|0s + 262 + + + decimal(16,4 digit)|0s + 263 + + + decimal(16,4 digit)|0s + 264 + + + decimal(16,4 digit)|0s + 265 + + + decimal(16,4 digit)|0s + 266 + + + decimal(16,4 digit)|0s + 267 + + + decimal(16,4 digit)|0s + 268 + + + decimal(16,4 digit)|0s + 269 + + + decimal(16,4 digit)|0s + 270 + + + decimal(16,4 digit)|0s + 271 + + + decimal(16,4 digit)|0s + 272 + + + decimal(16,4 digit)|0s + 273 + + + decimal(16,4 digit)|0s + 274 + + + decimal(16,4 digit)|0s + 275 + + + decimal(16,4 digit)|0s + 276 + + + decimal(16,4 digit)|0s + 277 + + + decimal(16,4 digit)|0s + 278 + + + decimal(16,4 digit)|0s + 279 + + + decimal(16,4 digit)|0s + 280 + + + decimal(16,4 digit)|0s + 281 + + + decimal(16,4 digit)|0s + 282 + + + decimal(16,4 digit)|0s + 283 + + + decimal(16,4 digit)|0s + 284 + + + decimal(16,4 digit)|0s + 285 + + + decimal(16,4 digit)|0s + 286 + + + decimal(16,4 digit)|0s + 287 + + + decimal(16,4 digit)|0s + 288 + + + decimal(16,4 digit)|0s + 289 + + + decimal(16,4 digit)|0s + 290 + + + decimal(16,4 digit)|0s + 291 + + + decimal(16,4 digit)|0s + 292 + + + varchar(50)|0s + 1 + 293 + + + 操作类型 0-无操作,1-新增/修改,2-删除 + varchar(2)|0s + 294 + + + 1 + 1 + dev_id +load_dt +load_type + + + 1 + int(11)|0s + 1 + 1 + + + 调峰事件编号 + varchar(64)|0s + 2 + + + 聚合商编号 + varchar(64)|0s + 3 + + + 基线类型:0-负荷聚合商基线 + tinyint(4)|0s + 4 + + + 日期 + date|0s + 1 + 5 + + + varchar(32)|0s + 6 + + + varchar(32)|0s + 7 + + + varchar(32)|0s + 8 + + + varchar(32)|0s + 9 + + + varchar(32)|0s + 10 + + + varchar(32)|0s + 11 + + + varchar(32)|0s + 12 + + + varchar(32)|0s + 13 + + + varchar(32)|0s + 14 + + + varchar(32)|0s + 15 + + + varchar(32)|0s + 16 + + + varchar(32)|0s + 17 + + + varchar(32)|0s + 18 + + + varchar(32)|0s + 19 + + + varchar(32)|0s + 20 + + + varchar(32)|0s + 21 + + + varchar(32)|0s + 22 + + + varchar(32)|0s + 23 + + + varchar(32)|0s + 24 + + + varchar(32)|0s + 25 + + + varchar(32)|0s + 26 + + + varchar(32)|0s + 27 + + + varchar(32)|0s + 28 + + + varchar(32)|0s + 29 + + + varchar(32)|0s + 30 + + + varchar(32)|0s + 31 + + + varchar(32)|0s + 32 + + + varchar(32)|0s + 33 + + + varchar(32)|0s + 34 + + + varchar(32)|0s + 35 + + + varchar(32)|0s + 36 + + + varchar(32)|0s + 37 + + + varchar(32)|0s + 38 + + + varchar(32)|0s + 39 + + + varchar(32)|0s + 40 + + + varchar(32)|0s + 41 + + + varchar(32)|0s + 42 + + + varchar(32)|0s + 43 + + + varchar(32)|0s + 44 + + + varchar(32)|0s + 45 + + + varchar(32)|0s + 46 + + + varchar(32)|0s + 47 + + + varchar(32)|0s + 48 + + + varchar(32)|0s + 49 + + + varchar(32)|0s + 50 + + + varchar(32)|0s + 51 + + + varchar(32)|0s + 52 + + + varchar(32)|0s + 53 + + + varchar(32)|0s + 54 + + + varchar(32)|0s + 55 + + + varchar(32)|0s + 56 + + + varchar(32)|0s + 57 + + + varchar(32)|0s + 58 + + + varchar(32)|0s + 59 + + + varchar(32)|0s + 60 + + + varchar(32)|0s + 61 + + + varchar(32)|0s + 62 + + + varchar(32)|0s + 63 + + + varchar(32)|0s + 64 + + + varchar(32)|0s + 65 + + + varchar(32)|0s + 66 + + + varchar(32)|0s + 67 + + + varchar(32)|0s + 68 + + + varchar(32)|0s + 69 + + + varchar(32)|0s + 70 + + + varchar(32)|0s + 71 + + + varchar(32)|0s + 72 + + + varchar(32)|0s + 73 + + + varchar(32)|0s + 74 + + + varchar(32)|0s + 75 + + + varchar(32)|0s + 76 + + + varchar(32)|0s + 77 + + + varchar(32)|0s + 78 + + + varchar(32)|0s + 79 + + + varchar(32)|0s + 80 + + + varchar(32)|0s + 81 + + + varchar(32)|0s + 82 + + + varchar(32)|0s + 83 + + + varchar(32)|0s + 84 + + + varchar(32)|0s + 85 + + + varchar(32)|0s + 86 + + + varchar(32)|0s + 87 + + + varchar(32)|0s + 88 + + + varchar(32)|0s + 89 + + + varchar(32)|0s + 90 + + + varchar(32)|0s + 91 + + + varchar(32)|0s + 92 + + + varchar(32)|0s + 93 + + + varchar(32)|0s + 94 + + + varchar(32)|0s + 95 + + + varchar(32)|0s + 96 + + + varchar(32)|0s + 97 + + + varchar(32)|0s + 98 + + + varchar(32)|0s + 99 + + + varchar(32)|0s + 100 + + + varchar(32)|0s + 101 + + + varchar(32)|0s + 102 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 103 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 104 + utf8_general_ci + + + 创建时间 + datetime|0s + CURRENT_TIMESTAMP + 105 + + + 更新者 + varchar(64)|0s + '' + 106 + utf8_general_ci + + + 更新时间 + datetime|0s + 107 + + + event_no + btree + + + 1 + 1 + id + + + 1 + 主键 + int(11)|0s + 1 + 1 + + + 调峰事件id + int(11)|0s + 2 + + + 调峰事件编号 + varchar(64)|0s + 3 + + + 用户编号 + varchar(64)|0s + 4 + + + 邀约电量,单位KWh + varchar(32)|0s + 5 + + + 邀约运行负荷,单位KW + varchar(32)|0s + 6 + + + 认约电量,单位KWh + varchar(32)|0s + 7 + + + 认约负荷,单位KW + varchar(32)|0s + 8 + + + 是否被邀约:0否,1是 + tinyint(4)|0s + 9 + + + 是否参与:0不参与,1参与 + tinyint(4)|0s + 10 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 11 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 12 + utf8_general_ci + + + 创建时间 + datetime|0s + CURRENT_TIMESTAMP + 13 + + + 更新者 + varchar(64)|0s + '' + 14 + utf8_general_ci + + + 更新时间 + datetime|0s + 15 + + + 计划响应电量,单位KWh + varchar(32)|0s + 16 + + + 计划运行负荷,单位KW + varchar(32)|0s + 17 + + + 确认回复:1是,0否 + tinyint(4)|0s + 18 + + + event_id + btree + + + event_no + btree + + + 1 + 1 + id + + + 1 + 主键 + int(11)|0s + 1 + 1 + + + 事件编号 + varchar(64)|0s + 2 + + + 事件名称 + varchar(128)|0s + 3 + + + 所属项目编号 + varchar(64)|0s + 4 + + + 负荷聚合商编号 + varchar(64)|0s + 5 + + + 响应类型:0电储能调峰 + varchar(4)|0s + 6 + + + 时间类型 + varchar(4)|0s + 7 + + + 提前通知时长 + varchar(4)|0s + 8 + + + 响应日期 + date|0s + 9 + + + 开始时间 + datetime|0s + 10 + + + 结束时间 + datetime|0s + 11 + + + 邀约时间 + datetime|0s + 12 + + + 申报截止时间 + datetime|0s + 13 + + + 邀约电量 + varchar(32)|0s + 14 + + + 申报电量 + varchar(32)|0s + 15 + + + 邀请截止时间 + datetime|0s + 16 + + + 邀请方式:0短信邀请,1web端邀请,2移动端邀请 + tinyint(4)|0s + 17 + + + 各参与主体响应策略:0不可调整,1可自定义调整 + tinyint(4)|0s + 18 + + + 事件状态 + tinyint(4)|0s + 19 + + + 聚合方案id + varchar(64)|0s + 20 + + + 申报档位 + tinyint(4)|0s + 21 + + + 申报价格 + decimal(20,4 digit)|0s + 22 + + + 分解策略:0能力均分,1自定义设置 + tinyint(4)|0s + 23 + + + 参与类型:0放点降功率,1充电加功率 + tinyint(4)|0s + 24 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 25 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 26 + utf8_general_ci + + + 创建时间 + datetime|0s + CURRENT_TIMESTAMP + 27 + + + 更新者 + varchar(64)|0s + '' + 28 + utf8_general_ci + + + 更新时间 + datetime|0s + 29 + + + 出清电量,单位kWh + varchar(32)|0s + 30 + + + event_no + btree + + + 1 + 1 + id + + + 主键 + varchar(255)|0s + 1 + 1 + + + 聚合单元名称 + varchar(64)|0s + 2 + + + 方案类型 + varchar(255)|0s + 3 + + + 调控类型 + varchar(255)|0s + 4 + + + 邀约类型 + varchar(20)|0s + 5 + utf8_general_ci + + + 响应策略 + varchar(20)|0s + 6 + utf8_general_ci + + + 收益估算 + varchar(255)|0s + 7 + + + 达标率 + varchar(255)|0s + 8 + + + 状态 0-启用,1-停用 + varchar(1)|0s + 9 + + + 方案描述 + varchar(1000)|0s + 10 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 11 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 12 + utf8_general_ci + + + 创建时间 + datetime|0s + 13 + + + 更新者 + varchar(64)|0s + '' + 14 + utf8_general_ci + + + 更新时间 + datetime|0s + 15 + + + 1 + 1 + plan_id + + + 1 + 主键 + int(11)|0s + 1 + 1 + + + 聚合单元id + varchar(255)|0s + 2 + + + 用户id + int(11)|0s + 3 + + + 删除标志(0代表存在 1代表删除) + char(1)|0s + '0' + 4 + utf8_general_ci + + + 创建者 + varchar(64)|0s + '' + 5 + utf8_general_ci + + + 创建时间 + datetime|0s + 6 + + + 更新者 + varchar(64)|0s + '' + 7 + utf8_general_ci + + + 更新时间 + datetime|0s + 8 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 用户id + int(11)|0s + 2 + + + varchar(7)|0s + 3 + + + 企业名称 + varchar(100)|0s + 4 + + + 企业类型 + varchar(2)|0s + 5 + + + 统一社会信用代码 + varchar(18)|0s + 6 + + + 注册资本 + varchar(50)|0s + 7 + + + 行政区划-市 + varchar(20)|0s + 8 + + + 行政区划-区县 + varchar(20)|0s + 9 + + + 行政区划名称 + varchar(20)|0s + 10 + + + 法人名称 + varchar(20)|0s + 11 + + + 法人联系方式 + varchar(50)|0s + 12 + + + 法人身份证号 + varchar(18)|0s + 13 + + + 申请人id + varchar(11)|0s + 14 + + + 申请人名称 + varchar(20)|0s + 15 + + + 申请人联系方式 + varchar(50)|0s + 16 + + + 申请人身份证号 + varchar(18)|0s + 17 + + + 用电户号 + varchar(255)|0s + 18 + + + 用电户名 + varchar(20)|0s + 19 + + + 电压等级 + varchar(2)|0s + 20 + + + 用电性质 + varchar(2)|0s + 21 + + + 资源类型 + varchar(2)|0s + 22 + + + 响应类型 + varchar(2)|0s + 23 + + + 资源所属地区-市 + varchar(10)|0s + 24 + + + 资源所属地区-区县 + varchar(10)|0s + 25 + + + 包装容量 + varchar(20)|0s + 26 + + + 最高运行负荷 + varchar(20)|0s + 27 + + + 最大响应能力 + varchar(20)|0s + 28 + + + 最小响应能力 + varchar(20)|0s + 29 + + + 保安负荷 + varchar(20)|0s + 30 + + + 审核状态 + varchar(2)|0s + 31 + + + 删除状态 0-正常,1-已删除 + varchar(1)|0s + '0' + 32 + + + 创建人 + varchar(10)|0s + 33 + + + 创建时间 + datetime|0s + 34 + + + 修改人 + varchar(10)|0s + 35 + + + 修改时间 + datetime|0s + 36 + + + varchar(255)|0s + 37 + + + varchar(255)|0s + 38 + + + date|0s + 39 + + + date|0s + 40 + + + date|0s + 41 + + + varchar(255)|0s + 42 + + + varchar(255)|0s + 43 + + + 1 + 1 + id + + + 代理客户id + int(11)|0s + 1 + 1 + + + 客户名称 + varchar(255)|0s + 2 + + + 企业类型 + varchar(255)|0s + 3 + + + 行政区划-市 + varchar(255)|0s + 4 + + + 行政区划-区县 + varchar(255)|0s + 5 + + + 法定代表人 + varchar(255)|0s + 6 + + + 联系方式 + varchar(255)|0s + 7 + + + datetime|0s + 8 + + + varchar(255)|0s + 9 + + + datetime|0s + 10 + + + varchar(255)|0s + 11 + + + 1 + 1 + client_id + + + 1 + int(11)|0s + 1 + 1 + + + 设备标识 + varchar(32)|0s + 2 + + + 用电户id + varchar(20)|0s + 3 + + + 设备编号 + varchar(255)|0s + 4 + + + 设备名称 + varchar(100)|0s + 5 + + + 设备类型 + varchar(10)|0s + 6 + + + 设备容量 + varchar(20)|0s + 7 + + + 响应方式 + varchar(2)|0s + 8 + + + 调控级别 + varchar(255)|0s + 9 + + + 设备状态 + varchar(2)|0s + 10 + + + 额定电压 + varchar(255)|0s + 11 + + + 额定电流 + varchar(255)|0s + 12 + + + 额定功率 + varchar(255)|0s + 13 + + + 储能设备参与调峰调频类型 + varchar(255)|0s + 14 + + + 计量点编号 + varchar(20)|0s + 15 + + + 操作类型 0-无操作,1-新增/修改,2-删除 + varchar(2)|0s + 16 + + + 删除状态 0-正常,1-已删除 + varchar(2)|0s + '0' + 17 + + + 创建人 + varchar(20)|0s + 18 + + + 创建时间 + datetime|0s + 19 + + + 修改人 + varchar(20)|0s + 20 + + + 修改时间 + datetime|0s + 21 + + + 0-聚合商,1-电力用户 + varchar(5)|0s + 22 + + + 充电响应容量 + varchar(100)|0s + 23 + + + 放电响应容量 + varchar(100)|0s + 24 + + + 是否可远程控制 + varchar(2)|0s + 25 + + + 是否可监测 + varchar(2)|0s + 26 + + + 响应速度 + varchar(2)|0s + 27 + + + 响应容量 + varchar(100)|0s + 28 + + + 1 + 1 + id + + + root@% + I + 193 + after-row + + + root@% + U + 193 + after-row + + + 1 + int(11)|0s + 1 + 1 + + + varchar(255)|0s + 2 + + + 设备状态 + varchar(255)|0s + 3 + + + datetime|0s + 4 + + + varchar(255)|0s + 5 + + + datetime|0s + 6 + + + varchar(255)|0s + 7 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 聚合商/企业id + varchar(20)|0s + 2 + + + 服务器存放地址 + varchar(255)|0s + 3 + + + 文件名称 + varchar(255)|0s + 4 + + + 0-聚合商,1-电力用户 + varchar(5)|0s + 5 + + + 删除状态 0-正常,1-已删除 + varchar(1)|0s + '0' + 6 + + + 创建人 + varchar(10)|0s + 7 + + + 创建时间 + datetime|0s + 8 + + + 修改人 + varchar(10)|0s + 9 + + + 修改时间 + datetime|0s + 10 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 用户id + int(11)|0s + 2 + + + 企业名称 + varchar(100)|0s + 3 + + + 客户id + varchar(255)|0s + 4 + + + 企业ID + varchar(100)|0s + 5 + + + 企业类型 + varchar(2)|0s + 6 + + + 统一社会信用代码 + varchar(18)|0s + 7 + + + 所属行业 + varchar(255)|0s + 8 + + + 调控时长 + varchar(255)|0s + 9 + + + 注册资本 + varchar(50)|0s + 10 + + + 行政区划-市 + varchar(20)|0s + 11 + + + 行政区划-区县 + varchar(20)|0s + 12 + + + 行政区划名称 + varchar(20)|0s + 13 + + + 法人名称 + varchar(20)|0s + 14 + + + 法人联系方式 + varchar(500)|0s + 15 + + + 法人身份证号 + varchar(500)|0s + 16 + + + 申请人id + varchar(11)|0s + 17 + + + 申请人名称 + varchar(20)|0s + 18 + + + 申请人联系方式 + varchar(500)|0s + 19 + + + 申请人身份证号 + varchar(500)|0s + 20 + + + 用电户号 + varchar(255)|0s + 21 + + + 用电户名 + varchar(25)|0s + 22 + + + 响应类型 + varchar(50)|0s + 23 + + + 聚合商id + varchar(20)|0s + 24 + + + 经度 + varchar(255)|0s + 25 + + + 纬度 + varchar(255)|0s + 26 + + + 时间类型 + varchar(255)|0s + 27 + + + 提前通知时长 + varchar(255)|0s + 28 + + + 签约容量 + varchar(255)|0s + 29 + + + 备用容量 + varchar(255)|0s + 30 + + + 实时削峰量 + decimal(10,2 digit)|0s + 31 + + + 约时削峰量 + decimal(10,2 digit)|0s + 32 + + + 约时填谷量 + decimal(10,2 digit)|0s + 33 + + + 代理协议签订日期 + date|0s + 34 + + + 代理开始日期 + date|0s + 35 + + + 代理结束日期 + date|0s + 36 + + + 分成比例 + varchar(10)|0s + 37 + + + 删除状态 0-正常,1-已删除 + varchar(1)|0s + '0' + 38 + + + 创建人 + varchar(10)|0s + 39 + + + 操作类型 0-无操作,1-新增/修改,2-删除 + varchar(2)|0s + 40 + + + 创建时间 + datetime|0s + 41 + + + 修改人 + varchar(10)|0s + 42 + + + 修改时间 + datetime|0s + 43 + + + 资源类型 + varchar(2)|0s + 44 + + + 电压等级 + varchar(2)|0s + 45 + + + 资源所属地区-市 + varchar(10)|0s + 46 + + + 用电性质 + varchar(2)|0s + 47 + + + 是否参与现货交易 + varchar(1)|0s + '0' + 48 + + + 是否参与调峰调频 + varchar(1)|0s + '0' + 49 + + + 是否参与需求侧响应 + varchar(1)|0s + '0' + 50 + + + 审核状态 + varchar(2)|0s + 51 + + + 资源所属地区区县 + varchar(10)|0s + 52 + + + 最高运行负荷 + varchar(20)|0s + 53 + + + 最大响应能力 + varchar(20)|0s + 54 + + + 最小响应能力 + varchar(20)|0s + 55 + + + 保安负荷 + varchar(20)|0s + 56 + + + 包装容量 + varchar(20)|0s + 57 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 聚合日期 + datetime|0s + 2 + + + 聚合频率 + varchar(2)|0s + 3 + + + 聚合维度 + varchar(2)|0s + 4 + + + 聚合主体 + varchar(64)|0s + 5 + + + 交易序列 + varchar(2)|0s + 6 + + + 聚合申报日期 + datetime|0s + 7 + + + 聚合企业数量 + int(11)|0s + 8 + + + 选择用电日期start + datetime|0s + 9 + + + 选择用电日期end + datetime|0s + 10 + + + 实际用电量 + decimal(10,2 digit)|0s + 11 + + + 中长期用电量 + decimal(10,2 digit)|0s + 12 + + + 偏差量 + decimal(10,2 digit)|0s + 13 + + + 曲线持久化x轴 + text|0s + 14 + + + 曲线持久化y轴 + text|0s + 15 + + + 聚合用户id + varchar(255)|0s + 16 + + + varchar(255)|0s + 17 + + + datetime|0s + 18 + + + varchar(255)|0s + 19 + + + datetime|0s + 20 + + + varchar(255)|0s + 21 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 快照时间 + datetime|0s + 2 + + + 曲线聚合主键 + int(11)|0s + 3 + + + 聚合日期 + datetime|0s + 4 + + + 聚合频率 + varchar(2)|0s + 5 + + + 聚合维度 + varchar(2)|0s + 6 + + + 聚合主体 + varchar(64)|0s + 7 + + + 交易序列 + varchar(2)|0s + 8 + + + 聚合申报日期 + datetime|0s + 9 + + + 聚合企业数量 + int(11)|0s + 10 + + + 选择用电日期start + datetime|0s + 11 + + + 选择用电日期end + datetime|0s + 12 + + + 实际用电量 + decimal(10,2 digit)|0s + 13 + + + 中长期用电量 + decimal(10,2 digit)|0s + 14 + + + 偏差量 + decimal(10,2 digit)|0s + 15 + + + 曲线持久化x轴 + text|0s + 16 + + + 曲线持久化y轴 + text|0s + 17 + + + 聚合用户id + varchar(255)|0s + 18 + + + varchar(255)|0s + 19 + + + datetime|0s + 20 + + + varchar(255)|0s + 21 + + + datetime|0s + 22 + + + varchar(255)|0s + 23 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 曲线聚合主键 + int(11)|0s + 2 + + + 曲线聚合快照 + int(11)|0s + 3 + + + 申报主体 + varchar(64)|0s + 4 + + + 聚合申报日期 + datetime|0s + 5 + + + 聚合企业数量 + int(11)|0s + 6 + + + 申报用电日期start + datetime|0s + 7 + + + 申报用电日期end + datetime|0s + 8 + + + 聚合日前申报总量 + decimal(10,2 digit)|0s + 9 + + + 可分配调节数 + int(11)|0s + 0 + 10 + + + 曲线持久化x轴 + text|0s + 11 + + + 曲线持久化y轴 + text|0s + 12 + + + varchar(255)|0s + 13 + + + datetime|0s + 14 + + + varchar(255)|0s + 15 + + + datetime|0s + 16 + + + varchar(255)|0s + 17 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 合同编号 + varchar(255)|0s + 1 + 2 + + + 合同名称 + varchar(255)|0s + 3 + + + 合同签署方 + varchar(255)|0s + 4 + + + 合同类别 + varchar(255)|0s + 5 + + + 合同类型 + varchar(255)|0s + 6 + + + 合同总量 + decimal(10,2 digit)|0s + 7 + + + 合同价格 元/MWh + decimal(10,2 digit)|0s + 8 + + + 交易序列 + varchar(255)|0s + 9 + + + 合同状态 + varchar(255)|0s + 10 + + + 开始时间 + date|0s + 11 + + + 结束时间 + date|0s + 12 + + + 履约周期 + varchar(255)|0s + 13 + + + 周期时间段 + varchar(255)|0s + 14 + + + 是否分解合同 + varchar(255)|0s + 15 + + + 是否有转让 + varchar(255)|0s + 16 + + + 确认状态 + varchar(255)|0s + 17 + + + 是否存在调整 + varchar(255)|0s + 18 + + + 是否月分时 + varchar(255)|0s + 19 + + + varchar(255)|0s + 20 + + + datetime|0s + 21 + + + varchar(255)|0s + 22 + + + datetime|0s + 23 + + + varchar(255)|0s + 24 + + + 1 + 1 + id +contract_no + + + 1 + int(11)|0s + 1 + 1 + + + 设备id + varchar(32)|0s + 2 + + + 履约周期 + varchar(255)|0s + 3 + + + 周期时间 + varchar(255)|0s + 4 + + + varchar(255)|0s + 5 + + + decimal(20,4 digit)|0s + 6 + + + decimal(20,4 digit)|0s + 7 + + + decimal(20,4 digit)|0s + 8 + + + decimal(20,4 digit)|0s + 9 + + + decimal(20,4 digit)|0s + 10 + + + decimal(20,4 digit)|0s + 11 + + + decimal(20,4 digit)|0s + 12 + + + decimal(20,4 digit)|0s + 13 + + + decimal(20,4 digit)|0s + 14 + + + decimal(20,4 digit)|0s + 15 + + + decimal(20,4 digit)|0s + 16 + + + decimal(20,4 digit)|0s + 17 + + + decimal(20,4 digit)|0s + 18 + + + decimal(20,4 digit)|0s + 19 + + + decimal(20,4 digit)|0s + 20 + + + decimal(20,4 digit)|0s + 21 + + + decimal(20,4 digit)|0s + 22 + + + decimal(20,4 digit)|0s + 23 + + + decimal(20,4 digit)|0s + 24 + + + decimal(20,4 digit)|0s + 25 + + + decimal(20,4 digit)|0s + 26 + + + decimal(20,4 digit)|0s + 27 + + + decimal(20,4 digit)|0s + 28 + + + decimal(20,4 digit)|0s + 29 + + + decimal(20,4 digit)|0s + 30 + + + decimal(20,4 digit)|0s + 31 + + + decimal(20,4 digit)|0s + 32 + + + decimal(20,4 digit)|0s + 33 + + + decimal(20,4 digit)|0s + 34 + + + decimal(20,4 digit)|0s + 35 + + + decimal(20,4 digit)|0s + 36 + + + decimal(20,4 digit)|0s + 37 + + + decimal(20,4 digit)|0s + 38 + + + decimal(20,4 digit)|0s + 39 + + + decimal(20,4 digit)|0s + 40 + + + decimal(20,4 digit)|0s + 41 + + + decimal(20,4 digit)|0s + 42 + + + decimal(20,4 digit)|0s + 43 + + + decimal(20,4 digit)|0s + 44 + + + decimal(20,4 digit)|0s + 45 + + + decimal(20,4 digit)|0s + 46 + + + decimal(20,4 digit)|0s + 47 + + + decimal(20,4 digit)|0s + 48 + + + decimal(20,4 digit)|0s + 49 + + + decimal(20,4 digit)|0s + 50 + + + decimal(20,4 digit)|0s + 51 + + + decimal(20,4 digit)|0s + 52 + + + decimal(20,4 digit)|0s + 53 + + + decimal(20,4 digit)|0s + 54 + + + decimal(20,4 digit)|0s + 55 + + + decimal(20,4 digit)|0s + 56 + + + decimal(20,4 digit)|0s + 57 + + + decimal(20,4 digit)|0s + 58 + + + decimal(20,4 digit)|0s + 59 + + + decimal(20,4 digit)|0s + 60 + + + decimal(20,4 digit)|0s + 61 + + + decimal(20,4 digit)|0s + 62 + + + decimal(20,4 digit)|0s + 63 + + + decimal(20,4 digit)|0s + 64 + + + decimal(20,4 digit)|0s + 65 + + + decimal(20,4 digit)|0s + 66 + + + decimal(20,4 digit)|0s + 67 + + + decimal(20,4 digit)|0s + 68 + + + decimal(20,4 digit)|0s + 69 + + + decimal(20,4 digit)|0s + 70 + + + decimal(20,4 digit)|0s + 71 + + + decimal(20,4 digit)|0s + 72 + + + decimal(20,4 digit)|0s + 73 + + + decimal(20,4 digit)|0s + 74 + + + decimal(20,4 digit)|0s + 75 + + + decimal(20,4 digit)|0s + 76 + + + decimal(20,4 digit)|0s + 77 + + + decimal(20,4 digit)|0s + 78 + + + decimal(20,4 digit)|0s + 79 + + + decimal(20,4 digit)|0s + 80 + + + decimal(20,4 digit)|0s + 81 + + + decimal(20,4 digit)|0s + 82 + + + decimal(20,4 digit)|0s + 83 + + + decimal(20,4 digit)|0s + 84 + + + decimal(20,4 digit)|0s + 85 + + + decimal(20,4 digit)|0s + 86 + + + decimal(20,4 digit)|0s + 87 + + + decimal(20,4 digit)|0s + 88 + + + decimal(20,4 digit)|0s + 89 + + + decimal(20,4 digit)|0s + 90 + + + decimal(20,4 digit)|0s + 91 + + + decimal(20,4 digit)|0s + 92 + + + decimal(20,4 digit)|0s + 93 + + + decimal(20,4 digit)|0s + 94 + + + decimal(20,4 digit)|0s + 95 + + + decimal(20,4 digit)|0s + 96 + + + decimal(20,4 digit)|0s + 97 + + + decimal(20,4 digit)|0s + 98 + + + decimal(20,4 digit)|0s + 99 + + + decimal(20,4 digit)|0s + 100 + + + decimal(20,4 digit)|0s + 101 + + + decimal(20,4 digit)|0s + 102 + + + varchar(255)|0s + 103 + + + datetime|0s + 104 + + + varchar(255)|0s + 105 + + + datetime|0s + 106 + + + varchar(255)|0s + 107 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 合同编号 + varchar(255)|0s + 2 + + + 合同总量 + decimal(10,2 digit)|0s + 3 + + + 履约周期 + varchar(255)|0s + 4 + + + 周期时间 + varchar(255)|0s + 5 + + + 确认状态 + varchar(255)|0s + 6 + + + decimal(10,2 digit)|0s + 7 + + + decimal(10,2 digit)|0s + 8 + + + decimal(10,2 digit)|0s + 9 + + + decimal(10,2 digit)|0s + 10 + + + decimal(10,2 digit)|0s + 11 + + + decimal(10,2 digit)|0s + 12 + + + decimal(10,2 digit)|0s + 13 + + + decimal(10,2 digit)|0s + 14 + + + decimal(10,2 digit)|0s + 15 + + + decimal(10,2 digit)|0s + 16 + + + decimal(10,2 digit)|0s + 17 + + + decimal(10,2 digit)|0s + 18 + + + decimal(10,2 digit)|0s + 19 + + + decimal(10,2 digit)|0s + 20 + + + decimal(10,2 digit)|0s + 21 + + + decimal(10,2 digit)|0s + 22 + + + decimal(10,2 digit)|0s + 23 + + + decimal(10,2 digit)|0s + 24 + + + decimal(10,2 digit)|0s + 25 + + + decimal(10,2 digit)|0s + 26 + + + decimal(10,2 digit)|0s + 27 + + + decimal(10,2 digit)|0s + 28 + + + decimal(10,2 digit)|0s + 29 + + + decimal(10,2 digit)|0s + 30 + + + decimal(10,2 digit)|0s + 31 + + + decimal(10,2 digit)|0s + 32 + + + decimal(10,2 digit)|0s + 33 + + + decimal(10,2 digit)|0s + 34 + + + decimal(10,2 digit)|0s + 35 + + + decimal(10,2 digit)|0s + 36 + + + decimal(10,2 digit)|0s + 37 + + + decimal(10,2 digit)|0s + 38 + + + datetime|0s + 39 + + + varchar(255)|0s + 40 + + + datetime|0s + 41 + + + varchar(255)|0s + 42 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 合同编号 + varchar(255)|0s + 2 + + + 合同总量 + decimal(10,2 digit)|0s + 3 + + + 履约周期 + varchar(255)|0s + 4 + + + 周期时间 + varchar(255)|0s + 5 + + + 开始时间 + varchar(255)|0s + 6 + + + 结束时间 + varchar(255)|0s + 7 + + + 确认状态 + varchar(255)|0s + 8 + + + varchar(255)|0s + 9 + + + datetime|0s + 10 + + + varchar(255)|0s + 11 + + + datetime|0s + 12 + + + varchar(255)|0s + 13 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 合同id + varchar(20)|0s + 2 + + + 服务器存放地址 + varchar(255)|0s + 3 + + + 文件名称 + varchar(255)|0s + 4 + + + 删除状态 0-正常,1-已删除 + varchar(1)|0s + '0' + 5 + + + 创建人 + varchar(10)|0s + 6 + + + 创建时间 + datetime|0s + 7 + + + 修改人 + varchar(10)|0s + 8 + + + 修改时间 + datetime|0s + 9 + + + 1 + 1 + id + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + qrtz_triggers表trigger_name的外键 + varchar(200)|0s + 1 + 2 + + + qrtz_triggers表trigger_group的外键 + varchar(200)|0s + 1 + 3 + + + 存放持久化Trigger对象 + blob|0s + 4 + + + sched_name +trigger_name +trigger_group + sched_name +trigger_name +trigger_group + qrtz_triggers + + + 1 + 1 + sched_name +trigger_name +trigger_group + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + 日历名称 + varchar(200)|0s + 1 + 2 + + + 存放持久化calendar对象 + blob|0s + 1 + 3 + + + 1 + 1 + sched_name +calendar_name + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + qrtz_triggers表trigger_name的外键 + varchar(200)|0s + 1 + 2 + + + qrtz_triggers表trigger_group的外键 + varchar(200)|0s + 1 + 3 + + + cron表达式 + varchar(200)|0s + 1 + 4 + + + 时区 + varchar(80)|0s + 5 + + + sched_name +trigger_name +trigger_group + sched_name +trigger_name +trigger_group + qrtz_triggers + + + 1 + 1 + sched_name +trigger_name +trigger_group + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + 调度器实例id + varchar(95)|0s + 1 + 2 + + + qrtz_triggers表trigger_name的外键 + varchar(200)|0s + 1 + 3 + + + qrtz_triggers表trigger_group的外键 + varchar(200)|0s + 1 + 4 + + + 调度器实例名 + varchar(200)|0s + 1 + 5 + + + 触发的时间 + bigint(13)|0s + 1 + 6 + + + 定时器制定的时间 + bigint(13)|0s + 1 + 7 + + + 优先级 + int(11)|0s + 1 + 8 + + + 状态 + varchar(16)|0s + 1 + 9 + + + 任务名称 + varchar(200)|0s + 10 + + + 任务组名 + varchar(200)|0s + 11 + + + 是否并发 + varchar(1)|0s + 12 + + + 是否接受恢复执行 + varchar(1)|0s + 13 + + + 1 + 1 + sched_name +entry_id + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + 任务名称 + varchar(200)|0s + 1 + 2 + + + 任务组名 + varchar(200)|0s + 1 + 3 + + + 相关介绍 + varchar(250)|0s + 4 + + + 执行任务类名称 + varchar(250)|0s + 1 + 5 + + + 是否持久化 + varchar(1)|0s + 1 + 6 + + + 是否并发 + varchar(1)|0s + 1 + 7 + + + 是否更新数据 + varchar(1)|0s + 1 + 8 + + + 是否接受恢复执行 + varchar(1)|0s + 1 + 9 + + + 存放持久化job对象 + blob|0s + 10 + + + 1 + 1 + sched_name +job_name +job_group + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + 悲观锁名称 + varchar(40)|0s + 1 + 2 + + + 1 + 1 + sched_name +lock_name + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + qrtz_triggers表trigger_group的外键 + varchar(200)|0s + 1 + 2 + + + 1 + 1 + sched_name +trigger_group + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + 实例名称 + varchar(200)|0s + 1 + 2 + + + 上次检查时间 + bigint(13)|0s + 1 + 3 + + + 检查间隔时间 + bigint(13)|0s + 1 + 4 + + + 1 + 1 + sched_name +instance_name + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + qrtz_triggers表trigger_name的外键 + varchar(200)|0s + 1 + 2 + + + qrtz_triggers表trigger_group的外键 + varchar(200)|0s + 1 + 3 + + + 重复的次数统计 + bigint(7)|0s + 1 + 4 + + + 重复的间隔时间 + bigint(12)|0s + 1 + 5 + + + 已经触发的次数 + bigint(10)|0s + 1 + 6 + + + sched_name +trigger_name +trigger_group + sched_name +trigger_name +trigger_group + qrtz_triggers + + + 1 + 1 + sched_name +trigger_name +trigger_group + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + qrtz_triggers表trigger_name的外键 + varchar(200)|0s + 1 + 2 + + + qrtz_triggers表trigger_group的外键 + varchar(200)|0s + 1 + 3 + + + String类型的trigger的第一个参数 + varchar(512)|0s + 4 + + + String类型的trigger的第二个参数 + varchar(512)|0s + 5 + + + String类型的trigger的第三个参数 + varchar(512)|0s + 6 + + + int类型的trigger的第一个参数 + int(11)|0s + 7 + + + int类型的trigger的第二个参数 + int(11)|0s + 8 + + + long类型的trigger的第一个参数 + bigint(20)|0s + 9 + + + long类型的trigger的第二个参数 + bigint(20)|0s + 10 + + + decimal类型的trigger的第一个参数 + decimal(13,4 digit)|0s + 11 + + + decimal类型的trigger的第二个参数 + decimal(13,4 digit)|0s + 12 + + + Boolean类型的trigger的第一个参数 + varchar(1)|0s + 13 + + + Boolean类型的trigger的第二个参数 + varchar(1)|0s + 14 + + + sched_name +trigger_name +trigger_group + sched_name +trigger_name +trigger_group + qrtz_triggers + + + 1 + 1 + sched_name +trigger_name +trigger_group + + + 调度名称 + varchar(120)|0s + 1 + 1 + + + 触发器的名字 + varchar(200)|0s + 1 + 2 + + + 触发器所属组的名字 + varchar(200)|0s + 1 + 3 + + + qrtz_job_details表job_name的外键 + varchar(200)|0s + 1 + 4 + + + qrtz_job_details表job_group的外键 + varchar(200)|0s + 1 + 5 + + + 相关介绍 + varchar(250)|0s + 6 + + + 上一次触发时间(毫秒) + bigint(13)|0s + 7 + + + 下一次触发时间(默认为-1表示不触发) + bigint(13)|0s + 8 + + + 优先级 + int(11)|0s + 9 + + + 触发器状态 + varchar(16)|0s + 1 + 10 + + + 触发器的类型 + varchar(8)|0s + 1 + 11 + + + 开始时间 + bigint(13)|0s + 1 + 12 + + + 结束时间 + bigint(13)|0s + 13 + + + 日程表名称 + varchar(200)|0s + 14 + + + 补偿执行的策略 + smallint(2)|0s + 15 + + + 存放持久化job对象 + blob|0s + 16 + + + sched_name +job_name +job_group + sched_name +job_name +job_group + qrtz_job_details + + + sched_name +job_name +job_group + btree + + + 1 + 1 + sched_name +trigger_name +trigger_group + + + 1 + int(11)|0s + 1 + 1 + + + 行政区划代码 + int(12)|0s + 2 + + + 名称 + varchar(32)|0s + 3 + + + 上级id + int(11)|0s + 4 + + + 类型 + varchar(32)|0s + 5 + + + 1 + 1 + id + + + 1 + 参数主键 + int(5)|0s + 1 + 1 + + + 参数名称 + varchar(100)|0s + '' + 2 + + + 参数键名 + varchar(100)|0s + '' + 3 + + + 参数键值 + varchar(500)|0s + '' + 4 + + + 系统内置(Y是 N否) + char(1)|0s + 'N' + 5 + + + 创建者 + varchar(64)|0s + '' + 6 + + + 创建时间 + datetime|0s + 7 + + + 更新者 + varchar(64)|0s + '' + 8 + + + 更新时间 + datetime|0s + 9 + + + 备注 + varchar(500)|0s + 10 + + + 1 + 1 + config_id + + + 1 + 部门id + bigint(20)|0s + 1 + 1 + + + 父部门id + bigint(20)|0s + 0 + 2 + + + 祖级列表 + varchar(50)|0s + '' + 3 + + + 部门名称 + varchar(30)|0s + '' + 4 + + + 显示顺序 + int(4)|0s + 0 + 5 + + + 负责人 + varchar(20)|0s + 6 + + + 联系电话 + varchar(11)|0s + 7 + + + 邮箱 + varchar(50)|0s + 8 + + + 部门状态(0正常 1停用) + char(1)|0s + '0' + 9 + + + 删除标志(0代表存在 2代表删除) + char(1)|0s + '0' + 10 + + + 创建者 + varchar(64)|0s + '' + 11 + + + 创建时间 + datetime|0s + 12 + + + 更新者 + varchar(64)|0s + '' + 13 + + + 更新时间 + datetime|0s + 14 + + + 1 + 1 + dept_id + + + 1 + 字典编码 + bigint(20)|0s + 1 + 1 + + + 字典排序 + int(4)|0s + 0 + 2 + + + 字典标签 + varchar(100)|0s + '' + 3 + + + 字典键值 + varchar(100)|0s + '' + 4 + + + 字典类型 + varchar(100)|0s + '' + 5 + + + 样式属性(其他样式扩展) + varchar(100)|0s + 6 + + + 表格回显样式 + varchar(100)|0s + 7 + + + 是否默认(Y是 N否) + char(1)|0s + 'N' + 8 + + + 状态(0正常 1停用) + char(1)|0s + '0' + 9 + + + 创建者 + varchar(64)|0s + '' + 10 + + + 创建时间 + datetime|0s + 11 + + + 更新者 + varchar(64)|0s + '' + 12 + + + 更新时间 + datetime|0s + 13 + + + 备注 + varchar(500)|0s + 14 + + + 1 + 1 + dict_code + + + 1 + 字典主键 + bigint(20)|0s + 1 + 1 + + + 字典名称 + varchar(100)|0s + '' + 2 + + + 字典类型 + varchar(100)|0s + '' + 3 + + + 状态(0正常 1停用) + char(1)|0s + '0' + 4 + + + 创建者 + varchar(64)|0s + '' + 5 + + + 创建时间 + datetime|0s + 6 + + + 更新者 + varchar(64)|0s + '' + 7 + + + 更新时间 + datetime|0s + 8 + + + 备注 + varchar(500)|0s + 9 + + + dict_type + btree + 1 + + + 1 + 1 + dict_id + + + dict_type + + + 1 + 任务ID + bigint(20)|0s + 1 + 1 + + + 任务名称 + varchar(64)|0s + '' + 1 + 2 + + + 任务组名 + varchar(64)|0s + 'DEFAULT' + 1 + 3 + + + 调用目标字符串 + varchar(500)|0s + 1 + 4 + + + cron执行表达式 + varchar(255)|0s + '' + 5 + + + 计划执行错误策略(1立即执行 2执行一次 3放弃执行) + varchar(20)|0s + '3' + 6 + + + 是否并发执行(0允许 1禁止) + char(1)|0s + '1' + 7 + + + 状态(0正常 1暂停) + char(1)|0s + '0' + 8 + + + 创建者 + varchar(64)|0s + '' + 9 + + + 创建时间 + datetime|0s + 10 + + + 更新者 + varchar(64)|0s + '' + 11 + + + 更新时间 + datetime|0s + 12 + + + 备注信息 + varchar(500)|0s + '' + 13 + + + 1 + 1 + job_id +job_name +job_group + + + 1 + 任务日志ID + bigint(20)|0s + 1 + 1 + + + 任务名称 + varchar(64)|0s + 1 + 2 + + + 任务组名 + varchar(64)|0s + 1 + 3 + + + 调用目标字符串 + varchar(500)|0s + 1 + 4 + + + 日志信息 + varchar(500)|0s + 5 + + + 执行状态(0正常 1失败) + char(1)|0s + '0' + 6 + + + 异常信息 + varchar(2000)|0s + '' + 7 + + + 创建时间 + datetime|0s + 8 + + + 1 + 1 + job_log_id + + + 1 + 访问ID + bigint(20)|0s + 1 + 1 + + + 用户账号 + varchar(50)|0s + '' + 2 + + + 登录IP地址 + varchar(128)|0s + '' + 3 + + + 登录地点 + varchar(255)|0s + '' + 4 + + + 浏览器类型 + varchar(50)|0s + '' + 5 + + + 操作系统 + varchar(50)|0s + '' + 6 + + + 登录状态(0成功 1失败) + char(1)|0s + '0' + 7 + + + 提示消息 + varchar(255)|0s + '' + 8 + + + 访问时间 + datetime|0s + 9 + + + status + btree + + + login_time + btree + + + 1 + 1 + info_id + + + 1 + 菜单ID + bigint(20)|0s + 1 + 1 + + + 菜单名称 + varchar(50)|0s + 1 + 2 + + + 父菜单ID + bigint(20)|0s + 0 + 3 + + + 显示顺序 + int(4)|0s + 0 + 4 + + + 路由地址 + varchar(200)|0s + '' + 5 + + + 组件路径 + varchar(255)|0s + 6 + + + 路由参数 + varchar(255)|0s + 7 + + + 是否为外链(0是 1否) + int(1)|0s + 1 + 8 + + + 是否缓存(0缓存 1不缓存) + int(1)|0s + 0 + 9 + + + 菜单类型(M目录 C菜单 F按钮) + char(1)|0s + '' + 10 + + + 菜单状态(0显示 1隐藏) + char(1)|0s + '0' + 11 + + + 菜单状态(0正常 1停用) + char(1)|0s + '0' + 12 + + + 权限标识 + varchar(100)|0s + 13 + + + 菜单图标 + varchar(100)|0s + '#' + 14 + + + 创建者 + varchar(64)|0s + '' + 15 + + + 创建时间 + datetime|0s + 16 + + + 更新者 + varchar(64)|0s + '' + 17 + + + 更新时间 + datetime|0s + 18 + + + 备注 + varchar(500)|0s + '' + 19 + + + 1 + 1 + menu_id + + + 1 + 公告ID + int(4)|0s + 1 + 1 + + + 公告标题 + varchar(50)|0s + 1 + 2 + + + 公告类型(1通知 2公告) + char(1)|0s + 1 + 3 + + + 公告内容 + longblob|0s + 4 + + + 公告状态(0正常 1关闭) + char(1)|0s + '0' + 5 + + + 创建者 + varchar(64)|0s + '' + 6 + + + 创建时间 + datetime|0s + 7 + + + 更新者 + varchar(64)|0s + '' + 8 + + + 更新时间 + datetime|0s + 9 + + + 备注 + varchar(255)|0s + 10 + + + 1 + 1 + notice_id + + + 1 + 日志主键 + bigint(20)|0s + 1 + 1 + + + 模块标题 + varchar(50)|0s + '' + 2 + + + 业务类型(0其它 1新增 2修改 3删除) + int(2)|0s + 0 + 3 + + + 方法名称 + varchar(100)|0s + '' + 4 + + + 请求方式 + varchar(10)|0s + '' + 5 + + + 操作类别(0其它 1后台用户 2手机端用户) + int(1)|0s + 0 + 6 + + + 操作人员 + varchar(50)|0s + '' + 7 + + + 部门名称 + varchar(50)|0s + '' + 8 + + + 请求URL + varchar(255)|0s + '' + 9 + + + 主机地址 + varchar(128)|0s + '' + 10 + + + 操作地点 + varchar(255)|0s + '' + 11 + + + 请求参数 + varchar(2000)|0s + '' + 12 + + + 返回参数 + varchar(2000)|0s + '' + 13 + + + 操作状态(0正常 1异常) + int(1)|0s + 0 + 14 + + + 错误消息 + varchar(2000)|0s + '' + 15 + + + 操作时间 + datetime|0s + 16 + + + 消耗时间 + bigint(20)|0s + 0 + 17 + + + business_type + btree + + + status + btree + + + oper_time + btree + + + 1 + 1 + oper_id + + + 1 + 岗位ID + bigint(20)|0s + 1 + 1 + + + 岗位编码 + varchar(64)|0s + 1 + 2 + + + 岗位名称 + varchar(50)|0s + 1 + 3 + + + 显示顺序 + int(4)|0s + 1 + 4 + + + 状态(0正常 1停用) + char(1)|0s + 1 + 5 + + + 创建者 + varchar(64)|0s + '' + 6 + + + 创建时间 + datetime|0s + 7 + + + 更新者 + varchar(64)|0s + '' + 8 + + + 更新时间 + datetime|0s + 9 + + + 备注 + varchar(500)|0s + 10 + + + 1 + 1 + post_id + + + 1 + 角色ID + bigint(20)|0s + 1 + 1 + + + 角色名称 + varchar(30)|0s + 1 + 2 + + + 角色权限字符串 + varchar(100)|0s + 1 + 3 + + + 显示顺序 + int(4)|0s + 1 + 4 + + + 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限) + char(1)|0s + '1' + 5 + + + 菜单树选择项是否关联显示 + tinyint(1)|0s + 1 + 6 + + + 部门树选择项是否关联显示 + tinyint(1)|0s + 1 + 7 + + + 角色状态(0正常 1停用) + char(1)|0s + 1 + 8 + + + 删除标志(0代表存在 2代表删除) + char(1)|0s + '0' + 9 + + + 创建者 + varchar(64)|0s + '' + 10 + + + 创建时间 + datetime|0s + 11 + + + 更新者 + varchar(64)|0s + '' + 12 + + + 更新时间 + datetime|0s + 13 + + + 备注 + varchar(500)|0s + 14 + + + 1 + 1 + role_id + + + 角色ID + bigint(20)|0s + 1 + 1 + + + 部门ID + bigint(20)|0s + 1 + 2 + + + 1 + 1 + role_id +dept_id + + + 角色ID + bigint(20)|0s + 1 + 1 + + + 菜单ID + bigint(20)|0s + 1 + 2 + + + 1 + 1 + role_id +menu_id + + + 1 + 用户ID + bigint(20)|0s + 1 + 1 + + + 部门ID + bigint(20)|0s + 100 + 2 + + + 用户账号 + varchar(30)|0s + 1 + 3 + + + 用户昵称 + varchar(30)|0s + 1 + 4 + + + 用户类型(00系统用户) + varchar(2)|0s + '00' + 5 + + + 用户邮箱 + varchar(50)|0s + '' + 6 + + + 手机号码 + varchar(255)|0s + '' + 7 + + + 用户性别(0男 1女 2未知) + char(1)|0s + '0' + 8 + + + 头像地址 + varchar(100)|0s + '' + 9 + + + 密码 + varchar(100)|0s + '' + 10 + + + 帐号状态(0正常 1停用) + char(1)|0s + '0' + 11 + + + 删除标志(0代表存在 2代表删除) + char(1)|0s + '0' + 12 + + + 最后登录IP + varchar(128)|0s + '' + 13 + + + 最后登录时间 + datetime|0s + 14 + + + 创建者 + varchar(64)|0s + '' + 15 + + + 创建时间 + datetime|0s + 16 + + + 更新者 + varchar(64)|0s + '' + 17 + + + 更新时间 + datetime|0s + 18 + + + 备注 + varchar(500)|0s + 19 + + + 1 + 1 + user_id + + + 用户ID + bigint(20)|0s + 1 + 1 + + + 岗位ID + bigint(20)|0s + 1 + 2 + + + 1 + 1 + user_id +post_id + + + 用户ID + bigint(20)|0s + 1 + 1 + + + 角色ID + bigint(20)|0s + 1 + 2 + + + 1 + 1 + user_id +role_id + + + 1 + int(11)|0s + 1 + 1 + + + 企业名称 + varchar(255)|0s + 2 + + + 响应类型 + varchar(255)|0s + 3 + + + 时间类型 + varchar(255)|0s + 4 + + + 设备数量 + varchar(255)|0s + 5 + + + 签约量 + varchar(255)|0s + 6 + + + 市 参考表 sys_city + varchar(255)|0s + 7 + + + 区 参考表 sys_city + varchar(255)|0s + 8 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 可调负荷 + varchar(255)|0s + 2 + + + 接入用户数 + varchar(255)|0s + 3 + + + 接入设备数 + varchar(255)|0s + 4 + + + 接入规模 + varchar(255)|0s + 5 + + + 1 + 1 + id + + + 1 + int(11)|0s + 1 + 1 + + + 资源编码(0-储能,1-充电桩,2-5G基站,3-分布式光伏)参考字典表 + varchar(255)|0s + 2 + + + 用户数 + varchar(255)|0s + 3 + + + 聚合容量 + varchar(255)|0s + 4 + + + 设备数量 + varchar(255)|0s + 5 + + + 可调负荷数量 + varchar(255)|0s + 6 + + + 市 参考表 sys_city + varchar(255)|0s + 7 + + + 区 参考表 sys_city + varchar(255)|0s + 8 + + + 1 + 1 + id + +
+
\ No newline at end of file diff --git a/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/information_schema.FNRwLQ.meta b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/information_schema.FNRwLQ.meta new file mode 100644 index 0000000..1ff3db2 --- /dev/null +++ b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/information_schema.FNRwLQ.meta @@ -0,0 +1,2 @@ +#n:information_schema +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/mysql.osA4Bg.meta b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/mysql.osA4Bg.meta new file mode 100644 index 0000000..86a53f1 --- /dev/null +++ b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/mysql.osA4Bg.meta @@ -0,0 +1,2 @@ +#n:mysql +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/performance_schema.kIw0nw.meta b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/performance_schema.kIw0nw.meta new file mode 100644 index 0000000..9394db1 --- /dev/null +++ b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/performance_schema.kIw0nw.meta @@ -0,0 +1,2 @@ +#n:performance_schema +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/sys.zb4BAA.meta b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/sys.zb4BAA.meta new file mode 100644 index 0000000..2f4470b --- /dev/null +++ b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/sys.zb4BAA.meta @@ -0,0 +1,2 @@ +#n:sys +! [null, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/vpp_hf.53y6zw.meta b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/vpp_hf.53y6zw.meta new file mode 100644 index 0000000..b6c989c --- /dev/null +++ b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/vpp_hf.53y6zw.meta @@ -0,0 +1 @@ +#n:vpp_hf \ No newline at end of file diff --git a/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/vpp_hf.53y6zw.zip b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/vpp_hf.53y6zw.zip new file mode 100644 index 0000000..6e61341 Binary files /dev/null and b/.idea/dataSources/7a63a1d8-527a-4a64-9456-1125ed0afa8d/storage_v2/_src_/schema/vpp_hf.53y6zw.zip differ diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..50b661d --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..6560a98 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..28d1fef --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml new file mode 100644 index 0000000..918ecc3 --- /dev/null +++ b/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml new file mode 100644 index 0000000..8a3a0a7 --- /dev/null +++ b/.idea/libraries/Maven__ch_qos_logback_logback_core_1_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__cn_hutool_hutool_all_5_8_16.xml b/.idea/libraries/Maven__cn_hutool_hutool_all_5_8_16.xml new file mode 100644 index 0000000..868f0be --- /dev/null +++ b/.idea/libraries/Maven__cn_hutool_hutool_all_5_8_16.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_alibaba_druid_1_1_14.xml b/.idea/libraries/Maven__com_alibaba_druid_1_1_14.xml new file mode 100644 index 0000000..1aa067a --- /dev/null +++ b/.idea/libraries/Maven__com_alibaba_druid_1_1_14.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_14.xml b/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_14.xml new file mode 100644 index 0000000..cff7c82 --- /dev/null +++ b/.idea/libraries/Maven__com_alibaba_druid_spring_boot_starter_1_1_14.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_alibaba_fastjson2_fastjson2_2_0_39.xml b/.idea/libraries/Maven__com_alibaba_fastjson2_fastjson2_2_0_39.xml new file mode 100644 index 0000000..6786a6e --- /dev/null +++ b/.idea/libraries/Maven__com_alibaba_fastjson2_fastjson2_2_0_39.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_alibaba_fastjson_1_2_47.xml b/.idea/libraries/Maven__com_alibaba_fastjson_1_2_47.xml new file mode 100644 index 0000000..67f4582 --- /dev/null +++ b/.idea/libraries/Maven__com_alibaba_fastjson_1_2_47.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml b/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml new file mode 100644 index 0000000..abcb0c4 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_classmate_1_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml new file mode 100644 index 0000000..538fec4 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_7.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_7.xml new file mode 100644 index 0000000..0b0893a --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_7.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_7.xml new file mode 100644 index 0000000..74cd582 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_7.xml b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_7.xml new file mode 100644 index 0000000..09b2ff3 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jdk8_2_9_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_7.xml b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_7.xml new file mode 100644 index 0000000..60e71cc --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_9_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_7.xml b/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_7.xml new file mode 100644 index 0000000..714da5f --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_parameter_names_2_9_7.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_0.xml b/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_0.xml new file mode 100644 index 0000000..674923f --- /dev/null +++ b/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_oshi_oshi_core_3_9_1.xml b/.idea/libraries/Maven__com_github_oshi_oshi_core_3_9_1.xml new file mode 100644 index 0000000..3d35646 --- /dev/null +++ b/.idea/libraries/Maven__com_github_oshi_oshi_core_3_9_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_4.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_4.xml new file mode 100644 index 0000000..572f3a9 --- /dev/null +++ b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_5.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_5.xml new file mode 100644 index 0000000..e45917b --- /dev/null +++ b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_5.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_5.xml new file mode 100644 index 0000000..da300ad --- /dev/null +++ b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_virtuald_curvesapi_1_04.xml b/.idea/libraries/Maven__com_github_virtuald_curvesapi_1_04.xml new file mode 100644 index 0000000..f4112db --- /dev/null +++ b/.idea/libraries/Maven__com_github_virtuald_curvesapi_1_04.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_xiaoymin_knife4j_annotations_2_0_5.xml b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_annotations_2_0_5.xml new file mode 100644 index 0000000..73a4eb1 --- /dev/null +++ b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_annotations_2_0_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_xiaoymin_knife4j_core_2_0_5.xml b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_core_2_0_5.xml new file mode 100644 index 0000000..3d2a389 --- /dev/null +++ b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_core_2_0_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_2_0_5.xml b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_2_0_5.xml new file mode 100644 index 0000000..e556d81 --- /dev/null +++ b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_2_0_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_boot_autoconfigure_2_0_5.xml b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_boot_autoconfigure_2_0_5.xml new file mode 100644 index 0000000..02794aa --- /dev/null +++ b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_boot_autoconfigure_2_0_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_boot_starter_2_0_5.xml b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_boot_starter_2_0_5.xml new file mode 100644 index 0000000..2b71064 --- /dev/null +++ b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_boot_starter_2_0_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_ui_2_0_5.xml b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_ui_2_0_5.xml new file mode 100644 index 0000000..a87c317 --- /dev/null +++ b/.idea/libraries/Maven__com_github_xiaoymin_knife4j_spring_ui_2_0_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_6_2.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_6_2.xml new file mode 100644 index 0000000..fbf5cf6 --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_gson_gson_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_guava_guava_20_0.xml b/.idea/libraries/Maven__com_google_guava_guava_20_0.xml new file mode 100644 index 0000000..772677a --- /dev/null +++ b/.idea/libraries/Maven__com_google_guava_guava_20_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml b/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml new file mode 100644 index 0000000..208099d --- /dev/null +++ b/.idea/libraries/Maven__com_jayway_jsonpath_json_path_2_4_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_lowagie_text_com_springsource_com_lowagie_text_2_0_8.xml b/.idea/libraries/Maven__com_lowagie_text_com_springsource_com_lowagie_text_2_0_8.xml new file mode 100644 index 0000000..2e6a43e --- /dev/null +++ b/.idea/libraries/Maven__com_lowagie_text_com_springsource_com_lowagie_text_2_0_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml b/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml new file mode 100644 index 0000000..be47f2e --- /dev/null +++ b/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml b/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml new file mode 100644 index 0000000..8573b12 --- /dev/null +++ b/.idea/libraries/Maven__com_vaadin_external_google_android_json_0_0_20131108_vaadin1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml b/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml new file mode 100644 index 0000000..2791fb7 --- /dev/null +++ b/.idea/libraries/Maven__com_zaxxer_HikariCP_3_2_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_3.xml b/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_3.xml new file mode 100644 index 0000000..d4805f8 --- /dev/null +++ b/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml b/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml new file mode 100644 index 0000000..3f0f0c4 --- /dev/null +++ b/.idea/libraries/Maven__commons_codec_commons_codec_1_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml b/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml new file mode 100644 index 0000000..6111a01 --- /dev/null +++ b/.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_3_3.xml b/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_3_3.xml new file mode 100644 index 0000000..a8457d1 --- /dev/null +++ b/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_3_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_2.xml b/.idea/libraries/Maven__commons_io_commons_io_2_2.xml new file mode 100644 index 0000000..b5e1983 --- /dev/null +++ b/.idea/libraries/Maven__commons_io_commons_io_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_5.xml b/.idea/libraries/Maven__commons_io_commons_io_2_5.xml new file mode 100644 index 0000000..5be8885 --- /dev/null +++ b/.idea/libraries/Maven__commons_io_commons_io_2_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml new file mode 100644 index 0000000..2943e17 --- /dev/null +++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__eu_bitwalker_UserAgentUtils_1_19.xml b/.idea/libraries/Maven__eu_bitwalker_UserAgentUtils_1_19.xml new file mode 100644 index 0000000..6480692 --- /dev/null +++ b/.idea/libraries/Maven__eu_bitwalker_UserAgentUtils_1_19.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_jsonwebtoken_jjwt_0_9_0.xml b/.idea/libraries/Maven__io_jsonwebtoken_jjwt_0_9_0.xml new file mode 100644 index 0000000..758be8d --- /dev/null +++ b/.idea/libraries/Maven__io_jsonwebtoken_jjwt_0_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_lettuce_lettuce_core_5_1_3_RELEASE.xml b/.idea/libraries/Maven__io_lettuce_lettuce_core_5_1_3_RELEASE.xml new file mode 100644 index 0000000..ea42d65 --- /dev/null +++ b/.idea/libraries/Maven__io_lettuce_lettuce_core_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_netty_netty_buffer_4_1_31_Final.xml b/.idea/libraries/Maven__io_netty_netty_buffer_4_1_31_Final.xml new file mode 100644 index 0000000..f377bd5 --- /dev/null +++ b/.idea/libraries/Maven__io_netty_netty_buffer_4_1_31_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_netty_netty_codec_4_1_31_Final.xml b/.idea/libraries/Maven__io_netty_netty_codec_4_1_31_Final.xml new file mode 100644 index 0000000..1e2aa88 --- /dev/null +++ b/.idea/libraries/Maven__io_netty_netty_codec_4_1_31_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_netty_netty_common_4_1_31_Final.xml b/.idea/libraries/Maven__io_netty_netty_common_4_1_31_Final.xml new file mode 100644 index 0000000..455b1e9 --- /dev/null +++ b/.idea/libraries/Maven__io_netty_netty_common_4_1_31_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_netty_netty_handler_4_1_31_Final.xml b/.idea/libraries/Maven__io_netty_netty_handler_4_1_31_Final.xml new file mode 100644 index 0000000..78e3935 --- /dev/null +++ b/.idea/libraries/Maven__io_netty_netty_handler_4_1_31_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_netty_netty_resolver_4_1_31_Final.xml b/.idea/libraries/Maven__io_netty_netty_resolver_4_1_31_Final.xml new file mode 100644 index 0000000..46c403d --- /dev/null +++ b/.idea/libraries/Maven__io_netty_netty_resolver_4_1_31_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_netty_netty_transport_4_1_31_Final.xml b/.idea/libraries/Maven__io_netty_netty_transport_4_1_31_Final.xml new file mode 100644 index 0000000..1185211 --- /dev/null +++ b/.idea/libraries/Maven__io_netty_netty_transport_4_1_31_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_projectreactor_reactor_core_3_2_3_RELEASE.xml b/.idea/libraries/Maven__io_projectreactor_reactor_core_3_2_3_RELEASE.xml new file mode 100644 index 0000000..f7b7f21 --- /dev/null +++ b/.idea/libraries/Maven__io_projectreactor_reactor_core_3_2_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_bean_validators_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_bean_validators_2_9_2.xml new file mode 100644 index 0000000..26fd287 --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_bean_validators_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_core_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_core_2_9_2.xml new file mode 100644 index 0000000..05564c3 --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_core_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_schema_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_schema_2_9_2.xml new file mode 100644 index 0000000..4de4bfb --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_schema_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_spi_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_spi_2_9_2.xml new file mode 100644 index 0000000..2bca7ff --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_spi_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_spring_web_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_spring_web_2_9_2.xml new file mode 100644 index 0000000..8bfa761 --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_spring_web_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_swagger2_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_swagger2_2_9_2.xml new file mode 100644 index 0000000..74d0b2b --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_swagger2_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_swagger_common_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_swagger_common_2_9_2.xml new file mode 100644 index 0000000..59b5309 --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_swagger_common_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_springfox_springfox_swagger_ui_2_9_2.xml b/.idea/libraries/Maven__io_springfox_springfox_swagger_ui_2_9_2.xml new file mode 100644 index 0000000..b8fb20c --- /dev/null +++ b/.idea/libraries/Maven__io_springfox_springfox_swagger_ui_2_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_swagger_swagger_annotations_1_5_21.xml b/.idea/libraries/Maven__io_swagger_swagger_annotations_1_5_21.xml new file mode 100644 index 0000000..ffb5d88 --- /dev/null +++ b/.idea/libraries/Maven__io_swagger_swagger_annotations_1_5_21.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_swagger_swagger_models_1_5_21.xml b/.idea/libraries/Maven__io_swagger_swagger_models_1_5_21.xml new file mode 100644 index 0000000..b605d52 --- /dev/null +++ b/.idea/libraries/Maven__io_swagger_swagger_models_1_5_21.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_undertow_undertow_core_2_0_16_Final.xml b/.idea/libraries/Maven__io_undertow_undertow_core_2_0_16_Final.xml new file mode 100644 index 0000000..1d6293d --- /dev/null +++ b/.idea/libraries/Maven__io_undertow_undertow_core_2_0_16_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_undertow_undertow_servlet_2_0_16_Final.xml b/.idea/libraries/Maven__io_undertow_undertow_servlet_2_0_16_Final.xml new file mode 100644 index 0000000..a5026e8 --- /dev/null +++ b/.idea/libraries/Maven__io_undertow_undertow_servlet_2_0_16_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__io_undertow_undertow_websockets_jsr_2_0_16_Final.xml b/.idea/libraries/Maven__io_undertow_undertow_websockets_jsr_2_0_16_Final.xml new file mode 100644 index 0000000..e7f7236 --- /dev/null +++ b/.idea/libraries/Maven__io_undertow_undertow_websockets_jsr_2_0_16_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml b/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml new file mode 100644 index 0000000..4e2bc60 --- /dev/null +++ b/.idea/libraries/Maven__jakarta_activation_jakarta_activation_api_1_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml b/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml new file mode 100644 index 0000000..4a7d0b7 --- /dev/null +++ b/.idea/libraries/Maven__jakarta_xml_bind_jakarta_xml_bind_api_2_3_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml b/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml new file mode 100644 index 0000000..41f2a3f --- /dev/null +++ b/.idea/libraries/Maven__javax_annotation_javax_annotation_api_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml b/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml new file mode 100644 index 0000000..ff0858f --- /dev/null +++ b/.idea/libraries/Maven__javax_persistence_persistence_api_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_servlet_javax_servlet_api_4_0_1.xml b/.idea/libraries/Maven__javax_servlet_javax_servlet_api_4_0_1.xml new file mode 100644 index 0000000..8c26417 --- /dev/null +++ b/.idea/libraries/Maven__javax_servlet_javax_servlet_api_4_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml b/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml new file mode 100644 index 0000000..ce4a6d4 --- /dev/null +++ b/.idea/libraries/Maven__javax_validation_validation_api_2_0_1_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_12.xml b/.idea/libraries/Maven__junit_junit_4_12.xml new file mode 100644 index 0000000..7cef68d --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_13.xml b/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_13.xml new file mode 100644 index 0000000..a9c2706 --- /dev/null +++ b/.idea/libraries/Maven__mysql_mysql_connector_java_8_0_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_5.xml b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_5.xml new file mode 100644 index 0000000..db7ba5b --- /dev/null +++ b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_9_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_5.xml b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_5.xml new file mode 100644 index 0000000..4f2f8ba --- /dev/null +++ b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_agent_1_9_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_java_dev_jna_jna_4_5_2.xml b/.idea/libraries/Maven__net_java_dev_jna_jna_4_5_2.xml new file mode 100644 index 0000000..f9aaf51 --- /dev/null +++ b/.idea/libraries/Maven__net_java_dev_jna_jna_4_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_java_dev_jna_jna_platform_4_5_2.xml b/.idea/libraries/Maven__net_java_dev_jna_jna_platform_4_5_2.xml new file mode 100644 index 0000000..c3e9f1b --- /dev/null +++ b/.idea/libraries/Maven__net_java_dev_jna_jna_platform_4_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml b/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml new file mode 100644 index 0000000..6d3bf54 --- /dev/null +++ b/.idea/libraries/Maven__net_minidev_accessors_smart_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml b/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml new file mode 100644 index 0000000..a545e65 --- /dev/null +++ b/.idea/libraries/Maven__net_minidev_json_smart_2_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml b/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml new file mode 100644 index 0000000..210efd7 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_8_1.xml b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_8_1.xml new file mode 100644 index 0000000..88f5a3a --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_8_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_0.xml b/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_0.xml new file mode 100644 index 0000000..7c3dd6e --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_13.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_13.xml new file mode 100644 index 0000000..cb46199 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_6.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_6.xml new file mode 100644 index 0000000..4082a75 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_10.xml b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_10.xml new file mode 100644 index 0000000..b160454 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_10.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_1.xml b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_1.xml new file mode 100644 index 0000000..2b5ff74 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_1.xml b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_1.xml new file mode 100644 index 0000000..0069b43 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_logging_log4j_log4j_to_slf4j_2_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_poi_poi_3_17.xml b/.idea/libraries/Maven__org_apache_poi_poi_3_17.xml new file mode 100644 index 0000000..0a176aa --- /dev/null +++ b/.idea/libraries/Maven__org_apache_poi_poi_3_17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_17.xml b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_17.xml new file mode 100644 index 0000000..e86aaee --- /dev/null +++ b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_17.xml b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_17.xml new file mode 100644 index 0000000..2531d5d --- /dev/null +++ b/.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_13.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_13.xml new file mode 100644 index 0000000..3494ed4 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_core_9_0_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_13.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_13.xml new file mode 100644 index 0000000..fa07337 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_el_9_0_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_13.xml b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_13.xml new file mode 100644 index 0000000..1c1fac8 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_tomcat_embed_tomcat_embed_websocket_9_0_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml b/.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml new file mode 100644 index 0000000..e7e91a5 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_0_0.xml b/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_0_0.xml new file mode 100644 index 0000000..5b66488 --- /dev/null +++ b/.idea/libraries/Maven__org_apiguardian_apiguardian_api_1_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_2.xml b/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_2.xml new file mode 100644 index 0000000..aae6ac5 --- /dev/null +++ b/.idea/libraries/Maven__org_aspectj_aspectjweaver_1_9_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml b/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml new file mode 100644 index 0000000..f513afc --- /dev/null +++ b/.idea/libraries/Maven__org_assertj_assertj_core_3_11_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15to18_1_77.xml b/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15to18_1_77.xml new file mode 100644 index 0000000..47ddfd2 --- /dev/null +++ b/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15to18_1_77.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_glassfish_javax_el_3_0_0.xml b/.idea/libraries/Maven__org_glassfish_javax_el_3_0_0.xml new file mode 100644 index 0000000..474fcb4 --- /dev/null +++ b/.idea/libraries/Maven__org_glassfish_javax_el_3_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml new file mode 100644 index 0000000..06d1e74 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_2_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 0000000..c3af8f4 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml new file mode 100644 index 0000000..55f2911 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_library_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_13_Final.xml b/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_13_Final.xml new file mode 100644 index 0000000..eec9c16 --- /dev/null +++ b/.idea/libraries/Maven__org_hibernate_validator_hibernate_validator_6_0_13_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_javassist_javassist_3_25_0_GA.xml b/.idea/libraries/Maven__org_javassist_javassist_3_25_0_GA.xml new file mode 100644 index 0000000..92d414c --- /dev/null +++ b/.idea/libraries/Maven__org_javassist_javassist_3_25_0_GA.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml b/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml new file mode 100644 index 0000000..b08a279 --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_logging_jboss_logging_3_3_2_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_spec_javax_annotation_jboss_annotations_api_1_2_spec_1_0_2_Final.xml b/.idea/libraries/Maven__org_jboss_spec_javax_annotation_jboss_annotations_api_1_2_spec_1_0_2_Final.xml new file mode 100644 index 0000000..41b7d61 --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_spec_javax_annotation_jboss_annotations_api_1_2_spec_1_0_2_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_spec_javax_websocket_jboss_websocket_api_1_1_spec_1_1_3_Final.xml b/.idea/libraries/Maven__org_jboss_spec_javax_websocket_jboss_websocket_api_1_1_spec_1_1_3_Final.xml new file mode 100644 index 0000000..0dee970 --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_spec_javax_websocket_jboss_websocket_api_1_1_spec_1_1_3_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_xnio_xnio_api_3_3_8_Final.xml b/.idea/libraries/Maven__org_jboss_xnio_xnio_api_3_3_8_Final.xml new file mode 100644 index 0000000..d22aa0c --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_xnio_xnio_api_3_3_8_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jboss_xnio_xnio_nio_3_3_8_Final.xml b/.idea/libraries/Maven__org_jboss_xnio_xnio_nio_3_3_8_Final.xml new file mode 100644 index 0000000..e434cbd --- /dev/null +++ b/.idea/libraries/Maven__org_jboss_xnio_xnio_nio_3_3_8_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jsoup_jsoup_1_11_3.xml b/.idea/libraries/Maven__org_jsoup_jsoup_1_11_3.xml new file mode 100644 index 0000000..1e1a7c7 --- /dev/null +++ b/.idea/libraries/Maven__org_jsoup_jsoup_1_11_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_8_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_8_2.xml new file mode 100644 index 0000000..d1aa878 --- /dev/null +++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_5_8_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_3_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_3_2.xml new file mode 100644 index 0000000..ab81565 --- /dev/null +++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_api_5_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_3_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_3_2.xml new file mode 100644 index 0000000..d0120e8 --- /dev/null +++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_engine_5_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_3_2.xml b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_3_2.xml new file mode 100644 index 0000000..3db1f7a --- /dev/null +++ b/.idea/libraries/Maven__org_junit_jupiter_junit_jupiter_params_5_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_3_2.xml b/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_3_2.xml new file mode 100644 index 0000000..8f62851 --- /dev/null +++ b/.idea/libraries/Maven__org_junit_platform_junit_platform_commons_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_3_2.xml b/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_3_2.xml new file mode 100644 index 0000000..6238216 --- /dev/null +++ b/.idea/libraries/Maven__org_junit_platform_junit_platform_engine_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mapstruct_mapstruct_1_2_0_Final.xml b/.idea/libraries/Maven__org_mapstruct_mapstruct_1_2_0_Final.xml new file mode 100644 index 0000000..0eb463f --- /dev/null +++ b/.idea/libraries/Maven__org_mapstruct_mapstruct_1_2_0_Final.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml b/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml new file mode 100644 index 0000000..dcafc45 --- /dev/null +++ b/.idea/libraries/Maven__org_mockito_mockito_core_2_23_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_2_23_4.xml b/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_2_23_4.xml new file mode 100644 index 0000000..a9f81f0 --- /dev/null +++ b/.idea/libraries/Maven__org_mockito_mockito_junit_jupiter_2_23_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_mybatis_3_4_6.xml b/.idea/libraries/Maven__org_mybatis_mybatis_3_4_6.xml new file mode 100644 index 0000000..4b05c4f --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_mybatis_3_4_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_2.xml b/.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_2.xml new file mode 100644 index 0000000..0a83ec7 --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_2.xml b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_2.xml new file mode 100644 index 0000000..ef87ced --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_2.xml b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_2.xml new file mode 100644 index 0000000..f0e3d3f --- /dev/null +++ b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_1_3_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml b/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml new file mode 100644 index 0000000..7b0ad95 --- /dev/null +++ b/.idea/libraries/Maven__org_objenesis_objenesis_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_opentest4j_opentest4j_1_1_1.xml b/.idea/libraries/Maven__org_opentest4j_opentest4j_1_1_1.xml new file mode 100644 index 0000000..cfda67a --- /dev/null +++ b/.idea/libraries/Maven__org_opentest4j_opentest4j_1_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml b/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml new file mode 100644 index 0000000..6ce223f --- /dev/null +++ b/.idea/libraries/Maven__org_ow2_asm_asm_5_0_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml b/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml new file mode 100644 index 0000000..34fa786 --- /dev/null +++ b/.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_quartz_scheduler_quartz_2_3_0.xml b/.idea/libraries/Maven__org_quartz_scheduler_quartz_2_3_0.xml new file mode 100644 index 0000000..123d32a --- /dev/null +++ b/.idea/libraries/Maven__org_quartz_scheduler_quartz_2_3_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_2.xml b/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_2.xml new file mode 100644 index 0000000..065cfd0 --- /dev/null +++ b/.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml b/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml new file mode 100644 index 0000000..ac814ca --- /dev/null +++ b/.idea/libraries/Maven__org_skyscreamer_jsonassert_1_5_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml new file mode 100644 index 0000000..4e0eb96 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_jul_to_slf4j_1_7_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml new file mode 100644 index 0000000..f462818 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_1_RELEASE.xml new file mode 100644 index 0000000..56db9c8 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_1_RELEASE.xml new file mode 100644 index 0000000..5c8e407 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_autoconfigure_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_2_1_1_RELEASE.xml new file mode 100644 index 0000000..86293b9 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_devtools_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_1_RELEASE.xml new file mode 100644 index 0000000..b48adf8 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_1_RELEASE.xml new file mode 100644 index 0000000..47d9e9f --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_aop_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_1_1_RELEASE.xml new file mode 100644 index 0000000..0474edb --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_1_RELEASE.xml new file mode 100644 index 0000000..93bb323 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_jdbc_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_1_RELEASE.xml new file mode 100644 index 0000000..55111d2 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_json_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_1_RELEASE.xml new file mode 100644 index 0000000..2717632 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_logging_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_2_1_1_RELEASE.xml new file mode 100644 index 0000000..7f8277a --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_security_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_1_RELEASE.xml new file mode 100644 index 0000000..4ed1207 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_7_4.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_7_4.xml new file mode 100644 index 0000000..b2bd463 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_test_2_7_4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_1_RELEASE.xml new file mode 100644 index 0000000..cae6052 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_tomcat_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_undertow_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_undertow_2_1_1_RELEASE.xml new file mode 100644 index 0000000..8377f57 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_undertow_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_1_RELEASE.xml new file mode 100644 index 0000000..04c8290 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_web_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_websocket_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_websocket_2_1_1_RELEASE.xml new file mode 100644 index 0000000..57493b2 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_websocket_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_1_RELEASE.xml new file mode 100644 index 0000000..882d15d --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_1_RELEASE.xml b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_1_RELEASE.xml new file mode 100644 index 0000000..1b23314 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_boot_spring_boot_test_autoconfigure_2_1_1_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_1_3_RELEASE.xml new file mode 100644 index 0000000..b754bee --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_1_3_RELEASE.xml new file mode 100644 index 0000000..e05b240 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_1_3_RELEASE.xml new file mode 100644 index 0000000..8ad4d7f --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_plugin_spring_plugin_core_1_2_0_RELEASE.xml b/.idea/libraries/Maven__org_springframework_plugin_spring_plugin_core_1_2_0_RELEASE.xml new file mode 100644 index 0000000..60f8d1d --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_plugin_spring_plugin_core_1_2_0_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_plugin_spring_plugin_metadata_1_2_0_RELEASE.xml b/.idea/libraries/Maven__org_springframework_plugin_spring_plugin_metadata_1_2_0_RELEASE.xml new file mode 100644 index 0000000..a808141 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_plugin_spring_plugin_metadata_1_2_0_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_config_5_1_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_config_5_1_2_RELEASE.xml new file mode 100644 index 0000000..527d913 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_security_spring_security_config_5_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_core_5_1_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_core_5_1_2_RELEASE.xml new file mode 100644 index 0000000..9409a99 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_security_spring_security_core_5_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_security_spring_security_web_5_1_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_security_spring_security_web_5_1_2_RELEASE.xml new file mode 100644 index 0000000..6e32175 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_security_spring_security_web_5_1_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_aop_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_aop_5_1_3_RELEASE.xml new file mode 100644 index 0000000..e7647bb --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_aop_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_beans_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_beans_5_1_3_RELEASE.xml new file mode 100644 index 0000000..dd5d664 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_beans_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_context_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_context_5_1_3_RELEASE.xml new file mode 100644 index 0000000..ef1f2ed --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_context_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_context_support_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_context_support_5_1_3_RELEASE.xml new file mode 100644 index 0000000..f21b0a1 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_context_support_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_core_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_core_5_1_3_RELEASE.xml new file mode 100644 index 0000000..56007c8 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_core_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_expression_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_expression_5_1_3_RELEASE.xml new file mode 100644 index 0000000..b4d669e --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_expression_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_3_RELEASE.xml new file mode 100644 index 0000000..577286f --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_jcl_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_3_RELEASE.xml new file mode 100644 index 0000000..89de782 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_jdbc_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_messaging_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_messaging_5_1_3_RELEASE.xml new file mode 100644 index 0000000..629dbcb --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_messaging_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_oxm_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_oxm_5_1_3_RELEASE.xml new file mode 100644 index 0000000..bcab199 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_oxm_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_test_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_test_5_1_3_RELEASE.xml new file mode 100644 index 0000000..7b8619f --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_test_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_tx_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_tx_5_1_3_RELEASE.xml new file mode 100644 index 0000000..cb4d2b6 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_tx_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_web_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_web_5_1_3_RELEASE.xml new file mode 100644 index 0000000..652b779 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_web_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_3_RELEASE.xml new file mode 100644 index 0000000..3f056bb --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_webmvc_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_websocket_5_1_3_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_websocket_5_1_3_RELEASE.xml new file mode 100644 index 0000000..ca68286 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_websocket_5_1_3_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_2.xml b/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_2.xml new file mode 100644 index 0000000..f87fa51 --- /dev/null +++ b/.idea/libraries/Maven__org_xmlunit_xmlunit_core_2_6_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml new file mode 100644 index 0000000..485fc87 --- /dev/null +++ b/.idea/libraries/Maven__org_yaml_snakeyaml_1_23.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml b/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml new file mode 100644 index 0000000..e0d791f --- /dev/null +++ b/.idea/libraries/Maven__redis_clients_jedis_2_9_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__stax_stax_api_1_0_1.xml b/.idea/libraries/Maven__stax_stax_api_1_0_1.xml new file mode 100644 index 0000000..cd06518 --- /dev/null +++ b/.idea/libraries/Maven__stax_stax_api_1_0_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__tk_mybatis_mapper_base_1_0_0.xml b/.idea/libraries/Maven__tk_mybatis_mapper_base_1_0_0.xml new file mode 100644 index 0000000..4999b59 --- /dev/null +++ b/.idea/libraries/Maven__tk_mybatis_mapper_base_1_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__tk_mybatis_mapper_core_1_0_0.xml b/.idea/libraries/Maven__tk_mybatis_mapper_core_1_0_0.xml new file mode 100644 index 0000000..faa8b68 --- /dev/null +++ b/.idea/libraries/Maven__tk_mybatis_mapper_core_1_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__tk_mybatis_mapper_spring_1_0_0.xml b/.idea/libraries/Maven__tk_mybatis_mapper_spring_1_0_0.xml new file mode 100644 index 0000000..0054a4b --- /dev/null +++ b/.idea/libraries/Maven__tk_mybatis_mapper_spring_1_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__tk_mybatis_mapper_spring_boot_autoconfigure_2_0_0.xml b/.idea/libraries/Maven__tk_mybatis_mapper_spring_boot_autoconfigure_2_0_0.xml new file mode 100644 index 0000000..4e64a7f --- /dev/null +++ b/.idea/libraries/Maven__tk_mybatis_mapper_spring_boot_autoconfigure_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__tk_mybatis_mapper_spring_boot_starter_2_0_0.xml b/.idea/libraries/Maven__tk_mybatis_mapper_spring_boot_starter_2_0_0.xml new file mode 100644 index 0000000..06b6eb3 --- /dev/null +++ b/.idea/libraries/Maven__tk_mybatis_mapper_spring_boot_starter_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__tk_mybatis_mapper_weekend_1_1_3.xml b/.idea/libraries/Maven__tk_mybatis_mapper_weekend_1_1_3.xml new file mode 100644 index 0000000..7eec073 --- /dev/null +++ b/.idea/libraries/Maven__tk_mybatis_mapper_weekend_1_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..25daa30 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..bf4fc25 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..a237675 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C:\Users\郑成强\AppData\Roaming\Subversion + 125 + + + + + 1706682349098 + + + + + + + + + + + + + file://$PROJECT_DIR$/mxdata_v-system/src/main/java/com/alonginfo/project/common/CommonController.java + 76 + + + + + + + + + + \ No newline at end of file diff --git a/a_device_info.uml b/a_device_info.uml new file mode 100644 index 0000000..a6739aa --- /dev/null +++ b/a_device_info.uml @@ -0,0 +1,126 @@ + + + DATABASE + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_device_info + + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_spot_contract_month_day + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_post + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_poly_plan_user + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.t_resource_total + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_dict_type + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_notice + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_logininfor + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_blob_triggers + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_cons_baseline + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_dict_data + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_simple_triggers + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_device_load_data + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_record_client + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_scheduler_state + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_user_role + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_device_index + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_monitor_event + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_execute_cons + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_project_user + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_execute_event + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_job_details + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_spot_contract_day_min + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_peak_shave_invitation_event + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_role_menu + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.t_resource_company + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.gen_table + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_peak_shave_invitation_cons + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_peak_shave_cust_baseline + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_role_dept + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_user_load + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_execute_result_cust + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_project_aggregator_detail + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_user + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_dept + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_user_invite + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_cron_triggers + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_job + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_report_curve_merge + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_locks + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_record_device + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_spot_file + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_user_post + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_fired_triggers + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_calendars + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.gen_table_column + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_menu + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_record_power_user + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_job_log + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_report_order + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_project_user_sign_detail + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_cust_baseline + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_spot_contract_year_month + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.t_resource_type + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_record_device_warning + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_poly_plan + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_city + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_project_user_detail + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_subsidy_cons + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_project_info + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_config + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_project_aggregator + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_invitation_event + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_project + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_record_aggregator + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_device_info + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_execute_result_cons + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_role + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_simprop_triggers + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_device_elec_data + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_device_load_data + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_report_curve_merge_snapshot + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_triggers + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.sys_oper_log + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_run_device + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_demand_invitation_cons + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_project_user_sign + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_spot_contract + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.qrtz_paused_trigger_grps + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.p_record_file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7a63a1d8-527a-4a64-9456-1125ed0afa8d.TABLE:vpp_hf.a_project_user_sign_detail + + + Columns + Key columns + + + diff --git a/mxdata_v-common/mxdata_v-common.iml b/mxdata_v-common/mxdata_v-common.iml new file mode 100644 index 0000000..da94750 --- /dev/null +++ b/mxdata_v-common/mxdata_v-common.iml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-common/pom.xml b/mxdata_v-common/pom.xml new file mode 100644 index 0000000..81a5166 --- /dev/null +++ b/mxdata_v-common/pom.xml @@ -0,0 +1,134 @@ + + + + mxdata_v + com.alonginfo + 1.0 + + 4.0.0 + + mxdata_v-common + + + common通用工具 + + + + 2.5 + 1.3.3 + 1.11.3 + 3.17 + 0.9.0 + + + + + + org.springframework + spring-context-support + + + + + org.springframework + spring-web + + + + org.apache.commons + commons-lang3 + + + + + com.fasterxml.jackson.core + jackson-databind + + + + + commons-io + commons-io + ${commons.io.version} + + + + + commons-fileupload + commons-fileupload + ${commons.fileupload.version} + + + + + org.jsoup + jsoup + ${jsoup.version} + + + + + org.apache.poi + poi-ooxml + ${poi.version} + + + + + org.yaml + snakeyaml + + + + + commons-beanutils + commons-beanutils + 1.9.3 + + + + io.jsonwebtoken + jjwt + ${jwt.version} + + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + cn.hutool + hutool-all + 5.8.16 + + + com.alibaba.fastjson2 + fastjson2 + 2.0.39 + + + org.springframework.data + spring-data-redis + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${java.version} + ${java.version} + ${project.build.sourceEncoding} + true + + + + + \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/constant/Constants.java b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/Constants.java new file mode 100644 index 0000000..cdfe8a6 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/Constants.java @@ -0,0 +1,116 @@ +package com.alonginfo.common.constant; +import io.jsonwebtoken.Claims; +/** + * 通用常量信息 + */ +public class Constants { + /** + * UTF-8 字符集 + */ + public static final String UTF8 = "UTF-8"; + + /** + * 通用成功标识 + */ + public static final String SUCCESS = "0"; + + /** + * 通用失败标识 + */ + public static final String FAIL = "1"; + + /** + * 登录成功 + */ + public static final String LOGIN_SUCCESS = "Success"; + + /** + * 注销 + */ + public static final String LOGOUT = "Logout"; + + /** + * 登录失败 + */ + public static final String LOGIN_FAIL = "Error"; + + /** + * 验证码 redis key + */ + public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; + + /** + * 登录用户 redis key + */ + public static final String LOGIN_TOKEN_KEY = "login_tokens:"; + + /** + * 验证码有效期(分钟) + */ + public static final Integer CAPTCHA_EXPIRATION = 2; + + /** + * 令牌 + */ + public static final String TOKEN = "token"; + + /** + * 令牌前缀 + */ + public static final String TOKEN_PREFIX = "Bearer "; + + /** + * 令牌前缀 + */ + public static final String LOGIN_USER_KEY = "login_user_key"; + + /** + * 用户ID + */ + public static final String JWT_USERID = "userid"; + + /** + * 用户名称 + */ + public static final String JWT_USERNAME = Claims.SUBJECT; + + /** + * 用户头像 + */ + public static final String JWT_AVATAR = "avatar"; + + /** + * 创建时间 + */ + public static final String JWT_CREATED = "created"; + + /** + * 用户权限 + */ + public static final String JWT_AUTHORITIES = "authorities"; + + /** + * 资源映射路径 前缀 + */ + public static final String RESOURCE_PREFIX = "/profile"; + + /** + * 交易公告文件映射路径 + */ + public static final String NOTICE_RESOURCE_PREFIX = "/notice"; + + /** + * 市场建设情况文件 + */ + public static final String MARKET_RESOURCE_PREFIX = "/marketUpload"; + + /** + * http请求 + */ + public static final String HTTP = "http://"; + + /** + * https请求 + */ + public static final String HTTPS = "https://"; +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/constant/DatavConstans.java b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/DatavConstans.java new file mode 100644 index 0000000..ade1eb2 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/DatavConstans.java @@ -0,0 +1,12 @@ +package com.alonginfo.common.constant; + +/** + * 可视化相关的常量 + * @author shidj + */ +public class DatavConstans { + + /** 校验返回结果码 */ + public final static String UNIQUE = "0"; + public final static String NOT_UNIQUE = "1"; +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/constant/HttpStatus.java b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/HttpStatus.java new file mode 100644 index 0000000..e25563c --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/HttpStatus.java @@ -0,0 +1,89 @@ +package com.alonginfo.common.constant; + +/** + * 返回状态码 + */ +public interface HttpStatus { + /** + * 操作成功 + */ + public static final int SUCCESS = 200; + + /** + * 对象创建成功 + */ + public static final int CREATED = 201; + + /** + * 请求已经被接受 + */ + public static final int ACCEPTED = 202; + + /** + * 操作已经执行成功,但是没有返回数据 + */ + public static final int NO_CONTENT = 204; + + /** + * 资源已被移除 + */ + public static final int MOVED_PERM = 301; + + /** + * 重定向 + */ + public static final int SEE_OTHER = 303; + + /** + * 资源没有被修改 + */ + public static final int NOT_MODIFIED = 304; + + /** + * 参数列表错误(缺少,格式不匹配) + */ + public static final int BAD_REQUEST = 400; + + /** + * 未授权 + */ + public static final int UNAUTHORIZED = 401; + + /** + * 访问受限,授权过期 + */ + public static final int FORBIDDEN = 403; + + /** + * 资源,服务未找到 + */ + public static final int NOT_FOUND = 404; + + /** + * 不允许的http方法 + */ + public static final int BAD_METHOD = 405; + + /** + * 资源冲突,或者资源被锁 + */ + public static final int CONFLICT = 409; + + /** + * 不支持的数据,媒体类型 + */ + public static final int UNSUPPORTED_TYPE = 415; + + /** + * 系统内部错误 + */ + public static final int ERROR = 500; + + /** + * 接口未实现 + */ + public static final int NOT_IMPLEMENTED = 501; + + + public static final int WARN = 601; +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/constant/UserConstants.java b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/UserConstants.java new file mode 100644 index 0000000..5cc47e5 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/constant/UserConstants.java @@ -0,0 +1,36 @@ +package com.alonginfo.common.constant; + +/** + * 用户常量信息 + */ +public class UserConstants { + /** + * 平台内系统用户的唯一标志 + */ + public static final String SYS_USER = "SYS_USER"; + + /** 正常状态 */ + public static final String NORMAL = "0"; + + /** 异常状态 */ + public static final String EXCEPTION = "1"; + + /** 用户封禁状态 */ + public static final String USER_BLOCKED = "1"; + + /** 角色封禁状态 */ + public static final String ROLE_BLOCKED = "1"; + + /** 部门正常状态 */ + public static final String DEPT_NORMAL = "0"; + + /** 字典正常状态 */ + public static final String DICT_NORMAL = "0"; + + /** 是否为系统默认(是) */ + public static final String YES = "Y"; + + /** 校验返回结果码 */ + public final static String UNIQUE = "0"; + public final static String NOT_UNIQUE = "1"; +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/core/lang/UUID.java b/mxdata_v-common/src/main/java/com/alonginfo/common/core/lang/UUID.java new file mode 100644 index 0000000..5d0899d --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/core/lang/UUID.java @@ -0,0 +1,480 @@ +package com.alonginfo.common.core.lang; + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.Random; +import java.util.concurrent.ThreadLocalRandom; + +/** + * 提供通用唯一识别码(universally unique identifier)(UUID)实现 + */ +public class UUID implements java.io.Serializable, Comparable { + + private static final long serialVersionUID = -1185015143654744140L; + + /** + * SecureRandom 的单例 + * + */ + private static class Holder + { + static final SecureRandom numberGenerator = getSecureRandom(); + } + + /** 此UUID的最高64有效位 */ + private final long mostSigBits; + + /** 此UUID的最低64有效位 */ + private final long leastSigBits; + + /** + * 私有构造 + * + * @param data 数据 + */ + private UUID(byte[] data) + { + long msb = 0; + long lsb = 0; + assert data.length == 16 : "data must be 16 bytes in length"; + for (int i = 0; i < 8; i++) + { + msb = (msb << 8) | (data[i] & 0xff); + } + for (int i = 8; i < 16; i++) + { + lsb = (lsb << 8) | (data[i] & 0xff); + } + this.mostSigBits = msb; + this.leastSigBits = lsb; + } + + /** + * 使用指定的数据构造新的 UUID。 + * + * @param mostSigBits 用于 {@code UUID} 的最高有效 64 位 + * @param leastSigBits 用于 {@code UUID} 的最低有效 64 位 + */ + public UUID(long mostSigBits, long leastSigBits) + { + this.mostSigBits = mostSigBits; + this.leastSigBits = leastSigBits; + } + + /** + * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的本地线程伪随机数生成器生成该 UUID。 + * + * @return 随机生成的 {@code UUID} + */ + public static UUID fastUUID() + { + return randomUUID(false); + } + + /** + * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的强伪随机数生成器生成该 UUID。 + * + * @return 随机生成的 {@code UUID} + */ + public static UUID randomUUID() + { + return randomUUID(true); + } + + /** + * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的强伪随机数生成器生成该 UUID。 + * + * @param isSecure 是否使用{@link SecureRandom}如果是可以获得更安全的随机码,否则可以得到更好的性能 + * @return 随机生成的 {@code UUID} + */ + public static UUID randomUUID(boolean isSecure) + { + final Random ng = isSecure ? Holder.numberGenerator : getRandom(); + + byte[] randomBytes = new byte[16]; + ng.nextBytes(randomBytes); + randomBytes[6] &= 0x0f; /* clear version */ + randomBytes[6] |= 0x40; /* set to version 4 */ + randomBytes[8] &= 0x3f; /* clear variant */ + randomBytes[8] |= 0x80; /* set to IETF variant */ + return new UUID(randomBytes); + } + + /** + * 根据指定的字节数组获取类型 3(基于名称的)UUID 的静态工厂。 + * + * @param name 用于构造 UUID 的字节数组。 + * + * @return 根据指定数组生成的 {@code UUID} + */ + public static UUID nameUUIDFromBytes(byte[] name) + { + MessageDigest md; + try + { + md = MessageDigest.getInstance("MD5"); + } + catch (NoSuchAlgorithmException nsae) + { + throw new InternalError("MD5 not supported"); + } + byte[] md5Bytes = md.digest(name); + md5Bytes[6] &= 0x0f; /* clear version */ + md5Bytes[6] |= 0x30; /* set to version 3 */ + md5Bytes[8] &= 0x3f; /* clear variant */ + md5Bytes[8] |= 0x80; /* set to IETF variant */ + return new UUID(md5Bytes); + } + + /** + * 根据 {@link #toString()} 方法中描述的字符串标准表示形式创建{@code UUID}。 + * + * @param name 指定 {@code UUID} 字符串 + * @return 具有指定值的 {@code UUID} + * @throws IllegalArgumentException 如果 name 与 {@link #toString} 中描述的字符串表示形式不符抛出此异常 + * + */ + public static UUID fromString(String name) + { + String[] components = name.split("-"); + if (components.length != 5) + { + throw new IllegalArgumentException("Invalid UUID string: " + name); + } + for (int i = 0; i < 5; i++) + { + components[i] = "0x" + components[i]; + } + + long mostSigBits = Long.decode(components[0]).longValue(); + mostSigBits <<= 16; + mostSigBits |= Long.decode(components[1]).longValue(); + mostSigBits <<= 16; + mostSigBits |= Long.decode(components[2]).longValue(); + + long leastSigBits = Long.decode(components[3]).longValue(); + leastSigBits <<= 48; + leastSigBits |= Long.decode(components[4]).longValue(); + + return new UUID(mostSigBits, leastSigBits); + } + + /** + * 返回此 UUID 的 128 位值中的最低有效 64 位。 + * + * @return 此 UUID 的 128 位值中的最低有效 64 位。 + */ + public long getLeastSignificantBits() + { + return leastSigBits; + } + + /** + * 返回此 UUID 的 128 位值中的最高有效 64 位。 + * + * @return 此 UUID 的 128 位值中最高有效 64 位。 + */ + public long getMostSignificantBits() + { + return mostSigBits; + } + + /** + * 与此 {@code UUID} 相关联的版本号. 版本号描述此 {@code UUID} 是如何生成的。 + *

+ * 版本号具有以下含意: + *

    + *
  • 1 基于时间的 UUID + *
  • 2 DCE 安全 UUID + *
  • 3 基于名称的 UUID + *
  • 4 随机生成的 UUID + *
+ * + * @return 此 {@code UUID} 的版本号 + */ + public int version() + { + // Version is bits masked by 0x000000000000F000 in MS long + return (int) ((mostSigBits >> 12) & 0x0f); + } + + /** + * 与此 {@code UUID} 相关联的变体号。变体号描述 {@code UUID} 的布局。 + *

+ * 变体号具有以下含意: + *

    + *
  • 0 为 NCS 向后兼容保留 + *
  • 2 IETF RFC 4122(Leach-Salz), 用于此类 + *
  • 6 保留,微软向后兼容 + *
  • 7 保留供以后定义使用 + *
+ * + * @return 此 {@code UUID} 相关联的变体号 + */ + public int variant() + { + // This field is composed of a varying number of bits. + // 0 - - Reserved for NCS backward compatibility + // 1 0 - The IETF aka Leach-Salz variant (used by this class) + // 1 1 0 Reserved, Microsoft backward compatibility + // 1 1 1 Reserved for future definition. + return (int) ((leastSigBits >>> (64 - (leastSigBits >>> 62))) & (leastSigBits >> 63)); + } + + /** + * 与此 UUID 相关联的时间戳值。 + * + *

+ * 60 位的时间戳值根据此 {@code UUID} 的 time_low、time_mid 和 time_hi 字段构造。
+ * 所得到的时间戳以 100 毫微秒为单位,从 UTC(通用协调时间) 1582 年 10 月 15 日零时开始。 + * + *

+ * 时间戳值仅在在基于时间的 UUID(其 version 类型为 1)中才有意义。
+ * 如果此 {@code UUID} 不是基于时间的 UUID,则此方法抛出 UnsupportedOperationException。 + * + * @throws UnsupportedOperationException 如果此 {@code UUID} 不是 version 为 1 的 UUID。 + */ + public long timestamp() throws UnsupportedOperationException + { + checkTimeBase(); + return (mostSigBits & 0x0FFFL) << 48// + | ((mostSigBits >> 16) & 0x0FFFFL) << 32// + | mostSigBits >>> 32; + } + /** + * 与此 UUID 相关联的时钟序列值。 + * + *

+ * 14 位的时钟序列值根据此 UUID 的 clock_seq 字段构造。clock_seq 字段用于保证在基于时间的 UUID 中的时间唯一性。 + *

+ * {@code clockSequence} 值仅在基于时间的 UUID(其 version 类型为 1)中才有意义。 如果此 UUID 不是基于时间的 UUID,则此方法抛出 + * UnsupportedOperationException。 + * + * @return 此 {@code UUID} 的时钟序列 + * + * @throws UnsupportedOperationException 如果此 UUID 的 version 不为 1 + */ + public int clockSequence() throws UnsupportedOperationException + { + checkTimeBase(); + return (int) ((leastSigBits & 0x3FFF000000000000L) >>> 48); + } + + /** + * 与此 UUID 相关的节点值。 + * + *

+ * 48 位的节点值根据此 UUID 的 node 字段构造。此字段旨在用于保存机器的 IEEE 802 地址,该地址用于生成此 UUID 以保证空间唯一性。 + *

+ * 节点值仅在基于时间的 UUID(其 version 类型为 1)中才有意义。
+ * 如果此 UUID 不是基于时间的 UUID,则此方法抛出 UnsupportedOperationException。 + * + * @return 此 {@code UUID} 的节点值 + * + * @throws UnsupportedOperationException 如果此 UUID 的 version 不为 1 + */ + public long node() throws UnsupportedOperationException + { + checkTimeBase(); + return leastSigBits & 0x0000FFFFFFFFFFFFL; + } + + /** + * 返回此{@code UUID} 的字符串表现形式。 + * + *

+ * UUID 的字符串表示形式由此 BNF 描述: + * + *

+     * {@code
+     * UUID                   = ----
+     * time_low               = 4*
+     * time_mid               = 2*
+     * time_high_and_version  = 2*
+     * variant_and_sequence   = 2*
+     * node                   = 6*
+     * hexOctet               = 
+     * hexDigit               = [0-9a-fA-F]
+     * }
+     * 
+ * + * + * + * @return 此{@code UUID} 的字符串表现形式 + * @see #toString(boolean) + */ + @Override + public String toString() + { + return toString(false); + } + + /** + * 返回此{@code UUID} 的字符串表现形式。 + * + *

+ * UUID 的字符串表示形式由此 BNF 描述: + * + *

+     * {@code
+     * UUID                   = ----
+     * time_low               = 4*
+     * time_mid               = 2*
+     * time_high_and_version  = 2*
+     * variant_and_sequence   = 2*
+     * node                   = 6*
+     * hexOctet               = 
+     * hexDigit               = [0-9a-fA-F]
+     * }
+     * 
+ * + * + * + * @param isSimple 是否简单模式,简单模式为不带'-'的UUID字符串 + * @return 此{@code UUID} 的字符串表现形式 + */ + public String toString(boolean isSimple) + { + final StringBuilder builder = new StringBuilder(isSimple ? 32 : 36); + // time_low + builder.append(digits(mostSigBits >> 32, 8)); + if (false == isSimple) + { + builder.append('-'); + } + // time_mid + builder.append(digits(mostSigBits >> 16, 4)); + if (false == isSimple) + { + builder.append('-'); + } + // time_high_and_version + builder.append(digits(mostSigBits, 4)); + if (false == isSimple) + { + builder.append('-'); + } + // variant_and_sequence + builder.append(digits(leastSigBits >> 48, 4)); + if (false == isSimple) + { + builder.append('-'); + } + // node + builder.append(digits(leastSigBits, 12)); + + return builder.toString(); + } + + /** + * 返回此 UUID 的哈希码。 + * + * @return UUID 的哈希码值。 + */ + @Override + public int hashCode() + { + long hilo = mostSigBits ^ leastSigBits; + return ((int) (hilo >> 32)) ^ (int) hilo; + } + + /** + * 将此对象与指定对象比较。 + *

+ * 当且仅当参数不为 {@code null}、而是一个 UUID 对象、具有与此 UUID 相同的 varriant、包含相同的值(每一位均相同)时,结果才为 {@code true}。 + * + * @param obj 要与之比较的对象 + * + * @return 如果对象相同,则返回 {@code true};否则返回 {@code false} + */ + @Override + public boolean equals(Object obj) + { + if ((null == obj) || (obj.getClass() != UUID.class)) + { + return false; + } + UUID id = (UUID) obj; + return (mostSigBits == id.mostSigBits && leastSigBits == id.leastSigBits); + } + + // Comparison Operations + + /** + * 将此 UUID 与指定的 UUID 比较。 + * + *

+ * 如果两个 UUID 不同,且第一个 UUID 的最高有效字段大于第二个 UUID 的对应字段,则第一个 UUID 大于第二个 UUID。 + * + * @param val 与此 UUID 比较的 UUID + * + * @return 在此 UUID 小于、等于或大于 val 时,分别返回 -1、0 或 1。 + * + */ + @Override + public int compareTo(UUID val) + { + // The ordering is intentionally set up so that the UUIDs + // can simply be numerically compared as two numbers + return (this.mostSigBits < val.mostSigBits ? -1 : // + (this.mostSigBits > val.mostSigBits ? 1 : // + (this.leastSigBits < val.leastSigBits ? -1 : // + (this.leastSigBits > val.leastSigBits ? 1 : // + 0)))); + } + + // ------------------------------------------------------------------------------------------------------------------- + // Private method start + /** + * 返回指定数字对应的hex值 + * + * @param val 值 + * @param digits 位 + * @return 值 + */ + private static String digits(long val, int digits) + { + long hi = 1L << (digits * 4); + return Long.toHexString(hi | (val & (hi - 1))).substring(1); + } + + /** + * 检查是否为time-based版本UUID + */ + private void checkTimeBase() + { + if (version() != 1) + { + throw new UnsupportedOperationException("Not a time-based UUID"); + } + } + + /** + * 获取{@link SecureRandom},类提供加密的强随机数生成器 (RNG) + * + * @return {@link SecureRandom} + */ + public static SecureRandom getSecureRandom() + { + try + { + return SecureRandom.getInstance("SHA1PRNG"); + } + catch (NoSuchAlgorithmException e) + { + throw new RuntimeException(); + } + } + + /** + * 获取随机数生成器对象
+ * ThreadLocalRandom是JDK 7之后提供并发产生随机数,能够解决多个线程发生的竞争争夺。 + * + * @return {@link ThreadLocalRandom} + */ + public static ThreadLocalRandom getRandom() + { + return ThreadLocalRandom.current(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/CharsetKit.java b/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/CharsetKit.java new file mode 100644 index 0000000..8ce7031 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/CharsetKit.java @@ -0,0 +1,85 @@ +package com.alonginfo.common.core.text; + +import com.alonginfo.common.utils.StringUtils; + +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; + +/** + * 字符集工具类 + */ +public class CharsetKit +{ + /** ISO-8859-1 */ + public static final String ISO_8859_1 = "ISO-8859-1"; + /** UTF-8 */ + public static final String UTF_8 = "UTF-8"; + /** GBK */ + public static final String GBK = "GBK"; + + /** ISO-8859-1 */ + public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1); + /** UTF-8 */ + public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8); + /** GBK */ + public static final Charset CHARSET_GBK = Charset.forName(GBK); + + /** + * 转换为Charset对象 + * + * @param charset 字符集,为空则返回默认字符集 + * @return Charset + */ + public static Charset charset(String charset) + { + return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset); + } + + /** + * 转换字符串的字符集编码 + * + * @param source 字符串 + * @param srcCharset 源字符集,默认ISO-8859-1 + * @param destCharset 目标字符集,默认UTF-8 + * @return 转换后的字符集 + */ + public static String convert(String source, String srcCharset, String destCharset) + { + return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset)); + } + + /** + * 转换字符串的字符集编码 + * + * @param source 字符串 + * @param srcCharset 源字符集,默认ISO-8859-1 + * @param destCharset 目标字符集,默认UTF-8 + * @return 转换后的字符集 + */ + public static String convert(String source, Charset srcCharset, Charset destCharset) + { + if (null == srcCharset) + { + srcCharset = StandardCharsets.ISO_8859_1; + } + + if (null == destCharset) + { + srcCharset = StandardCharsets.UTF_8; + } + + if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset)) + { + return source; + } + return new String(source.getBytes(srcCharset), destCharset); + } + + /** + * @return 系统字符集编码 + */ + public static String systemCharset() + { + return Charset.defaultCharset().name(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/Convert.java b/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/Convert.java new file mode 100644 index 0000000..a220379 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/Convert.java @@ -0,0 +1,998 @@ +package com.alonginfo.common.core.text; + +import com.alonginfo.common.utils.StringUtils; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.text.NumberFormat; +import java.util.Set; + +/** + * 类型转换器 + */ +public class Convert +{ + /** + * 转换为字符串
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static String toStr(Object value, String defaultValue) + { + if (null == value) + { + return defaultValue; + } + if (value instanceof String) + { + return (String) value; + } + return value.toString(); + } + + /** + * 转换为字符串
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static String toStr(Object value) + { + return toStr(value, null); + } + + /** + * 转换为字符
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Character toChar(Object value, Character defaultValue) + { + if (null == value) + { + return defaultValue; + } + if (value instanceof Character) + { + return (Character) value; + } + + final String valueStr = toStr(value, null); + return StringUtils.isEmpty(valueStr) ? defaultValue : valueStr.charAt(0); + } + + /** + * 转换为字符
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Character toChar(Object value) + { + return toChar(value, null); + } + + /** + * 转换为byte
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Byte toByte(Object value, Byte defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Byte) + { + return (Byte) value; + } + if (value instanceof Number) + { + return ((Number) value).byteValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return Byte.parseByte(valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为byte
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Byte toByte(Object value) + { + return toByte(value, null); + } + + /** + * 转换为Short
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Short toShort(Object value, Short defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Short) + { + return (Short) value; + } + if (value instanceof Number) + { + return ((Number) value).shortValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return Short.parseShort(valueStr.trim()); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为Short
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Short toShort(Object value) + { + return toShort(value, null); + } + + /** + * 转换为Number
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Number toNumber(Object value, Number defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Number) + { + return (Number) value; + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return NumberFormat.getInstance().parse(valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为Number
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Number toNumber(Object value) + { + return toNumber(value, null); + } + + /** + * 转换为int
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Integer toInt(Object value, Integer defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Integer) + { + return (Integer) value; + } + if (value instanceof Number) + { + return ((Number) value).intValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return Integer.parseInt(valueStr.trim()); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为int
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Integer toInt(Object value) + { + return toInt(value, null); + } + + /** + * 转换为Integer数组
+ * + * @param str 被转换的值 + * @return 结果 + */ + public static Integer[] toIntArray(String str) + { + return toIntArray(",", str); + } + + /** + * 转换为Long数组
+ * + * @param str 被转换的值 + * @return 结果 + */ + public static Long[] toLongArray(String str) + { + return toLongArray(",", str); + } + + /** + * 转换为Integer数组
+ * + * @param split 分隔符 + * @param split 被转换的值 + * @return 结果 + */ + public static Integer[] toIntArray(String split, String str) + { + if (StringUtils.isEmpty(str)) + { + return new Integer[] {}; + } + String[] arr = str.split(split); + final Integer[] ints = new Integer[arr.length]; + for (int i = 0; i < arr.length; i++) + { + final Integer v = toInt(arr[i], 0); + ints[i] = v; + } + return ints; + } + + /** + * 转换为Long数组
+ * + * @param split 分隔符 + * @param str 被转换的值 + * @return 结果 + */ + public static Long[] toLongArray(String split, String str) + { + if (StringUtils.isEmpty(str)) + { + return new Long[] {}; + } + String[] arr = str.split(split); + final Long[] longs = new Long[arr.length]; + for (int i = 0; i < arr.length; i++) + { + final Long v = toLong(arr[i], null); + longs[i] = v; + } + return longs; + } + + /** + * 转换为String数组
+ * + * @param str 被转换的值 + * @return 结果 + */ + public static String[] toStrArray(String str) + { + return toStrArray(",", str); + } + + /** + * 转换为String数组
+ * + * @param split 分隔符 + * @param split 被转换的值 + * @return 结果 + */ + public static String[] toStrArray(String split, String str) + { + return str.split(split); + } + + /** + * 转换为long
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Long toLong(Object value, Long defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Long) + { + return (Long) value; + } + if (value instanceof Number) + { + return ((Number) value).longValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + // 支持科学计数法 + return new BigDecimal(valueStr.trim()).longValue(); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为long
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Long toLong(Object value) + { + return toLong(value, null); + } + + /** + * 转换为double
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Double toDouble(Object value, Double defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Double) + { + return (Double) value; + } + if (value instanceof Number) + { + return ((Number) value).doubleValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + // 支持科学计数法 + return new BigDecimal(valueStr.trim()).doubleValue(); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为double
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Double toDouble(Object value) + { + return toDouble(value, null); + } + + /** + * 转换为Float
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Float toFloat(Object value, Float defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Float) + { + return (Float) value; + } + if (value instanceof Number) + { + return ((Number) value).floatValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return Float.parseFloat(valueStr.trim()); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为Float
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Float toFloat(Object value) + { + return toFloat(value, null); + } + + /** + * 转换为boolean
+ * String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Boolean toBool(Object value, Boolean defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Boolean) + { + return (Boolean) value; + } + String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + valueStr = valueStr.trim().toLowerCase(); + switch (valueStr) + { + case "true": + return true; + case "false": + return false; + case "yes": + return true; + case "ok": + return true; + case "no": + return false; + case "1": + return true; + case "0": + return false; + default: + return defaultValue; + } + } + + /** + * 转换为boolean
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Boolean toBool(Object value) + { + return toBool(value, null); + } + + /** + * 转换为Enum对象
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * + * @param clazz Enum的Class + * @param value 值 + * @param defaultValue 默认值 + * @return Enum + */ + public static > E toEnum(Class clazz, Object value, E defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (clazz.isAssignableFrom(value.getClass())) + { + @SuppressWarnings("unchecked") + E myE = (E) value; + return myE; + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return Enum.valueOf(clazz, valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为Enum对象
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * + * @param clazz Enum的Class + * @param value 值 + * @return Enum + */ + public static > E toEnum(Class clazz, Object value) + { + return toEnum(clazz, value, null); + } + + /** + * 转换为BigInteger
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static BigInteger toBigInteger(Object value, BigInteger defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof BigInteger) + { + return (BigInteger) value; + } + if (value instanceof Long) + { + return BigInteger.valueOf((Long) value); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return new BigInteger(valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为BigInteger
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static BigInteger toBigInteger(Object value) + { + return toBigInteger(value, null); + } + + /** + * 转换为BigDecimal
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof BigDecimal) + { + return (BigDecimal) value; + } + if (value instanceof Long) + { + return new BigDecimal((Long) value); + } + if (value instanceof Double) + { + return new BigDecimal((Double) value); + } + if (value instanceof Integer) + { + return new BigDecimal((Integer) value); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return new BigDecimal(valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为BigDecimal
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static BigDecimal toBigDecimal(Object value) + { + return toBigDecimal(value, null); + } + + /** + * 将对象转为字符串
+ * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 + * + * @param obj 对象 + * @return 字符串 + */ + public static String utf8Str(Object obj) + { + return str(obj, CharsetKit.CHARSET_UTF_8); + } + + /** + * 将对象转为字符串
+ * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 + * + * @param obj 对象 + * @param charsetName 字符集 + * @return 字符串 + */ + public static String str(Object obj, String charsetName) + { + return str(obj, Charset.forName(charsetName)); + } + + /** + * 将对象转为字符串
+ * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 + * + * @param obj 对象 + * @param charset 字符集 + * @return 字符串 + */ + public static String str(Object obj, Charset charset) + { + if (null == obj) + { + return null; + } + + if (obj instanceof String) + { + return (String) obj; + } + else if (obj instanceof byte[] || obj instanceof Byte[]) + { + return str((Byte[]) obj, charset); + } + else if (obj instanceof ByteBuffer) + { + return str((ByteBuffer) obj, charset); + } + return obj.toString(); + } + + /** + * 将byte数组转为字符串 + * + * @param bytes byte数组 + * @param charset 字符集 + * @return 字符串 + */ + public static String str(byte[] bytes, String charset) + { + return str(bytes, StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset)); + } + + /** + * 解码字节码 + * + * @param data 字符串 + * @param charset 字符集,如果此字段为空,则解码的结果取决于平台 + * @return 解码后的字符串 + */ + public static String str(byte[] data, Charset charset) + { + if (data == null) + { + return null; + } + + if (null == charset) + { + return new String(data); + } + return new String(data, charset); + } + + /** + * 将编码的byteBuffer数据转换为字符串 + * + * @param data 数据 + * @param charset 字符集,如果为空使用当前系统字符集 + * @return 字符串 + */ + public static String str(ByteBuffer data, String charset) + { + if (data == null) + { + return null; + } + + return str(data, Charset.forName(charset)); + } + + /** + * 将编码的byteBuffer数据转换为字符串 + * + * @param data 数据 + * @param charset 字符集,如果为空使用当前系统字符集 + * @return 字符串 + */ + public static String str(ByteBuffer data, Charset charset) + { + if (null == charset) + { + charset = Charset.defaultCharset(); + } + return charset.decode(data).toString(); + } + + // ----------------------------------------------------------------------- 全角半角转换 + /** + * 半角转全角 + * + * @param input String. + * @return 全角字符串. + */ + public static String toSBC(String input) + { + return toSBC(input, null); + } + + /** + * 半角转全角 + * + * @param input String + * @param notConvertSet 不替换的字符集合 + * @return 全角字符串. + */ + public static String toSBC(String input, Set notConvertSet) + { + char c[] = input.toCharArray(); + for (int i = 0; i < c.length; i++) + { + if (null != notConvertSet && notConvertSet.contains(c[i])) + { + // 跳过不替换的字符 + continue; + } + + if (c[i] == ' ') + { + c[i] = '\u3000'; + } + else if (c[i] < '\177') + { + c[i] = (char) (c[i] + 65248); + + } + } + return new String(c); + } + + /** + * 全角转半角 + * + * @param input String. + * @return 半角字符串 + */ + public static String toDBC(String input) + { + return toDBC(input, null); + } + + /** + * 替换全角为半角 + * + * @param text 文本 + * @param notConvertSet 不替换的字符集合 + * @return 替换后的字符 + */ + public static String toDBC(String text, Set notConvertSet) + { + char c[] = text.toCharArray(); + for (int i = 0; i < c.length; i++) + { + if (null != notConvertSet && notConvertSet.contains(c[i])) + { + // 跳过不替换的字符 + continue; + } + + if (c[i] == '\u3000') + { + c[i] = ' '; + } + else if (c[i] > '\uFF00' && c[i] < '\uFF5F') + { + c[i] = (char) (c[i] - 65248); + } + } + String returnString = new String(c); + + return returnString; + } + + /** + * 数字金额大写转换 先写个完整的然后将如零拾替换成零 + * + * @param n 数字 + * @return 中文大写数字 + */ + public static String digitUppercase(double n) + { + String[] fraction = { "角", "分" }; + String[] digit = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }; + String[][] unit = { { "元", "万", "亿" }, { "", "拾", "佰", "仟" } }; + + String head = n < 0 ? "负" : ""; + n = Math.abs(n); + + String s = ""; + for (int i = 0; i < fraction.length; i++) + { + s += (digit[(int) (Math.floor(n * 10 * Math.pow(10, i)) % 10)] + fraction[i]).replaceAll("(零.)+", ""); + } + if (s.length() < 1) + { + s = "整"; + } + int integerPart = (int) Math.floor(n); + + for (int i = 0; i < unit[0].length && integerPart > 0; i++) + { + String p = ""; + for (int j = 0; j < unit[1].length && n > 0; j++) + { + p = digit[integerPart % 10] + unit[1][j] + p; + integerPart = integerPart / 10; + } + s = p.replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][i] + s; + } + return head + s.replaceAll("(零.)*零元", "元").replaceFirst("(零.)+", "").replaceAll("(零.)+", "零").replaceAll("^整$", "零元整"); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/StrFormatter.java b/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/StrFormatter.java new file mode 100644 index 0000000..44c4c9f --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/StrFormatter.java @@ -0,0 +1,90 @@ +package com.alonginfo.common.core.text; + +import com.alonginfo.common.utils.StringUtils; + +/** + * 字符串格式化 + */ +public class StrFormatter +{ + public static final String EMPTY_JSON = "{}"; + public static final char C_BACKSLASH = '\\'; + public static final char C_DELIM_START = '{'; + public static final char C_DELIM_END = '}'; + + /** + * 格式化字符串
+ * 此方法只是简单将占位符 {} 按照顺序替换为参数
+ * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可
+ * 例:
+ * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b
+ * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a
+ * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b
+ * + * @param strPattern 字符串模板 + * @param argArray 参数列表 + * @return 结果 + */ + public static String format(final String strPattern, final Object... argArray) + { + if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray)) + { + return strPattern; + } + final int strPatternLength = strPattern.length(); + + // 初始化定义好的长度以获得更好的性能 + StringBuilder sbuf = new StringBuilder(strPatternLength + 50); + + int handledPosition = 0; + int delimIndex;// 占位符所在位置 + for (int argIndex = 0; argIndex < argArray.length; argIndex++) + { + delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition); + if (delimIndex == -1) + { + if (handledPosition == 0) + { + return strPattern; + } + else + { // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果 + sbuf.append(strPattern, handledPosition, strPatternLength); + return sbuf.toString(); + } + } + else + { + if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH) + { + if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH) + { + // 转义符之前还有一个转义符,占位符依旧有效 + sbuf.append(strPattern, handledPosition, delimIndex - 1); + sbuf.append(Convert.utf8Str(argArray[argIndex])); + handledPosition = delimIndex + 2; + } + else + { + // 占位符被转义 + argIndex--; + sbuf.append(strPattern, handledPosition, delimIndex - 1); + sbuf.append(C_DELIM_START); + handledPosition = delimIndex + 1; + } + } + else + { + // 正常占位符 + sbuf.append(strPattern, handledPosition, delimIndex); + sbuf.append(Convert.utf8Str(argArray[argIndex])); + handledPosition = delimIndex + 2; + } + } + } + // 加入最后一个占位符后所有的字符 + sbuf.append(strPattern, handledPosition, strPattern.length()); + + return sbuf.toString(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/enums/HttpMethod.java b/mxdata_v-common/src/main/java/com/alonginfo/common/enums/HttpMethod.java new file mode 100644 index 0000000..2b0a0c1 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/enums/HttpMethod.java @@ -0,0 +1,34 @@ +package com.alonginfo.common.enums; + +import org.springframework.lang.Nullable; + +import java.util.HashMap; +import java.util.Map; + +/** + * 请求方式 + */ +public enum HttpMethod { + GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE; + + private static final Map mappings = new HashMap(16); + + static + { + for (HttpMethod httpMethod : values()) + { + mappings.put(httpMethod.name(), httpMethod); + } + } + + @Nullable + public static HttpMethod resolve(@Nullable String method) + { + return (method != null ? mappings.get(method) : null); + } + + public boolean matches(String method) + { + return (this == resolve(method)); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/enums/ScheduleConstants.java b/mxdata_v-common/src/main/java/com/alonginfo/common/enums/ScheduleConstants.java new file mode 100644 index 0000000..741a888 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/enums/ScheduleConstants.java @@ -0,0 +1,50 @@ +package com.alonginfo.common.enums; + +/** + * 任务调度通用常量 + * + * @author lcdop + */ +public class ScheduleConstants +{ + public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; + + /** 执行目标key */ + public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; + + /** 默认 */ + public static final String MISFIRE_DEFAULT = "0"; + + /** 立即触发执行 */ + public static final String MISFIRE_IGNORE_MISFIRES = "1"; + + /** 触发一次执行 */ + public static final String MISFIRE_FIRE_AND_PROCEED = "2"; + + /** 不触发立即执行 */ + public static final String MISFIRE_DO_NOTHING = "3"; + + public enum Status + { + /** + * 正常 + */ + NORMAL("0"), + /** + * 暂停 + */ + PAUSE("1"); + + private String value; + + private Status(String value) + { + this.value = value; + } + + public String getValue() + { + return value; + } + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/enums/UserStatus.java b/mxdata_v-common/src/main/java/com/alonginfo/common/enums/UserStatus.java new file mode 100644 index 0000000..23cdabc --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/enums/UserStatus.java @@ -0,0 +1,27 @@ +package com.alonginfo.common.enums; + +/** + * 用户状态 + */ +public enum UserStatus { + OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除"); + + private final String code; + private final String info; + + UserStatus(String code, String info) + { + this.code = code; + this.info = info; + } + + public String getCode() + { + return code; + } + + public String getInfo() + { + return info; + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/BaseException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/BaseException.java new file mode 100644 index 0000000..c2cde84 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/BaseException.java @@ -0,0 +1,91 @@ +package com.alonginfo.common.exception; + +import com.alonginfo.common.utils.MessageUtils; +import com.alonginfo.common.utils.StringUtils; + +public class BaseException extends RuntimeException { + + private static final long serialVersionUID = 1L; + /** + * 所属模块 + */ + private String module; + + /** + * 错误码 + */ + private String code; + + /** + * 错误码对应的参数 + */ + private Object[] args; + + /** + * 错误消息 + */ + private String defaultMessage; + + public BaseException(String module, String code, Object[] args, String defaultMessage) + { + this.module = module; + this.code = code; + this.args = args; + this.defaultMessage = defaultMessage; + } + + public BaseException(String module, String code, Object[] args) + { + this(module, code, args, null); + } + + public BaseException(String module, String defaultMessage) + { + this(module, null, null, defaultMessage); + } + + public BaseException(String code, Object[] args) + { + this(null, code, args, null); + } + + public BaseException(String defaultMessage) + { + this(null, null, null, defaultMessage); + } + + @Override + public String getMessage() + { + String message = null; + if (!StringUtils.isEmpty(code)) + { + message = MessageUtils.message(code, args); + } + if (message == null) + { + message = defaultMessage; + } + return message; + } + + public String getModule() + { + return module; + } + + public String getCode() + { + return code; + } + + public Object[] getArgs() + { + return args; + } + + public String getDefaultMessage() + { + return defaultMessage; + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/CustomException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/CustomException.java new file mode 100644 index 0000000..e228fd6 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/CustomException.java @@ -0,0 +1,40 @@ +package com.alonginfo.common.exception; + +/** + * 自定义异常 + */ +public class CustomException extends RuntimeException { + private static final long serialVersionUID = 1L; + + private Integer code; + + private String message; + + public CustomException(String message) + { + this.message = message; + } + + public CustomException(String message, Integer code) + { + this.message = message; + this.code = code; + } + + public CustomException(String message, Throwable e) + { + super(message, e); + this.message = message; + } + + @Override + public String getMessage() + { + return message; + } + + public Integer getCode() + { + return code; + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/DemoModeException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/DemoModeException.java new file mode 100644 index 0000000..b93752a --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/DemoModeException.java @@ -0,0 +1,12 @@ +package com.alonginfo.common.exception; + +/** + * 演示模式异常 + */ +public class DemoModeException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public DemoModeException() + { + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/InvalidExtensionException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/InvalidExtensionException.java new file mode 100644 index 0000000..615d250 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/InvalidExtensionException.java @@ -0,0 +1,82 @@ +package com.alonginfo.common.exception; + +import org.apache.commons.fileupload.FileUploadException; + +import java.util.Arrays; + +/** + * 文件上传 误异常类 + * + * + */ +public class InvalidExtensionException extends FileUploadException +{ + private static final long serialVersionUID = 1L; + + private String[] allowedExtension; + private String extension; + private String filename; + + public InvalidExtensionException(String[] allowedExtension, String extension, String filename) + { + super("文件[" + filename + "]后缀[" + extension + "]不正确,请上传" + Arrays.toString(allowedExtension) + "格式"); + this.allowedExtension = allowedExtension; + this.extension = extension; + this.filename = filename; + } + + public String[] getAllowedExtension() + { + return allowedExtension; + } + + public String getExtension() + { + return extension; + } + + public String getFilename() + { + return filename; + } + + public static class InvalidImageExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } + + public static class InvalidFlashExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } + + public static class InvalidMediaExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } + + public static class InvalidVideoExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileException.java new file mode 100644 index 0000000..0aafed3 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileException.java @@ -0,0 +1,19 @@ +package com.alonginfo.common.exception.file; + + +import com.alonginfo.common.exception.BaseException; + +/** + * 文件信息异常类 + * + */ +public class FileException extends BaseException +{ + private static final long serialVersionUID = 1L; + + public FileException(String code, Object[] args) + { + super("file", code, args, null); + } + +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileNameLengthLimitExceededException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileNameLengthLimitExceededException.java new file mode 100644 index 0000000..a014218 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileNameLengthLimitExceededException.java @@ -0,0 +1,14 @@ +package com.alonginfo.common.exception.file; + +/** + * 文件名称超长限制异常类 + */ +public class FileNameLengthLimitExceededException extends FileException +{ + private static final long serialVersionUID = 1L; + + public FileNameLengthLimitExceededException(int defaultFileNameLength) + { + super("upload.filename.exceed.length", new Object[] { defaultFileNameLength }); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileSizeLimitExceededException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileSizeLimitExceededException.java new file mode 100644 index 0000000..ac8478d --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileSizeLimitExceededException.java @@ -0,0 +1,14 @@ +package com.alonginfo.common.exception.file; + +/** + * 文件名大小限制异常类 + */ +public class FileSizeLimitExceededException extends FileException +{ + private static final long serialVersionUID = 1L; + + public FileSizeLimitExceededException(long defaultMaxSize) + { + super("upload.exceed.maxSize", new Object[] { defaultMaxSize }); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/InvalidExtensionException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/InvalidExtensionException.java new file mode 100644 index 0000000..3228250 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/InvalidExtensionException.java @@ -0,0 +1,79 @@ +package com.alonginfo.common.exception.file; + +import org.apache.commons.fileupload.FileUploadException; + +import java.util.Arrays; + +/** + * 文件上传 误异常类 + */ +public class InvalidExtensionException extends FileUploadException { + private static final long serialVersionUID = 1L; + + private String[] allowedExtension; + private String extension; + private String filename; + + public InvalidExtensionException(String[] allowedExtension, String extension, String filename) + { + super("文件[" + filename + "]后缀[" + extension + "]不正确,请上传" + Arrays.toString(allowedExtension) + "格式"); + this.allowedExtension = allowedExtension; + this.extension = extension; + this.filename = filename; + } + + public String[] getAllowedExtension() + { + return allowedExtension; + } + + public String getExtension() + { + return extension; + } + + public String getFilename() + { + return filename; + } + + public static class InvalidImageExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } + + public static class InvalidFlashExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } + + public static class InvalidMediaExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } + + public static class InvalidVideoExtensionException extends InvalidExtensionException + { + private static final long serialVersionUID = 1L; + + public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename) + { + super(allowedExtension, extension, filename); + } + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/job/TaskException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/job/TaskException.java new file mode 100644 index 0000000..5e68f21 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/job/TaskException.java @@ -0,0 +1,34 @@ +package com.alonginfo.common.exception.job; + +/** + * 计划策略异常 + * + * @author lcdop + */ +public class TaskException extends Exception +{ + private static final long serialVersionUID = 1L; + + private Code code; + + public TaskException(String msg, Code code) + { + this(msg, code, null); + } + + public TaskException(String msg, Code code, Exception nestedEx) + { + super(msg, nestedEx); + this.code = code; + } + + public Code getCode() + { + return code; + } + + public enum Code + { + TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE + } +} \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaException.java new file mode 100644 index 0000000..28d54fc --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaException.java @@ -0,0 +1,13 @@ +package com.alonginfo.common.exception.user; + +/** + * 验证码错误异常类 + */ +public class CaptchaException extends UserException { + private static final long serialVersionUID = 1L; + + public CaptchaException() + { + super("user.jcaptcha.error", null); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaExpireException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaExpireException.java new file mode 100644 index 0000000..91dca4c --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaExpireException.java @@ -0,0 +1,13 @@ +package com.alonginfo.common.exception.user; + +/** + * 验证码失效异常类 + */ +public class CaptchaExpireException extends UserException { + private static final long serialVersionUID = 1L; + + public CaptchaExpireException() + { + super("user.jcaptcha.expire", null); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserException.java new file mode 100644 index 0000000..6929eb7 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserException.java @@ -0,0 +1,15 @@ +package com.alonginfo.common.exception.user; + +import com.alonginfo.common.exception.BaseException; + +/** + * 用户信息异常类 + */ +public class UserException extends BaseException { + private static final long serialVersionUID = 1L; + + public UserException(String code, Object[] args) + { + super("user", code, args, null); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserPasswordNotMatchException.java b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserPasswordNotMatchException.java new file mode 100644 index 0000000..47b8c87 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserPasswordNotMatchException.java @@ -0,0 +1,13 @@ +package com.alonginfo.common.exception.user; + +/** + * 用户密码不正确或不符合规范异常类 + */ +public class UserPasswordNotMatchException extends UserException { + private static final long serialVersionUID = 1L; + + public UserPasswordNotMatchException() + { + super("user.password.not.match", null); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Arith.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Arith.java new file mode 100644 index 0000000..1f7b67e --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Arith.java @@ -0,0 +1,111 @@ +package com.alonginfo.common.utils; + +import java.math.BigDecimal; +import java.math.RoundingMode; + +/** + * 精确的浮点数运算 + */ +public class Arith { + + /** 默认除法运算精度 */ + private static final int DEF_DIV_SCALE = 10; + + /** 这个类不能实例化 */ + private Arith() + { + } + + /** + * 提供精确的加法运算。 + * @param v1 被加数 + * @param v2 加数 + * @return 两个参数的和 + */ + public static double add(double v1, double v2) + { + BigDecimal b1 = new BigDecimal(Double.toString(v1)); + BigDecimal b2 = new BigDecimal(Double.toString(v2)); + return b1.add(b2).doubleValue(); + } + + /** + * 提供精确的减法运算。 + * @param v1 被减数 + * @param v2 减数 + * @return 两个参数的差 + */ + public static double sub(double v1, double v2) + { + BigDecimal b1 = new BigDecimal(Double.toString(v1)); + BigDecimal b2 = new BigDecimal(Double.toString(v2)); + return b1.subtract(b2).doubleValue(); + } + + /** + * 提供精确的乘法运算。 + * @param v1 被乘数 + * @param v2 乘数 + * @return 两个参数的积 + */ + public static double mul(double v1, double v2) + { + BigDecimal b1 = new BigDecimal(Double.toString(v1)); + BigDecimal b2 = new BigDecimal(Double.toString(v2)); + return b1.multiply(b2).doubleValue(); + } + + /** + * 提供(相对)精确的除法运算,当发生除不尽的情况时,精确到 + * 小数点以后10位,以后的数字四舍五入。 + * @param v1 被除数 + * @param v2 除数 + * @return 两个参数的商 + */ + public static double div(double v1, double v2) + { + return div(v1, v2, DEF_DIV_SCALE); + } + + /** + * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指 + * 定精度,以后的数字四舍五入。 + * @param v1 被除数 + * @param v2 除数 + * @param scale 表示表示需要精确到小数点以后几位。 + * @return 两个参数的商 + */ + public static double div(double v1, double v2, int scale) + { + if (scale < 0) + { + throw new IllegalArgumentException( + "The scale must be a positive integer or zero"); + } + BigDecimal b1 = new BigDecimal(Double.toString(v1)); + BigDecimal b2 = new BigDecimal(Double.toString(v2)); + if (b1.compareTo(BigDecimal.ZERO) == 0) + { + return BigDecimal.ZERO.doubleValue(); + } + return b1.divide(b2, scale, RoundingMode.HALF_UP).doubleValue(); + } + + /** + * 提供精确的小数位四舍五入处理。 + * @param v 需要四舍五入的数字 + * @param scale 小数点后保留几位 + * @return 四舍五入后的结果 + */ + public static double round(double v, int scale) + { + if (scale < 0) + { + throw new IllegalArgumentException( + "The scale must be a positive integer or zero"); + } + BigDecimal b = new BigDecimal(Double.toString(v)); + BigDecimal one = new BigDecimal("1"); + return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/DateUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/DateUtils.java new file mode 100644 index 0000000..641cab2 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/DateUtils.java @@ -0,0 +1,185 @@ +package com.alonginfo.common.utils; + +import org.apache.commons.lang3.time.DateFormatUtils; + +import java.lang.management.ManagementFactory; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.Year; +import java.util.Date; +import java.util.LinkedList; +import java.util.List; +import java.util.stream.IntStream; + +/** + * 时间工具类 + * @author shidj + */ +public class DateUtils extends org.apache.commons.lang3.time.DateUtils { + public static String YYYY = "yyyy"; + + public static String YYYY_MM = "yyyy-MM"; + + public static String YYYY_MM_DD = "yyyy-MM-dd"; + + public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; + + public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; + + private static String[] parsePatterns = { + "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", + "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", + "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; + + /** + * 获取当前Date型日期 + * + * @return Date() 当前日期 + */ + public static Date getNowDate() + { + return new Date(); + } + + /** + * 获取当前日期, 默认格式为yyyy-MM-dd + * + * @return String + */ + public static String getDate() + { + return dateTimeNow(YYYY_MM_DD); + } + + public static final String getTime() + { + return dateTimeNow(YYYY_MM_DD_HH_MM_SS); + } + + public static final String dateTimeNow() + { + return dateTimeNow(YYYYMMDDHHMMSS); + } + + public static final String dateTimeNow(final String format) + { + return parseDateToStr(format, new Date()); + } + + public static final String dateTime(final Date date) + { + return parseDateToStr(YYYY_MM_DD, date); + } + + public static final String parseDateToStr(final String format, final Date date) + { + return new SimpleDateFormat(format).format(date); + } + + public static final Date dateTime(final String format, final String ts) { + try { + return new SimpleDateFormat(format).parse(ts); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * 日期路径 即年/月/日 如2018/08/08 + */ + public static final String datePath() { + Date now = new Date(); + return DateFormatUtils.format(now, "yyyy/MM/dd"); + } + + /** + * 日期路径 即年/月/日 如20180808 + */ + public static final String dateTime() { + Date now = new Date(); + return DateFormatUtils.format(now, "yyyyMMdd"); + } + + /** + * 日期路径 即年月 如201808 + */ + public static final String dateMonth() { + Date now = new Date(); + return DateFormatUtils.format(now, "yyyyMM"); + } + + /** + * 日期型字符串转化为日期 格式 + */ + public static Date parseDate(Object str) { + if (str == null) { + return null; + } + try { + return parseDate(str.toString(), parsePatterns); + } catch (ParseException e) { + return null; + } + } + + /** + * 获取服务器启动时间 + */ + public static Date getServerStartDate() { + long time = ManagementFactory.getRuntimeMXBean().getStartTime(); + return new Date(time); + } + + /** + * 计算两个时间差 + */ + public static String getDatePoor(Date endDate, Date nowDate) { + long nd = 1000 * 24 * 60 * 60; + long nh = 1000 * 60 * 60; + long nm = 1000 * 60; + // long ns = 1000; + // 获得两个时间的毫秒时间差异 + long diff = endDate.getTime() - nowDate.getTime(); + // 计算差多少天 + long day = diff / nd; + // 计算差多少小时 + long hour = diff % nd / nh; + // 计算差多少分钟 + long min = diff % nd % nh / nm; + // 计算差多少秒//输出结果 + // long sec = diff % nd % nh % nm / ns; + return day + "天" + hour + "小时" + min + "分钟"; + } + + /** + * yyyy-MM-dd HH:mm:ss.SSSSSS 转为 MM-dd HH:mm + * @param dateTime + * @return + * @throws ParseException + */ + public static String dateTimeFormat(String dateTime) throws ParseException { + SimpleDateFormat simpleDateParse = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS"); + Date date = simpleDateParse.parse(dateTime); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM-dd HH:mm"); + return simpleDateFormat.format(date); + } + + /** + * 获取以往n年年份(包含当年) + * @param n 以往多少年 + * @return + */ + public static List getLastYear(int n) { + List years = new LinkedList<>(); + IntStream.range(0, n).forEach(year -> { + Year yearNow = Year.now(); + String yearValue = String.valueOf(yearNow.getValue() - year); + years.add(yearValue); + }); + return years; + } + + public static void main(String[] args) { + System.out.println(getLastYear(2)); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/FileTypeDetector.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/FileTypeDetector.java new file mode 100644 index 0000000..93266ef --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/FileTypeDetector.java @@ -0,0 +1,56 @@ +package com.alonginfo.common.utils; + +import org.springframework.web.multipart.MultipartFile; + +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +public class FileTypeDetector { + // 定义文件类型映射 + private static final Map FILE_TYPE_MAP = new HashMap<>(); + + static { + // 初始化文件类型映射 + FILE_TYPE_MAP.put("89504E47", "png"); // PNG + FILE_TYPE_MAP.put("47494638", "gif"); // GIF + FILE_TYPE_MAP.put("25504446", "pdf"); // PDF + FILE_TYPE_MAP.put("504b0304", "docx"); // docx + FILE_TYPE_MAP.put("d0cf11e0", "doc"); // doc + FILE_TYPE_MAP.put("504B0304", "xlsx"); // xlsx + FILE_TYPE_MAP.put("D0CF11E0", "xls"); // xls + FILE_TYPE_MAP.put("00000018", "mp4"); // mp4 + FILE_TYPE_MAP.put("6D6F6F76", "mov"); // mov + // ... 其他文件类型的魔数 + } + + public static String getFileType(MultipartFile file) throws IOException { + byte[] fileBytes = new byte[8]; + try (InputStream inputStream = file.getInputStream()) { + int bytesRead = inputStream.read(fileBytes, 0, fileBytes.length); + if (bytesRead < fileBytes.length) { + throw new IOException("无法读取足够的字节来检测文件类型"); + } + } + + String magicNumber = bytesToHex(fileBytes, 0, fileBytes.length).toUpperCase(); + + for (Map.Entry entry : FILE_TYPE_MAP.entrySet()) { + if (magicNumber.startsWith(entry.getKey())) { + return entry.getValue(); + } + } + + return "未知文件类型"; + } + + private static String bytesToHex(byte[] bytes, int offset, int length) { + StringBuilder sb = new StringBuilder(); + for (int i = offset; i < offset + length; i++) { + sb.append(String.format("%02X", bytes[i])); + } + return sb.toString(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/IdUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/IdUtils.java new file mode 100644 index 0000000..03222bb --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/IdUtils.java @@ -0,0 +1,49 @@ +package com.alonginfo.common.utils; + +import com.alonginfo.common.core.lang.UUID; + +/** + * ID生成器工具类 + */ +public class IdUtils +{ + /** + * 获取随机UUID + * + * @return 随机UUID + */ + public static String randomUUID() + { + return UUID.randomUUID().toString(); + } + + /** + * 简化的UUID,去掉了横线 + * + * @return 简化的UUID,去掉了横线 + */ + public static String simpleUUID() + { + return UUID.randomUUID().toString(true); + } + + /** + * 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID + * + * @return 随机UUID + */ + public static String fastUUID() + { + return UUID.fastUUID().toString(); + } + + /** + * 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID + * + * @return 简化的UUID,去掉了横线 + */ + public static String fastSimpleUUID() + { + return UUID.fastUUID().toString(true); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/LogUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/LogUtils.java new file mode 100644 index 0000000..3a60f6e --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/LogUtils.java @@ -0,0 +1,13 @@ +package com.alonginfo.common.utils; + +/** + * 处理并记录日志文件 + */ +public class LogUtils { + public static String getBlock(Object msg) { + if (msg == null) { + msg = ""; + } + return "[" + msg.toString() + "]"; + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/MessageUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/MessageUtils.java new file mode 100644 index 0000000..e619fd8 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/MessageUtils.java @@ -0,0 +1,23 @@ +package com.alonginfo.common.utils; + +import com.alonginfo.common.utils.spring.SpringUtils; +import org.springframework.context.MessageSource; +import org.springframework.context.i18n.LocaleContextHolder; + +/** + * 获取i18n资源文件 + */ +public class MessageUtils { + /** + * 根据消息键和参数 获取消息 委托给spring messageSource + * + * @param code 消息键 + * @param args 参数 + * @return 获取国际化翻译值 + */ + public static String message(String code, Object... args) + { + MessageSource messageSource = SpringUtils.getBean(MessageSource.class); + return messageSource.getMessage(code, args, LocaleContextHolder.getLocale()); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ServletUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ServletUtils.java new file mode 100644 index 0000000..98758c1 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ServletUtils.java @@ -0,0 +1,122 @@ +package com.alonginfo.common.utils; + +import com.alonginfo.common.core.text.Convert; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +import java.io.IOException; + +/** + * 客户端工具类 + */ +public class ServletUtils { + /** + * 获取String参数 + */ + public static String getParameter(String name) + { + return getRequest().getParameter(name); + } + + /** + * 获取String参数 + */ + public static String getParameter(String name, String defaultValue) { + return Convert.toStr(getRequest().getParameter(name), defaultValue); + } + + /** + * 获取Integer参数 + */ + public static Integer getParameterToInt(String name) + { + return Convert.toInt(getRequest().getParameter(name)); + } + + /** + * 获取Integer参数 + */ + public static Integer getParameterToInt(String name, Integer defaultValue) { + return Convert.toInt(getRequest().getParameter(name), defaultValue); + } + + /** + * 获取request + */ + public static HttpServletRequest getRequest() + { + return getRequestAttributes().getRequest(); + } + + /** + * 获取response + */ + public static HttpServletResponse getResponse() + { + return getRequestAttributes().getResponse(); + } + + /** + * 获取session + */ + public static HttpSession getSession() + { + return getRequest().getSession(); + } + + public static ServletRequestAttributes getRequestAttributes() { + RequestAttributes attributes = RequestContextHolder.getRequestAttributes(); + return (ServletRequestAttributes) attributes; + } + + /** + * 将字符串渲染到客户端 + * + * @param response 渲染对象 + * @param string 待渲染的字符串 + * @return null + */ + public static String renderString(HttpServletResponse response, String string) { + try { + response.setStatus(200); + response.setContentType("application/json"); + response.setCharacterEncoding("utf-8"); + response.getWriter().print(string); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + + /** + * 是否是Ajax异步请求 + * + * @param request + */ + public static boolean isAjaxRequest(HttpServletRequest request) { + String accept = request.getHeader("accept"); + if (accept != null && accept.indexOf("application/json") != -1) { + return true; + } + + String xRequestedWith = request.getHeader("X-Requested-With"); + if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) { + return true; + } + + String uri = request.getRequestURI(); + if (StringUtils.inStringIgnoreCase(uri, ".json", ".xml")) { + return true; + } + + String ajax = request.getParameter("__ajax"); + if (StringUtils.inStringIgnoreCase(ajax, "json", "xml")) { + return true; + } + return false; + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/StringUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/StringUtils.java new file mode 100644 index 0000000..44fbcde --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/StringUtils.java @@ -0,0 +1,608 @@ +package com.alonginfo.common.utils; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.core.text.StrFormatter; +import org.springframework.util.AntPathMatcher; + +import java.util.*; + +/** + * 字符串工具类 + */ +public class StringUtils extends org.apache.commons.lang3.StringUtils +{ + /** 空字符串 */ + private static final String NULLSTR = ""; + + /** 下划线 */ + private static final char SEPARATOR = '_'; + + /** + * 获取参数不为空值 + * + * @param value defaultValue 要判断的value + * @return value 返回值 + */ + public static T nvl(T value, T defaultValue) + { + return value != null ? value : defaultValue; + } + + /** + * * 判断一个Collection是否为空, 包含List,Set,Queue + * + * @param coll 要判断的Collection + * @return true:为空 false:非空 + */ + public static boolean isEmpty(Collection coll) + { + return isNull(coll) || coll.isEmpty(); + } + + /** + * * 判断一个Collection是否非空,包含List,Set,Queue + * + * @param coll 要判断的Collection + * @return true:非空 false:空 + */ + public static boolean isNotEmpty(Collection coll) + { + return !isEmpty(coll); + } + + /** + * * 判断一个对象数组是否为空 + * + * @param objects 要判断的对象数组 + ** @return true:为空 false:非空 + */ + public static boolean isEmpty(Object[] objects) + { + return isNull(objects) || (objects.length == 0); + } + + /** + * * 判断一个对象数组是否非空 + * + * @param objects 要判断的对象数组 + * @return true:非空 false:空 + */ + public static boolean isNotEmpty(Object[] objects) + { + return !isEmpty(objects); + } + + /** + * * 判断一个Map是否为空 + * + * @param map 要判断的Map + * @return true:为空 false:非空 + */ + public static boolean isEmpty(Map map) + { + return isNull(map) || map.isEmpty(); + } + + /** + * * 判断一个Map是否为空 + * + * @param map 要判断的Map + * @return true:非空 false:空 + */ + public static boolean isNotEmpty(Map map) + { + return !isEmpty(map); + } + + /** + * * 判断一个字符串是否为空串 + * + * @param str String + * @return true:为空 false:非空 + */ + public static boolean isEmpty(String str) + { + return isNull(str) || NULLSTR.equals(str.trim()); + } + + /** + * * 判断一个字符串是否为非空串 + * + * @param str String + * @return true:非空串 false:空串 + */ + public static boolean isNotEmpty(String str) + { + return !isEmpty(str); + } + + /** + * * 判断一个对象是否为空 + * + * @param object Object + * @return true:为空 false:非空 + */ + public static boolean isNull(Object object) + { + return object == null; + } + + /** + * * 判断一个对象是否非空 + * + * @param object Object + * @return true:非空 false:空 + */ + public static boolean isNotNull(Object object) + { + return !isNull(object); + } + + /** + * * 判断一个对象是否是数组类型(Java基本型别的数组) + * + * @param object 对象 + * @return true:是数组 false:不是数组 + */ + public static boolean isArray(Object object) + { + return isNotNull(object) && object.getClass().isArray(); + } + + /** + * 去空格 + */ + public static String trim(String str) + { + return (str == null ? "" : str.trim()); + } + + /** + * 截取字符串 + * + * @param str 字符串 + * @param start 开始 + * @return 结果 + */ + public static String substring(final String str, int start) + { + if (str == null) + { + return NULLSTR; + } + + if (start < 0) + { + start = str.length() + start; + } + + if (start < 0) + { + start = 0; + } + if (start > str.length()) + { + return NULLSTR; + } + + return str.substring(start); + } + + /** + * 截取字符串 + * + * @param str 字符串 + * @param start 开始 + * @param end 结束 + * @return 结果 + */ + public static String substring(final String str, int start, int end) + { + if (str == null) + { + return NULLSTR; + } + + if (end < 0) + { + end = str.length() + end; + } + if (start < 0) + { + start = str.length() + start; + } + + if (end > str.length()) + { + end = str.length(); + } + + if (start > end) + { + return NULLSTR; + } + + if (start < 0) + { + start = 0; + } + if (end < 0) + { + end = 0; + } + + return str.substring(start, end); + } + + /** + * 格式化文本, {} 表示占位符
+ * 此方法只是简单将占位符 {} 按照顺序替换为参数
+ * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可
+ * 例:
+ * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b
+ * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a
+ * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b
+ * + * @param template 文本模板,被替换的部分用 {} 表示 + * @param params 参数值 + * @return 格式化后的文本 + */ + public static String format(String template, Object... params) + { + if (isEmpty(params) || isEmpty(template)) + { + return template; + } + return StrFormatter.format(template, params); + } + + /** + * 是否为http(s)://开头 + * + * @param link 链接 + * @return 结果 + */ + public static boolean ishttp(String link) + { + return StringUtils.startsWithAny(link, Constants.HTTP, Constants.HTTPS); + } + + /** + * 字符串转set + * + * @param str 字符串 + * @param sep 分隔符 + * @return set集合 + */ + public static final Set str2Set(String str, String sep) + { + return new HashSet(str2List(str, sep, true, false)); + } + + /** + * 字符串转list + * + * @param str 字符串 + * @param sep 分隔符 + * @param filterBlank 过滤纯空白 + * @param trim 去掉首尾空白 + * @return list集合 + */ + public static final List str2List(String str, String sep, boolean filterBlank, boolean trim) + { + List list = new ArrayList(); + if (StringUtils.isEmpty(str)) + { + return list; + } + + // 过滤空白字符串 + if (filterBlank && StringUtils.isBlank(str)) + { + return list; + } + String[] split = str.split(sep); + for (String string : split) + { + if (filterBlank && StringUtils.isBlank(string)) + { + continue; + } + if (trim) + { + string = string.trim(); + } + list.add(string); + } + + return list; + } + + /** + * 判断给定的collection列表中是否包含数组array 判断给定的数组array中是否包含给定的元素value + * + * @param collection 给定的集合 + * @param array 给定的数组 + * @return boolean 结果 + */ + public static boolean containsAny(Collection collection, String... array) + { + if (isEmpty(collection) || isEmpty(array)) + { + return false; + } + else + { + for (String str : array) + { + if (collection.contains(str)) + { + return true; + } + } + return false; + } + } + + /** + * 查找指定字符串是否包含指定字符串列表中的任意一个字符串同时串忽略大小写 + * + * @param cs 指定字符串 + * @param searchCharSequences 需要检查的字符串数组 + * @return 是否包含任意一个字符串 + */ + public static boolean containsAnyIgnoreCase(CharSequence cs, CharSequence... searchCharSequences) + { + if (isEmpty(cs) || isEmpty(searchCharSequences)) + { + return false; + } + for (CharSequence testStr : searchCharSequences) + { + if (containsIgnoreCase(cs, testStr)) + { + return true; + } + } + return false; + } + + /** + * 驼峰转下划线命名 + */ + public static String toUnderScoreCase(String str) + { + if (str == null) + { + return null; + } + StringBuilder sb = new StringBuilder(); + // 前置字符是否大写 + boolean preCharIsUpperCase = true; + // 当前字符是否大写 + boolean curreCharIsUpperCase = true; + // 下一字符是否大写 + boolean nexteCharIsUpperCase = true; + for (int i = 0; i < str.length(); i++) + { + char c = str.charAt(i); + if (i > 0) + { + preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1)); + } + else + { + preCharIsUpperCase = false; + } + + curreCharIsUpperCase = Character.isUpperCase(c); + + if (i < (str.length() - 1)) + { + nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1)); + } + + if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) + { + sb.append(SEPARATOR); + } + else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase) + { + sb.append(SEPARATOR); + } + sb.append(Character.toLowerCase(c)); + } + + return sb.toString(); + } + + /** + * 是否包含字符串 + * + * @param str 验证字符串 + * @param strs 字符串组 + * @return 包含返回true + */ + public static boolean inStringIgnoreCase(String str, String... strs) + { + if (str != null && strs != null) + { + for (String s : strs) + { + if (str.equalsIgnoreCase(trim(s))) + { + return true; + } + } + } + return false; + } + + /** + * 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld + * + * @param name 转换前的下划线大写方式命名的字符串 + * @return 转换后的驼峰式命名的字符串 + */ + public static String convertToCamelCase(String name) + { + StringBuilder result = new StringBuilder(); + // 快速检查 + if (name == null || name.isEmpty()) + { + // 没必要转换 + return ""; + } + else if (!name.contains("_")) + { + // 不含下划线,仅将首字母大写 + return name.substring(0, 1).toUpperCase() + name.substring(1); + } + // 用下划线将原始字符串分割 + String[] camels = name.split("_"); + for (String camel : camels) + { + // 跳过原始字符串中开头、结尾的下换线或双重下划线 + if (camel.isEmpty()) + { + continue; + } + // 首字母大写 + result.append(camel.substring(0, 1).toUpperCase()); + result.append(camel.substring(1).toLowerCase()); + } + return result.toString(); + } + + /** + * 驼峰式命名法 + * 例如:user_name->userName + */ + public static String toCamelCase(String s) + { + if (s == null) + { + return null; + } + if (s.indexOf(SEPARATOR) == -1) + { + return s; + } + s = s.toLowerCase(); + StringBuilder sb = new StringBuilder(s.length()); + boolean upperCase = false; + for (int i = 0; i < s.length(); i++) + { + char c = s.charAt(i); + + if (c == SEPARATOR) + { + upperCase = true; + } + else if (upperCase) + { + sb.append(Character.toUpperCase(c)); + upperCase = false; + } + else + { + sb.append(c); + } + } + return sb.toString(); + } + + /** + * 查找指定字符串是否匹配指定字符串列表中的任意一个字符串 + * + * @param str 指定字符串 + * @param strs 需要检查的字符串数组 + * @return 是否匹配 + */ + public static boolean matches(String str, List strs) + { + if (isEmpty(str) || isEmpty(strs)) + { + return false; + } + for (String pattern : strs) + { + if (isMatch(pattern, str)) + { + return true; + } + } + return false; + } + + /** + * 判断url是否与规则配置: + * ? 表示单个字符; + * * 表示一层路径内的任意字符串,不可跨层级; + * ** 表示任意层路径; + * + * @param pattern 匹配规则 + * @param url 需要匹配的url + * @return + */ + public static boolean isMatch(String pattern, String url) + { + AntPathMatcher matcher = new AntPathMatcher(); + return matcher.match(pattern, url); + } + + @SuppressWarnings("unchecked") + public static T cast(Object obj) + { + return (T) obj; + } + + /** + * 数字左边补齐0,使之达到指定长度。注意,如果数字转换为字符串后,长度大于size,则只保留 最后size个字符。 + * + * @param num 数字对象 + * @param size 字符串指定长度 + * @return 返回数字的字符串格式,该字符串为指定长度。 + */ + public static final String padl(final Number num, final int size) + { + return padl(num.toString(), size, '0'); + } + + /** + * 字符串左补齐。如果原始字符串s长度大于size,则只保留最后size个字符。 + * + * @param s 原始字符串 + * @param size 字符串指定长度 + * @param c 用于补齐的字符 + * @return 返回指定长度的字符串,由原字符串左补齐或截取得到。 + */ + public static final String padl(final String s, final int size, final char c) + { + final StringBuilder sb = new StringBuilder(size); + if (s != null) + { + final int len = s.length(); + if (s.length() <= size) + { + for (int i = size - len; i > 0; i--) + { + sb.append(c); + } + sb.append(s); + } + else + { + return s.substring(len - size, len); + } + } + else + { + for (int i = size; i > 0; i--) + { + sb.append(c); + } + } + return sb.toString(); + } +} \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Threads.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Threads.java new file mode 100644 index 0000000..0e61d43 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Threads.java @@ -0,0 +1,71 @@ +package com.alonginfo.common.utils; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.*; + +/** + * 线程相关工具类. + */ +public class Threads { + private static final Logger logger = LoggerFactory.getLogger(Threads.class); + + /** + * sleep等待,单位为毫秒 + */ + public static void sleep(long milliseconds) { + try { + Thread.sleep(milliseconds); + } catch (InterruptedException e) { + return; + } + } + + /** + * 停止线程池 + * 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务. + * 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数. + * 如果仍人超時,則強制退出. + * 另对在shutdown时线程本身被调用中断做了处理. + */ + public static void shutdownAndAwaitTermination(ExecutorService pool) { + if (pool != null && !pool.isShutdown()) { + pool.shutdown(); + try { + if (!pool.awaitTermination(120, TimeUnit.SECONDS)) { + pool.shutdownNow(); + if (!pool.awaitTermination(120, TimeUnit.SECONDS)) { + logger.info("Pool did not terminate"); + } + } + } catch (InterruptedException ie) { + pool.shutdownNow(); + Thread.currentThread().interrupt(); + } + } + } + + /** + * 打印线程异常信息 + */ + public static void printException(Runnable r, Throwable t) { + if (t == null && r instanceof Future) { + try { + Future future = (Future) r; + if (future.isDone()) { + future.get(); + } + } catch (CancellationException ce) { + t = ce; + } catch (ExecutionException ee) { + t = ee.getCause(); + } catch (InterruptedException ie) { + Thread.currentThread().interrupt(); + } + } + if (t != null) { + logger.error(t.getMessage(), t); + } + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/VerifyCodeUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/VerifyCodeUtils.java new file mode 100644 index 0000000..4799c69 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/VerifyCodeUtils.java @@ -0,0 +1,202 @@ +package com.alonginfo.common.utils; + +import javax.imageio.ImageIO; +import java.awt.*; +import java.awt.geom.AffineTransform; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.OutputStream; +import java.security.SecureRandom; +import java.util.Arrays; +import java.util.Random; + +/** + * 验证码工具类 + */ +public class VerifyCodeUtils { + // 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符 + public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ"; + + private static Random random = new SecureRandom(); + + /** + * 使用系统默认字符源生成验证码 + * + * @param verifySize 验证码长度 + * @return + */ + public static String generateVerifyCode(int verifySize) { + return generateVerifyCode(verifySize, VERIFY_CODES); + } + + /** + * 使用指定源生成验证码 + * + * @param verifySize 验证码长度 + * @param sources 验证码字符源 + * @return + */ + public static String generateVerifyCode(int verifySize, String sources) { + if (sources == null || sources.length() == 0) { + sources = VERIFY_CODES; + } + int codesLen = sources.length(); + Random rand = new Random(System.currentTimeMillis()); + StringBuilder verifyCode = new StringBuilder(verifySize); + for (int i = 0; i < verifySize; i++) { + verifyCode.append(sources.charAt(rand.nextInt(codesLen - 1))); + } + return verifyCode.toString(); + } + + /** + * 输出指定验证码图片流 + * + * @param w + * @param h + * @param os + * @param code + * @throws IOException + */ + public static void outputImage(int w, int h, OutputStream os, String code) throws IOException { + int verifySize = code.length(); + BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); + Random rand = new Random(); + Graphics2D g2 = image.createGraphics(); + g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + Color[] colors = new Color[5]; + Color[] colorSpaces = new Color[] { Color.WHITE, Color.CYAN, Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA, + Color.ORANGE, Color.PINK, Color.YELLOW }; + float[] fractions = new float[colors.length]; + for (int i = 0; i < colors.length; i++) { + colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)]; + fractions[i] = rand.nextFloat(); + } + Arrays.sort(fractions); + + g2.setColor(Color.GRAY);// 设置边框色 + g2.fillRect(0, 0, w, h); + + Color c = getRandColor(200, 250); + g2.setColor(c);// 设置背景色 + g2.fillRect(0, 2, w, h - 4); + + // 绘制干扰线 + Random random = new Random(); + g2.setColor(getRandColor(160, 200));// 设置线条的颜色 + for (int i = 0; i < 20; i++) { + int x = random.nextInt(w - 1); + int y = random.nextInt(h - 1); + int xl = random.nextInt(6) + 1; + int yl = random.nextInt(12) + 1; + g2.drawLine(x, y, x + xl + 40, y + yl + 20); + } + + // 添加噪点 + float yawpRate = 0.05f;// 噪声率 + int area = (int) (yawpRate * w * h); + for (int i = 0; i < area; i++) { + int x = random.nextInt(w); + int y = random.nextInt(h); + int rgb = getRandomIntColor(); + image.setRGB(x, y, rgb); + } + + shear(g2, w, h, c);// 使图片扭曲 + + g2.setColor(getRandColor(100, 160)); + int fontSize = h - 4; + Font font = new Font("Algerian", Font.ITALIC, fontSize); + g2.setFont(font); + char[] chars = code.toCharArray(); + for (int i = 0; i < verifySize; i++) { + AffineTransform affine = new AffineTransform(); + affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1), + (w / verifySize) * i + fontSize / 2, h / 2); + g2.setTransform(affine); + g2.drawChars(chars, i, 1, ((w - 10) / verifySize) * i + 5, h / 2 + fontSize / 2 - 10); + } + + g2.dispose(); + ImageIO.write(image, "jpg", os); + } + + private static Color getRandColor(int fc, int bc) { + if (fc > 255) + fc = 255; + if (bc > 255) + bc = 255; + int r = fc + random.nextInt(bc - fc); + int g = fc + random.nextInt(bc - fc); + int b = fc + random.nextInt(bc - fc); + return new Color(r, g, b); + } + + private static int getRandomIntColor() { + int[] rgb = getRandomRgb(); + int color = 0; + for (int c : rgb) + { + color = color << 8; + color = color | c; + } + return color; + } + + private static int[] getRandomRgb() { + int[] rgb = new int[3]; + for (int i = 0; i < 3; i++) { + rgb[i] = random.nextInt(255); + } + return rgb; + } + + private static void shear(Graphics g, int w1, int h1, Color color) { + shearX(g, w1, h1, color); + shearY(g, w1, h1, color); + } + + private static void shearX(Graphics g, int w1, int h1, Color color) { + + int period = random.nextInt(2); + + boolean borderGap = true; + int frames = 1; + int phase = random.nextInt(2); + + for (int i = 0; i < h1; i++) { + double d = (double) (period >> 1) + * Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames); + g.copyArea(0, i, w1, 1, (int) d, 0); + if (borderGap) + { + g.setColor(color); + g.drawLine((int) d, i, 0, i); + g.drawLine((int) d + w1, i, w1, i); + } + } + + } + + private static void shearY(Graphics g, int w1, int h1, Color color) { + + int period = random.nextInt(40) + 10; // 50; + + boolean borderGap = true; + int frames = 20; + int phase = 7; + for (int i = 0; i < w1; i++) + { + double d = (double) (period >> 1) + * Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames); + g.copyArea(i, 0, 1, h1, 0, (int) d); + if (borderGap) + { + g.setColor(color); + g.drawLine(i, (int) d, i, 0); + g.drawLine(i, (int) d + h1, i, h1); + } + + } + } +} \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/bean/BeanUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/bean/BeanUtils.java new file mode 100644 index 0000000..1bba798 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/bean/BeanUtils.java @@ -0,0 +1,110 @@ +package com.alonginfo.common.utils.bean; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Bean 工具类 + * + * @author lcdop + */ +public class BeanUtils extends org.springframework.beans.BeanUtils +{ + /** Bean方法名中属性名开始的下标 */ + private static final int BEAN_METHOD_PROP_INDEX = 3; + + /** * 匹配getter方法的正则表达式 */ + private static final Pattern GET_PATTERN = Pattern.compile("get(\\p{javaUpperCase}\\w*)"); + + /** * 匹配setter方法的正则表达式 */ + private static final Pattern SET_PATTERN = Pattern.compile("set(\\p{javaUpperCase}\\w*)"); + + /** + * Bean属性复制工具方法。 + * + * @param dest 目标对象 + * @param src 源对象 + */ + public static void copyBeanProp(Object dest, Object src) + { + try + { + copyProperties(src, dest); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * 获取对象的setter方法。 + * + * @param obj 对象 + * @return 对象的setter方法列表 + */ + public static List getSetterMethods(Object obj) + { + // setter方法列表 + List setterMethods = new ArrayList(); + + // 获取所有方法 + Method[] methods = obj.getClass().getMethods(); + + // 查找setter方法 + + for (Method method : methods) + { + Matcher m = SET_PATTERN.matcher(method.getName()); + if (m.matches() && (method.getParameterTypes().length == 1)) + { + setterMethods.add(method); + } + } + // 返回setter方法列表 + return setterMethods; + } + + /** + * 获取对象的getter方法。 + * + * @param obj 对象 + * @return 对象的getter方法列表 + */ + + public static List getGetterMethods(Object obj) + { + // getter方法列表 + List getterMethods = new ArrayList(); + // 获取所有方法 + Method[] methods = obj.getClass().getMethods(); + // 查找getter方法 + for (Method method : methods) + { + Matcher m = GET_PATTERN.matcher(method.getName()); + if (m.matches() && (method.getParameterTypes().length == 0)) + { + getterMethods.add(method); + } + } + // 返回getter方法列表 + return getterMethods; + } + + /** + * 检查Bean方法名中的属性名是否相等。
+ * 如getName()和setName()属性名一样,getName()和setAge()属性名不一样。 + * + * @param m1 方法名1 + * @param m2 方法名2 + * @return 属性名一样返回true,否则返回false + */ + + public static boolean isMethodPropEquals(String m1, String m2) + { + return m1.substring(BEAN_METHOD_PROP_INDEX).equals(m2.substring(BEAN_METHOD_PROP_INDEX)); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/FileUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/FileUtils.java new file mode 100644 index 0000000..84616cf --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/FileUtils.java @@ -0,0 +1,139 @@ +package com.alonginfo.common.utils.file; + +import javax.servlet.http.HttpServletRequest; +import java.io.*; +import java.net.URLEncoder; + +/** + * 文件处理工具类 + * + * @author sdj + */ +public class FileUtils +{ + //public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"; + + public static String FILENAME_PATTERN = "[^\\s\\\\/:\\*\\?\\\"<>\\|](\\x20|[^\\s\\\\/:\\*\\?\\\"<>\\|])*[^\\s\\\\/:\\*\\?\\\"<>\\|\\.]$"; + + /** + * 输出指定文件的byte数组 + * + * @param filePath 文件路径 + * @param os 输出流 + * @return + */ + public static void writeBytes(String filePath, OutputStream os) throws IOException + { + FileInputStream fis = null; + try + { + File file = new File(filePath); + if (!file.exists()) + { + throw new FileNotFoundException(filePath); + } + fis = new FileInputStream(file); + byte[] b = new byte[1024]; + int length; + while ((length = fis.read(b)) > 0) + { + os.write(b, 0, length); + } + } + catch (IOException e) + { + throw e; + } + finally + { + if (os != null) + { + try + { + os.close(); + } + catch (IOException e1) + { + e1.printStackTrace(); + } + } + if (fis != null) + { + try + { + fis.close(); + } + catch (IOException e1) + { + e1.printStackTrace(); + } + } + } + } + + /** + * 删除文件 + * + * @param filePath 文件 + * @return + */ + public static boolean deleteFile(String filePath) + { + boolean flag = false; +// File file = new File(filePath); +// // 路径为文件且不为空则进行删除 +// if (file.isFile() && file.exists()) +// { +// file.delete(); +// flag = true; +// } + return flag; + } + + /** + * 文件名称验证 + * + * @param filename 文件名称 + * @return true 正常 false 非法 + */ + public static boolean isValidFilename(String filename) + { + return filename.matches(FILENAME_PATTERN); + } + + /** + * 下载文件名重新编码 + * + * @param request 请求对象 + * @param fileName 文件名 + * @return 编码后的文件名 + */ + public static String setFileDownloadHeader(HttpServletRequest request, String fileName) + throws UnsupportedEncodingException + { + final String agent = request.getHeader("USER-AGENT"); + String filename = fileName; + if (agent.contains("MSIE")) + { + // IE浏览器 + filename = URLEncoder.encode(filename, "utf-8"); + filename = filename.replace("+", " "); + } + else if (agent.contains("Firefox")) + { + // 火狐浏览器 + filename = new String(fileName.getBytes(), "ISO8859-1"); + } + else if (agent.contains("Chrome")) + { + // google浏览器 + filename = URLEncoder.encode(filename, "utf-8"); + } + else + { + // 其它浏览器 + filename = URLEncoder.encode(filename, "utf-8"); + } + return filename; + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/MimeTypeUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/MimeTypeUtils.java new file mode 100644 index 0000000..ed0905b --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/MimeTypeUtils.java @@ -0,0 +1,59 @@ +package com.alonginfo.common.utils.file; + +/** + * 媒体类型工具类 + * + * @author sdj + */ +public class MimeTypeUtils +{ + public static final String IMAGE_PNG = "image/png"; + + public static final String IMAGE_JPG = "image/jpg"; + + public static final String IMAGE_JPEG = "image/jpeg"; + + public static final String IMAGE_BMP = "image/bmp"; + + public static final String IMAGE_GIF = "image/gif"; + + public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" }; + + public static final String[] FLASH_EXTENSION = { "swf", "flv" }; + + public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", + "asf", "rm", "rmvb" }; + + public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" }; + + public static final String[] DEFAULT_ALLOWED_EXTENSION = { + // 图片 + "bmp", "gif", "jpg", "jpeg", "png", + // word excel powerpoint + "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", + // 压缩文件 + "rar", "zip", "gz", "bz2", + // 视频格式 + "mp4", "avi", "rmvb", + // pdf + "pdf" }; + + public static String getExtension(String prefix) + { + switch (prefix) + { + case IMAGE_PNG: + return "png"; + case IMAGE_JPG: + return "jpg"; + case IMAGE_JPEG: + return "jpeg"; + case IMAGE_BMP: + return "bmp"; + case IMAGE_GIF: + return "gif"; + default: + return ""; + } + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/EscapeUtil.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/EscapeUtil.java new file mode 100644 index 0000000..2e86278 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/EscapeUtil.java @@ -0,0 +1,132 @@ +package com.alonginfo.common.utils.html; + + +import com.alonginfo.common.utils.StringUtils; + +/** + * 转义和反转义工具类 + */ +public class EscapeUtil { + public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)"; + + private static final char[][] TEXT = new char[64][]; + + static { + for (int i = 0; i < 64; i++) { + TEXT[i] = new char[] { (char) i }; + } + + // special HTML characters + TEXT['\''] = "'".toCharArray(); // 单引号 + TEXT['"'] = """.toCharArray(); // 单引号 + TEXT['&'] = "&".toCharArray(); // &符 + TEXT['<'] = "<".toCharArray(); // 小于号 + TEXT['>'] = ">".toCharArray(); // 大于号 + } + + /** + * 转义文本中的HTML字符为安全的字符 + * + * @param text 被转义的文本 + * @return 转义后的文本 + */ + public static String escape(String text) + { + return encode(text); + } + + /** + * 还原被转义的HTML特殊字符 + * + * @param content 包含转义符的HTML内容 + * @return 转换后的字符串 + */ + public static String unescape(String content) + { + return decode(content); + } + + /** + * 清除所有HTML标签,但是不删除标签内的内容 + * + * @param content 文本 + * @return 清除标签后的文本 + */ + public static String clean(String content) + { + return new HTMLFilter().filter(content); + } + + /** + * Escape编码 + * + * @param text 被编码的文本 + * @return 编码后的字符 + */ + private static String encode(String text) { + int len; + if ((text == null) || ((len = text.length()) == 0)) { + return StringUtils.EMPTY; + } + StringBuilder buffer = new StringBuilder(len + (len >> 2)); + char c; + for (int i = 0; i < len; i++) { + c = text.charAt(i); + if (c < 64) { + buffer.append(TEXT[c]); + } else { + buffer.append(c); + } + } + return buffer.toString(); + } + + /** + * Escape解码 + * + * @param content 被转义的内容 + * @return 解码后的字符串 + */ + public static String decode(String content) { + if (StringUtils.isEmpty(content)){ + return content; + } + + StringBuilder tmp = new StringBuilder(content.length()); + int lastPos = 0, pos = 0; + char ch; + while (lastPos < content.length()) { + pos = content.indexOf("%", lastPos); + if (pos == lastPos) { + if (content.charAt(pos + 1) == 'u') { + ch = (char) Integer.parseInt(content.substring(pos + 2, pos + 6), 16); + tmp.append(ch); + lastPos = pos + 6; + } else { + ch = (char) Integer.parseInt(content.substring(pos + 1, pos + 3), 16); + tmp.append(ch); + lastPos = pos + 3; + } + } else { + if (pos == -1) + { + tmp.append(content.substring(lastPos)); + lastPos = content.length(); + } + else + { + tmp.append(content.substring(lastPos, pos)); + lastPos = pos; + } + } + } + return tmp.toString(); + } + + public static void main(String[] args) { + String html = ""; + System.out.println(EscapeUtil.clean(html)); + System.out.println(EscapeUtil.escape(html)); + System.out.println(EscapeUtil.unescape(html)); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/HTMLFilter.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/HTMLFilter.java new file mode 100644 index 0000000..9a8f22a --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/HTMLFilter.java @@ -0,0 +1,501 @@ +package com.alonginfo.common.utils.html; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * HTML过滤器,用于去除XSS漏洞隐患。 + */ +public final class HTMLFilter +{ + /** + * regex flag union representing /si modifiers in php + **/ + private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL; + private static final Pattern P_COMMENTS = Pattern.compile("", Pattern.DOTALL); + private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI); + private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL); + private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI); + private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI); + private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI); + private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI); + private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI); + private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?"); + private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?"); + private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?"); + private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))"); + private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL); + private static final Pattern P_END_ARROW = Pattern.compile("^>"); + private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)"); + private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)"); + private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)"); + private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)"); + private static final Pattern P_AMP = Pattern.compile("&"); + private static final Pattern P_QUOTE = Pattern.compile("\""); + private static final Pattern P_LEFT_ARROW = Pattern.compile("<"); + private static final Pattern P_RIGHT_ARROW = Pattern.compile(">"); + private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>"); + + // @xxx could grow large... maybe use sesat's ReferenceMap + private static final ConcurrentMap P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap(); + private static final ConcurrentMap P_REMOVE_SELF_BLANKS = new ConcurrentHashMap(); + + /** + * set of allowed html elements, along with allowed attributes for each element + **/ + private final Map> vAllowed; + /** + * counts of open tags for each (allowable) html element + **/ + private final Map vTagCounts = new HashMap(); + + /** + * html elements which must always be self-closing (e.g. "") + **/ + private final String[] vSelfClosingTags; + /** + * html elements which must always have separate opening and closing tags (e.g. "") + **/ + private final String[] vNeedClosingTags; + /** + * set of disallowed html elements + **/ + private final String[] vDisallowed; + /** + * attributes which should be checked for valid protocols + **/ + private final String[] vProtocolAtts; + /** + * allowed protocols + **/ + private final String[] vAllowedProtocols; + /** + * tags which should be removed if they contain no content (e.g. "" or "") + **/ + private final String[] vRemoveBlanks; + /** + * entities allowed within html markup + **/ + private final String[] vAllowedEntities; + /** + * flag determining whether comments are allowed in input String. + */ + private final boolean stripComment; + private final boolean encodeQuotes; + /** + * flag determining whether to try to make tags when presented with "unbalanced" angle brackets (e.g. "" + * becomes " text "). If set to false, unbalanced angle brackets will be html escaped. + */ + private final boolean alwaysMakeTags; + + /** + * Default constructor. + */ + public HTMLFilter() { + vAllowed = new HashMap>(); + + final ArrayList a_atts = new ArrayList(); + a_atts.add("href"); + a_atts.add("target"); + vAllowed.put("a", a_atts); + + final ArrayList img_atts = new ArrayList(); + img_atts.add("src"); + img_atts.add("width"); + img_atts.add("height"); + img_atts.add("alt"); + vAllowed.put("img", img_atts); + + final ArrayList no_atts = new ArrayList(); + vAllowed.put("b", no_atts); + vAllowed.put("strong", no_atts); + vAllowed.put("i", no_atts); + vAllowed.put("em", no_atts); + + vSelfClosingTags = new String[] { "img" }; + vNeedClosingTags = new String[] { "a", "b", "strong", "i", "em" }; + vDisallowed = new String[] {}; + vAllowedProtocols = new String[] { "http", "mailto", "https" }; // no ftp. + vProtocolAtts = new String[] { "src", "href" }; + vRemoveBlanks = new String[] { "a", "b", "strong", "i", "em" }; + vAllowedEntities = new String[] { "amp", "gt", "lt", "quot" }; + stripComment = true; + encodeQuotes = true; + alwaysMakeTags = true; + } + + /** + * Map-parameter configurable constructor. + * + * @param conf map containing configuration. keys match field names. + */ + @SuppressWarnings("unchecked") + public HTMLFilter(final Map conf) { + + assert conf.containsKey("vAllowed") : "configuration requires vAllowed"; + assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags"; + assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags"; + assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed"; + assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols"; + assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts"; + assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks"; + assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities"; + + vAllowed = Collections.unmodifiableMap((HashMap>) conf.get("vAllowed")); + vSelfClosingTags = (String[]) conf.get("vSelfClosingTags"); + vNeedClosingTags = (String[]) conf.get("vNeedClosingTags"); + vDisallowed = (String[]) conf.get("vDisallowed"); + vAllowedProtocols = (String[]) conf.get("vAllowedProtocols"); + vProtocolAtts = (String[]) conf.get("vProtocolAtts"); + vRemoveBlanks = (String[]) conf.get("vRemoveBlanks"); + vAllowedEntities = (String[]) conf.get("vAllowedEntities"); + stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true; + encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true; + alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true; + } + + private void reset() + { + vTagCounts.clear(); + } + + // --------------------------------------------------------------- + // my versions of some PHP library functions + public static String chr(final int decimal) + { + return String.valueOf((char) decimal); + } + + public static String htmlSpecialChars(final String s) { + String result = s; + result = regexReplace(P_AMP, "&", result); + result = regexReplace(P_QUOTE, """, result); + result = regexReplace(P_LEFT_ARROW, "<", result); + result = regexReplace(P_RIGHT_ARROW, ">", result); + return result; + } + + // --------------------------------------------------------------- + + /** + * given a user submitted input String, filter out any invalid or restricted html. + * + * @param input text (i.e. submitted by a user) than may contain html + * @return "clean" version of input, with only valid, whitelisted html elements allowed + */ + public String filter(final String input) { + reset(); + String s = input; + + s = escapeComments(s); + + s = balanceHTML(s); + + s = checkTags(s); + + s = processRemoveBlanks(s); + + s = validateEntities(s); + + return s; + } + + public boolean isAlwaysMakeTags() + { + return alwaysMakeTags; + } + + public boolean isStripComments() + { + return stripComment; + } + + private String escapeComments(final String s) { + final Matcher m = P_COMMENTS.matcher(s); + final StringBuffer buf = new StringBuffer(); + if (m.find()) + { + final String match = m.group(1); // (.*?) + m.appendReplacement(buf, Matcher.quoteReplacement("")); + } + m.appendTail(buf); + + return buf.toString(); + } + + private String balanceHTML(String s) { + if (alwaysMakeTags) { + // + // try and form html + // + s = regexReplace(P_END_ARROW, "", s); + s = regexReplace(P_BODY_TO_END, "<$1>", s); + s = regexReplace(P_XML_CONTENT, "$1<$2", s); + + } else { + // + // escape stray brackets + // + s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s); + s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s); + + // + // the last regexp causes '<>' entities to appear + // (we need to do a lookahead assertion so that the last bracket can + // be used in the next pass of the regexp) + // + s = regexReplace(P_BOTH_ARROWS, "", s); + } + + return s; + } + + private String checkTags(String s) { + Matcher m = P_TAGS.matcher(s); + + final StringBuffer buf = new StringBuffer(); + while (m.find()) { + String replaceStr = m.group(1); + replaceStr = processTag(replaceStr); + m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr)); + } + m.appendTail(buf); + + // these get tallied in processTag + // (remember to reset before subsequent calls to filter method) + final StringBuilder sBuilder = new StringBuilder(buf.toString()); + for (String key : vTagCounts.keySet()) { + for (int ii = 0; ii < vTagCounts.get(key); ii++) { + sBuilder.append(""); + } + } + s = sBuilder.toString(); + + return s; + } + + private String processRemoveBlanks(final String s) { + String result = s; + for (String tag : vRemoveBlanks) { + if (!P_REMOVE_PAIR_BLANKS.containsKey(tag)) { + P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?>")); + } + result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result); + if (!P_REMOVE_SELF_BLANKS.containsKey(tag)) { + P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>")); + } + result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result); + } + + return result; + } + + private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) { + Matcher m = regex_pattern.matcher(s); + return m.replaceAll(replacement); + } + + private String processTag(final String s) { + // ending tags + Matcher m = P_END_TAG.matcher(s); + if (m.find()) { + final String name = m.group(1).toLowerCase(); + if (allowed(name)) { + if (false == inArray(name, vSelfClosingTags)) { + if (vTagCounts.containsKey(name)) { + vTagCounts.put(name, vTagCounts.get(name) - 1); + return ""; + } + } + } + } + + // starting tags + m = P_START_TAG.matcher(s); + if (m.find()) { + final String name = m.group(1).toLowerCase(); + final String body = m.group(2); + String ending = m.group(3); + + // debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" ); + if (allowed(name)) { + final StringBuilder params = new StringBuilder(); + + final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body); + final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body); + final List paramNames = new ArrayList(); + final List paramValues = new ArrayList(); + while (m2.find()) { + paramNames.add(m2.group(1)); // ([a-z0-9]+) + paramValues.add(m2.group(3)); // (.*?) + } + while (m3.find()) { + paramNames.add(m3.group(1)); // ([a-z0-9]+) + paramValues.add(m3.group(3)); // ([^\"\\s']+) + } + + String paramName, paramValue; + for (int ii = 0; ii < paramNames.size(); ii++) { + paramName = paramNames.get(ii).toLowerCase(); + paramValue = paramValues.get(ii); + + // debug( "paramName='" + paramName + "'" ); + // debug( "paramValue='" + paramValue + "'" ); + // debug( "allowed? " + vAllowed.get( name ).contains( paramName ) ); + + if (allowedAttribute(name, paramName)) { + if (inArray(paramName, vProtocolAtts)) { + paramValue = processParamProtocol(paramValue); + } + params.append(' ').append(paramName).append("=\"").append(paramValue).append("\""); + } + } + + if (inArray(name, vSelfClosingTags)) { + ending = " /"; + } + + if (inArray(name, vNeedClosingTags)) { + ending = ""; + } + + if (ending == null || ending.length() < 1) { + if (vTagCounts.containsKey(name)) { + vTagCounts.put(name, vTagCounts.get(name) + 1); + } else { + vTagCounts.put(name, 1); + } + } else { + ending = " /"; + } + return "<" + name + params + ending + ">"; + } else { + return ""; + } + } + + // comments + m = P_COMMENT.matcher(s); + if (!stripComment && m.find()) { + return "<" + m.group() + ">"; + } + + return ""; + } + + private String processParamProtocol(String s) { + s = decodeEntities(s); + final Matcher m = P_PROTOCOL.matcher(s); + if (m.find()) { + final String protocol = m.group(1); + if (!inArray(protocol, vAllowedProtocols)) { + // bad protocol, turn into local anchor link instead + s = "#" + s.substring(protocol.length() + 1); + if (s.startsWith("#//")) { + s = "#" + s.substring(3); + } + } + } + + return s; + } + + private String decodeEntities(String s) { + StringBuffer buf = new StringBuffer(); + + Matcher m = P_ENTITY.matcher(s); + while (m.find()) { + final String match = m.group(1); + final int decimal = Integer.decode(match).intValue(); + m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); + } + m.appendTail(buf); + s = buf.toString(); + + buf = new StringBuffer(); + m = P_ENTITY_UNICODE.matcher(s); + while (m.find()) { + final String match = m.group(1); + final int decimal = Integer.valueOf(match, 16).intValue(); + m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); + } + m.appendTail(buf); + s = buf.toString(); + + buf = new StringBuffer(); + m = P_ENCODE.matcher(s); + while (m.find()) { + final String match = m.group(1); + final int decimal = Integer.valueOf(match, 16).intValue(); + m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); + } + m.appendTail(buf); + s = buf.toString(); + + s = validateEntities(s); + return s; + } + + private String validateEntities(final String s) { + StringBuffer buf = new StringBuffer(); + + // validate entities throughout the string + Matcher m = P_VALID_ENTITIES.matcher(s); + while (m.find()) { + final String one = m.group(1); // ([^&;]*) + final String two = m.group(2); // (?=(;|&|$)) + m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two))); + } + m.appendTail(buf); + + return encodeQuotes(buf.toString()); + } + + private String encodeQuotes(final String s) { + if (encodeQuotes) { + StringBuffer buf = new StringBuffer(); + Matcher m = P_VALID_QUOTES.matcher(s); + while (m.find()) { + final String one = m.group(1); // (>|^) + final String two = m.group(2); // ([^<]+?) + final String three = m.group(3); // (<|$) + // 不替换双引号为",防止json格式无效 regexReplace(P_QUOTE, """, two) + m.appendReplacement(buf, Matcher.quoteReplacement(one + two + three)); + } + m.appendTail(buf); + return buf.toString(); + } else { + return s; + } + } + + private String checkEntity(final String preamble, final String term) { + + return ";".equals(term) && isValidEntity(preamble) ? '&' + preamble : "&" + preamble; + } + + private boolean isValidEntity(final String entity) + { + return inArray(entity, vAllowedEntities); + } + + private static boolean inArray(final String s, final String[] array) { + for (String item : array) { + if (item != null && item.equals(s)) { + return true; + } + } + return false; + } + + private boolean allowed(final String name) { + return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed); + } + + private boolean allowedAttribute(final String name, final String paramName) { + return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName)); + } +} \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/http/HttpUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/http/HttpUtils.java new file mode 100644 index 0000000..b2136ef --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/http/HttpUtils.java @@ -0,0 +1,495 @@ +package com.alonginfo.common.utils.http; + +import com.alibaba.fastjson.JSONObject; +import org.apache.http.HttpStatus; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.net.ssl.*; +import java.io.*; +import java.net.*; +import java.security.cert.X509Certificate; +import java.util.Map; + +/** + * 通用http发送方法 + */ +public class HttpUtils { + private static final Logger log = LoggerFactory.getLogger(HttpUtils.class); + + /** + * 向指定 URL 发送GET方法的请求 (Http请求) + * + * @param url 发送请求的 URL + * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 + * @return 所代表远程资源的响应结果 + */ + public static String sendGet(String url, String param) { + StringBuilder result = new StringBuilder(); + BufferedReader in = null; + try { + String urlNameString = url + "?" + param; + log.info("sendGet - {}", urlNameString); + URL realUrl = new URL(urlNameString); + URLConnection connection = realUrl.openConnection(); + connection.setRequestProperty("accept", "*/*"); + connection.setRequestProperty("connection", "Keep-Alive"); + connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + connection.connect(); + in = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String line; + while ((line = in.readLine()) != null) + { + result.append(line); + } + log.info("recv - {}", result); + } catch (ConnectException e) { + log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e); + } catch (SocketTimeoutException e) { + log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e); + } catch (IOException e) { + log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e); + } catch (Exception e) { + log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e); + } finally { + try { + if (in != null) { + in.close(); + } + } catch (Exception ex) { + log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); + } + } + return result.toString(); + } + + /** + * 向指定 URL 发送POST方法的请求 (Http请求) + * + * @param url 发送请求的 URL + * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 + * @return 所代表远程资源的响应结果 + */ + public static String sendPost(String url, String param, String authorization) { + PrintWriter out = null; + BufferedReader in = null; + StringBuilder result = new StringBuilder(); + try { +// String urlNameString = url + "?" + param; +// log.info("sendPost - {}", urlNameString); + URL realUrl = new URL(url); + URLConnection conn = realUrl.openConnection(); + conn.setRequestProperty("accept", "*/*"); + conn.setRequestProperty("connection", "Keep-Alive"); + conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + conn.setRequestProperty("Accept-Charset", "utf-8"); + conn.setRequestProperty("contentType", "utf-8"); + conn.setRequestProperty("token", authorization); + conn.setDoOutput(true); + conn.setDoInput(true); + out = new PrintWriter(conn.getOutputStream()); + //此处发送请求参数后 上面new URL(只需要输入url 不需要 ?拼接参数) + out.print(param); + out.flush(); + in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8")); + String line; + while ((line = in.readLine()) != null) { + result.append(line); + } + } catch (ConnectException e) { + log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e); + } catch (SocketTimeoutException e) { + log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e); + } catch (IOException e) { + log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e); + } catch (Exception e) { + log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e); + } finally { + try { + if (out != null) { + out.close(); + } + if (in != null) { + in.close(); + } + } catch (IOException ex) { + log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); + } + } + return result.toString(); + } + + /** + * post请求传输body-json数据 + * + * @param url url地址 + * @param json json数据 + * @return + * @throws ClientProtocolException + * @throws IOException + */ + public static String sendPostDataByJson(String url, String json, String token) throws ClientProtocolException, IOException { + String result = ""; + CloseableHttpResponse response = null; + try { + // 创建httpclient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + // 创建post方式请求对象 + HttpPost httpPost = new HttpPost(url); + + // 设置参数到请求对象中 + StringEntity stringEntity = new StringEntity(json, ContentType.APPLICATION_JSON); + stringEntity.setContentEncoding("utf-8"); + httpPost.setEntity(stringEntity); + + // 设置header信息 + // 指定报文头【Content-type】、【User-Agent】 + httpPost.setHeader("Content-type", "application/json"); + httpPost.setHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); + httpPost.setHeader("token", token); + + // 执行请求操作,并拿到结果(同步阻塞) + response = httpClient.execute(httpPost); + + // 获取结果实体 + // 判断网络连接状态码是否正常(0--200都数正常) + if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { + log.info("sendPostByJson - url:{}, param:{}", url, json); + result = EntityUtils.toString(response.getEntity(), "utf-8"); + } else { + log.info("网络状态码错误! url:{}, param:{}, result:{}", url, json, EntityUtils.toString(response.getEntity(), "utf-8")); + } + } catch (Exception e) { + e.printStackTrace(); + log.info("调用失败! url: {}, paramJson: {}, token: {}", url, json, token); + } finally { + // 释放链接 + response.close(); + } + return result; + } + + /** + * post请求传递 body参数及url参数 (Http请求) + * @param url + * @param json + * @param map + * @return + */ + public static String sendPostDataByJsonAndMap(String url, String json, Map map, String token) throws IOException { + String result = ""; + + // 设置Map参数到请求对象中 + if (map != null) { + boolean isFirst = true; + for (Map.Entry entry : map.entrySet()) { + String sign = isFirst ? "?" : "&"; + url += (sign + entry.getKey() + "=" + entry.getValue()); + isFirst = false; + } + } + // 创建httpclient对象 + CloseableHttpClient httpClient = HttpClients.createDefault(); + // 创建post方式请求对象 + HttpPost httpPost = new HttpPost(url); + + // 设置Json参数到请求对象中 + StringEntity stringEntity = new StringEntity(json, ContentType.APPLICATION_JSON); + stringEntity.setContentEncoding("utf-8"); + httpPost.setEntity(stringEntity); + + // 设置header信息 + // 指定报文头【Content-type】、【User-Agent】 + httpPost.setHeader("Content-type", "application/json"); + httpPost.setHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)"); + httpPost.setHeader("Authorization", token); + + // 执行请求操作,并拿到结果(同步阻塞) + CloseableHttpResponse response = httpClient.execute(httpPost); + + // 获取结果实体 + // 判断网络连接状态码是否正常(0--200都数正常) + if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { + result = EntityUtils.toString(response.getEntity(), "utf-8"); + } + // 释放链接 + response.close(); + + return result; + } + + /** + * 向https发送post请求 注:参数存在于请求体(Body传参) + * @param url 接口地址 + * @param params 参数 + * @return + */ + public static String sendSSLPost(String url, Map params, String authorization) { + StringBuilder result = new StringBuilder(); + String urlNameString = url; + try { + log.info("sendSSLPost - {}", urlNameString); + SSLContext sc = SSLContext.getInstance("SSL"); + sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom()); + URL console = new URL(urlNameString); + HttpsURLConnection conn = (HttpsURLConnection) console.openConnection(); + conn.setRequestProperty("accept", "*/*"); + conn.setRequestProperty("connection", "Keep-Alive"); + conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + conn.setRequestProperty("Content-Type", "application/json;charset=utf-8"); + conn.setRequestProperty("Authorization", authorization); + conn.setRequestMethod("POST"); + conn.setDoOutput(true); + conn.setDoInput(true); + + conn.setSSLSocketFactory(sc.getSocketFactory()); +// conn.setHostnameVerifier(new TrustAnyHostnameVerifier()); + + JSONObject jsonParam = new JSONObject(); + for (Map.Entry entry : params.entrySet()) { + jsonParam.put(entry.getKey(), entry.getValue()); + } + conn.connect(); + //获取请求的输出流对象 + OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream(), "UTF-8"); + writer.write(jsonParam.toString()); + writer.flush(); + + InputStream is = conn.getInputStream(); + BufferedReader br = new BufferedReader(new InputStreamReader(is)); + String ret = ""; + while ((ret = br.readLine()) != null) { + if (ret != null && !ret.trim().equals("")) { + result.append(new String(ret.getBytes("UTF-8"), "utf-8")); + } + } + log.info("recv - {}", result); + conn.disconnect(); + br.close(); + } catch (ConnectException e) { + log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + params, e); + } catch (SocketTimeoutException e) { + log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + params, e); + } catch (IOException e) { + log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + params, e); + } catch (Exception e) { + log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + params, e); + } + return result.toString(); + } + + /** + * 向https接口发送请求 注:参数通过?拼接到url后面(params传参) + * @param url 接口地址 + * @param param 参数 格式: key1=value1&key2=value2&key3=value3 + * @return + */ + public static String sendSSLPost(String url, String param, String authorization) { + StringBuilder result = new StringBuilder(); + String urlNameString = url + "?" + param; + try { + log.info("sendSSLPost - {}", urlNameString); + SSLContext sc = SSLContext.getInstance("SSL"); + sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom()); + URL console = new URL(urlNameString); + HttpsURLConnection conn = (HttpsURLConnection) console.openConnection(); + conn.setRequestProperty("accept", "*/*"); + conn.setRequestProperty("connection", "Keep-Alive"); + conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + conn.setRequestProperty("Content-Type", "application/json;charset=utf-8"); + conn.setRequestProperty("Authorization", authorization); + conn.setRequestMethod("POST"); + conn.setDoOutput(true); + conn.setDoInput(true); + + conn.setSSLSocketFactory(sc.getSocketFactory()); +// conn.setHostnameVerifier(new TrustAnyHostnameVerifier()); + conn.connect(); + InputStream is = conn.getInputStream(); + BufferedReader br = new BufferedReader(new InputStreamReader(is)); + String ret = ""; + while ((ret = br.readLine()) != null) { + if (ret != null && !ret.trim().equals("")) { + result.append(new String(ret.getBytes("UTF-8"), "utf-8")); + } + } + log.info("recv - {}", result); + conn.disconnect(); + br.close(); + } catch (ConnectException e) { + log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + param, e); + } catch (SocketTimeoutException e) { + log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + param, e); + } catch (IOException e) { + log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + param, e); + } catch (Exception e) { + log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + param, e); + } + return result.toString(); + } + + /** + * 向https发送post请求 注:参数存在于请求体(param 传参 + Body传参) + * @param url 接口地址 + * @param params param参数 + * @param bodyParams body参数 + * @return + */ + public static String sendSSLPost(String url, String params, Map bodyParams, String authorization) { + StringBuilder result = new StringBuilder(); + String urlNameString = url + "?" + params; + try { + log.info("sendSSLPost - {}", urlNameString); + SSLContext sc = SSLContext.getInstance("SSL"); + sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, new java.security.SecureRandom()); + URL console = new URL(urlNameString); + HttpsURLConnection conn = (HttpsURLConnection) console.openConnection(); + conn.setRequestProperty("accept", "*/*"); + conn.setRequestProperty("connection", "Keep-Alive"); + conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + conn.setRequestProperty("Content-Type", "application/json;charset=utf-8"); + conn.setRequestProperty("Authorization", authorization); + conn.setRequestMethod("POST"); + conn.setDoOutput(true); + conn.setDoInput(true); + + conn.setSSLSocketFactory(sc.getSocketFactory()); +// conn.setHostnameVerifier(new TrustAnyHostnameVerifier()); + + //设置body参数 放到JSONObject中 + JSONObject jsonParam = new JSONObject(); + for (Map.Entry entry : bodyParams.entrySet()) { + jsonParam.put(entry.getKey(), entry.getValue()); + } + conn.connect(); + //获取请求的输出流对象 + OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream(), "UTF-8"); + writer.write(jsonParam.toString()); + writer.flush(); + + InputStream is = conn.getInputStream(); + BufferedReader br = new BufferedReader(new InputStreamReader(is)); + String ret = ""; + while ((ret = br.readLine()) != null) { + if (ret != null && !ret.trim().equals("")) { + result.append(new String(ret.getBytes("UTF-8"), "utf-8")); + } + } + log.info("recv - {}", result); + conn.disconnect(); + br.close(); + } catch (ConnectException e) { + log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + params, e); + } catch (SocketTimeoutException e) { + log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + params, e); + } catch (IOException e) { + log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + params, e); + } catch (Exception e) { + log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + params, e); + } + return result.toString(); + } + + /** + * URLConnection发送https请求 注:参数通过?拼接到url后面(params传参) + * @param url + * @param authorization + * @param params + * @return + */ + public static String urlSentHttps(String url, Map authorization, Map params) { + OutputStreamWriter out = null; + BufferedReader in = null; + String result = ""; + try { + URL realUrl = new URL(url); + // 打开和URL之间的连接 + URLConnection conn = realUrl.openConnection(); + // 设置通用的请求属性 + conn.setRequestProperty("accept", "*/*"); + conn.setRequestProperty("connection", "Keep-Alive"); + conn.setRequestProperty("user-agent", + "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); + conn.setRequestProperty("Accept-Charset", "utf-8"); + conn.setRequestProperty("contentType", "utf-8"); + conn.setRequestProperty("Content-Type", "application/json;charset=utf-8"); + conn.setRequestProperty("Authorization", String.valueOf(JSONObject.toJSON(authorization).toString())); + // 发送POST请求必须设置如下两行 + conn.setDoOutput(true); + conn.setDoInput(true); + // 获取URLConnection对象对应的输出流 + out = new OutputStreamWriter(conn.getOutputStream(), "UTF-8"); + String pamasStr = ""; + if (params != null && params.size() > 0) { + for (Map.Entry entry : params.entrySet()) { + pamasStr += entry.getKey() + "=" + entry.getValue() + "&"; + } + } + out.write(URLEncoder.encode(pamasStr.substring(0, pamasStr.length()-1), "UTF-8")); + // flush输出流的缓冲 + out.flush(); + // 定义BufferedReader输入流来读取URL的响应 + in = new BufferedReader( + new InputStreamReader(conn.getInputStream())); + String line; + while ((line = in.readLine()) != null) { + result += line; + } + } catch (Exception e) { + log.info("发送 POST 请求出现异常!url = {}, param = {}, ", url, params, e); + e.printStackTrace(); + } + //使用finally块来关闭输出流、输入流 + finally { + try { + if (out != null) { + out.close(); + } + if (in != null) { + in.close(); + } + } catch (IOException ex) { + ex.printStackTrace(); + } + } + return result; + } + + + + private static class TrustAnyTrustManager implements X509TrustManager { + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) { + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) { + } + + @Override + public X509Certificate[] getAcceptedIssuers() + { + return new X509Certificate[] {}; + } + } + +// private static class TrustAnyHostnameVerifier implements HostnameVerifier { +// @Override +// public boolean verify(String hostname, SSLSession session) +// { +// return true; +// } +// } + + private static class TrustAnyHostnameVerifier { + + } +} \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/AddressUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/AddressUtils.java new file mode 100644 index 0000000..69511ee --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/AddressUtils.java @@ -0,0 +1,36 @@ +package com.alonginfo.common.utils.ip; + +import com.alibaba.fastjson.JSONObject; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 获取地址类 + */ +public class AddressUtils { + private static final Logger log = LoggerFactory.getLogger(AddressUtils.class); + + public static final String IP_URL = "p"; + + public static String getRealAddressByIP(String ip) { + String address = "XX XX"; + return "内网IP"; + /*// 内网不查询 + if (IpUtils.internalIp(ip)) { + return "内网IP"; + } + String rspStr = HttpUtils.sendPost(IP_URL, "ip=" + ip); + if (StringUtils.isEmpty(rspStr)) { + log.error("获取地理位置异常 {}", ip); + return address; + } + JSONObject obj = JSONObject.parseObject(rspStr); + JSONObject data = obj.getObject("data", JSONObject.class); + String region = data.getString("region"); + String city = data.getString("city"); + address = region + " " + city; + return address;*/ + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/IpUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/IpUtils.java new file mode 100644 index 0000000..6bdfe2f --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/IpUtils.java @@ -0,0 +1,163 @@ +package com.alonginfo.common.utils.ip; + +import com.alonginfo.common.utils.StringUtils; + +import javax.servlet.http.HttpServletRequest; +import java.net.InetAddress; +import java.net.UnknownHostException; + +/** + * 获取IP方法 + * + * @author sdj + */ +public class IpUtils { + public static String getIpAddr(HttpServletRequest request) { + if (request == null) { + return "unknown"; + } + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("X-Forwarded-For"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("X-Real-IP"); + } + + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + + return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; + } + + public static boolean internalIp(String ip) { + byte[] addr = textToNumericFormatV4(ip); + return internalIp(addr) || "127.0.0.1".equals(ip); + } + + private static boolean internalIp(byte[] addr) { + if (StringUtils.isNull(addr) || addr.length < 2) { + return true; + } + final byte b0 = addr[0]; + final byte b1 = addr[1]; + // 10.x.x.x/8 + final byte SECTION_1 = 0x0A; + // 172.16.x.x/12 + final byte SECTION_2 = (byte) 0xAC; + final byte SECTION_3 = (byte) 0x10; + final byte SECTION_4 = (byte) 0x1F; + // 192.168.x.x/16 + final byte SECTION_5 = (byte) 0xC0; + final byte SECTION_6 = (byte) 0xA8; + switch (b0) { + case SECTION_1: + return true; + case SECTION_2: + if (b1 >= SECTION_3 && b1 <= SECTION_4) { + return true; + } + case SECTION_5: + switch (b1) { + case SECTION_6: + return true; + } + default: + return false; + } + } + + /** + * 将IPv4地址转换成字节 + * + * @param text IPv4地址 + * @return byte 字节 + */ + public static byte[] textToNumericFormatV4(String text) { + if (text.length() == 0) { + return null; + } + + byte[] bytes = new byte[4]; + String[] elements = text.split("\\.", -1); + try { + long l; + int i; + switch (elements.length) { + case 1: + l = Long.parseLong(elements[0]); + if ((l < 0L) || (l > 4294967295L)) + return null; + bytes[0] = (byte) (int) (l >> 24 & 0xFF); + bytes[1] = (byte) (int) ((l & 0xFFFFFF) >> 16 & 0xFF); + bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF); + bytes[3] = (byte) (int) (l & 0xFF); + break; + case 2: + l = Integer.parseInt(elements[0]); + if ((l < 0L) || (l > 255L)) + return null; + bytes[0] = (byte) (int) (l & 0xFF); + l = Integer.parseInt(elements[1]); + if ((l < 0L) || (l > 16777215L)) + return null; + bytes[1] = (byte) (int) (l >> 16 & 0xFF); + bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF); + bytes[3] = (byte) (int) (l & 0xFF); + break; + case 3: + for (i = 0; i < 2; ++i) { + l = Integer.parseInt(elements[i]); + if ((l < 0L) || (l > 255L)) + return null; + bytes[i] = (byte) (int) (l & 0xFF); + } + l = Integer.parseInt(elements[2]); + if ((l < 0L) || (l > 65535L)) + return null; + bytes[2] = (byte) (int) (l >> 8 & 0xFF); + bytes[3] = (byte) (int) (l & 0xFF); + break; + case 4: + for (i = 0; i < 4; ++i) { + l = Integer.parseInt(elements[i]); + if ((l < 0L) || (l > 255L)) + return null; + bytes[i] = (byte) (int) (l & 0xFF); + } + break; + default: + return null; + } + } + catch (NumberFormatException e) { + return null; + } + return bytes; + } + + public static String getHostIp() { + try { + return InetAddress.getLocalHost().getHostAddress(); + } + catch (UnknownHostException e) { + } + return "127.0.0.1"; + } + + public static String getHostName() { + try { + return InetAddress.getLocalHost().getHostName(); + } + catch (UnknownHostException e) { + } + return "未知"; + } +} \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/reflect/ReflectUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/reflect/ReflectUtils.java new file mode 100644 index 0000000..f02c12d --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/reflect/ReflectUtils.java @@ -0,0 +1,325 @@ +package com.alonginfo.common.utils.reflect; + +import com.alonginfo.common.core.text.Convert; +import com.alonginfo.common.utils.DateUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.Validate; +import org.apache.poi.ss.usermodel.DateUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.lang.reflect.*; +import java.util.Date; + +/** + * 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数. + */ +@SuppressWarnings("rawtypes") +public class ReflectUtils { + + private static final String SETTER_PREFIX = "set"; + + private static final String GETTER_PREFIX = "get"; + + private static final String CGLIB_CLASS_SEPARATOR = "$$"; + + private static Logger logger = LoggerFactory.getLogger(ReflectUtils.class); + + /** + * 调用Getter方法. + * 支持多级,如:对象名.对象名.方法 + */ + @SuppressWarnings("unchecked") + public static E invokeGetter(Object obj, String propertyName) { + Object object = obj; + for (String name : StringUtils.split(propertyName, ".")) { + String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name); + object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {}); + } + return (E) object; + } + + /** + * 调用Setter方法, 仅匹配方法名。 + * 支持多级,如:对象名.对象名.方法 + */ + public static void invokeSetter(Object obj, String propertyName, E value) { + Object object = obj; + String[] names = StringUtils.split(propertyName, "."); + for (int i = 0; i < names.length; i++) { + if (i < names.length - 1) { + String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(names[i]); + object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {}); + } else { + String setterMethodName = SETTER_PREFIX + StringUtils.capitalize(names[i]); + invokeMethodByName(object, setterMethodName, new Object[] { value }); + } + } + } + + /** + * 直接读取对象属性值, 无视private/protected修饰符, 不经过getter函数. + */ + @SuppressWarnings("unchecked") + public static E getFieldValue(final Object obj, final String fieldName) { + Field field = getAccessibleField(obj, fieldName); + if (field == null) { + logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); + return null; + } + E result = null; + try { + result = (E) field.get(obj); + } catch (IllegalAccessException e) { + logger.error("不可能抛出的异常{}", e.getMessage()); + } + return result; + } + + /** + * 直接设置对象属性值, 无视private/protected修饰符, 不经过setter函数. + */ + public static void setFieldValue(final Object obj, final String fieldName, final E value) { + Field field = getAccessibleField(obj, fieldName); + if (field == null) { + // throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); + logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); + return; + } + try { + field.set(obj, value); + } catch (IllegalAccessException e) { + logger.error("不可能抛出的异常: {}", e.getMessage()); + } + } + + /** + * 直接调用对象方法, 无视private/protected修饰符. + * 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用. + * 同时匹配方法名+参数类型, + */ + @SuppressWarnings("unchecked") + public static E invokeMethod(final Object obj, final String methodName, final Class[] parameterTypes, + final Object[] args) { + if (obj == null || methodName == null) { + return null; + } + Method method = getAccessibleMethod(obj, methodName, parameterTypes); + if (method == null) { + logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 "); + return null; + } + try { + return (E) method.invoke(obj, args); + } catch (Exception e) { + String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; + throw convertReflectionExceptionToUnchecked(msg, e); + } + } + + /** + * 直接调用对象方法, 无视private/protected修饰符, + * 用于一次性调用的情况,否则应使用getAccessibleMethodByName()函数获得Method后反复调用. + * 只匹配函数名,如果有多个同名函数调用第一个。 + */ + @SuppressWarnings("unchecked") + public static E invokeMethodByName(final Object obj, final String methodName, final Object[] args) { + Method method = getAccessibleMethodByName(obj, methodName, args.length); + if (method == null) { + // 如果为空不报错,直接返回空。 + logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 "); + return null; + } + try { + // 类型转换(将参数数据类型转换为目标方法参数类型) + Class[] cs = method.getParameterTypes(); + for (int i = 0; i < cs.length; i++) { + if (args[i] != null && !args[i].getClass().equals(cs[i])) { + if (cs[i] == String.class) { + args[i] = Convert.toStr(args[i]); + if (StringUtils.endsWith((String) args[i], ".0")) { + args[i] = StringUtils.substringBefore((String) args[i], ".0"); + } + } else if (cs[i] == Integer.class) { + args[i] = Convert.toInt(args[i]); + } else if (cs[i] == Long.class) { + args[i] = Convert.toLong(args[i]); + } else if (cs[i] == Double.class) { + args[i] = Convert.toDouble(args[i]); + } else if (cs[i] == Float.class) { + args[i] = Convert.toFloat(args[i]); + } else if (cs[i] == Date.class) { + if (args[i] instanceof String) { + args[i] = DateUtils.parseDate(args[i]); + } else { + args[i] = DateUtil.getJavaDate((Double) args[i]); + } + } + } + } + return (E) method.invoke(obj, args); + } catch (Exception e) { + String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; + throw convertReflectionExceptionToUnchecked(msg, e); + } + } + + /** + * 循环向上转型, 获取对象的DeclaredField, 并强制设置为可访问. + * 如向上转型到Object仍无法找到, 返回null. + */ + public static Field getAccessibleField(final Object obj, final String fieldName) { + // 为空不报错。直接返回 null + if (obj == null) { + return null; + } + Validate.notBlank(fieldName, "fieldName can't be blank"); + for (Class superClass = obj.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) { + try { + Field field = superClass.getDeclaredField(fieldName); + makeAccessible(field); + return field; + } catch (NoSuchFieldException e) { + continue; + } + } + return null; + } + + /** + * 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问. + * 如向上转型到Object仍无法找到, 返回null. + * 匹配函数名+参数类型。 + * 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args) + */ + public static Method getAccessibleMethod(final Object obj, final String methodName, + final Class... parameterTypes) { + // 为空不报错。直接返回 null + if (obj == null) { + return null; + } + Validate.notBlank(methodName, "methodName can't be blank"); + for (Class searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) { + try { + Method method = searchType.getDeclaredMethod(methodName, parameterTypes); + makeAccessible(method); + return method; + } catch (NoSuchMethodException e) { + continue; + } + } + return null; + } + + /** + * 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问. + * 如向上转型到Object仍无法找到, 返回null. + * 只匹配函数名。 + * 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args) + */ + public static Method getAccessibleMethodByName(final Object obj, final String methodName, int argsNum) { + // 为空不报错。直接返回 null + if (obj == null) { + return null; + } + Validate.notBlank(methodName, "methodName can't be blank"); + for (Class searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) + { + Method[] methods = searchType.getDeclaredMethods(); + for (Method method : methods) + { + if (method.getName().equals(methodName) && method.getParameterTypes().length == argsNum) + { + makeAccessible(method); + return method; + } + } + } + return null; + } + + /** + * 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。 + */ + public static void makeAccessible(Method method) { + if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers())) + && !method.isAccessible()) { + method.setAccessible(true); + } + } + + /** + * 改变private/protected的成员变量为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。 + */ + public static void makeAccessible(Field field) { + if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) + || Modifier.isFinal(field.getModifiers())) && !field.isAccessible()) { + field.setAccessible(true); + } + } + + /** + * 通过反射, 获得Class定义中声明的泛型参数的类型, 注意泛型必须定义在父类处 + * 如无法找到, 返回Object.class. + */ + @SuppressWarnings("unchecked") + public static Class getClassGenricType(final Class clazz) + { + return getClassGenricType(clazz, 0); + } + + /** + * 通过反射, 获得Class定义中声明的父类的泛型参数的类型. + * 如无法找到, 返回Object.class. + */ + public static Class getClassGenricType(final Class clazz, final int index) { + Type genType = clazz.getGenericSuperclass(); + + if (!(genType instanceof ParameterizedType)) { + logger.debug(clazz.getSimpleName() + "'s superclass not ParameterizedType"); + return Object.class; + } + + Type[] params = ((ParameterizedType) genType).getActualTypeArguments(); + + if (index >= params.length || index < 0) { + logger.debug("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: " + + params.length); + return Object.class; + } + if (!(params[index] instanceof Class)) { + logger.debug(clazz.getSimpleName() + " not set the actual class on superclass generic parameter"); + return Object.class; + } + + return (Class) params[index]; + } + + public static Class getUserClass(Object instance) { + if (instance == null) { + throw new RuntimeException("Instance must not be null"); + } + Class clazz = instance.getClass(); + if (clazz != null && clazz.getName().contains(CGLIB_CLASS_SEPARATOR)) { + Class superClass = clazz.getSuperclass(); + if (superClass != null && !Object.class.equals(superClass)) { + return superClass; + } + } + return clazz; + + } + + /** + * 将反射时的checked exception转换为unchecked exception. + */ + public static RuntimeException convertReflectionExceptionToUnchecked(String msg, Exception e) { + if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException + || e instanceof NoSuchMethodException) { + return new IllegalArgumentException(msg, e); + } else if (e instanceof InvocationTargetException) { + return new RuntimeException(msg, ((InvocationTargetException) e).getTargetException()); + } + return new RuntimeException(msg, e); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/security/Md5Utils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/security/Md5Utils.java new file mode 100644 index 0000000..9f545a9 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/security/Md5Utils.java @@ -0,0 +1,52 @@ +package com.alonginfo.common.utils.security; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.security.MessageDigest; + +/** + * Md5加密方法 + */ +public class Md5Utils { + private static final Logger log = LoggerFactory.getLogger(Md5Utils.class); + + private static byte[] md5(String s) { + MessageDigest algorithm; + try { + algorithm = MessageDigest.getInstance("MD5"); + algorithm.reset(); + algorithm.update(s.getBytes("UTF-8")); + byte[] messageDigest = algorithm.digest(); + return messageDigest; + } catch (Exception e) { + log.error("MD5 Error...", e); + } + return null; + } + + private static final String toHex(byte hash[]) { + if (hash == null) { + return null; + } + StringBuffer buf = new StringBuffer(hash.length * 2); + int i; + + for (i = 0; i < hash.length; i++) { + if ((hash[i] & 0xff) < 0x10) { + buf.append("0"); + } + buf.append(Long.toString(hash[i] & 0xff, 16)); + } + return buf.toString(); + } + + public static String hash(String s) { + try { + return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8"); + } catch (Exception e) { + log.error("not supported charset...{}", e); + return s; + } + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sign/Base64.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sign/Base64.java new file mode 100644 index 0000000..f3b81b8 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sign/Base64.java @@ -0,0 +1,253 @@ +package com.alonginfo.common.utils.sign; + +/** + * Base64工具类 + */ +public final class Base64 { + static private final int BASELENGTH = 128; + static private final int LOOKUPLENGTH = 64; + static private final int TWENTYFOURBITGROUP = 24; + static private final int EIGHTBIT = 8; + static private final int SIXTEENBIT = 16; + static private final int FOURBYTE = 4; + static private final int SIGN = -128; + static private final char PAD = '='; + static final private byte[] base64Alphabet = new byte[BASELENGTH]; + static final private char[] lookUpBase64Alphabet = new char[LOOKUPLENGTH]; + + static { + for (int i = 0; i < BASELENGTH; ++i) { + base64Alphabet[i] = -1; + } + for (int i = 'Z'; i >= 'A'; i--) { + base64Alphabet[i] = (byte) (i - 'A'); + } + for (int i = 'z'; i >= 'a'; i--) { + base64Alphabet[i] = (byte) (i - 'a' + 26); + } + + for (int i = '9'; i >= '0'; i--) { + base64Alphabet[i] = (byte) (i - '0' + 52); + } + + base64Alphabet['+'] = 62; + base64Alphabet['/'] = 63; + + for (int i = 0; i <= 25; i++) { + lookUpBase64Alphabet[i] = (char) ('A' + i); + } + + for (int i = 26, j = 0; i <= 51; i++, j++) { + lookUpBase64Alphabet[i] = (char) ('a' + j); + } + + for (int i = 52, j = 0; i <= 61; i++, j++) { + lookUpBase64Alphabet[i] = (char) ('0' + j); + } + lookUpBase64Alphabet[62] = (char) '+'; + lookUpBase64Alphabet[63] = (char) '/'; + } + + private static boolean isWhiteSpace(char octect) { + return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9); + } + + private static boolean isPad(char octect) + { + return (octect == PAD); + } + + private static boolean isData(char octect) + { + return (octect < BASELENGTH && base64Alphabet[octect] != -1); + } + + /** + * Encodes hex octects into Base64 + * + * @param binaryData Array containing binaryData + * @return Encoded Base64 array + */ + public static String encode(byte[] binaryData) { + if (binaryData == null) { + return null; + } + + int lengthDataBits = binaryData.length * EIGHTBIT; + if (lengthDataBits == 0) { + return ""; + } + + int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP; + int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP; + int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets; + char encodedData[] = null; + + encodedData = new char[numberQuartet * 4]; + + byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0; + + int encodedIndex = 0; + int dataIndex = 0; + + for (int i = 0; i < numberTriplets; i++) { + b1 = binaryData[dataIndex++]; + b2 = binaryData[dataIndex++]; + b3 = binaryData[dataIndex++]; + + l = (byte) (b2 & 0x0f); + k = (byte) (b1 & 0x03); + + byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); + byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); + byte val3 = ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc); + + encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; + encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; + encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3]; + encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f]; + } + + // form integral number of 6-bit groups + if (fewerThan24bits == EIGHTBIT) { + b1 = binaryData[dataIndex]; + k = (byte) (b1 & 0x03); + byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); + encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; + encodedData[encodedIndex++] = lookUpBase64Alphabet[k << 4]; + encodedData[encodedIndex++] = PAD; + encodedData[encodedIndex++] = PAD; + } else if (fewerThan24bits == SIXTEENBIT) { + b1 = binaryData[dataIndex]; + b2 = binaryData[dataIndex + 1]; + l = (byte) (b2 & 0x0f); + k = (byte) (b1 & 0x03); + + byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); + byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); + + encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; + encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; + encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2]; + encodedData[encodedIndex++] = PAD; + } + return new String(encodedData); + } + + /** + * Decodes Base64 data into octects + * + * @param encoded string containing Base64 data + * @return Array containind decoded data. + */ + public static byte[] decode(String encoded) { + if (encoded == null) { + return null; + } + + char[] base64Data = encoded.toCharArray(); + // remove white spaces + int len = removeWhiteSpace(base64Data); + + if (len % FOURBYTE != 0) { + return null;// should be divisible by four + } + + int numberQuadruple = (len / FOURBYTE); + + if (numberQuadruple == 0) { + return new byte[0]; + } + + byte decodedData[] = null; + byte b1 = 0, b2 = 0, b3 = 0, b4 = 0; + char d1 = 0, d2 = 0, d3 = 0, d4 = 0; + + int i = 0; + int encodedIndex = 0; + int dataIndex = 0; + decodedData = new byte[(numberQuadruple) * 3]; + + for (; i < numberQuadruple - 1; i++) { + + if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++])) + || !isData((d3 = base64Data[dataIndex++])) || !isData((d4 = base64Data[dataIndex++]))) { + return null; + } // if found "no data" just return null + + b1 = base64Alphabet[d1]; + b2 = base64Alphabet[d2]; + b3 = base64Alphabet[d3]; + b4 = base64Alphabet[d4]; + + decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); + decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); + decodedData[encodedIndex++] = (byte) (b3 << 6 | b4); + } + + if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++]))) { + return null;// if found "no data" just return null + } + + b1 = base64Alphabet[d1]; + b2 = base64Alphabet[d2]; + + d3 = base64Data[dataIndex++]; + d4 = base64Data[dataIndex++]; + if (!isData((d3)) || !isData((d4))) {// Check if they are PAD characters + if (isPad(d3) && isPad(d4)) { + if ((b2 & 0xf) != 0)// last 4 bits should be zero + { + return null; + } + byte[] tmp = new byte[i * 3 + 1]; + System.arraycopy(decodedData, 0, tmp, 0, i * 3); + tmp[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); + return tmp; + } else if (!isPad(d3) && isPad(d4)) { + b3 = base64Alphabet[d3]; + if ((b3 & 0x3) != 0)// last 2 bits should be zero + { + return null; + } + byte[] tmp = new byte[i * 3 + 2]; + System.arraycopy(decodedData, 0, tmp, 0, i * 3); + tmp[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); + tmp[encodedIndex] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); + return tmp; + } else { + return null; + } + } else { // No PAD e.g 3cQl + b3 = base64Alphabet[d3]; + b4 = base64Alphabet[d4]; + decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); + decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); + decodedData[encodedIndex++] = (byte) (b3 << 6 | b4); + + } + return decodedData; + } + + /** + * remove WhiteSpace from MIME containing encoded Base64 data. + * + * @param data the byte array of base64 data (with WS) + * @return the new length + */ + private static int removeWhiteSpace(char[] data) { + if (data == null) { + return 0; + } + + // count characters that's not whitespace + int newSize = 0; + int len = data.length; + for (int i = 0; i < len; i++) { + if (!isWhiteSpace(data[i])) { + data[newSize++] = data[i]; + } + } + return newSize; + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/spring/SpringUtils.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/spring/SpringUtils.java new file mode 100644 index 0000000..3a34d78 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/spring/SpringUtils.java @@ -0,0 +1,112 @@ +package com.alonginfo.common.utils.spring; + +import org.springframework.aop.framework.AopContext; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.beans.factory.config.BeanFactoryPostProcessor; +import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.stereotype.Component; + +/** + * spring工具类 方便在非spring管理环境中获取bean + */ +@Component +public final class SpringUtils implements BeanFactoryPostProcessor { + + /** Spring应用上下文环境 */ + private static ConfigurableListableBeanFactory beanFactory; + + @Override + public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException + { + SpringUtils.beanFactory = beanFactory; + } + + /** + * 获取对象 + * + * @param name + * @return Object 一个以所给名字注册的bean的实例 + * @throws org.springframework.beans.BeansException + * + */ + @SuppressWarnings("unchecked") + public static T getBean(String name) throws BeansException + { + return (T) beanFactory.getBean(name); + } + + /** + * 获取类型为requiredType的对象 + * + * @param clz + * @return + * @throws org.springframework.beans.BeansException + * + */ + public static T getBean(Class clz) throws BeansException + { + T result = (T) beanFactory.getBean(clz); + return result; + } + + /** + * 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true + * + * @param name + * @return boolean + */ + public static boolean containsBean(String name) + { + return beanFactory.containsBean(name); + } + + /** + * 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException) + * + * @param name + * @return boolean + * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException + * + */ + public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException + { + return beanFactory.isSingleton(name); + } + + /** + * @param name + * @return Class 注册对象的类型 + * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException + * + */ + public static Class getType(String name) throws NoSuchBeanDefinitionException + { + return beanFactory.getType(name); + } + + /** + * 如果给定的bean名字在bean定义中有别名,则返回这些别名 + * + * @param name + * @return + * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException + * + */ + public static String[] getAliases(String name) throws NoSuchBeanDefinitionException + { + return beanFactory.getAliases(name); + } + + /** + * 获取aop代理对象 + * + * @param invoker + * @return + */ + @SuppressWarnings("unchecked") + public static T getAopProxy(T invoker) + { + return (T) AopContext.currentProxy(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sql/SqlUtil.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sql/SqlUtil.java new file mode 100644 index 0000000..b136f82 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sql/SqlUtil.java @@ -0,0 +1,31 @@ +package com.alonginfo.common.utils.sql; + +import com.alonginfo.common.utils.StringUtils; + +/** + * sql操作工具类 + */ +public class SqlUtil { + /** + * 仅支持字母、数字、下划线、空格、逗号(支持多个字段排序) + */ + public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,]+"; + + /** + * 检查字符,防止注入绕过 + */ + public static String escapeOrderBySql(String value) { + if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) { + return StringUtils.EMPTY; + } + return value; + } + + /** + * 验证 order by 语法是否符合规范 + */ + public static boolean isValidOrderBySql(String value) + { + return value.matches(SQL_PATTERN); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/CharsetKit.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/CharsetKit.java new file mode 100644 index 0000000..df6e04d --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/CharsetKit.java @@ -0,0 +1,78 @@ +package com.alonginfo.common.utils.text; + +import com.alonginfo.common.utils.StringUtils; + +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; + +/** + * 字符集工具类 + */ +public class CharsetKit { + /** ISO-8859-1 */ + public static final String ISO_8859_1 = "ISO-8859-1"; + /** UTF-8 */ + public static final String UTF_8 = "UTF-8"; + /** GBK */ + public static final String GBK = "GBK"; + + /** ISO-8859-1 */ + public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1); + /** UTF-8 */ + public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8); + /** GBK */ + public static final Charset CHARSET_GBK = Charset.forName(GBK); + + /** + * 转换为Charset对象 + * + * @param charset 字符集,为空则返回默认字符集 + * @return Charset + */ + public static Charset charset(String charset) { + return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset); + } + + /** + * 转换字符串的字符集编码 + * + * @param source 字符串 + * @param srcCharset 源字符集,默认ISO-8859-1 + * @param destCharset 目标字符集,默认UTF-8 + * @return 转换后的字符集 + */ + public static String convert(String source, String srcCharset, String destCharset) { + return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset)); + } + + /** + * 转换字符串的字符集编码 + * + * @param source 字符串 + * @param srcCharset 源字符集,默认ISO-8859-1 + * @param destCharset 目标字符集,默认UTF-8 + * @return 转换后的字符集 + */ + public static String convert(String source, Charset srcCharset, Charset destCharset) { + if (null == srcCharset) { + srcCharset = StandardCharsets.ISO_8859_1; + } + + if (null == destCharset) { + srcCharset = StandardCharsets.UTF_8; + } + + if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset)) { + return source; + } + return new String(source.getBytes(srcCharset), destCharset); + } + + /** + * @return 系统字符集编码 + */ + public static String systemCharset() + { + return Charset.defaultCharset().name(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/Convert.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/Convert.java new file mode 100644 index 0000000..d97a122 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/Convert.java @@ -0,0 +1,960 @@ +package com.alonginfo.common.utils.text; + +import com.alonginfo.common.utils.StringUtils; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.text.NumberFormat; +import java.util.Set; + +/** + * 类型转换器 + */ +public class Convert { + /** + * 转换为字符串
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static String toStr(Object value, String defaultValue) { + if (null == value) { + return defaultValue; + } + if (value instanceof String) { + return (String) value; + } + return value.toString(); + } + + /** + * 转换为字符串
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static String toStr(Object value) + { + return toStr(value, null); + } + + /** + * 转换为字符
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Character toChar(Object value, Character defaultValue) { + if (null == value) { + return defaultValue; + } + if (value instanceof Character) { + return (Character) value; + } + + final String valueStr = toStr(value, null); + return StringUtils.isEmpty(valueStr) ? defaultValue : valueStr.charAt(0); + } + + /** + * 转换为字符
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Character toChar(Object value) + { + return toChar(value, null); + } + + /** + * 转换为byte
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Byte toByte(Object value, Byte defaultValue) { + if (value == null) { + return defaultValue; + } + if (value instanceof Byte) { + return (Byte) value; + } + if (value instanceof Number) { + return ((Number) value).byteValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) { + return defaultValue; + } + try { + return Byte.parseByte(valueStr); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * 转换为byte
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Byte toByte(Object value) + { + return toByte(value, null); + } + + /** + * 转换为Short
+ * 如果给定的值为null,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Short toShort(Object value, Short defaultValue) { + if (value == null) { + return defaultValue; + } + if (value instanceof Short) { + return (Short) value; + } + if (value instanceof Number) { + return ((Number) value).shortValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) { + return defaultValue; + } + try { + return Short.parseShort(valueStr.trim()); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * 转换为Short
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Short toShort(Object value) + { + return toShort(value, null); + } + + /** + * 转换为Number
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Number toNumber(Object value, Number defaultValue) { + if (value == null) { + return defaultValue; + } + if (value instanceof Number) { + return (Number) value; + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) { + return defaultValue; + } + try { + return NumberFormat.getInstance().parse(valueStr); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * 转换为Number
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Number toNumber(Object value) + { + return toNumber(value, null); + } + + /** + * 转换为int
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Integer toInt(Object value, Integer defaultValue) { + if (value == null) { + return defaultValue; + } + if (value instanceof Integer) { + return (Integer) value; + } + if (value instanceof Number) { + return ((Number) value).intValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) { + return defaultValue; + } + try { + return Integer.parseInt(valueStr.trim()); + } catch (Exception e) { + return defaultValue; + } + } + + /** + * 转换为int
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Integer toInt(Object value) + { + return toInt(value, null); + } + + /** + * 转换为Integer数组
+ * + * @param str 被转换的值 + * @return 结果 + */ + public static Integer[] toIntArray(String str) + { + return toIntArray(",", str); + } + + /** + * 转换为Long数组
+ * + * @param str 被转换的值 + * @return 结果 + */ + public static Long[] toLongArray(String str) + { + return toLongArray(",", str); + } + + /** + * 转换为Integer数组
+ * + * @param split 分隔符 + * @param split 被转换的值 + * @return 结果 + */ + public static Integer[] toIntArray(String split, String str) + { + if (StringUtils.isEmpty(str)) + { + return new Integer[] {}; + } + String[] arr = str.split(split); + final Integer[] ints = new Integer[arr.length]; + for (int i = 0; i < arr.length; i++) + { + final Integer v = toInt(arr[i], 0); + ints[i] = v; + } + return ints; + } + + /** + * 转换为Long数组
+ * + * @param split 分隔符 + * @param str 被转换的值 + * @return 结果 + */ + public static Long[] toLongArray(String split, String str) + { + if (StringUtils.isEmpty(str)) + { + return new Long[] {}; + } + String[] arr = str.split(split); + final Long[] longs = new Long[arr.length]; + for (int i = 0; i < arr.length; i++) + { + final Long v = toLong(arr[i], null); + longs[i] = v; + } + return longs; + } + + /** + * 转换为String数组
+ * + * @param str 被转换的值 + * @return 结果 + */ + public static String[] toStrArray(String str) + { + return toStrArray(",", str); + } + + /** + * 转换为String数组
+ * + * @param split 分隔符 + * @param split 被转换的值 + * @return 结果 + */ + public static String[] toStrArray(String split, String str) + { + return str.split(split); + } + + /** + * 转换为long
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Long toLong(Object value, Long defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Long) + { + return (Long) value; + } + if (value instanceof Number) + { + return ((Number) value).longValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + // 支持科学计数法 + return new BigDecimal(valueStr.trim()).longValue(); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为long
+ * 如果给定的值为null,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Long toLong(Object value) + { + return toLong(value, null); + } + + /** + * 转换为double
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Double toDouble(Object value, Double defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Double) + { + return (Double) value; + } + if (value instanceof Number) + { + return ((Number) value).doubleValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + // 支持科学计数法 + return new BigDecimal(valueStr.trim()).doubleValue(); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为double
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Double toDouble(Object value) + { + return toDouble(value, null); + } + + /** + * 转换为Float
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Float toFloat(Object value, Float defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Float) + { + return (Float) value; + } + if (value instanceof Number) + { + return ((Number) value).floatValue(); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return Float.parseFloat(valueStr.trim()); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为Float
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Float toFloat(Object value) + { + return toFloat(value, null); + } + + /** + * 转换为boolean
+ * String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static Boolean toBool(Object value, Boolean defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof Boolean) + { + return (Boolean) value; + } + String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + valueStr = valueStr.trim().toLowerCase(); + switch (valueStr) + { + case "true": + return true; + case "false": + return false; + case "yes": + return true; + case "ok": + return true; + case "no": + return false; + case "1": + return true; + case "0": + return false; + default: + return defaultValue; + } + } + + /** + * 转换为boolean
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static Boolean toBool(Object value) + { + return toBool(value, null); + } + + /** + * 转换为Enum对象
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * + * @param clazz Enum的Class + * @param value 值 + * @param defaultValue 默认值 + * @return Enum + */ + public static > E toEnum(Class clazz, Object value, E defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (clazz.isAssignableFrom(value.getClass())) + { + @SuppressWarnings("unchecked") + E myE = (E) value; + return myE; + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return Enum.valueOf(clazz, valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为Enum对象
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * + * @param clazz Enum的Class + * @param value 值 + * @return Enum + */ + public static > E toEnum(Class clazz, Object value) + { + return toEnum(clazz, value, null); + } + + /** + * 转换为BigInteger
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static BigInteger toBigInteger(Object value, BigInteger defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof BigInteger) + { + return (BigInteger) value; + } + if (value instanceof Long) + { + return BigInteger.valueOf((Long) value); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return new BigInteger(valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为BigInteger
+ * 如果给定的值为空,或者转换失败,返回默认值null
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static BigInteger toBigInteger(Object value) + { + return toBigInteger(value, null); + } + + /** + * 转换为BigDecimal
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @param defaultValue 转换错误时的默认值 + * @return 结果 + */ + public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue) + { + if (value == null) + { + return defaultValue; + } + if (value instanceof BigDecimal) + { + return (BigDecimal) value; + } + if (value instanceof Long) + { + return new BigDecimal((Long) value); + } + if (value instanceof Double) + { + return new BigDecimal((Double) value); + } + if (value instanceof Integer) + { + return new BigDecimal((Integer) value); + } + final String valueStr = toStr(value, null); + if (StringUtils.isEmpty(valueStr)) + { + return defaultValue; + } + try + { + return new BigDecimal(valueStr); + } + catch (Exception e) + { + return defaultValue; + } + } + + /** + * 转换为BigDecimal
+ * 如果给定的值为空,或者转换失败,返回默认值
+ * 转换失败不会报错 + * + * @param value 被转换的值 + * @return 结果 + */ + public static BigDecimal toBigDecimal(Object value) + { + return toBigDecimal(value, null); + } + + /** + * 将对象转为字符串
+ * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 + * + * @param obj 对象 + * @return 字符串 + */ + public static String utf8Str(Object obj) + { + return str(obj, CharsetKit.CHARSET_UTF_8); + } + + /** + * 将对象转为字符串
+ * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 + * + * @param obj 对象 + * @param charsetName 字符集 + * @return 字符串 + */ + public static String str(Object obj, String charsetName) + { + return str(obj, Charset.forName(charsetName)); + } + + /** + * 将对象转为字符串
+ * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 + * + * @param obj 对象 + * @param charset 字符集 + * @return 字符串 + */ + public static String str(Object obj, Charset charset) + { + if (null == obj) + { + return null; + } + + if (obj instanceof String) + { + return (String) obj; + } + else if (obj instanceof byte[] || obj instanceof Byte[]) + { + return str((Byte[]) obj, charset); + } + else if (obj instanceof ByteBuffer) + { + return str((ByteBuffer) obj, charset); + } + return obj.toString(); + } + + /** + * 将byte数组转为字符串 + * + * @param bytes byte数组 + * @param charset 字符集 + * @return 字符串 + */ + public static String str(byte[] bytes, String charset) + { + return str(bytes, StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset)); + } + + /** + * 解码字节码 + * + * @param data 字符串 + * @param charset 字符集,如果此字段为空,则解码的结果取决于平台 + * @return 解码后的字符串 + */ + public static String str(byte[] data, Charset charset) + { + if (data == null) + { + return null; + } + + if (null == charset) + { + return new String(data); + } + return new String(data, charset); + } + + /** + * 将编码的byteBuffer数据转换为字符串 + * + * @param data 数据 + * @param charset 字符集,如果为空使用当前系统字符集 + * @return 字符串 + */ + public static String str(ByteBuffer data, String charset) + { + if (data == null) + { + return null; + } + + return str(data, Charset.forName(charset)); + } + + /** + * 将编码的byteBuffer数据转换为字符串 + * + * @param data 数据 + * @param charset 字符集,如果为空使用当前系统字符集 + * @return 字符串 + */ + public static String str(ByteBuffer data, Charset charset) + { + if (null == charset) + { + charset = Charset.defaultCharset(); + } + return charset.decode(data).toString(); + } + + // ----------------------------------------------------------------------- 全角半角转换 + /** + * 半角转全角 + * + * @param input String. + * @return 全角字符串. + */ + public static String toSBC(String input) + { + return toSBC(input, null); + } + + /** + * 半角转全角 + * + * @param input String + * @param notConvertSet 不替换的字符集合 + * @return 全角字符串. + */ + public static String toSBC(String input, Set notConvertSet) + { + char c[] = input.toCharArray(); + for (int i = 0; i < c.length; i++) + { + if (null != notConvertSet && notConvertSet.contains(c[i])) + { + // 跳过不替换的字符 + continue; + } + + if (c[i] == ' ') + { + c[i] = '\u3000'; + } + else if (c[i] < '\177') + { + c[i] = (char) (c[i] + 65248); + + } + } + return new String(c); + } + + /** + * 全角转半角 + * + * @param input String. + * @return 半角字符串 + */ + public static String toDBC(String input) + { + return toDBC(input, null); + } + + /** + * 替换全角为半角 + * + * @param text 文本 + * @param notConvertSet 不替换的字符集合 + * @return 替换后的字符 + */ + public static String toDBC(String text, Set notConvertSet) + { + char c[] = text.toCharArray(); + for (int i = 0; i < c.length; i++) + { + if (null != notConvertSet && notConvertSet.contains(c[i])) + { + // 跳过不替换的字符 + continue; + } + + if (c[i] == '\u3000') + { + c[i] = ' '; + } + else if (c[i] > '\uFF00' && c[i] < '\uFF5F') + { + c[i] = (char) (c[i] - 65248); + } + } + String returnString = new String(c); + + return returnString; + } + + /** + * 数字金额大写转换 先写个完整的然后将如零拾替换成零 + * + * @param n 数字 + * @return 中文大写数字 + */ + public static String digitUppercase(double n) + { + String[] fraction = { "角", "分" }; + String[] digit = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }; + String[][] unit = { { "元", "万", "亿" }, { "", "拾", "佰", "仟" } }; + + String head = n < 0 ? "负" : ""; + n = Math.abs(n); + + String s = ""; + for (int i = 0; i < fraction.length; i++) + { + s += (digit[(int) (Math.floor(n * 10 * Math.pow(10, i)) % 10)] + fraction[i]).replaceAll("(零.)+", ""); + } + if (s.length() < 1) + { + s = "整"; + } + int integerPart = (int) Math.floor(n); + + for (int i = 0; i < unit[0].length && integerPart > 0; i++) + { + String p = ""; + for (int j = 0; j < unit[1].length && n > 0; j++) + { + p = digit[integerPart % 10] + unit[1][j] + p; + integerPart = integerPart / 10; + } + s = p.replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][i] + s; + } + return head + s.replaceAll("(零.)*零元", "元").replaceFirst("(零.)+", "").replaceAll("(零.)+", "零").replaceAll("^整$", "零元整"); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/StrFormatter.java b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/StrFormatter.java new file mode 100644 index 0000000..5e8e578 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/StrFormatter.java @@ -0,0 +1,77 @@ +package com.alonginfo.common.utils.text; + +import com.alonginfo.common.utils.StringUtils; + +/** + * 字符串格式化 + * + * @author sdj + */ +public class StrFormatter { + public static final String EMPTY_JSON = "{}"; + public static final char C_BACKSLASH = '\\'; + public static final char C_DELIM_START = '{'; + public static final char C_DELIM_END = '}'; + + /** + * 格式化字符串
+ * 此方法只是简单将占位符 {} 按照顺序替换为参数
+ * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可
+ * 例:
+ * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b
+ * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a
+ * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b
+ * + * @param strPattern 字符串模板 + * @param argArray 参数列表 + * @return 结果 + */ + public static String format(final String strPattern, final Object... argArray) { + if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray)) { + return strPattern; + } + final int strPatternLength = strPattern.length(); + + // 初始化定义好的长度以获得更好的性能 + StringBuilder sbuf = new StringBuilder(strPatternLength + 50); + + int handledPosition = 0; + int delimIndex;// 占位符所在位置 + for (int argIndex = 0; argIndex < argArray.length; argIndex++) { + delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition); + if (delimIndex == -1) { + if (handledPosition == 0) { + return strPattern; + } else { // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果 + sbuf.append(strPattern, handledPosition, strPatternLength); + return sbuf.toString(); + } + } else { + if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH) { + if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH) { + // 转义符之前还有一个转义符,占位符依旧有效 + sbuf.append(strPattern, handledPosition, delimIndex - 1); + sbuf.append(Convert.utf8Str(argArray[argIndex])); + handledPosition = delimIndex + 2; + } else { + // 占位符被转义 + argIndex--; + sbuf.append(strPattern, handledPosition, delimIndex - 1); + sbuf.append(C_DELIM_START); + handledPosition = delimIndex + 1; + } + } else { + // 正常占位符 + sbuf.append(strPattern, handledPosition, delimIndex); + sbuf.append(Convert.utf8Str(argArray[argIndex])); + handledPosition = delimIndex + 2; + } + } + } + // append the characters following the last {} pair. + // 加入最后一个占位符后所有的字符 + sbuf.append(strPattern, handledPosition, strPattern.length()); + + return sbuf.toString(); + } +} diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssFilter.java b/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssFilter.java new file mode 100644 index 0000000..29ac796 --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssFilter.java @@ -0,0 +1,78 @@ +package com.alonginfo.common.xss; + +import com.alonginfo.common.utils.StringUtils; + +import javax.servlet.*; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 防止XSS攻击的过滤器 + */ +public class XssFilter implements Filter { + /** + * 排除链接 + */ + public List excludes = new ArrayList(); + + /** + * xss过滤开关 + */ + public boolean enabled = true; + + @Override + public void init(FilterConfig filterConfig) throws ServletException { + String tempExcludes = filterConfig.getInitParameter("excludes"); + String tempEnabled = filterConfig.getInitParameter("enabled"); + if (StringUtils.isNotEmpty(tempExcludes)) { + String[] url = tempExcludes.split(","); + for (int i = 0; url != null && i < url.length; i++) { + excludes.add(url[i]); + } + } + if (StringUtils.isNotEmpty(tempEnabled)) { + enabled = Boolean.valueOf(tempEnabled); + } + } + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) + throws IOException, ServletException { + HttpServletRequest req = (HttpServletRequest) request; + HttpServletResponse resp = (HttpServletResponse) response; +// if (handleExcludeURL(req, resp)) { +// chain.doFilter(request, response); +// return; +// } + XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest) request); + chain.doFilter(xssRequest, response); + } + + private boolean handleExcludeURL(HttpServletRequest request, HttpServletResponse response) { + if (!enabled) { + return true; + } + if (excludes == null || excludes.isEmpty()) { + return false; + } + String url = request.getServletPath(); + for (String pattern : excludes) { + Pattern p = Pattern.compile("^" + pattern); + Matcher m = p.matcher(url); + if (m.find()) + { + return true; + } + } + return false; + } + + @Override + public void destroy() { + } +} \ No newline at end of file diff --git a/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssHttpServletRequestWrapper.java b/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssHttpServletRequestWrapper.java new file mode 100644 index 0000000..071068b --- /dev/null +++ b/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssHttpServletRequestWrapper.java @@ -0,0 +1,120 @@ +package com.alonginfo.common.xss; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.html.EscapeUtil; +import org.apache.commons.io.IOUtils; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; + +import javax.servlet.ReadListener; +import javax.servlet.ServletInputStream; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * XSS过滤处理 + */ +public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { + + public static final String[] blackChars = new String[]{"~", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "+", "{", "}", "|", ":", "\"", "<", ">", "\\?", " ", "`", "-", "=", "[", "]", "\\", ";", "'", ",", ".", "/", "\t", "\r", "\n", "\f", "\b"}; + /** + * @param request + */ + public XssHttpServletRequestWrapper(HttpServletRequest request) + { + super(request); + } + + @Override + public String[] getParameterValues(String name) { + String[] values = super.getParameterValues(name); + if (values != null) { + int length = values.length; + String[] escapseValues = new String[length]; + for (int i = 0; i < length; i++) { + // 防xss攻击和过滤前后空格 + escapseValues[i] = EscapeUtil.clean(values[i]).trim(); + filterSpecialCharacters(values[i],blackChars); + } + return escapseValues; + } + return super.getParameterValues(name); + } + + // 过滤掉特殊字符 + public static String filterSpecialCharacters(String input, String[] specialChars) { + // 使用 StringBuilder 来构建结果字符串 + StringBuilder result = new StringBuilder(); + + // 将特殊字符数组转换为 Set,以提高查找效率 + Set specialCharSet = new HashSet<>(Arrays.asList(specialChars)); + + // 遍历输入字符串中的每一个字符 + for (char ch : input.toCharArray()) { + // 将字符转换为字符串并检查是否在特殊字符数组中 + if (!specialCharSet.contains(String.valueOf(ch))) { + // 如果字符不是特殊字符,则添加到结果中 + result.append(ch); + } + } + + // 返回过滤后的字符串 + return result.toString(); + } + + + + @Override + public ServletInputStream getInputStream() throws IOException { + // 非json类型,直接返回 + if (!isJsonRequest()) { + return super.getInputStream(); + } + + // 为空,直接返回 + String json = IOUtils.toString(super.getInputStream(), "utf-8"); + if (StringUtils.isEmpty(json)) { + return super.getInputStream(); + } + + // xss过滤 + json = EscapeUtil.clean(json).trim(); + final ByteArrayInputStream bis = new ByteArrayInputStream(json.getBytes("utf-8")); + return new ServletInputStream() { + @Override + public boolean isFinished() + { + return true; + } + + @Override + public boolean isReady() + { + return true; + } + + @Override + public void setReadListener(ReadListener readListener) { + } + + @Override + public int read() throws IOException { + return bis.read(); + } + }; + } + + /** + * 是否是Json请求 + */ + public boolean isJsonRequest() { + String header = super.getHeader(HttpHeaders.CONTENT_TYPE); + return MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(header) + || MediaType.APPLICATION_JSON_UTF8_VALUE.equalsIgnoreCase(header); + } +} \ No newline at end of file diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/constant/Constants.class b/mxdata_v-common/target/classes/com/alonginfo/common/constant/Constants.class new file mode 100644 index 0000000..aea0a5a Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/constant/Constants.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/constant/DatavConstans.class b/mxdata_v-common/target/classes/com/alonginfo/common/constant/DatavConstans.class new file mode 100644 index 0000000..301abb1 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/constant/DatavConstans.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/constant/HttpStatus.class b/mxdata_v-common/target/classes/com/alonginfo/common/constant/HttpStatus.class new file mode 100644 index 0000000..fcc6a9b Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/constant/HttpStatus.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/constant/UserConstants.class b/mxdata_v-common/target/classes/com/alonginfo/common/constant/UserConstants.class new file mode 100644 index 0000000..cf3d950 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/constant/UserConstants.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/core/lang/UUID$Holder.class b/mxdata_v-common/target/classes/com/alonginfo/common/core/lang/UUID$Holder.class new file mode 100644 index 0000000..d79e98c Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/core/lang/UUID$Holder.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/core/lang/UUID.class b/mxdata_v-common/target/classes/com/alonginfo/common/core/lang/UUID.class new file mode 100644 index 0000000..63fd1e4 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/core/lang/UUID.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/core/text/CharsetKit.class b/mxdata_v-common/target/classes/com/alonginfo/common/core/text/CharsetKit.class new file mode 100644 index 0000000..e52f2b7 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/core/text/CharsetKit.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/core/text/Convert.class b/mxdata_v-common/target/classes/com/alonginfo/common/core/text/Convert.class new file mode 100644 index 0000000..a994d55 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/core/text/Convert.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/core/text/StrFormatter.class b/mxdata_v-common/target/classes/com/alonginfo/common/core/text/StrFormatter.class new file mode 100644 index 0000000..e9104d9 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/core/text/StrFormatter.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/enums/HttpMethod.class b/mxdata_v-common/target/classes/com/alonginfo/common/enums/HttpMethod.class new file mode 100644 index 0000000..e985e39 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/enums/HttpMethod.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/enums/ScheduleConstants$Status.class b/mxdata_v-common/target/classes/com/alonginfo/common/enums/ScheduleConstants$Status.class new file mode 100644 index 0000000..f7e3d49 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/enums/ScheduleConstants$Status.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/enums/ScheduleConstants.class b/mxdata_v-common/target/classes/com/alonginfo/common/enums/ScheduleConstants.class new file mode 100644 index 0000000..0b4f1d9 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/enums/ScheduleConstants.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/enums/UserStatus.class b/mxdata_v-common/target/classes/com/alonginfo/common/enums/UserStatus.class new file mode 100644 index 0000000..aabf6a1 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/enums/UserStatus.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/BaseException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/BaseException.class new file mode 100644 index 0000000..86a1304 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/BaseException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/CustomException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/CustomException.class new file mode 100644 index 0000000..5ac9215 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/CustomException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/DemoModeException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/DemoModeException.class new file mode 100644 index 0000000..c9fe55d Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/DemoModeException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidFlashExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidFlashExtensionException.class new file mode 100644 index 0000000..8e8b278 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidFlashExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidImageExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidImageExtensionException.class new file mode 100644 index 0000000..bbae1ae Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidImageExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidMediaExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidMediaExtensionException.class new file mode 100644 index 0000000..902da59 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidMediaExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidVideoExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidVideoExtensionException.class new file mode 100644 index 0000000..56e263f Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException$InvalidVideoExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException.class new file mode 100644 index 0000000..8c1ca7a Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/InvalidExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileException.class new file mode 100644 index 0000000..31133c1 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileNameLengthLimitExceededException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileNameLengthLimitExceededException.class new file mode 100644 index 0000000..e285861 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileNameLengthLimitExceededException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileSizeLimitExceededException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileSizeLimitExceededException.class new file mode 100644 index 0000000..d0f3ab7 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/FileSizeLimitExceededException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidFlashExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidFlashExtensionException.class new file mode 100644 index 0000000..aae5f14 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidFlashExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidImageExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidImageExtensionException.class new file mode 100644 index 0000000..8f6ec15 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidImageExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidMediaExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidMediaExtensionException.class new file mode 100644 index 0000000..b0ece2b Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidMediaExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidVideoExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidVideoExtensionException.class new file mode 100644 index 0000000..5eb958b Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException$InvalidVideoExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException.class new file mode 100644 index 0000000..4893200 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/file/InvalidExtensionException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/job/TaskException$Code.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/job/TaskException$Code.class new file mode 100644 index 0000000..f7a8451 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/job/TaskException$Code.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/job/TaskException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/job/TaskException.class new file mode 100644 index 0000000..b70faae Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/job/TaskException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/CaptchaException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/CaptchaException.class new file mode 100644 index 0000000..1aaad70 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/CaptchaException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/CaptchaExpireException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/CaptchaExpireException.class new file mode 100644 index 0000000..766f58f Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/CaptchaExpireException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/UserException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/UserException.class new file mode 100644 index 0000000..ef0b88b Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/UserException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/UserPasswordNotMatchException.class b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/UserPasswordNotMatchException.class new file mode 100644 index 0000000..4315265 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/exception/user/UserPasswordNotMatchException.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/Arith.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/Arith.class new file mode 100644 index 0000000..b94d6ba Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/Arith.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/DateUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/DateUtils.class new file mode 100644 index 0000000..07bf5a0 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/DateUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/FileTypeDetector.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/FileTypeDetector.class new file mode 100644 index 0000000..ee15de1 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/FileTypeDetector.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/IdUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/IdUtils.class new file mode 100644 index 0000000..9cbb404 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/IdUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/LogUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/LogUtils.class new file mode 100644 index 0000000..cec4edb Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/LogUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/MessageUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/MessageUtils.class new file mode 100644 index 0000000..bd95bc0 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/MessageUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/ServletUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/ServletUtils.class new file mode 100644 index 0000000..643102f Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/ServletUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/StringUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/StringUtils.class new file mode 100644 index 0000000..bc6e759 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/StringUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/Threads.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/Threads.class new file mode 100644 index 0000000..b4ea6c6 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/Threads.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/VerifyCodeUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/VerifyCodeUtils.class new file mode 100644 index 0000000..3f34bd1 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/VerifyCodeUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/bean/BeanUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/bean/BeanUtils.class new file mode 100644 index 0000000..9eed7c2 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/bean/BeanUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/file/FileUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/file/FileUtils.class new file mode 100644 index 0000000..8555716 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/file/FileUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/file/MimeTypeUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/file/MimeTypeUtils.class new file mode 100644 index 0000000..055b52c Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/file/MimeTypeUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/html/EscapeUtil.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/html/EscapeUtil.class new file mode 100644 index 0000000..42a3189 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/html/EscapeUtil.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/html/HTMLFilter.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/html/HTMLFilter.class new file mode 100644 index 0000000..2063cf2 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/html/HTMLFilter.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$1.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$1.class new file mode 100644 index 0000000..85e9d54 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$1.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$TrustAnyHostnameVerifier.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$TrustAnyHostnameVerifier.class new file mode 100644 index 0000000..9238919 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$TrustAnyHostnameVerifier.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$TrustAnyTrustManager.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$TrustAnyTrustManager.class new file mode 100644 index 0000000..583178e Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils$TrustAnyTrustManager.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils.class new file mode 100644 index 0000000..27a76d6 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/http/HttpUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/ip/AddressUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/ip/AddressUtils.class new file mode 100644 index 0000000..6216f77 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/ip/AddressUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/ip/IpUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/ip/IpUtils.class new file mode 100644 index 0000000..ba3f198 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/ip/IpUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/reflect/ReflectUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/reflect/ReflectUtils.class new file mode 100644 index 0000000..4b4af5c Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/reflect/ReflectUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/security/Md5Utils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/security/Md5Utils.class new file mode 100644 index 0000000..d90fe9a Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/security/Md5Utils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/sign/Base64.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/sign/Base64.class new file mode 100644 index 0000000..7afe3f8 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/sign/Base64.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/spring/SpringUtils.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/spring/SpringUtils.class new file mode 100644 index 0000000..10d9e26 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/spring/SpringUtils.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/sql/SqlUtil.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/sql/SqlUtil.class new file mode 100644 index 0000000..977b41d Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/sql/SqlUtil.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/CharsetKit.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/CharsetKit.class new file mode 100644 index 0000000..93f9afe Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/CharsetKit.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/Convert.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/Convert.class new file mode 100644 index 0000000..3fceb04 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/Convert.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/StrFormatter.class b/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/StrFormatter.class new file mode 100644 index 0000000..55eaa05 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/utils/text/StrFormatter.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssFilter.class b/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssFilter.class new file mode 100644 index 0000000..6a39db7 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssFilter.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssHttpServletRequestWrapper$1.class b/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssHttpServletRequestWrapper$1.class new file mode 100644 index 0000000..fd27d44 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssHttpServletRequestWrapper$1.class differ diff --git a/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssHttpServletRequestWrapper.class b/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssHttpServletRequestWrapper.class new file mode 100644 index 0000000..386dc43 Binary files /dev/null and b/mxdata_v-common/target/classes/com/alonginfo/common/xss/XssHttpServletRequestWrapper.class differ diff --git a/mxdata_v-common/target/maven-archiver/pom.properties b/mxdata_v-common/target/maven-archiver/pom.properties new file mode 100644 index 0000000..2792789 --- /dev/null +++ b/mxdata_v-common/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Tue Jun 04 15:11:31 CST 2024 +version=1.0 +groupId=com.alonginfo +artifactId=mxdata_v-common diff --git a/mxdata_v-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/mxdata_v-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/mxdata_v-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..0babc14 --- /dev/null +++ b/mxdata_v-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,50 @@ +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/security/Md5Utils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/enums/ScheduleConstants.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/constant/UserConstants.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/reflect/ReflectUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Arith.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/StringUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/bean/BeanUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sign/Base64.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/IdUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssHttpServletRequestWrapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaExpireException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/StrFormatter.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/VerifyCodeUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/CharsetKit.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/job/TaskException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/constant/HttpStatus.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/Convert.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/constant/DatavConstans.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/BaseException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/StrFormatter.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/CaptchaException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/text/Convert.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/core/lang/UUID.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserPasswordNotMatchException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/DateUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/Threads.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/AddressUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ip/IpUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/spring/SpringUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/LogUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/MessageUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/DemoModeException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/CustomException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/MimeTypeUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/InvalidExtensionException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/enums/HttpMethod.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/constant/Constants.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/enums/UserStatus.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/file/FileUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/EscapeUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/http/HttpUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileSizeLimitExceededException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/sql/SqlUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/xss/XssFilter.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/core/text/CharsetKit.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/ServletUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/user/UserException.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/utils/html/HTMLFilter.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-common/src/main/java/com/alonginfo/common/exception/file/FileNameLengthLimitExceededException.java diff --git a/mxdata_v-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/mxdata_v-common/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-common/target/mxdata_v-common-1.0.jar b/mxdata_v-common/target/mxdata_v-common-1.0.jar new file mode 100644 index 0000000..9d033db Binary files /dev/null and b/mxdata_v-common/target/mxdata_v-common-1.0.jar differ diff --git a/mxdata_v-quzrtz/mxdata_v-quzrtz.iml b/mxdata_v-quzrtz/mxdata_v-quzrtz.iml new file mode 100644 index 0000000..7e54c94 --- /dev/null +++ b/mxdata_v-quzrtz/mxdata_v-quzrtz.iml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-quzrtz/pom.xml b/mxdata_v-quzrtz/pom.xml new file mode 100644 index 0000000..1b057de --- /dev/null +++ b/mxdata_v-quzrtz/pom.xml @@ -0,0 +1,37 @@ + + + + mxdata_v + com.alonginfo + 1.0 + + 4.0.0 + + mxdata_v-quzrtz + + quartz定时任务 + + + + + com.alonginfo + mxdata_v-common + 1.0 + + + + + org.quartz-scheduler + quartz + + + com.mchange + c3p0 + + + + + + \ No newline at end of file diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/config/SchedulerConfig.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/config/SchedulerConfig.java new file mode 100644 index 0000000..33b7701 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/config/SchedulerConfig.java @@ -0,0 +1,59 @@ +package com.alonginfo.quartz.config; + +import org.quartz.Scheduler; +import org.quartz.spi.JobFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.PropertiesFactoryBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; + +import java.io.IOException; +import java.util.Properties; + +/** + * @Description Qartz配置, 搭配quartz.properties文件自定义配置, 该处目的使定时任务持久化 + * @Author Haoxs + * @Date 2021-04-29 11:11 + */ +@Configuration +public class SchedulerConfig { + + @Autowired + private JobFactory jobFactory; + + @Bean + public SchedulerFactoryBean schedulerFactoryBean() { + SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean(); + try { + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setQuartzProperties(quartzProperties()); + schedulerFactoryBean.setOverwriteExistingJobs(true); + schedulerFactoryBean.setJobFactory(jobFactory); + } catch (IOException e) { + e.printStackTrace(); + } + return schedulerFactoryBean; + } + + /** + * 读取quartz.properties文件 + * 将值初始化 + * + * @return + * @throws IOException + */ + @Bean + public Properties quartzProperties() throws IOException { + PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); + propertiesFactoryBean.setLocation(new ClassPathResource("quartz.properties")); + propertiesFactoryBean.afterPropertiesSet(); + return propertiesFactoryBean.getObject(); + } + + @Bean(name = "scheduler") + public Scheduler scheduler() { + return schedulerFactoryBean().getScheduler(); + } +} \ No newline at end of file diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/domain/SysJob.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/domain/SysJob.java new file mode 100644 index 0000000..809967a --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/domain/SysJob.java @@ -0,0 +1,191 @@ +package com.alonginfo.quartz.domain; + +import com.alonginfo.common.enums.ScheduleConstants; +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description + * @Author Haoxs + * @Date 2021-05-07 10:43 + */ +public class SysJob implements Serializable { + + /** + * 任务Id + */ + private Long jobId; + + /** + * 任务名称 + */ + private String jobName; + + /** + * 任务组名 + */ + private String jobGroup; + + /** + * 调用目标字符串 + */ + private String invokeTarget; + + /** + * cron表达式 + */ + private String cronExpression; + + /** + * cron计划策略 0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行 + */ + private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT; + + /** + * 是否并发执行 0-允许 1-禁止 + */ + private String concurrent; + + /** + * 任务状态 0-正常 1-暂停 + */ + private String status; + + private String createBy; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + private String updateBy; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + private String remark; + + + public Long getJobId() { + return jobId; + } + + public void setJobId(Long jobId) { + this.jobId = jobId; + } + + public String getJobName() { + return jobName; + } + + public void setJobName(String jobName) { + this.jobName = jobName; + } + + public String getJobGroup() { + return jobGroup; + } + + public void setJobGroup(String jobGroup) { + this.jobGroup = jobGroup; + } + + public String getInvokeTarget() { + return invokeTarget; + } + + public void setInvokeTarget(String invokeTarget) { + this.invokeTarget = invokeTarget; + } + + public String getCronExpression() { + return cronExpression; + } + + public void setCronExpression(String cronExpression) { + this.cronExpression = cronExpression; + } + + public String getMisfirePolicy() { + return misfirePolicy; + } + + public void setMisfirePolicy(String misfirePolicy) { + this.misfirePolicy = misfirePolicy; + } + + public String getConcurrent() { + return concurrent; + } + + public void setConcurrent(String concurrent) { + this.concurrent = concurrent; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + @Override + public String toString() { + return "SysJob{" + + "jobId=" + jobId + + ", jobName='" + jobName + '\'' + + ", jobGroup='" + jobGroup + '\'' + + ", invokeTarget='" + invokeTarget + '\'' + + ", cronExpression='" + cronExpression + '\'' + + ", misfirePolicy='" + misfirePolicy + '\'' + + ", concurrent='" + concurrent + '\'' + + ", status='" + status + '\'' + + ", createBy='" + createBy + '\'' + + ", createTime=" + createTime + + ", updateBy='" + updateBy + '\'' + + ", updateTime=" + updateTime + + ", remark='" + remark + '\'' + + '}'; + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/factory/JobFactory.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/factory/JobFactory.java new file mode 100644 index 0000000..53a1850 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/factory/JobFactory.java @@ -0,0 +1,28 @@ +package com.alonginfo.quartz.factory; + +import org.quartz.spi.TriggerFiredBundle; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.config.AutowireCapableBeanFactory; +import org.springframework.scheduling.quartz.AdaptableJobFactory; +import org.springframework.stereotype.Component; + +/** + * @Description + * @Author Haoxs + * @Date 2021-05-06 18:57 + */ +@Component +public class JobFactory extends AdaptableJobFactory { + + @Autowired + private AutowireCapableBeanFactory capableBeanFactory; + + @Override + protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception { + //调用父类的方法 + Object jobInstance = super.createJobInstance(bundle); + //进行注入 + capableBeanFactory.autowireBean(jobInstance); + return jobInstance; + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/job/RyTask.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/job/RyTask.java new file mode 100644 index 0000000..72632bd --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/job/RyTask.java @@ -0,0 +1,28 @@ +package com.alonginfo.quartz.job; + +import com.alonginfo.common.utils.StringUtils; +import org.springframework.stereotype.Component; + +/** + * @Description 定时任务调度测试 + * @Author Haoxs + * @Date 2021-05-06 19:05 + */ +@Component("ryTask") +public class RyTask +{ + public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) + { + System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i)); + } + + public void ryParams(String params) + { + System.out.println("执行有参方法:" + params); + } + + public void ryNoParams() + { + System.out.println("执行无参方法"); + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/listener/SchedulerJobInitListener.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/listener/SchedulerJobInitListener.java new file mode 100644 index 0000000..7adf5b5 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/listener/SchedulerJobInitListener.java @@ -0,0 +1,25 @@ +package com.alonginfo.quartz.listener; + +import com.alonginfo.quartz.service.InitService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +/** + * @Description 监听器 + * @Author Haoxs + * @Date 2021-05-06 17:37 + */ +@Component +@Order(value = 1) +public class SchedulerJobInitListener implements CommandLineRunner { + + @Autowired + private InitService initService; + + @Override + public void run(String... args) throws Exception { + initService.initSchedule(); + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/mapper/InitMapper.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/mapper/InitMapper.java new file mode 100644 index 0000000..91c9f63 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/mapper/InitMapper.java @@ -0,0 +1,20 @@ +package com.alonginfo.quartz.mapper; + +import com.alonginfo.quartz.domain.SysJob; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @Description 定时任务mapper + * @Author Haoxs + * @Date 2021-05-06 18:31 + */ +@Repository +@Mapper +public interface InitMapper { + + List getList(); + +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/InitService.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/InitService.java new file mode 100644 index 0000000..ef6c205 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/InitService.java @@ -0,0 +1,18 @@ +package com.alonginfo.quartz.service; + + +import com.alonginfo.common.exception.job.TaskException; +import org.quartz.SchedulerException; + +/** + * @Description + * @Author Haoxs + * @Date 2021-05-06 18:10 + */ +public interface InitService { + + /** + * 初始化定时任务 + */ + void initSchedule() throws SchedulerException, TaskException; +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/impl/InitServiceImpl.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/impl/InitServiceImpl.java new file mode 100644 index 0000000..4d11f2c --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/impl/InitServiceImpl.java @@ -0,0 +1,40 @@ +package com.alonginfo.quartz.service.impl; + +import com.alonginfo.common.exception.job.TaskException; +import com.alonginfo.quartz.domain.SysJob; +import com.alonginfo.quartz.mapper.InitMapper; +import com.alonginfo.quartz.service.InitService; +import com.alonginfo.quartz.utils.ScheduleUtils; +import org.quartz.Scheduler; +import org.quartz.SchedulerException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Description + * @Author Haoxs + * @Date 2021-05-06 18:12 + */ +@Service +public class InitServiceImpl implements InitService { + + @Autowired + private Scheduler scheduler; + + @Autowired + private InitMapper initMapper; + + /** + * 初始化定时任务 + */ + @Override + public void initSchedule() throws SchedulerException, TaskException { + scheduler.clear(); + List jobList = initMapper.getList(); + for (SysJob job : jobList) { + ScheduleUtils.createScheduleJob(scheduler, job); + } + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/AbstractQuartzJob.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/AbstractQuartzJob.java new file mode 100644 index 0000000..c4d5dbc --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/AbstractQuartzJob.java @@ -0,0 +1,102 @@ +package com.alonginfo.quartz.utils; + +import com.alonginfo.common.enums.ScheduleConstants; +import com.alonginfo.common.utils.bean.BeanUtils; +import com.alonginfo.quartz.domain.SysJob; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Date; + +/** + * 抽象quartz调用 + * + * @author lcdop + */ +public abstract class AbstractQuartzJob implements Job +{ + private static final Logger log = LoggerFactory.getLogger(AbstractQuartzJob.class); + + /** + * 线程本地变量 + */ + private static ThreadLocal threadLocal = new ThreadLocal<>(); + + @Override + public void execute(JobExecutionContext context) throws JobExecutionException + { + SysJob sysJob = new SysJob(); + BeanUtils.copyBeanProp(sysJob, context.getMergedJobDataMap().get(ScheduleConstants.TASK_PROPERTIES)); + try + { + before(context, sysJob); + if (sysJob != null) + { + doExecute(context, sysJob); + } + after(context, sysJob, null); + } + catch (Exception e) + { + log.error("任务执行异常 - :", e); + after(context, sysJob, e); + } + } + + /** + * 执行前 + * + * @param context 工作执行上下文对象 + * @param sysJob 系统计划任务 + */ + protected void before(JobExecutionContext context, SysJob sysJob) + { + threadLocal.set(new Date()); + } + + /** + * 执行后 + * + * @param context 工作执行上下文对象 + * @param sysJob 系统计划任务 + */ + protected void after(JobExecutionContext context, SysJob sysJob, Exception e) + { + Date startTime = threadLocal.get(); + threadLocal.remove(); +// +// final SysJobLog sysJobLog = new SysJobLog(); +// sysJobLog.setJobName(sysJob.getJobName()); +// sysJobLog.setJobGroup(sysJob.getJobGroup()); +// sysJobLog.setInvokeTarget(sysJob.getInvokeTarget()); +// sysJobLog.setStartTime(startTime); +// sysJobLog.setStopTime(new Date()); +// long runMs = sysJobLog.getStopTime().getTime() - sysJobLog.getStartTime().getTime(); +// sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒"); +// if (e != null) +// { +// sysJobLog.setStatus(Constants.FAIL); +// String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000); +// sysJobLog.setExceptionInfo(errorMsg); +// } +// else +// { +// sysJobLog.setStatus(Constants.SUCCESS); +// } +// +// // 写入数据库当中 +// SpringUtils.getBean(ISysJobLogService.class).addJobLog(sysJobLog); + } + + /** + * 执行方法,由子类重载 + * + * @param context 工作执行上下文对象 + * @param sysJob 系统计划任务 + * @throws Exception 执行过程中的异常 + */ + protected abstract void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception; +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/CronUtils.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/CronUtils.java new file mode 100644 index 0000000..c551eb1 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/CronUtils.java @@ -0,0 +1,64 @@ +package com.alonginfo.quartz.utils; + +import org.quartz.CronExpression; + +import java.text.ParseException; +import java.util.Date; + +/** + * cron表达式工具类 + * + * @author lcdop + * + */ +public class CronUtils +{ + /** + * 返回一个布尔值代表一个给定的Cron表达式的有效性 + * + * @param cronExpression Cron表达式 + * @return boolean 表达式是否有效 + */ + public static boolean isValid(String cronExpression) + { + return CronExpression.isValidExpression(cronExpression); + } + + /** + * 返回一个字符串值,表示该消息无效Cron表达式给出有效性 + * + * @param cronExpression Cron表达式 + * @return String 无效时返回表达式错误描述,如果有效返回null + */ + public static String getInvalidMessage(String cronExpression) + { + try + { + new CronExpression(cronExpression); + return null; + } + catch (ParseException pe) + { + return pe.getMessage(); + } + } + + /** + * 返回下一个执行时间根据给定的Cron表达式 + * + * @param cronExpression Cron表达式 + * @return Date 下次Cron表达式执行时间 + */ + public static Date getNextExecution(String cronExpression) + { + try + { + CronExpression cron = new CronExpression(cronExpression); + return cron.getNextValidTimeAfter(new Date(System.currentTimeMillis())); + } + catch (ParseException e) + { + throw new IllegalArgumentException(e.getMessage()); + } + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/JobInvokeUtil.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/JobInvokeUtil.java new file mode 100644 index 0000000..35497fb --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/JobInvokeUtil.java @@ -0,0 +1,184 @@ +package com.alonginfo.quartz.utils; + + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.spring.SpringUtils; +import com.alonginfo.quartz.domain.SysJob; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.LinkedList; +import java.util.List; + +/** + * 任务执行工具 + * + * @author lcdop + */ +public class JobInvokeUtil +{ + /** + * 执行方法 + * + * @param sysJob 系统任务 + */ + public static void invokeMethod(SysJob sysJob) throws Exception + { + String invokeTarget = sysJob.getInvokeTarget(); + String beanName = getBeanName(invokeTarget); + String methodName = getMethodName(invokeTarget); + List methodParams = getMethodParams(invokeTarget); + + if (!isValidClassName(beanName)) + { + Object bean = SpringUtils.getBean(beanName); + invokeMethod(bean, methodName, methodParams); + } + else + { + Object bean = Class.forName(beanName).newInstance(); + invokeMethod(bean, methodName, methodParams); + } + } + + /** + * 调用任务方法 + * + * @param bean 目标对象 + * @param methodName 方法名称 + * @param methodParams 方法参数 + */ + private static void invokeMethod(Object bean, String methodName, List methodParams) + throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, + InvocationTargetException + { + if (StringUtils.isNotNull(methodParams) && methodParams.size() > 0) + { + Method method = bean.getClass().getDeclaredMethod(methodName, getMethodParamsType(methodParams)); + method.invoke(bean, getMethodParamsValue(methodParams)); + } + else + { + Method method = bean.getClass().getDeclaredMethod(methodName); + method.invoke(bean); + } + } + + /** + * 校验是否为为class包名 + * + * @param invokeTarget 名称 + * @return true是 false否 + */ + public static boolean isValidClassName(String invokeTarget) + { + return StringUtils.countMatches(invokeTarget, ".") > 1; + } + + /** + * 获取bean名称 + * + * @param invokeTarget 目标字符串 + * @return bean名称 + */ + public static String getBeanName(String invokeTarget) + { + String beanName = StringUtils.substringBefore(invokeTarget, "("); + return StringUtils.substringBeforeLast(beanName, "."); + } + + /** + * 获取bean方法 + * + * @param invokeTarget 目标字符串 + * @return method方法 + */ + public static String getMethodName(String invokeTarget) + { + String methodName = StringUtils.substringBefore(invokeTarget, "("); + return StringUtils.substringAfterLast(methodName, "."); + } + + /** + * 获取method方法参数相关列表 + * + * @param invokeTarget 目标字符串 + * @return method方法相关参数列表 + */ + public static List getMethodParams(String invokeTarget) + { + String methodStr = StringUtils.substringBetween(invokeTarget, "(", ")"); + if (StringUtils.isEmpty(methodStr)) + { + return null; + } + String[] methodParams = methodStr.split(","); + List classs = new LinkedList<>(); + for (int i = 0; i < methodParams.length; i++) + { + String str = StringUtils.trimToEmpty(methodParams[i]); + // String字符串类型,包含' + if (StringUtils.contains(str, "'")) + { + classs.add(new Object[] { StringUtils.replace(str, "'", ""), String.class }); + } + // boolean布尔类型,等于true或者false + else if (StringUtils.equals(str, "true") || StringUtils.equalsIgnoreCase(str, "false")) + { + classs.add(new Object[] { Boolean.valueOf(str), Boolean.class }); + } + // long长整形,包含L + else if (StringUtils.containsIgnoreCase(str, "L")) + { + classs.add(new Object[] { Long.valueOf(StringUtils.replaceIgnoreCase(str, "L", "")), Long.class }); + } + // double浮点类型,包含D + else if (StringUtils.containsIgnoreCase(str, "D")) + { + classs.add(new Object[] { Double.valueOf(StringUtils.replaceIgnoreCase(str, "D", "")), Double.class }); + } + // 其他类型归类为整形 + else + { + classs.add(new Object[] { Integer.valueOf(str), Integer.class }); + } + } + return classs; + } + + /** + * 获取参数类型 + * + * @param methodParams 参数相关列表 + * @return 参数类型列表 + */ + public static Class[] getMethodParamsType(List methodParams) + { + Class[] classs = new Class[methodParams.size()]; + int index = 0; + for (Object[] os : methodParams) + { + classs[index] = (Class) os[1]; + index++; + } + return classs; + } + + /** + * 获取参数值 + * + * @param methodParams 参数相关列表 + * @return 参数值列表 + */ + public static Object[] getMethodParamsValue(List methodParams) + { + Object[] classs = new Object[methodParams.size()]; + int index = 0; + for (Object[] os : methodParams) + { + classs[index] = (Object) os[0]; + index++; + } + return classs; + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzDisallowConcurrentExecution.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzDisallowConcurrentExecution.java new file mode 100644 index 0000000..8193cf1 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzDisallowConcurrentExecution.java @@ -0,0 +1,21 @@ +package com.alonginfo.quartz.utils; + +import com.alonginfo.quartz.domain.SysJob; +import org.quartz.DisallowConcurrentExecution; +import org.quartz.JobExecutionContext; + +/** + * 定时任务处理(禁止并发执行) + * + * @author lcdop + * + */ +@DisallowConcurrentExecution +public class QuartzDisallowConcurrentExecution extends AbstractQuartzJob +{ + @Override + protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception + { + JobInvokeUtil.invokeMethod(sysJob); + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzJobExecution.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzJobExecution.java new file mode 100644 index 0000000..07af31c --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzJobExecution.java @@ -0,0 +1,19 @@ +package com.alonginfo.quartz.utils; + +import com.alonginfo.quartz.domain.SysJob; +import org.quartz.JobExecutionContext; + +/** + * 定时任务处理(允许并发执行) + * + * @author lcdop + * + */ +public class QuartzJobExecution extends AbstractQuartzJob +{ + @Override + protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception + { + JobInvokeUtil.invokeMethod(sysJob); + } +} diff --git a/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/ScheduleUtils.java b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/ScheduleUtils.java new file mode 100644 index 0000000..bffbcb5 --- /dev/null +++ b/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/ScheduleUtils.java @@ -0,0 +1,104 @@ +package com.alonginfo.quartz.utils; + +import com.alonginfo.common.enums.ScheduleConstants; +import com.alonginfo.common.exception.job.TaskException; +import com.alonginfo.common.exception.job.TaskException.Code; +import com.alonginfo.quartz.domain.SysJob; +import org.quartz.*; + +/** + * 定时任务工具类 + * + * @author lcdop + * + */ +public class ScheduleUtils +{ + /** + * 得到quartz任务类 + * + * @param sysJob 执行计划 + * @return 具体执行任务类 + */ + private static Class getQuartzJobClass(SysJob sysJob) + { + boolean isConcurrent = "0".equals(sysJob.getConcurrent()); + return isConcurrent ? QuartzJobExecution.class : QuartzDisallowConcurrentExecution.class; + } + + /** + * 构建任务触发对象 + */ + public static TriggerKey getTriggerKey(Long jobId, String jobGroup) + { + return TriggerKey.triggerKey(ScheduleConstants.TASK_CLASS_NAME + jobId, jobGroup); + } + + /** + * 构建任务键对象 + */ + public static JobKey getJobKey(Long jobId, String jobGroup) + { + return JobKey.jobKey(ScheduleConstants.TASK_CLASS_NAME + jobId, jobGroup); + } + + /** + * 创建定时任务 + */ + public static void createScheduleJob(Scheduler scheduler, SysJob job) throws SchedulerException, TaskException + { + Class jobClass = getQuartzJobClass(job); + // 构建job信息 + Long jobId = job.getJobId(); + String jobGroup = job.getJobGroup(); + JobDetail jobDetail = JobBuilder.newJob(jobClass).withIdentity(getJobKey(jobId, jobGroup)).build(); + + // 表达式调度构建器 + CronScheduleBuilder cronScheduleBuilder = CronScheduleBuilder.cronSchedule(job.getCronExpression()); + cronScheduleBuilder = handleCronScheduleMisfirePolicy(job, cronScheduleBuilder); + + // 按新的cronExpression表达式构建一个新的trigger + CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(getTriggerKey(jobId, jobGroup)) + .withSchedule(cronScheduleBuilder).build(); + + // 放入参数,运行时的方法可以获取 + jobDetail.getJobDataMap().put(ScheduleConstants.TASK_PROPERTIES, job); + + // 判断是否存在 + if (scheduler.checkExists(getJobKey(jobId, jobGroup))) + { + // 防止创建时存在数据问题 先移除,然后在执行创建操作 + scheduler.deleteJob(getJobKey(jobId, jobGroup)); + } + + scheduler.scheduleJob(jobDetail, trigger); + + // 暂停任务 + if (job.getStatus().equals(ScheduleConstants.Status.PAUSE.getValue())) + { + scheduler.pauseJob(ScheduleUtils.getJobKey(jobId, jobGroup)); + } + } + + /** + * 设置定时任务策略 + */ + public static CronScheduleBuilder handleCronScheduleMisfirePolicy(SysJob job, CronScheduleBuilder cb) + throws TaskException + { + switch (job.getMisfirePolicy()) + { + case ScheduleConstants.MISFIRE_DEFAULT: + return cb; + case ScheduleConstants.MISFIRE_IGNORE_MISFIRES: + return cb.withMisfireHandlingInstructionIgnoreMisfires(); + case ScheduleConstants.MISFIRE_FIRE_AND_PROCEED: + return cb.withMisfireHandlingInstructionFireAndProceed(); + case ScheduleConstants.MISFIRE_DO_NOTHING: + return cb.withMisfireHandlingInstructionDoNothing(); + default: + throw new TaskException("The task misfire policy '" + job.getMisfirePolicy() + + "' cannot be used in cron schedule tasks", Code.CONFIG_ERROR); + } + } +} diff --git a/mxdata_v-quzrtz/src/main/resources/mybatis/quartz/InitMapper.xml b/mxdata_v-quzrtz/src/main/resources/mybatis/quartz/InitMapper.xml new file mode 100644 index 0000000..b0096be --- /dev/null +++ b/mxdata_v-quzrtz/src/main/resources/mybatis/quartz/InitMapper.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/mxdata_v-quzrtz/src/main/resources/quartz.properties b/mxdata_v-quzrtz/src/main/resources/quartz.properties new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/config/SchedulerConfig.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/config/SchedulerConfig.class new file mode 100644 index 0000000..fa9bcce Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/config/SchedulerConfig.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/domain/SysJob.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/domain/SysJob.class new file mode 100644 index 0000000..36851db Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/domain/SysJob.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/factory/JobFactory.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/factory/JobFactory.class new file mode 100644 index 0000000..3ae8db5 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/factory/JobFactory.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/job/RyTask.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/job/RyTask.class new file mode 100644 index 0000000..be076e7 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/job/RyTask.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/listener/SchedulerJobInitListener.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/listener/SchedulerJobInitListener.class new file mode 100644 index 0000000..9ef93b9 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/listener/SchedulerJobInitListener.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/mapper/InitMapper.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/mapper/InitMapper.class new file mode 100644 index 0000000..4da4803 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/mapper/InitMapper.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/service/InitService.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/service/InitService.class new file mode 100644 index 0000000..6442681 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/service/InitService.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/service/impl/InitServiceImpl.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/service/impl/InitServiceImpl.class new file mode 100644 index 0000000..8bbd288 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/service/impl/InitServiceImpl.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/AbstractQuartzJob.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/AbstractQuartzJob.class new file mode 100644 index 0000000..439ce3b Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/AbstractQuartzJob.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/CronUtils.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/CronUtils.class new file mode 100644 index 0000000..0a1acd2 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/CronUtils.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/JobInvokeUtil.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/JobInvokeUtil.class new file mode 100644 index 0000000..b731a44 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/JobInvokeUtil.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/QuartzDisallowConcurrentExecution.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/QuartzDisallowConcurrentExecution.class new file mode 100644 index 0000000..79406bd Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/QuartzDisallowConcurrentExecution.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/QuartzJobExecution.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/QuartzJobExecution.class new file mode 100644 index 0000000..7ecfa17 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/QuartzJobExecution.class differ diff --git a/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/ScheduleUtils.class b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/ScheduleUtils.class new file mode 100644 index 0000000..e92a743 Binary files /dev/null and b/mxdata_v-quzrtz/target/classes/com/alonginfo/quartz/utils/ScheduleUtils.class differ diff --git a/mxdata_v-quzrtz/target/classes/mybatis/quartz/InitMapper.xml b/mxdata_v-quzrtz/target/classes/mybatis/quartz/InitMapper.xml new file mode 100644 index 0000000..b0096be --- /dev/null +++ b/mxdata_v-quzrtz/target/classes/mybatis/quartz/InitMapper.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/mxdata_v-quzrtz/target/classes/quartz.properties b/mxdata_v-quzrtz/target/classes/quartz.properties new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-quzrtz/target/maven-archiver/pom.properties b/mxdata_v-quzrtz/target/maven-archiver/pom.properties new file mode 100644 index 0000000..a63ebbd --- /dev/null +++ b/mxdata_v-quzrtz/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Tue Jun 04 15:11:34 CST 2024 +version=1.0 +groupId=com.alonginfo +artifactId=mxdata_v-quzrtz diff --git a/mxdata_v-quzrtz/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/mxdata_v-quzrtz/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-quzrtz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/mxdata_v-quzrtz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..9f219e0 --- /dev/null +++ b/mxdata_v-quzrtz/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,14 @@ +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzDisallowConcurrentExecution.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/mapper/InitMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/listener/SchedulerJobInitListener.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/QuartzJobExecution.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/impl/InitServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/job/RyTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/JobInvokeUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/service/InitService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/ScheduleUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/config/SchedulerConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/CronUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/utils/AbstractQuartzJob.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/domain/SysJob.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-quzrtz/src/main/java/com/alonginfo/quartz/factory/JobFactory.java diff --git a/mxdata_v-quzrtz/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/mxdata_v-quzrtz/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-quzrtz/target/mxdata_v-quzrtz-1.0.jar b/mxdata_v-quzrtz/target/mxdata_v-quzrtz-1.0.jar new file mode 100644 index 0000000..6ea7f3a Binary files /dev/null and b/mxdata_v-quzrtz/target/mxdata_v-quzrtz-1.0.jar differ diff --git a/mxdata_v-system/mxdata_v-system-gs.iml b/mxdata_v-system/mxdata_v-system-gs.iml new file mode 100644 index 0000000..191b020 --- /dev/null +++ b/mxdata_v-system/mxdata_v-system-gs.iml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/pom.xml b/mxdata_v-system/pom.xml new file mode 100644 index 0000000..6071a18 --- /dev/null +++ b/mxdata_v-system/pom.xml @@ -0,0 +1,220 @@ + + + + mxdata_v + com.alonginfo + 1.0 + + 4.0.0 + + mxdata_v-system-gs + + + + org.springframework.boot + spring-boot-starter-test + 2.7.4 + + + org.springframework.boot + spring-boot-starter-web + + + + spring-boot-starter-tomcat + org.springframework.boot + + + + + + org.springframework.boot + spring-boot-starter-undertow + + + + org.springframework.boot + spring-boot-starter-aop + + + + + org.springframework.boot + spring-boot-devtools + true + + + + + org.springframework.boot + spring-boot-starter-security + + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis.boot.version} + + + tk.mybatis + mapper-spring-boot-starter + 2.0.0 + + + + + com.alonginfo + mxdata_v-common + ${mxdatav.version} + + + + com.alonginfo + mxdata_v-websocket + ${mxdatav.version} + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + redis.clients + jedis + 2.9.0 + + + + + + + + + + org.bouncycastle + bcprov-jdk15to18 + 1.77 + + + + + io.springfox + springfox-swagger2 + ${swagger.version} + + + io.swagger + swagger-annotations + + + io.swagger + swagger-models + + + + + + + com.github.xiaoymin + + knife4j-spring-boot-starter + 2.0.5 + + + + + io.swagger + swagger-annotations + 1.5.21 + + + + io.swagger + swagger-models + 1.5.21 + + + + + io.springfox + springfox-swagger-ui + ${swagger.version} + + + + com.google.code.gson + gson + 2.6.2 + + + + org.springframework.boot + spring-boot-starter-websocket + + + + com.alonginfo + mxdata_v-quzrtz + 1.0 + + + + + com.lowagie.text + com.springsource.com.lowagie.text + 2.0.8 + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + 2.1.1.RELEASE + + true + com.alonginfo.MxApplication + + + + + repackage + + + + + + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + false + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/MxApplication.java b/mxdata_v-system/src/main/java/com/alonginfo/MxApplication.java new file mode 100644 index 0000000..278426e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/MxApplication.java @@ -0,0 +1,17 @@ +package com.alonginfo; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; + +/** + * 程序启动 + */ +@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) +public class MxApplication { + public static void main(String[] args) { + // System.setProperty("spring.devtools.restart.enabled", "false"); + SpringApplication.run(MxApplication.class, args); + System.out.println("================甘肃可视化系统2.0-启动成功================ \n"); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/MxServletInitializer.java b/mxdata_v-system/src/main/java/com/alonginfo/MxServletInitializer.java new file mode 100644 index 0000000..911ffc3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/MxServletInitializer.java @@ -0,0 +1,14 @@ +package com.alonginfo; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * web容器中部署 + */ +public class MxServletInitializer extends SpringBootServletInitializer { + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(MxServletInitializer.class); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataScopeAspect.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataScopeAspect.java new file mode 100644 index 0000000..e50cffb --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataScopeAspect.java @@ -0,0 +1,153 @@ +package com.alonginfo.framework.aspectj; + +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.spring.SpringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.DataScope; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.framework.web.domain.BaseEntity; +import com.alonginfo.project.system.domain.SysRole; +import com.alonginfo.project.system.domain.SysUser; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; + +/** + * 数据过滤处理 + */ + +@Aspect +@Component +public class DataScopeAspect { + /** + * 全部数据权限 + */ + public static final String DATA_SCOPE_ALL = "1"; + + /** + * 自定数据权限 + */ + public static final String DATA_SCOPE_CUSTOM = "2"; + + /** + * 部门数据权限 + */ + public static final String DATA_SCOPE_DEPT = "3"; + + /** + * 部门及以下数据权限 + */ + public static final String DATA_SCOPE_DEPT_AND_CHILD = "4"; + + /** + * 仅本人数据权限 + */ + public static final String DATA_SCOPE_SELF = "5"; + + // 配置织入点 + @Pointcut("@annotation(com.alonginfo.framework.aspectj.lang.annotation.DataScope)") + public void dataScopePointCut() { + } + + @Before("dataScopePointCut()") + public void doBefore(JoinPoint point) throws Throwable { + handleDataScope(point); + } + + protected void handleDataScope(final JoinPoint joinPoint) { + // 获得注解 + DataScope controllerDataScope = getAnnotationLog(joinPoint); + if (controllerDataScope == null) { + return; + } + // 获取当前的用户 + LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); + SysUser currentUser = loginUser.getUser(); + if (currentUser != null) { + // 如果是超级管理员,则不过滤数据 + if (!currentUser.isAdmin()) { + dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), + controllerDataScope.userAlias()); + } + } + } + + /** + * 数据范围过滤 + * + * @param joinPoint 切点 + * @param user 用户 + * @param alias 别名 + */ + public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias) + { + StringBuilder sqlString = new StringBuilder(); + + for (SysRole role : user.getRoles()) + { + String dataScope = role.getDataScope(); + if (DATA_SCOPE_ALL.equals(dataScope)) + { + sqlString = new StringBuilder(); + break; + } + else if (DATA_SCOPE_CUSTOM.equals(dataScope)) + { + sqlString.append(StringUtils.format( + " OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, + role.getRoleId())); + } + else if (DATA_SCOPE_DEPT.equals(dataScope)) + { + sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId())); + } + else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) + { + sqlString.append(StringUtils.format( + " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", + deptAlias, user.getDeptId(), user.getDeptId())); + } + else if (DATA_SCOPE_SELF.equals(dataScope)) + { + if (StringUtils.isNotBlank(userAlias)) + { + sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId())); + } + else + { + // 数据权限为仅本人且没有userAlias别名不查询任何数据 + sqlString.append(" OR 1=0 "); + } + } + } + + if (StringUtils.isNotBlank(sqlString.toString())) + { + BaseEntity baseEntity = (BaseEntity) joinPoint.getArgs()[0]; + baseEntity.setDataScope(" AND (" + sqlString.substring(4) + ")"); + } + } + + /** + * 是否存在注解,如果存在就获取 + */ + private DataScope getAnnotationLog(JoinPoint joinPoint) + { + Signature signature = joinPoint.getSignature(); + MethodSignature methodSignature = (MethodSignature) signature; + Method method = methodSignature.getMethod(); + + if (method != null) + { + return method.getAnnotation(DataScope.class); + } + return null; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataSourceAspect.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataSourceAspect.java new file mode 100644 index 0000000..da87a34 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataSourceAspect.java @@ -0,0 +1,64 @@ +package com.alonginfo.framework.aspectj; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.DataSource; +import com.alonginfo.framework.datasource.DynamicDataSourceContextHolder; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; + +/** + * 多数据源处理 + */ +@Aspect +@Order(1) +@Component +public class DataSourceAspect { + protected Logger logger = LoggerFactory.getLogger(getClass()); + + @Pointcut("@annotation(com.alonginfo.framework.aspectj.lang.annotation.DataSource)" + + "|| @within(com.alonginfo.framework.aspectj.lang.annotation.DataSource)") + public void dsPointCut() { + + } + + @Around("dsPointCut()") + public Object around(ProceedingJoinPoint point) throws Throwable { + DataSource dataSource = getDataSource(point); + + if (StringUtils.isNotNull(dataSource)) { + DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); + } + + try { + return point.proceed(); + } finally { + // 销毁数据源 在执行方法之后 + DynamicDataSourceContextHolder.clearDataSourceType(); + } + } + + /** + * 获取需要切换的数据源 + */ + public DataSource getDataSource(ProceedingJoinPoint point) { + MethodSignature signature = (MethodSignature) point.getSignature(); + Class targetClass = point.getTarget().getClass(); + DataSource targetDataSource = targetClass.getAnnotation(DataSource.class); + if (StringUtils.isNotNull(targetDataSource)) { + return targetDataSource; + } else { + Method method = signature.getMethod(); + DataSource dataSource = method.getAnnotation(DataSource.class); + return dataSource; + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/LogAspect.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/LogAspect.java new file mode 100644 index 0000000..f0d8c3a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/LogAspect.java @@ -0,0 +1,194 @@ +package com.alonginfo.framework.aspectj; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.common.enums.HttpMethod; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.ip.IpUtils; +import com.alonginfo.common.utils.spring.SpringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessStatus; +import com.alonginfo.framework.manager.AsyncManager; +import com.alonginfo.framework.manager.factory.AsyncFactory; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.project.monitor.domain.SysOperLog; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.annotation.AfterReturning; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.HandlerMapping; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.Method; +import java.util.Map; + +/** + * 操作日志记录处理 + */ +@Aspect +@Component +public class LogAspect { + private static final Logger log = LoggerFactory.getLogger(LogAspect.class); + + // 配置织入点 + @Pointcut("@annotation(com.alonginfo.framework.aspectj.lang.annotation.Log)") + public void logPointCut() { + } + + /** + * 处理完请求后执行 + * + * @param joinPoint 切点 + */ + @AfterReturning(pointcut = "logPointCut()", returning = "jsonResult") + public void doAfterReturning(JoinPoint joinPoint, Object jsonResult) + { + handleLog(joinPoint, null, jsonResult); + } + + /** + * 拦截异常操作 + * + * @param joinPoint 切点 + * @param e 异常 + */ + @AfterThrowing(value = "logPointCut()", throwing = "e") + public void doAfterThrowing(JoinPoint joinPoint, Exception e) + { + handleLog(joinPoint, e, null); + } + + protected void handleLog(final JoinPoint joinPoint, final Exception e, Object jsonResult) { + try { + // 获得注解 + Log controllerLog = getAnnotationLog(joinPoint); + if (controllerLog == null) { + return; + } + + // 获取当前的用户 + LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); + + // *========数据库日志=========*// + SysOperLog operLog = new SysOperLog(); + operLog.setStatus(BusinessStatus.SUCCESS.ordinal()); + // 请求的地址 + String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); + operLog.setOperIp(ip); + // 返回参数 + operLog.setJsonResult(JSON.toJSONString(jsonResult)); + + operLog.setOperUrl(ServletUtils.getRequest().getRequestURI()); + if (loginUser != null) { + operLog.setOperName(loginUser.getUsername()); + } + + if (e != null) { + operLog.setStatus(BusinessStatus.FAIL.ordinal()); + operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); + } + // 设置方法名称 + String className = joinPoint.getTarget().getClass().getName(); + String methodName = joinPoint.getSignature().getName(); + operLog.setMethod(className + "." + methodName + "()"); + // 设置请求方式 + operLog.setRequestMethod(ServletUtils.getRequest().getMethod()); + // 处理设置注解上的参数 + getControllerMethodDescription(joinPoint, controllerLog, operLog); + // 保存数据库 + AsyncManager.me().execute(AsyncFactory.recordOper(operLog)); + } catch (Exception exp) { + // 记录本地异常日志 + log.error("==前置通知异常=="); + log.error("异常信息:{}", exp.getMessage()); + exp.printStackTrace(); + } + } + + /** + * 获取注解中对方法的描述信息 用于Controller层注解 + * + * @param log 日志 + * @param operLog 操作日志 + * @throws Exception + */ + public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLog operLog) throws Exception { + // 设置action动作 + operLog.setBusinessType(log.businessType().ordinal()); + // 设置标题 + operLog.setTitle(log.title()); + // 设置操作人类别 + operLog.setOperatorType(log.operatorType().ordinal()); + // 是否需要保存request,参数和值 + if (log.isSaveRequestData()) { + // 获取参数的信息,传入到数据库中。 + setRequestValue(joinPoint, operLog); + } + } + + /** + * 获取请求的参数,放到log中 + * + * @param operLog 操作日志 + * @throws Exception 异常 + */ + private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog) throws Exception { + String requestMethod = operLog.getRequestMethod(); + if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) { + String params = argsArrayToString(joinPoint.getArgs()); + operLog.setOperParam(StringUtils.substring(params, 0, 2000)); + } else { + Map paramsMap = (Map) ServletUtils.getRequest().getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE); + operLog.setOperParam(StringUtils.substring(paramsMap.toString(), 0, 2000)); + } + } + + /** + * 是否存在注解,如果存在就获取 + */ + private Log getAnnotationLog(JoinPoint joinPoint) throws Exception { + Signature signature = joinPoint.getSignature(); + MethodSignature methodSignature = (MethodSignature) signature; + Method method = methodSignature.getMethod(); + + if (method != null) { + return method.getAnnotation(Log.class); + } + return null; + } + + /** + * 参数拼装 + */ + private String argsArrayToString(Object[] paramsArray) { + String params = ""; + if (paramsArray != null && paramsArray.length > 0) { + for (int i = 0; i < paramsArray.length; i++) { + if (!isFilterObject(paramsArray[i])) { + Object jsonObj = JSON.toJSON(paramsArray[i]); + params += jsonObj.toString() + " "; + } + } + } + return params.trim(); + } + + /** + * 判断是否需要过滤的对象。 + * + * @param o 对象信息。 + * @return 如果是需要过滤的对象,则返回true;否则返回false。 + */ + public boolean isFilterObject(final Object o) { + return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataScope.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataScope.java new file mode 100644 index 0000000..a22fe27 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataScope.java @@ -0,0 +1,21 @@ +package com.alonginfo.framework.aspectj.lang.annotation; + +import java.lang.annotation.*; + +/** + * 数据权限过滤注解 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface DataScope { + /** + * 部门表的别名 + */ + public String deptAlias() default ""; + + /** + * 用户表的别名 + */ + public String userAlias() default ""; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataSource.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataSource.java new file mode 100644 index 0000000..42d192b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataSource.java @@ -0,0 +1,19 @@ +package com.alonginfo.framework.aspectj.lang.annotation; + +import com.alonginfo.framework.aspectj.lang.enums.DataSourceType; + +import java.lang.annotation.*; + +/** + * 自定义多数据源切换注解 + */ +@Target({ ElementType.METHOD, ElementType.TYPE }) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +public @interface DataSource { + /** + * 切换数据源名称 + */ + public DataSourceType value() default DataSourceType.MASTER; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excel.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excel.java new file mode 100644 index 0000000..58d5cb5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excel.java @@ -0,0 +1,108 @@ +package com.alonginfo.framework.aspectj.lang.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * 自定义导出Excel数据注解 + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Excel { + /** + * 导出到Excel中的名字. + */ + public String name() default ""; + + /** + * 日期格式, 如: yyyy-MM-dd + */ + public String dateFormat() default ""; + + /** + * 读取内容转表达式 (如: 0=男,1=女,2=未知) + */ + public String readConverterExp() default ""; + + /** + * 导出类型(0数字 1字符串) + */ + public ColumnType cellType() default ColumnType.STRING; + + /** + * 导出时在excel中每个列的高度 单位为字符 + */ + public double height() default 14; + + /** + * 导出时在excel中每个列的宽 单位为字符 + */ + public double width() default 16; + + /** + * 文字后缀,如% 90 变成90% + */ + public String suffix() default ""; + + /** + * 当值为空时,字段的默认值 + */ + public String defaultValue() default ""; + + /** + * 提示信息 + */ + public String prompt() default ""; + + /** + * 设置只能选择不能输入的列内容. + */ + public String[] combo() default {}; + + /** + * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写. + */ + public boolean isExport() default true; + + /** + * 另一个类中的属性名称,支持多级获取,以小数点隔开 + */ + public String targetAttr() default ""; + + /** + * 字段类型(0:导出导入;1:仅导出;2:仅导入) + */ + Type type() default Type.ALL; + + public enum Type { + ALL(0), EXPORT(1), IMPORT(2); + private final int value; + + Type(int value) + { + this.value = value; + } + + public int value() + { + return this.value; + } + } + + public enum ColumnType { + NUMERIC(0), STRING(1); + private final int value; + + ColumnType(int value) + { + this.value = value; + } + + public int value() + { + return this.value; + } + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excels.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excels.java new file mode 100644 index 0000000..c3d9b0b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excels.java @@ -0,0 +1,15 @@ +package com.alonginfo.framework.aspectj.lang.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Excel注解集 + */ +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Excels { + Excel[] value(); +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Log.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Log.java new file mode 100644 index 0000000..6112316 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Log.java @@ -0,0 +1,37 @@ +package com.alonginfo.framework.aspectj.lang.annotation; + +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.aspectj.lang.enums.OperatorType; + +import java.lang.annotation.*; + +/** + * 自定义操作日志记录注解 + * + * @author sdj + * + */ +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface Log { + /** + * 模块 + */ + public String title() default ""; + + /** + * 功能 + */ + public BusinessType businessType() default BusinessType.OTHER; + + /** + * 操作人类别 + */ + public OperatorType operatorType() default OperatorType.MANAGE; + + /** + * 是否保存请求的参数 + */ + public boolean isSaveRequestData() default true; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessStatus.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessStatus.java new file mode 100644 index 0000000..14a29e7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessStatus.java @@ -0,0 +1,16 @@ +package com.alonginfo.framework.aspectj.lang.enums; + +/** + * 操作状态 + */ +public enum BusinessStatus { + /** + * 成功 + */ + SUCCESS, + + /** + * 失败 + */ + FAIL, +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessType.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessType.java new file mode 100644 index 0000000..2d334fd --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessType.java @@ -0,0 +1,56 @@ +package com.alonginfo.framework.aspectj.lang.enums; + +/** + * 业务操作类型 + */ +public enum BusinessType { + /** + * 其它 + */ + OTHER, + + /** + * 新增 + */ + INSERT, + + /** + * 修改 + */ + UPDATE, + + /** + * 删除 + */ + DELETE, + + /** + * 授权 + */ + GRANT, + + /** + * 导出 + */ + EXPORT, + + /** + * 导入 + */ + IMPORT, + + /** + * 强退 + */ + FORCE, + + /** + * 生成代码 + */ + GENCODE, + + /** + * 清空数据 + */ + CLEAN, +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/DataSourceType.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/DataSourceType.java new file mode 100644 index 0000000..ec3484e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/DataSourceType.java @@ -0,0 +1,18 @@ +package com.alonginfo.framework.aspectj.lang.enums; + +/** + * 数据源 + * + * @author sdj + */ +public enum DataSourceType { + /** + * 主库 + */ + MASTER, + + /** + * 从库 + */ + SLAVE +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/OperatorType.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/OperatorType.java new file mode 100644 index 0000000..f4c96d1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/OperatorType.java @@ -0,0 +1,23 @@ +package com.alonginfo.framework.aspectj.lang.enums; + +/** + * 操作人类别 + * + * @author sdj + */ +public enum OperatorType { + /** + * 其它 + */ + OTHER, + + /** + * 后台用户 + */ + MANAGE, + + /** + * 手机端用户 + */ + MOBILE +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ApplicationConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ApplicationConfig.java new file mode 100644 index 0000000..e174279 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ApplicationConfig.java @@ -0,0 +1,27 @@ +package com.alonginfo.framework.config; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.EnableAspectJAutoProxy; + +import java.util.TimeZone; + +/** + * 程序注解配置 + */ +@Configuration +// 表示通过aop框架暴露该代理对象,AopContext能够访问 +@EnableAspectJAutoProxy(exposeProxy = true) +// 指定要扫描的Mapper类的包的路径 +@MapperScan({"com.alonginfo.project.**.mapper", "com.alonginfo.quartz.**.mapper"}) +public class ApplicationConfig { + /** + * 时区配置 + */ + @Bean + public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() { + return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault()); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/DruidConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/DruidConfig.java new file mode 100644 index 0000000..5dbbd8c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/DruidConfig.java @@ -0,0 +1,173 @@ +package com.alonginfo.framework.config; + +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; +import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; +import com.alibaba.druid.util.Utils; +import com.alonginfo.common.utils.spring.SpringUtils; +import com.alonginfo.framework.aspectj.lang.enums.DataSourceType; +import com.alonginfo.framework.config.properties.DruidProperties; +import com.alonginfo.framework.datasource.DynamicDataSource; +import com.alonginfo.project.business.domain.MxDatabase; +import com.alonginfo.project.business.service.IMxDatabaseService; +import com.alonginfo.project.tool.Sm4Utils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.web.servlet.FilterRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; + +import javax.annotation.PostConstruct; +import javax.servlet.*; +import javax.sql.DataSource; +import java.io.IOException; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +/** + * druid 配置多数据源 + */ +@Configuration +public class DruidConfig { + + @Autowired + IMxDatabaseService service; + + + @Bean +// @ConfigurationProperties("spring.datasource.druid.master") + public DataSource masterDataSource(DruidProperties druidProperties) throws Exception { + DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); + DruidDataSource druidDataSource = druidProperties.dataSource(dataSource); + return druidDataSource; + } + + @Bean + @ConfigurationProperties("spring.datasource.druid.slave") + @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true") + public DataSource slaveDataSource(DruidProperties druidProperties) throws Exception { + DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); + return druidProperties.dataSource(dataSource); + } + + @Bean(name = "dynamicDataSource") + @Primary + public DynamicDataSource dataSource(DataSource masterDataSource) { + Map targetDataSources = new HashMap<>(); + targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource); + setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource"); + return new DynamicDataSource(masterDataSource, targetDataSources); + } + + /** + * 设置数据源 + * + * @param targetDataSources 备选数据源集合 + * @param sourceName 数据源名称 + * @param beanName bean名称 + */ + public void setDataSource(Map targetDataSources, String sourceName, String beanName) { + try { + DataSource dataSource = SpringUtils.getBean(beanName); + targetDataSources.put(sourceName, dataSource); + } catch (Exception e) { + } + } + + /** + * 去除监控页面底部的广告 + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) +// @Bean + @ConditionalOnProperty(name = "spring.datasource.druid.statViewServlet.enabled", havingValue = "false") + public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties) { + // 获取web监控页面的参数 + DruidStatProperties.StatViewServlet config = properties.getStatViewServlet(); + // 提取common.js的配置路径 + String pattern = config.getUrlPattern() != null ? config.getUrlPattern() : "/druid/*"; + String commonJsPattern = pattern.replaceAll("\\*", "js/common.js"); + final String filePath = "support/http/resources/js/common.js"; + // 创建filter进行过滤 + Filter filter = new Filter() { + @Override + public void init(javax.servlet.FilterConfig filterConfig) throws ServletException { + } + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) + throws IOException, ServletException { + chain.doFilter(request, response); + // 重置缓冲区,响应头不会被重置 + response.resetBuffer(); + // 获取common.js + String text = Utils.readFromResource(filePath); + // 正则替换banner, 除去底部的广告信息 + text = text.replaceAll("
", ""); + text = text.replaceAll("powered.*?shrek.wang", ""); + response.getWriter().write(text); + } + @Override + public void destroy() { + } + }; + FilterRegistrationBean registrationBean = new FilterRegistrationBean(); + registrationBean.setFilter(filter); + registrationBean.addUrlPatterns(commonJsPattern); + return registrationBean; + } + + + /** + * 修改数据源内容 多添加几个业务数据源 + */ + @PostConstruct + public void init(){ + List mxDatabases = service.selectMxDatabaseList(null); + // 获取动态数据源 + DynamicDataSource dynamicDataSource = SpringUtils.getBean("dynamicDataSource"); + + // 拿到主数据源 从数据源 + Map targetDataSources = new HashMap<>(); + setDataSource(targetDataSources, DataSourceType.MASTER.name(), "masterDataSource"); + setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource"); + // 拿到业务数据源 + mxDatabases.stream().forEach(obj->{ + if ("Y".equals(obj.getIsOpen())) { + String id = obj.getId(); + String url = obj.getUrl(); + String username = obj.getUsername(); + String password = obj.getPassword(); + String driverClass = obj.getDriverClass(); + // 初始化数据源 + DruidDataSource druidDataSource = new DruidDataSource(); + druidDataSource.setDriverClassName(driverClass); + druidDataSource.setUrl(url); + druidDataSource.setUsername(username); + druidDataSource.setPassword(password); + druidDataSource.setInitialSize(10); //初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时 + druidDataSource.setMaxActive(100); //最大连接池数量 + druidDataSource.setMaxWait(60000); //获取连接时最大等待时间,单位毫秒。当链接数已经达到了最大链接数的时候,应用如果还要获取链接就会出现等待的现象,等待链接释放并回到链接池,如果等待的时间过长就应该踢掉这个等待,不然应用很可能出现雪崩现象 + druidDataSource.setMinIdle(40); // + + // 设置加密 + try { + druidDataSource.setFilters("config"); + Properties p = new Properties(); + p.setProperty("config.decrypt","true"); + druidDataSource.setConnectProperties(p); + } catch (SQLException e) { + e.printStackTrace(); + } + // 添加到数据源集合 + targetDataSources.put(id,druidDataSource); + dynamicDataSource.setTargetDataSources(targetDataSources); + dynamicDataSource.afterPropertiesSet(); + } + + }); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FastJson2JsonRedisSerializer.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FastJson2JsonRedisSerializer.java new file mode 100644 index 0000000..56ba822 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FastJson2JsonRedisSerializer.java @@ -0,0 +1,60 @@ +package com.alonginfo.framework.config; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.parser.ParserConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.type.TypeFactory; +import org.springframework.data.redis.serializer.RedisSerializer; +import org.springframework.data.redis.serializer.SerializationException; +import org.springframework.util.Assert; + +import java.nio.charset.Charset; + +/** + * Redis使用FastJson序列化 + */ +public class FastJson2JsonRedisSerializer implements RedisSerializer { + @SuppressWarnings("unused") + private ObjectMapper objectMapper = new ObjectMapper(); + + public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); + + private Class clazz; + + static { + ParserConfig.getGlobalInstance().setAutoTypeSupport(true); + } + + public FastJson2JsonRedisSerializer(Class clazz) { + super(); + this.clazz = clazz; + } + + public byte[] serialize(T t) throws SerializationException { + if (t == null) { + return new byte[0]; + } + return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET); + } + + public T deserialize(byte[] bytes) throws SerializationException { + if (bytes == null || bytes.length <= 0) { + return null; + } + String str = new String(bytes, DEFAULT_CHARSET); + + return JSON.parseObject(str, clazz); + } + + public void setObjectMapper(ObjectMapper objectMapper) { + Assert.notNull(objectMapper, "'objectMapper' must not be null"); + this.objectMapper = objectMapper; + } + + protected JavaType getJavaType(Class clazz) + { + return TypeFactory.defaultInstance().constructType(clazz); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FilterConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FilterConfig.java new file mode 100644 index 0000000..36d615f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FilterConfig.java @@ -0,0 +1,43 @@ +package com.alonginfo.framework.config; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.xss.XssFilter; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.web.servlet.FilterRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.servlet.DispatcherType; +import java.util.HashMap; +import java.util.Map; + +/** + * Filter配置 + */ +@Configuration +public class FilterConfig { + @Value("${xss.enabled}") + private String enabled; + + @Value("${xss.excludes}") + private String excludes; + + @Value("${xss.urlPatterns}") + private String urlPatterns; + + @SuppressWarnings({ "rawtypes", "unchecked" }) + @Bean + public FilterRegistrationBean xssFilterRegistration() { + FilterRegistrationBean registration = new FilterRegistrationBean(); + registration.setDispatcherTypes(DispatcherType.REQUEST); + registration.setFilter(new XssFilter()); + registration.addUrlPatterns(StringUtils.split(urlPatterns, ",")); + registration.setName("xssFilter"); + registration.setOrder(Integer.MAX_VALUE); + Map initParameters = new HashMap(); + initParameters.put("excludes", excludes); + initParameters.put("enabled", enabled); + registration.setInitParameters(initParameters); + return registration; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MxConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MxConfig.java new file mode 100644 index 0000000..eef6204 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MxConfig.java @@ -0,0 +1,113 @@ +package com.alonginfo.framework.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * 读取配置文件 + */ +@Component +@ConfigurationProperties(prefix = "mxdatav") +public class MxConfig { + /** 项目名称 */ + private String name; + + /** 版本 */ + private String version; + + /** 版权年份 */ + private String copyrightYear; + + /** 实例演示开关 */ + private boolean demoEnabled; + + /** 上传路径 */ + private static String profile; + + /** 获取地址开关 */ + private static boolean addressEnabled; + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getVersion() + { + return version; + } + + public void setVersion(String version) + { + this.version = version; + } + + public String getCopyrightYear() + { + return copyrightYear; + } + + public void setCopyrightYear(String copyrightYear) + { + this.copyrightYear = copyrightYear; + } + + public boolean isDemoEnabled() + { + return demoEnabled; + } + + public void setDemoEnabled(boolean demoEnabled) + { + this.demoEnabled = demoEnabled; + } + + public static String getProfile() + { + return profile; + } + + public void setProfile(String profile) + { + MxConfig.profile = profile; + } + + public static boolean isAddressEnabled() + { + return addressEnabled; + } + + public void setAddressEnabled(boolean addressEnabled) + { + MxConfig.addressEnabled = addressEnabled; + } + + /** + * 获取头像上传路径 + */ + public static String getAvatarPath() + { + return getProfile() + "/avatar"; + } + + /** + * 获取下载路径 + */ + public static String getDownloadPath() + { + return getProfile() + "/download/"; + } + + /** + * 获取上传路径 + */ + public static String getUploadPath() + { + return getProfile() + "/upload"; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MyBatisConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MyBatisConfig.java new file mode 100644 index 0000000..9db886a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MyBatisConfig.java @@ -0,0 +1,87 @@ +package com.alonginfo.framework.config; + +import org.apache.ibatis.io.VFS; +import org.apache.ibatis.session.SqlSessionFactory; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.boot.autoconfigure.SpringBootVFS; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.core.io.Resource; +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; +import org.springframework.core.io.support.ResourcePatternResolver; +import org.springframework.core.type.classreading.CachingMetadataReaderFactory; +import org.springframework.core.type.classreading.MetadataReader; +import org.springframework.core.type.classreading.MetadataReaderFactory; +import org.springframework.util.ClassUtils; + +import javax.sql.DataSource; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; + +/** + * Mybatis支持*匹配扫描包 + */ +@Configuration +public class MyBatisConfig { + @Autowired + private Environment env; + + static final String DEFAULT_RESOURCE_PATTERN = "**/*.class"; + + public static String setTypeAliasesPackage(String typeAliasesPackage) { + ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver(); + MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver); + List allResult = new ArrayList(); + try { + for (String aliasesPackage : typeAliasesPackage.split(",")) { + List result = new ArrayList(); + aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN; + Resource[] resources = resolver.getResources(aliasesPackage); + if (resources != null && resources.length > 0) { + MetadataReader metadataReader = null; + for (Resource resource : resources) { + if (resource.isReadable()) { + metadataReader = metadataReaderFactory.getMetadataReader(resource); + try { + result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName()); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + } + } + } + if (result.size() > 0) { + HashSet hashResult = new HashSet(result); + allResult.addAll(hashResult); + } + } + if (allResult.size() > 0) { + typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0])); + } else { + throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包"); + } + } catch (IOException e) { + e.printStackTrace(); + } + return typeAliasesPackage; + } + + @Bean + public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception { + String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage"); + String mapperLocations = env.getProperty("mybatis.mapperLocations"); + typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage); + VFS.addImplClass(SpringBootVFS.class); + + final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); + sessionFactory.setDataSource(dataSource); + sessionFactory.setTypeAliasesPackage(typeAliasesPackage); + sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(mapperLocations)); + return sessionFactory.getObject(); + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/RedisConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/RedisConfig.java new file mode 100644 index 0000000..fcd87d2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/RedisConfig.java @@ -0,0 +1,75 @@ +package com.alonginfo.framework.config; + +import cn.hutool.crypto.SmUtil; +import cn.hutool.crypto.symmetric.SymmetricCrypto; +import com.alonginfo.project.tool.Sm4Utils; +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.bouncycastle.jcajce.provider.asymmetric.util.DESUtil; +import org.springframework.cache.annotation.CachingConfigurerSupport; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.connection.RedisStandaloneConfiguration; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +import java.nio.charset.Charset; + +/** + * redis配置 + */ +@Configuration +@EnableCaching +public class RedisConfig extends CachingConfigurerSupport { + + private static final String sm4key = "edcssm4key071520"; + private static final String iv = "abcdef1234567890"; + private final Environment environment; + public RedisConfig(Environment environment){ + this.environment=environment; + } + + @Bean + public RedisConnectionFactory myLettuceConnectionFactory() throws Exception { + RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration(environment.getProperty("spring.redis.host"),Integer.parseInt(environment.getProperty("spring.redis.port"))); + redisStandaloneConfiguration.setDatabase(Integer.parseInt(environment.getProperty("spring.redis.database"))); + //获取application.yml 中的密码(密文) + String password = environment.getProperty("spring.redis.password"); + //解密密码并停驾到配置中 + byte[] decrypt = Sm4Utils.decrypt(sm4key.getBytes(), iv.getBytes(), password.getBytes()); + Charset charset = Charset.forName("UTF-8"); + redisStandaloneConfiguration.setPassword(new String(decrypt, charset)); + return new LettuceConnectionFactory(redisStandaloneConfiguration); + } + + + @Bean + @SuppressWarnings(value = { "unchecked", "rawtypes" }) + public RedisTemplate redisTemplate(RedisConnectionFactory connectionFactory) { + RedisTemplate template = new RedisTemplate<>(); + template.setConnectionFactory(connectionFactory); + FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class); + + ObjectMapper mapper = new ObjectMapper(); + mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); + mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL); + serializer.setObjectMapper(mapper); + + template.setValueSerializer(serializer); + // 使用StringRedisSerializer来序列化和反序列化redis的key值 + template.setKeySerializer(new StringRedisSerializer()); + template.afterPropertiesSet(); + return template; + } + + public static void main(String[] args) { + SymmetricCrypto sm4 = SmUtil.sm4(sm4key.getBytes()); + String encryptParam = sm4.encryptHex("Hxs1909."); + System.out.println(encryptParam); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ResourcesConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ResourcesConfig.java new file mode 100644 index 0000000..09e8463 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ResourcesConfig.java @@ -0,0 +1,71 @@ +package com.alonginfo.framework.config; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.framework.interceptor.RepeatSubmitInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * 通用配置 + */ +@Configuration +public class ResourcesConfig implements WebMvcConfigurer { + @Autowired + private RepeatSubmitInterceptor repeatSubmitInterceptor; + + @Value("${notice.filePath}") + private String NOTICE_FILE_PATH; + + @Value("${market.filePath}") + private String MARKET_FILE_PATH; + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + /** 本地文件上传路径 */ + registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + MxConfig.getProfile() + "/"); + + registry.addResourceHandler(Constants.NOTICE_RESOURCE_PREFIX + "/**").addResourceLocations("file:" + NOTICE_FILE_PATH); + + registry.addResourceHandler(Constants.MARKET_RESOURCE_PREFIX + "/**").addResourceLocations("file:" + MARKET_FILE_PATH); + + /** swagger配置 */ + registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); + } + + /** + * 自定义拦截规则 + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**"); + } + + /** + * 跨域配置 + */ + @Bean + public CorsFilter corsFilter() + { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); + // 设置访问源地址 + config.addAllowedOrigin("*"); + // 设置访问源请求头 + config.addAllowedHeader("*"); + // 设置访问源请求方法 + config.addAllowedMethod("*"); + // 对接口配置跨域设置 + source.registerCorsConfiguration("/**", config); + return new CorsFilter(source); + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SecurityConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SecurityConfig.java new file mode 100644 index 0000000..f35ebd0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SecurityConfig.java @@ -0,0 +1,171 @@ +package com.alonginfo.framework.config; + +import com.alonginfo.framework.security.filter.JwtAuthenticationTokenFilter; +import com.alonginfo.framework.security.handle.AuthenticationEntryPointImpl; +import com.alonginfo.framework.security.handle.LogoutSuccessHandlerImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.security.web.authentication.logout.LogoutFilter; +import org.springframework.web.filter.CorsFilter; + +/** + * spring security配置 + */ +@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) +public class SecurityConfig extends WebSecurityConfigurerAdapter { + /** + * 自定义用户认证逻辑 + */ + @Autowired + private UserDetailsService userDetailsService; + + /** + * 认证失败处理类 + */ + @Autowired + private AuthenticationEntryPointImpl unauthorizedHandler; + + /** + * 退出处理类 + */ + @Autowired + private LogoutSuccessHandlerImpl logoutSuccessHandler; + + /** + * token认证过滤器 + */ + @Autowired + private JwtAuthenticationTokenFilter authenticationTokenFilter; + + /** + * 跨域处理器 + */ + @Autowired + private CorsFilter corsFilter; + + /** + * 解决 无法直接注入 AuthenticationManager + * + * @return + * @throws Exception + */ + @Bean + @Override + public AuthenticationManager authenticationManagerBean() throws Exception { + return super.authenticationManagerBean(); + } + + /** + * anyRequest | 匹配所有请求路径 + * access | SpringEl表达式结果为true时可以访问 + * anonymous | 匿名可以访问 + * denyAll | 用户不能访问 + * fullyAuthenticated | 用户完全认证可以访问(非remember-me下自动登录) + * hasAnyAuthority | 如果有参数,参数表示权限,则其中任何一个权限可以访问 + * hasAnyRole | 如果有参数,参数表示角色,则其中任何一个角色可以访问 + * hasAuthority | 如果有参数,参数表示权限,则其权限可以访问 + * hasIpAddress | 如果有参数,参数表示IP地址,如果用户IP和参数匹配,则可以访问 + * hasRole | 如果有参数,参数表示角色,则其角色可以访问 + * permitAll | 用户可以任意访问 + * rememberMe | 允许通过remember-me登录的用户访问 + * authenticated | 用户登录后可访问 + */ + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception { + httpSecurity + // CRSF禁用,因为不使用session + .csrf().disable() + // 认证失败处理类 + .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() + // 基于token,所以不需要session + .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() + // 过滤请求 + .authorizeRequests() + // 对于登录login 验证码captchaImage 允许匿名访问 + .antMatchers("/login", "/captchaImage", "/mxDatav_*/**").anonymous() + .antMatchers( + HttpMethod.GET, + "/*.html", + "/**/*.html", + "/**/*.css", + "/**/*.js" + ).permitAll() + .antMatchers("/mxDatav_*/**").permitAll() + .antMatchers("/profile/**").anonymous() + .antMatchers("/common/download**").anonymous() + .antMatchers("/swagger-ui.html").denyAll() + .antMatchers("/swagger-resources/**").denyAll() + .antMatchers("/webjars/**").anonymous() + .antMatchers("/*/api-docs").denyAll() + .antMatchers("/druid/**").denyAll() + .antMatchers("/push/websocket").anonymous() + .antMatchers("/business/websocket/**").permitAll() + .antMatchers("/monthTransaction/**").permitAll() + .antMatchers("/trade/**").permitAll() + .antMatchers("/bilateralConsult/**").permitAll() + .antMatchers("/focusListing/**").permitAll() + .antMatchers("/dayAddThree/**").permitAll() + .antMatchers("/marketSurvey/**").permitAll() + .antMatchers("/marketBuild/**").permitAll() + .antMatchers("/provinceInner/**").permitAll() + .antMatchers("/tradeSettle/**").permitAll() + .antMatchers("/mediumLongTerm/**").permitAll() + .antMatchers("/newEnergySurvey/**").permitAll() + .antMatchers("/generation/**").permitAll() + .antMatchers("/tradeCenter/**").permitAll() + .antMatchers("/grid/**").permitAll() + .antMatchers("/provinceMiddle/**").permitAll() + .antMatchers("/clearEnergyAbsorption/**").permitAll() + .antMatchers("/carbonMonitor/**").permitAll() + .antMatchers("/green/**").permitAll() + .antMatchers("/menuStatist/**").permitAll() + .antMatchers("/tradeMarketInfo/**").permitAll() + .antMatchers("/greenConsumer/**").permitAll() + .antMatchers("/delivery/**").permitAll() + .antMatchers("/transactionPowerController/**").permitAll() + .antMatchers("/tradeInfo/**").permitAll() + .antMatchers("/uploadNotice/**").permitAll() + .antMatchers("/notice/**").permitAll() + .antMatchers("/marketUpload/**").permitAll() + .antMatchers("/resources/**").permitAll() + .antMatchers("/playThemes?pagePath=%2F20230325140927").permitAll() + .antMatchers("/heguigk/**").permitAll() + // 除上面外的所有请求全部需要鉴权认证 + .anyRequest().authenticated() + .and(); +// .headers().frameOptions().disable(); + httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); + // 添加JWT filter + httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); + httpSecurity.addFilterBefore(corsFilter,JwtAuthenticationTokenFilter.class); + httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class); + } + + + /** + * 强散列哈希加密实现 + */ + @Bean + public BCryptPasswordEncoder bCryptPasswordEncoder() + { + return new BCryptPasswordEncoder(); + } + + /** + * 身份认证接口 + */ + @Override + protected void configure(AuthenticationManagerBuilder auth) throws Exception { + auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder()); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ServerConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ServerConfig.java new file mode 100644 index 0000000..4075024 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ServerConfig.java @@ -0,0 +1,28 @@ +package com.alonginfo.framework.config; + +import com.alonginfo.common.utils.ServletUtils; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; + +/** + * 服务相关配置 + */ +@Component +public class ServerConfig { + /** + * 获取完整的请求路径,包括:域名,端口,上下文访问路径 + * + * @return 服务地址 + */ + public String getUrl() { + HttpServletRequest request = ServletUtils.getRequest(); + return getDomain(request); + } + + public static String getDomain(HttpServletRequest request) { + StringBuffer url = request.getRequestURL(); + String contextPath = request.getServletContext().getContextPath(); + return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SwaggerConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SwaggerConfig.java new file mode 100644 index 0000000..d436566 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SwaggerConfig.java @@ -0,0 +1,102 @@ +package com.alonginfo.framework.config; + +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.*; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +import java.util.ArrayList; +import java.util.List; + +/** + * Swagger2的接口配置 + */ +@Configuration +//@EnableSwagger2 +public class SwaggerConfig { + /** 系统基础配置 */ + @Autowired + private MxConfig mxConfig; + + /** + * 创建API + */ + @Bean + public Docket createRestApi() { + return new Docket(DocumentationType.SWAGGER_2) + //.pathMapping("/dev-api") + // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) + .apiInfo(apiInfo()) + // 设置哪些接口暴露给Swagger展示 + .select() + // 扫描所有有注解的api,用这种方式更灵活 + .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) + // 扫描指定包中的swagger注解 + //.apis(RequestHandlerSelectors.basePackage("com.alonginfo.project.tool.swagger")) + // 扫描所有 .apis(RequestHandlerSelectors.any()) + .paths(PathSelectors.any()) + .build() + /* 设置安全模式,swagger可以设置访问token */ + .securitySchemes(securitySchemes()) + .securityContexts(securityContexts()); + } + + /** + * 安全模式,这里指定token通过Authorization头请求头传递 + */ + private List securitySchemes() { + List apiKeyList = new ArrayList(); + apiKeyList.add(new ApiKey("Authorization", "Authorization", "header")); + return apiKeyList; + } + + /** + * 安全上下文 + */ + private List securityContexts() { + List securityContexts = new ArrayList<>(); + securityContexts.add( + SecurityContext.builder() + .securityReferences(defaultAuth()) + .forPaths(PathSelectors.regex("^(?!auth).*$")) + .build()); + return securityContexts; + } + + /** + * 默认的安全上引用 + */ + private List defaultAuth() { + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + List securityReferences = new ArrayList<>(); + securityReferences.add(new SecurityReference("Authorization", authorizationScopes)); + return securityReferences; + } + + /** + * 添加摘要信息 + */ + private ApiInfo apiInfo() { + // 用ApiInfoBuilder进行定制 + return new ApiInfoBuilder() + // 设置标题 + .title("MX-DataV API接口测试平台") + // 描述 + .description("提供后台所有Restful接口") + // 作者信息 + .contact(new Contact(mxConfig.getName(), null, null)) + // 版本 + .version("版本号:" + mxConfig.getVersion()) + .build(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ThreadPoolConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ThreadPoolConfig.java new file mode 100644 index 0000000..f76a08d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ThreadPoolConfig.java @@ -0,0 +1,57 @@ +package com.alonginfo.framework.config; + +import com.alonginfo.common.utils.Threads; +import org.apache.commons.lang3.concurrent.BasicThreadFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.ThreadPoolExecutor; + +/** + * 线程池配置 + * + */ +@Configuration +public class ThreadPoolConfig { + // 核心线程池大小 + private int corePoolSize = 50; + + // 最大可创建的线程数 + private int maxPoolSize = 200; + + // 队列最大长度 + private int queueCapacity = 1000; + + // 线程池维护线程所允许的空闲时间 + private int keepAliveSeconds = 300; + + @Bean(name = "threadPoolTaskExecutor") + public ThreadPoolTaskExecutor threadPoolTaskExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setMaxPoolSize(maxPoolSize); + executor.setCorePoolSize(corePoolSize); + executor.setQueueCapacity(queueCapacity); + executor.setKeepAliveSeconds(keepAliveSeconds); + // 线程池对拒绝任务(无线程可用)的处理策略 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + return executor; + } + + /** + * 执行周期性或定时任务 + */ + @Bean(name = "scheduledExecutorService") + protected ScheduledExecutorService scheduledExecutorService() { + return new ScheduledThreadPoolExecutor(corePoolSize, + new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build()) { + @Override + protected void afterExecute(Runnable r, Throwable t) { + super.afterExecute(r, t); + Threads.printException(r, t); + } + }; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/config/properties/DruidProperties.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/properties/DruidProperties.java new file mode 100644 index 0000000..67c21b0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/config/properties/DruidProperties.java @@ -0,0 +1,108 @@ +package com.alonginfo.framework.config.properties; + +import com.alibaba.druid.pool.DruidDataSource; +import com.alonginfo.project.tool.Sm4Utils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +import java.nio.charset.Charset; +import java.sql.SQLException; +import java.util.Properties; + +/** + * druid 配置属性 + */ +@Configuration +public class DruidProperties { + @Value("${spring.datasource.druid.initialSize}") + private int initialSize; + + @Value("${spring.datasource.druid.master.url}") + private String url; + + @Value("${spring.datasource.druid.master.username}") + private String username; + + @Value("${spring.datasource.druid.master.password}") + private String password; + + @Value("${spring.datasource.druid.minIdle}") + private int minIdle; + + @Value("${spring.datasource.druid.maxActive}") + private int maxActive; + + @Value("${spring.datasource.druid.maxWait}") + private int maxWait; + + @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") + private int timeBetweenEvictionRunsMillis; + + @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}") + private int minEvictableIdleTimeMillis; + + @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}") + private int maxEvictableIdleTimeMillis; + + @Value("${spring.datasource.druid.validationQuery}") + private String validationQuery; + + @Value("${spring.datasource.druid.testWhileIdle}") + private boolean testWhileIdle; + + @Value("${spring.datasource.druid.testOnBorrow}") + private boolean testOnBorrow; + + @Value("${spring.datasource.druid.testOnReturn}") + private boolean testOnReturn; + +// @Value("${spring.datasource.druid.filters}") +// private String filters; +// @Value("${spring.datasource.druid.connection-properties}") +// private Properties properties; + + private static final String sm4key = "edcssm4key071520"; + private static final String iv = "abcdef1234567890"; + + public DruidDataSource dataSource(DruidDataSource datasource) throws Exception { + /** 配置初始化大小、最小、最大 */ + datasource.setInitialSize(initialSize); + datasource.setMaxActive(maxActive); + datasource.setMinIdle(minIdle); + + /** 配置获取连接等待超时的时间 */ + datasource.setMaxWait(maxWait); + + /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ + datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); + + /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */ + datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); + datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis); + + /** + * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。 + */ + datasource.setValidationQuery(validationQuery); + /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */ + datasource.setTestWhileIdle(testWhileIdle); + /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ + datasource.setTestOnBorrow(testOnBorrow); + /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ + datasource.setTestOnReturn(testOnReturn); + byte[] decrypt = Sm4Utils.decrypt(sm4key.getBytes(), iv.getBytes(), password.getBytes()); + Charset charset = Charset.forName("UTF-8"); + datasource.setPassword(new String(decrypt, charset)); + datasource.setUsername(username); + datasource.setUrl(url); + +// // 密码加密 +// try { +// datasource.setFilters(filters); +// } catch (SQLException e) { +// e.printStackTrace(); +// } +// datasource.setConnectProperties(properties); + return datasource; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSource.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSource.java new file mode 100644 index 0000000..4399bb5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSource.java @@ -0,0 +1,23 @@ +package com.alonginfo.framework.datasource; + +import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; + +import javax.sql.DataSource; +import java.util.Map; + +/** + * 动态数据源 + */ +public class DynamicDataSource extends AbstractRoutingDataSource { + public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) { + super.setDefaultTargetDataSource(defaultTargetDataSource); + super.setTargetDataSources(targetDataSources); + super.afterPropertiesSet(); + } + + @Override + protected Object determineCurrentLookupKey() + { + return DynamicDataSourceContextHolder.getDataSourceType(); + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSourceContextHolder.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSourceContextHolder.java new file mode 100644 index 0000000..fc10146 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSourceContextHolder.java @@ -0,0 +1,41 @@ +package com.alonginfo.framework.datasource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 数据源切换处理 + */ +public class DynamicDataSourceContextHolder { + public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class); + + /** + * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本, + * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。 + */ + private static final ThreadLocal CONTEXT_HOLDER = new ThreadLocal<>(); + + /** + * 设置数据源的变量 + */ + public static void setDataSourceType(String dsType) { + log.info("切换到{}数据源", dsType); + CONTEXT_HOLDER.set(dsType); + } + + /** + * 获得数据源的变量 + */ + public static String getDataSourceType() + { + return CONTEXT_HOLDER.get(); + } + + /** + * 清空数据源变量 + */ + public static void clearDataSourceType() + { + CONTEXT_HOLDER.remove(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/AjaxResult.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/AjaxResult.java new file mode 100644 index 0000000..0ca20ef --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/AjaxResult.java @@ -0,0 +1,217 @@ +package com.alonginfo.framework.interceptor; + +import com.alonginfo.common.constant.HttpStatus; +import com.alonginfo.common.utils.StringUtils; + +import java.util.HashMap; +import java.util.Objects; + +/** + * 操作消息提醒 + * + * + */ +public class AjaxResult extends HashMap +{ + private static final long serialVersionUID = 1L; + + /** 状态码 */ + public static final String CODE_TAG = "code"; + + /** 返回内容 */ + public static final String MSG_TAG = "msg"; + + /** 数据对象 */ + public static final String DATA_TAG = "data"; + + /** + * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。 + */ + public AjaxResult() + { + } + + /** + * 初始化一个新创建的 AjaxResult 对象 + * + * @param code 状态码 + * @param msg 返回内容 + */ + public AjaxResult(int code, String msg) + { + super.put(CODE_TAG, code); + super.put(MSG_TAG, msg); + } + + /** + * 初始化一个新创建的 AjaxResult 对象 + * + * @param code 状态码 + * @param msg 返回内容 + * @param data 数据对象 + */ + public AjaxResult(int code, String msg, Object data) + { + super.put(CODE_TAG, code); + super.put(MSG_TAG, msg); + if (StringUtils.isNotNull(data)) + { + super.put(DATA_TAG, data); + } + } + + /** + * 返回成功消息 + * + * @return 成功消息 + */ + public static AjaxResult success() + { + return AjaxResult.success("操作成功"); + } + + /** + * 返回成功数据 + * + * @return 成功消息 + */ + public static AjaxResult success(Object data) + { + return AjaxResult.success("操作成功", data); + } + + /** + * 返回成功消息 + * + * @param msg 返回内容 + * @return 成功消息 + */ + public static AjaxResult success(String msg) + { + return AjaxResult.success(msg, null); + } + + /** + * 返回成功消息 + * + * @param msg 返回内容 + * @param data 数据对象 + * @return 成功消息 + */ + public static AjaxResult success(String msg, Object data) + { + return new AjaxResult(HttpStatus.SUCCESS, msg, data); + } + + /** + * 返回警告消息 + * + * @param msg 返回内容 + * @return 警告消息 + */ + public static AjaxResult warn(String msg) + { + return AjaxResult.warn(msg, null); + } + + /** + * 返回警告消息 + * + * @param msg 返回内容 + * @param data 数据对象 + * @return 警告消息 + */ + public static AjaxResult warn(String msg, Object data) + { + return new AjaxResult(HttpStatus.WARN, msg, data); + } + + /** + * 返回错误消息 + * + * @return 错误消息 + */ + public static AjaxResult error() + { + return AjaxResult.error("操作失败"); + } + + /** + * 返回错误消息 + * + * @param msg 返回内容 + * @return 错误消息 + */ + public static AjaxResult error(String msg) + { + return AjaxResult.error(msg, null); + } + + /** + * 返回错误消息 + * + * @param msg 返回内容 + * @param data 数据对象 + * @return 错误消息 + */ + public static AjaxResult error(String msg, Object data) + { + return new AjaxResult(HttpStatus.ERROR, msg, data); + } + + /** + * 返回错误消息 + * + * @param code 状态码 + * @param msg 返回内容 + * @return 错误消息 + */ + public static AjaxResult error(int code, String msg) + { + return new AjaxResult(code, msg, null); + } + + /** + * 是否为成功消息 + * + * @return 结果 + */ + public boolean isSuccess() + { + return Objects.equals(HttpStatus.SUCCESS, this.get(CODE_TAG)); + } + + /** + * 是否为警告消息 + * + * @return 结果 + */ + public boolean isWarn() + { + return Objects.equals(HttpStatus.WARN, this.get(CODE_TAG)); + } + + /** + * 是否为错误消息 + * + * @return 结果 + */ + public boolean isError() + { + return Objects.equals(HttpStatus.ERROR, this.get(CODE_TAG)); + } + + /** + * 方便链式调用 + * + * @param key 键 + * @param value 值 + * @return 数据对象 + */ + @Override + public AjaxResult put(String key, Object value) + { + super.put(key, value); + return this; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/CacheConstants.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/CacheConstants.java new file mode 100644 index 0000000..53a3fa3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/CacheConstants.java @@ -0,0 +1,50 @@ +package com.alonginfo.framework.interceptor; + +/** + * 缓存的key 常量 + * + * + */ +public class CacheConstants +{ + /** + * 登录用户 redis key + */ + public static final String LOGIN_TOKEN_KEY = "login_tokens:"; + + /** + * 验证码 redis key + */ + public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; + + /** + * 参数管理 cache key + */ + public static final String SYS_CONFIG_KEY = "sys_config:"; + + /** + * 字典管理 cache key + */ + public static final String SYS_DICT_KEY = "sys_dict:"; + + /** + * 防重提交 redis key + */ + public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; + + /** + * 限流 redis key + */ + public static final String RATE_LIMIT_KEY = "rate_limit:"; + + /** + * 登录账户密码错误次数 redis key + */ + public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:"; + + /** + * 签名 + */ + public static final String SIGN_KEY = "sign:"; + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/RepeatSubmitInterceptor.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/RepeatSubmitInterceptor.java new file mode 100644 index 0000000..bffc7ce --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/RepeatSubmitInterceptor.java @@ -0,0 +1,47 @@ +package com.alonginfo.framework.interceptor; + +import com.alibaba.fastjson.JSONObject; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.framework.interceptor.annotation.RepeatSubmit; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.springframework.stereotype.Component; +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.Method; + +/** + * 防止重复提交拦截器 + */ +@Component +public abstract class RepeatSubmitInterceptor extends HandlerInterceptorAdapter { + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + if (handler instanceof HandlerMethod) { + HandlerMethod handlerMethod = (HandlerMethod) handler; + Method method = handlerMethod.getMethod(); + RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class); + if (annotation != null) { + if (this.isRepeatSubmit(request)) { + AjaxResult ajaxResult = AjaxResult.error("不允许重复提交,请稍后再试"); + ServletUtils.renderString(response, JSONObject.toJSONString(ajaxResult)); + return false; + } + } + return true; + } else { + return super.preHandle(request, response, handler); + } + } + + /** + * 验证是否重复提交由子类实现具体的防重复提交的规则 + * + * @param httpServletRequest + * @return + * @throws Exception + */ + public abstract boolean isRepeatSubmit(HttpServletRequest request); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SecurityProperties.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SecurityProperties.java new file mode 100644 index 0000000..602331c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SecurityProperties.java @@ -0,0 +1,23 @@ +package com.alonginfo.framework.interceptor; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@ConfigurationProperties(prefix = "spring.security") +@Data +public class SecurityProperties { + + /** + * 签名地址 + */ + List signUri; + + /** + * 签名超时时间(分) + */ + Integer signTimeout; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SignAuthFilter.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SignAuthFilter.java new file mode 100644 index 0000000..32f22eb --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SignAuthFilter.java @@ -0,0 +1,140 @@ +package com.alonginfo.framework.interceptor; + +import cn.hutool.core.convert.Convert; +import cn.hutool.core.date.DateUnit; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.extra.servlet.ServletUtil; +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; +import com.alibaba.fastjson2.JSONWriter; +import com.alonginfo.common.constant.Constants; +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.utils.SignUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; + +import javax.servlet.*; +import javax.servlet.http.HttpServletRequest; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import java.util.concurrent.TimeUnit; + +/** + * @Description:防篡改、防重放攻击过滤器 + */ +@Slf4j +@Component +public class SignAuthFilter { + @Autowired + private SecurityProperties securityProperties; + + @Autowired + public RedisTemplate redisTemplate; + @Autowired + public RedisCache redisCache; + +// @Override +// public void init(FilterConfig filterConfig) { +// log.info("初始化 SignAuthFilter"); +// } +// +// @Override +// public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws ServletException, IOException { +// HttpServletRequest httpRequest = (HttpServletRequest) request; +// HttpServletRequest requestWrapper = httpRequest; +// +// Set uriSet = new HashSet<>(securityProperties.getSignUri()); +// String requestUri = httpRequest.getRequestURI(); +// boolean isMatch = false; +// for (String uri : uriSet) { +// isMatch = requestUri.equals(uri); +// if (isMatch) { +// break; +// } +// } +// if (!isMatch) { +// filterChain.doFilter(requestWrapper, response); +// return; +// } +// +// log.info("当前请求的URI是==>{},isMatch==>{}", httpRequest.getRequestURI(), isMatch); +// +// String sign = requestWrapper.getHeader("Sign"); +// Long timestamp = Convert.toLong(requestWrapper.getHeader("Timestamp")); +// +// if (StrUtil.isEmpty(sign)) { +// returnFail("签名不允许为空", response); +// return; +// } +// +// if (timestamp == null) { +// returnFail("时间戳不允许为空", response); +// return; +// } +// +// +// +// //重放时间限制(单位分) +// Long difference = DateUtil.between(DateUtil.date(), DateUtil.date(timestamp ), DateUnit.MINUTE); +// if (difference > securityProperties.getSignTimeout()) { +// returnFail("已过期的签名", response); +// log.info("前端时间戳:{},服务端时间戳:{}", DateUtil.date(timestamp ), DateUtil.date()); +// return; +// } +// +// //重发次数限制 +// String signKey = CacheConstants.SIGN_KEY + sign; +// Boolean hasKey = redisTemplate.hasKey(signKey); +// if(hasKey){ +// returnFail("不允许重发请求", response); +// return; +// } +// redisCache.setCacheObject(signKey, sign, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); +// boolean accept = true; +// Map paramMap; +// switch (requestWrapper.getMethod()) { +// case "GET": +// paramMap = ServletUtil.getParamMap(requestWrapper); +// // 使用TreeMap对Map的键进行排序 +// Map sortedMap = new TreeMap<>(paramMap); +// accept = SignUtil.verifySign(sortedMap, sign, timestamp); +// break; +// case "POST": +// case "PUT": +// case "DELETE": +// String body = JSON.toJSONString(JSONObject.parseObject(ServletUtil.getBody(requestWrapper)), JSONWriter.Feature.WriteMapNullValue, JSONWriter.Feature.WriteNullListAsEmpty); +// accept = SignUtil.verifySign(body, sign, timestamp); +// break; +// default: +// accept = true; +// break; +// } +// if (accept) { +// filterChain.doFilter(requestWrapper, response); +// } else { +// returnFail("签名验证不通过", response); +// } +// } + +// private void returnFail(String msg, ServletResponse response) throws IOException { +// response.setCharacterEncoding("UTF-8"); +// response.setContentType("application/json; charset=utf-8"); +// PrintWriter out = response.getWriter(); +// String result = JSONObject.toJSONString(AjaxResult.error(msg)); +// out.println(result); +// out.flush(); +// out.close(); +// } +// +// @Override +// public void destroy() { +// log.info("销毁 SignAuthFilter"); +// } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/annotation/RepeatSubmit.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/annotation/RepeatSubmit.java new file mode 100644 index 0000000..adc281c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/annotation/RepeatSubmit.java @@ -0,0 +1,14 @@ +package com.alonginfo.framework.interceptor.annotation; + +import java.lang.annotation.*; + +/** + * 自定义注解防止表单重复提交 + */ +@Inherited +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface RepeatSubmit { + +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/impl/SameUrlDataInterceptor.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/impl/SameUrlDataInterceptor.java new file mode 100644 index 0000000..f428c8e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/impl/SameUrlDataInterceptor.java @@ -0,0 +1,85 @@ +package com.alonginfo.framework.interceptor.impl; + +import com.alibaba.fastjson.JSONObject; +import com.alonginfo.framework.interceptor.RepeatSubmitInterceptor; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import java.util.HashMap; +import java.util.Map; + +/** + * 判断请求url和数据是否和上一次相同, + * 如果和上次相同,则是重复提交表单。 有效时间为10秒内。 + */ +@Component +public class SameUrlDataInterceptor extends RepeatSubmitInterceptor { + public final String REPEAT_PARAMS = "repeatParams"; + + public final String REPEAT_TIME = "repeatTime"; + + public final String SESSION_REPEAT_KEY = "repeatData"; + + /** + * 间隔时间,单位:秒 默认10秒 + * + * 两次相同参数的请求,如果间隔时间大于该参数,系统不会认定为重复提交的数据 + */ + private int intervalTime = 10; + + public void setIntervalTime(int intervalTime) + { + this.intervalTime = intervalTime; + } + + @SuppressWarnings("unchecked") + @Override + public boolean isRepeatSubmit(HttpServletRequest request) { + // 本次参数及系统时间 + String nowParams = JSONObject.toJSONString(request.getParameterMap()); + Map nowDataMap = new HashMap(); + nowDataMap.put(REPEAT_PARAMS, nowParams); + nowDataMap.put(REPEAT_TIME, System.currentTimeMillis()); + + // 请求地址(作为存放session的key值) + String url = request.getRequestURI(); + + HttpSession session = request.getSession(); + Object sessionObj = session.getAttribute(SESSION_REPEAT_KEY); + if (sessionObj != null) { + Map sessionMap = (Map) sessionObj; + if (sessionMap.containsKey(url)) { + Map preDataMap = (Map) sessionMap.get(url); + if (compareParams(nowDataMap, preDataMap) && compareTime(nowDataMap, preDataMap)) { + return true; + } + } + } + Map sessionMap = new HashMap(); + sessionMap.put(url, nowDataMap); + session.setAttribute(SESSION_REPEAT_KEY, sessionMap); + return false; + } + + /** + * 判断参数是否相同 + */ + private boolean compareParams(Map nowMap, Map preMap) { + String nowParams = (String) nowMap.get(REPEAT_PARAMS); + String preParams = (String) preMap.get(REPEAT_PARAMS); + return nowParams.equals(preParams); + } + + /** + * 判断两次间隔时间 + */ + private boolean compareTime(Map nowMap, Map preMap) { + long time1 = (Long) nowMap.get(REPEAT_TIME); + long time2 = (Long) preMap.get(REPEAT_TIME); + if ((time1 - time2) < (this.intervalTime * 1000)) { + return true; + } + return false; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/AsyncManager.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/AsyncManager.java new file mode 100644 index 0000000..0154fee --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/AsyncManager.java @@ -0,0 +1,53 @@ +package com.alonginfo.framework.manager; + +import com.alonginfo.common.utils.Threads; +import com.alonginfo.common.utils.spring.SpringUtils; + +import java.util.TimerTask; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +/** + * 异步任务管理器 + */ +public class AsyncManager { + /** + * 操作延迟10毫秒 + */ + private final int OPERATE_DELAY_TIME = 10; + + /** + * 异步操作任务调度线程池 + */ + private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService"); + + /** + * 单例模式 + */ + private AsyncManager(){} + + private static AsyncManager me = new AsyncManager(); + + public static AsyncManager me() + { + return me; + } + + /** + * 执行任务 + * + * @param task 任务 + */ + public void execute(TimerTask task) + { + executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); + } + + /** + * 停止任务线程池 + */ + public void shutdown() + { + Threads.shutdownAndAwaitTermination(executor); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/ShutdownManager.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/ShutdownManager.java new file mode 100644 index 0000000..8ca4eee --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/ShutdownManager.java @@ -0,0 +1,33 @@ +package com.alonginfo.framework.manager; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import javax.annotation.PreDestroy; + +/** + * 确保应用退出时能关闭后台线程 + */ +@Component +public class ShutdownManager { + private static final Logger logger = LoggerFactory.getLogger("sys-user"); + + @PreDestroy + public void destroy() + { + shutdownAsyncManager(); + } + + /** + * 停止异步执行任务 + */ + private void shutdownAsyncManager() { + try { + logger.info("====关闭后台任务任务线程池===="); + AsyncManager.me().shutdown(); + } catch (Exception e) { + logger.error(e.getMessage(), e); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/factory/AsyncFactory.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/factory/AsyncFactory.java new file mode 100644 index 0000000..240ed85 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/factory/AsyncFactory.java @@ -0,0 +1,97 @@ +package com.alonginfo.framework.manager.factory; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.utils.LogUtils; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.ip.AddressUtils; +import com.alonginfo.common.utils.ip.IpUtils; +import com.alonginfo.common.utils.spring.SpringUtils; +import com.alonginfo.project.monitor.domain.SysLogininfor; +import com.alonginfo.project.monitor.domain.SysOperLog; +import com.alonginfo.project.monitor.service.ISysLogininforService; +import com.alonginfo.project.monitor.service.ISysOperLogService; +import eu.bitwalker.useragentutils.UserAgent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.TimerTask; + +/** + * 异步工厂(产生任务用) + */ +public class AsyncFactory { + private static final Logger sys_user_logger = LoggerFactory.getLogger("sys-user"); + + /** + * 记录登陆信息 + * + * @param username 用户名 + * @param status 状态 + * @param message 消息 + * @param args 列表 + * @return 任务task + */ + public static TimerTask recordLogininfor(final String username, final String status, final String message, + final Object... args) { + final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); + final String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); + return new TimerTask() + { + @Override + public void run() + { + String address = AddressUtils.getRealAddressByIP(ip); + StringBuilder s = new StringBuilder(); + s.append(LogUtils.getBlock(ip)); + s.append(address); + s.append(LogUtils.getBlock(username)); + s.append(LogUtils.getBlock(status)); + s.append(LogUtils.getBlock(message)); + // 打印信息到日志 + sys_user_logger.info(s.toString(), args); + // 获取客户端操作系统 + String os = userAgent.getOperatingSystem().getName(); + // 获取客户端浏览器 + String browser = userAgent.getBrowser().getName(); + // 封装对象 + SysLogininfor logininfor = new SysLogininfor(); + logininfor.setUserName(username); + logininfor.setIpaddr(ip); + logininfor.setLoginLocation(address); + logininfor.setBrowser(browser); + logininfor.setOs(os); + logininfor.setMsg(message); + // 日志状态 + if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status)) + { + logininfor.setStatus(Constants.SUCCESS); + } + else if (Constants.LOGIN_FAIL.equals(status)) + { + logininfor.setStatus(Constants.FAIL); + } + // 插入数据 + SpringUtils.getBean(ISysLogininforService.class).insertLogininfor(logininfor); + } + }; + } + + /** + * 操作日志记录 + * + * @param operLog 操作日志信息 + * @return 任务task + */ + public static TimerTask recordOper(final SysOperLog operLog) { + return new TimerTask() + { + @Override + public void run() + { + // 远程查询操作地点 + operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp())); + SpringUtils.getBean(ISysOperLogService.class).insertOperlog(operLog); + } + }; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/redis/RedisCache.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/redis/RedisCache.java new file mode 100644 index 0000000..3eaa402 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/redis/RedisCache.java @@ -0,0 +1,201 @@ +package com.alonginfo.framework.redis; + +import org.apache.poi.ss.formula.functions.T; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.*; +import org.springframework.stereotype.Component; + +import java.util.*; +import java.util.concurrent.TimeUnit; + +/** + * spring redis 工具类 + **/ +@SuppressWarnings(value = { "unchecked", "rawtypes" }) +@Component +public class RedisCache { + @Autowired + public RedisTemplate redisTemplate; + + /** + * 缓存基本的对象,Integer、String、实体类等 + * + * @param key 缓存的键值 + * @param value 缓存的值 + * @return 缓存的对象 + */ + public ValueOperations setCacheObject(String key, T value) { + ValueOperations operation = redisTemplate.opsForValue(); + operation.set(key, value); + return operation; + } + + /** + * 缓存基本的对象,Integer、String、实体类等 + * + * @param key 缓存的键值 + * @param value 缓存的值 + * @param timeout 时间 + * @param timeUnit 时间颗粒度 + * @return 缓存的对象 + */ + public ValueOperations setCacheObject(String key, T value, Integer timeout, TimeUnit timeUnit) { + ValueOperations operation = redisTemplate.opsForValue(); + operation.set(key, value, timeout, timeUnit); + return operation; + } + + /** + * 获得缓存的基本对象。 + * + * @param key 缓存键值 + * @return 缓存键值对应的数据 + */ + public T getCacheObject(String key) { + ValueOperations operation = redisTemplate.opsForValue(); + return operation.get(key); + } + + /** + * 删除单个对象 + * + * @param key + */ + public void deleteObject(String key) + { + redisTemplate.delete(key); + } + + /** + * 删除集合对象 + * + * @param collection + */ + public void deleteObject(Collection collection) + { + redisTemplate.delete(collection); + } + + /** + * 缓存List数据 + * + * @param key 缓存的键值 + * @param dataList 待缓存的List数据 + * @return 缓存的对象 + */ + public ListOperations setCacheList(String key, List dataList) { + ListOperations listOperation = redisTemplate.opsForList(); + if (null != dataList) { + int size = dataList.size(); + for (int i = 0; i < size; i++) { + listOperation.leftPush(key, dataList.get(i)); + } + } + return listOperation; + } + + /** + * 获得缓存的list对象 + * + * @param key 缓存的键值 + * @return 缓存键值对应的数据 + */ + public List getCacheList(String key) { + List dataList = new ArrayList(); + ListOperations listOperation = redisTemplate.opsForList(); + Long size = listOperation.size(key); + + for (int i = 0; i < size; i++) { + dataList.add(listOperation.index(key, i)); + } + return dataList; + } + + /** + * 缓存Set + * + * @param key 缓存键值 + * @param dataSet 缓存的数据 + * @return 缓存数据的对象 + */ + public BoundSetOperations setCacheSet(String key, Set dataSet) { + BoundSetOperations setOperation = redisTemplate.boundSetOps(key); + Iterator it = dataSet.iterator(); + while (it.hasNext()) { + setOperation.add(it.next()); + } + return setOperation; + } + + /** + * 获得缓存的set + * + * @param key + * @return + */ + public Set getCacheSet(String key) { + Set dataSet = new HashSet(); + BoundSetOperations operation = redisTemplate.boundSetOps(key); + dataSet = operation.members(); + return dataSet; + } + + /** + * 缓存Map + * + * @param key + * @param dataMap + * @return + */ + public HashOperations setCacheMap(String key, Map dataMap) { + HashOperations hashOperations = redisTemplate.opsForHash(); + if (null != dataMap) { + for (Map.Entry entry : dataMap.entrySet()) { + hashOperations.put(key, entry.getKey(), entry.getValue()); + } + } + return hashOperations; + } + + /** + * 获得缓存的Map + * + * @param key + * @return + */ + public Map getCacheMap(String key) { + Map map = redisTemplate.opsForHash().entries(key); + return map; + } + + /** + * @param key redis key + * @param hkey hash key + * @return + */ + public String getCacheMapValue(String key, String hkey ) { + String value = (String) redisTemplate.opsForHash().get(key,hkey); + return value; + } + + + /** + * 获得缓存的基本对象列表 + * + * @param pattern 字符串前缀 + * @return 对象列表 + */ + public Collection keys(String pattern) + { + return redisTemplate.keys(pattern); + } + + public void deleteAllKeys(){ + Set keys = redisTemplate.keys("*"); + keys.stream().forEach((key)->{ + if (!key.startsWith("login_tokens:")) { + redisTemplate.delete(key); + } + }); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/LoginUser.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/LoginUser.java new file mode 100644 index 0000000..68e8337 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/LoginUser.java @@ -0,0 +1,224 @@ +package com.alonginfo.framework.security; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.alonginfo.project.system.domain.SysUser; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; + +import java.util.Collection; +import java.util.Set; + +/** + * 登录用户身份权限 + */ +public class LoginUser implements UserDetails { + private static final long serialVersionUID = 1L; + + /** + * 用户唯一标识 + */ + private String token; + + /** + * 登陆时间 + */ + private Long loginTime; + + /** + * 过期时间 + */ + private Long expireTime; + + /** + * 登录IP地址 + */ + private String ipaddr; + + /** + * 登录地点 + */ + private String loginLocation; + + /** + * 浏览器类型 + */ + private String browser; + + /** + * 操作系统 + */ + private String os; + + /** + * 权限列表 + */ + private Set permissions; + + /** + * 用户信息 + */ + private SysUser user; + + public String getToken() + { + return token; + } + + public void setToken(String token) + { + this.token = token; + } + + public LoginUser() { + } + + public LoginUser(SysUser user, Set permissions) { + this.user = user; + this.permissions = permissions; + } + + @JsonIgnore + @Override + public String getPassword() + { + return user.getPassword(); + } + + @Override + public String getUsername() + { + return user.getUserName(); + } + + /** + * 账户是否未过期,过期无法验证 + */ + @JsonIgnore + @Override + public boolean isAccountNonExpired() + { + return true; + } + + /** + * 指定用户是否解锁,锁定的用户无法进行身份验证 + * + * @return + */ + @JsonIgnore + @Override + public boolean isAccountNonLocked() + { + return true; + } + + /** + * 指示是否已过期的用户的凭据(密码),过期的凭据防止认证 + * + * @return + */ + @JsonIgnore + @Override + public boolean isCredentialsNonExpired() + { + return true; + } + + /** + * 是否可用 ,禁用的用户不能身份验证 + * + * @return + */ + @JsonIgnore + @Override + public boolean isEnabled() + { + return true; + } + + public Long getLoginTime() + { + return loginTime; + } + + public void setLoginTime(Long loginTime) + { + this.loginTime = loginTime; + } + + public String getIpaddr() + { + return ipaddr; + } + + public void setIpaddr(String ipaddr) + { + this.ipaddr = ipaddr; + } + + public String getLoginLocation() + { + return loginLocation; + } + + public void setLoginLocation(String loginLocation) + { + this.loginLocation = loginLocation; + } + + public String getBrowser() + { + return browser; + } + + public void setBrowser(String browser) + { + this.browser = browser; + } + + public String getOs() + { + return os; + } + + public void setOs(String os) + { + this.os = os; + } + + public Long getExpireTime() + { + return expireTime; + } + + public void setExpireTime(Long expireTime) + { + this.expireTime = expireTime; + } + + public Set getPermissions() + { + return permissions; + } + + public void setPermissions(Set permissions) + { + this.permissions = permissions; + } + + public SysUser getUser() + { + return user; + } + + public void setUser(SysUser user) + { + this.user = user; + } + + @Override + public Collection getAuthorities() + { + return null; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/filter/JwtAuthenticationTokenFilter.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/filter/JwtAuthenticationTokenFilter.java new file mode 100644 index 0000000..afd4563 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/filter/JwtAuthenticationTokenFilter.java @@ -0,0 +1,40 @@ +package com.alonginfo.framework.security.filter; + +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.TokenService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; +import org.springframework.stereotype.Component; +import org.springframework.web.filter.OncePerRequestFilter; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * token过滤器 验证token有效性 + */ +@Component +public class JwtAuthenticationTokenFilter extends OncePerRequestFilter { + @Autowired + private TokenService tokenService; + + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) + throws ServletException, IOException { + LoginUser loginUser = tokenService.getLoginUser(request); + if (StringUtils.isNotNull(loginUser) && StringUtils.isNull(SecurityUtils.getAuthentication())) { + tokenService.verifyToken(loginUser); + UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginUser, null, loginUser.getAuthorities()); + authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); + SecurityContextHolder.getContext().setAuthentication(authenticationToken); + } + chain.doFilter(request, response); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/AuthenticationEntryPointImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/AuthenticationEntryPointImpl.java new file mode 100644 index 0000000..7c0dd9e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/AuthenticationEntryPointImpl.java @@ -0,0 +1,31 @@ +package com.alonginfo.framework.security.handle; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.common.constant.HttpStatus; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.Serializable; + +/** + * 认证失败处理类 返回未授权 + */ +@Component +public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, Serializable { + private static final long serialVersionUID = -8970718410437077606L; + + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) + throws IOException { + int code = HttpStatus.UNAUTHORIZED; + String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI()); + ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(code, msg))); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/LogoutSuccessHandlerImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/LogoutSuccessHandlerImpl.java new file mode 100644 index 0000000..a0f2ea0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/LogoutSuccessHandlerImpl.java @@ -0,0 +1,49 @@ +package com.alonginfo.framework.security.handle; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.constant.HttpStatus; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.manager.AsyncManager; +import com.alonginfo.framework.manager.factory.AsyncFactory; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.core.Authentication; +import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * 自定义退出处理类 返回成功 + */ +@Configuration +public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler { + @Autowired + private TokenService tokenService; + + /** + * 退出处理 + * + * @return + */ + @Override + public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) + throws IOException, ServletException { + LoginUser loginUser = tokenService.getLoginUser(request); + if (StringUtils.isNotNull(loginUser)) { + String userName = loginUser.getUsername(); + // 删除用户缓存记录 + tokenService.delLoginUser(loginUser.getToken()); + // 记录用户退出日志 + AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, "退出成功")); + } + ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(HttpStatus.SUCCESS, "退出成功"))); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/PermissionService.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/PermissionService.java new file mode 100644 index 0000000..52d198b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/PermissionService.java @@ -0,0 +1,148 @@ +package com.alonginfo.framework.security.service; + +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.project.system.domain.SysRole; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Set; + +/** + * mxdatav 自定义权限实现,ss取自SpringSecurity首字母 + */ +@Service("ss") +public class PermissionService { + /** 所有权限标识 */ + private static final String ALL_PERMISSION = "*:*:*"; + + /** 管理员角色权限标识 */ + private static final String SUPER_ADMIN = "admin"; + + private static final String ROLE_DELIMETER = ","; + + private static final String PERMISSION_DELIMETER = ","; + + @Autowired + private TokenService tokenService; + + /** + * 验证用户是否具备某权限 + * + * @param permission 权限字符串 + * @return 用户是否具备某权限 + */ + public boolean hasPermi(String permission) { + if (StringUtils.isEmpty(permission)) { + return false; + } + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions())) { + return false; + } + return hasPermissions(loginUser.getPermissions(), permission); + } + + /** + * 验证用户是否不具备某权限,与 hasPermi逻辑相反 + * + * @param permission 权限字符串 + * @return 用户是否不具备某权限 + */ + public boolean lacksPermi(String permission) + { + return hasPermi(permission) != true; + } + + /** + * 验证用户是否具有以下任意一个权限 + * + * @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表 + * @return 用户是否具有以下任意一个权限 + */ + public boolean hasAnyPermi(String permissions) { + if (StringUtils.isEmpty(permissions)) { + return false; + } + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions())) { + return false; + } + Set authorities = loginUser.getPermissions(); + for (String permission : permissions.split(PERMISSION_DELIMETER)) { + if (permission != null && hasPermissions(authorities, permission)) { + return true; + } + } + return false; + } + + /** + * 判断用户是否拥有某个角色 + * + * @param role 角色字符串 + * @return 用户是否具备某角色 + */ + public boolean hasRole(String role) { + if (StringUtils.isEmpty(role)) { + return false; + } + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles())) { + return false; + } + for (SysRole sysRole : loginUser.getUser().getRoles()) { + String roleKey = sysRole.getRoleKey(); + if (SUPER_ADMIN.contains(roleKey) || roleKey.contains(StringUtils.trim(role))) { + return true; + } + } + return false; + } + + /** + * 验证用户是否不具备某角色,与 isRole逻辑相反。 + * + * @param role 角色名称 + * @return 用户是否不具备某角色 + */ + public boolean lacksRole(String role) + { + return hasRole(role) != true; + } + + /** + * 验证用户是否具有以下任意一个角色 + * + * @param roles 以 ROLE_NAMES_DELIMETER 为分隔符的角色列表 + * @return 用户是否具有以下任意一个角色 + */ + public boolean hasAnyRoles(String roles) { + if (StringUtils.isEmpty(roles)) { + return false; + } + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles())) { + return false; + } + for (String role : roles.split(ROLE_DELIMETER)) { + if (hasRole(role)) { + return true; + } + } + return false; + } + + /** + * 判断是否包含权限 + * + * @param permissions 权限列表 + * @param permission 权限字符串 + * @return 用户是否具备某权限 + */ + private boolean hasPermissions(Set permissions, String permission) { + return permissions.contains(ALL_PERMISSION) || permissions.contains(StringUtils.trim(permission)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysLoginService.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysLoginService.java new file mode 100644 index 0000000..ba11b83 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysLoginService.java @@ -0,0 +1,81 @@ +package com.alonginfo.framework.security.service; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.common.exception.user.CaptchaException; +import com.alonginfo.common.exception.user.CaptchaExpireException; +import com.alonginfo.common.exception.user.UserPasswordNotMatchException; +import com.alonginfo.common.utils.MessageUtils; +import com.alonginfo.common.utils.sign.Base64; +import com.alonginfo.framework.manager.AsyncManager; +import com.alonginfo.framework.manager.factory.AsyncFactory; +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.framework.security.LoginUser; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; + +/** + * 登录校验方法 + */ +@Component +public class SysLoginService { + @Autowired + private TokenService tokenService; + + @Resource + private AuthenticationManager authenticationManager; + + @Autowired + private RedisCache redisCache; + + /** + * 登录验证 + * + * @param username 用户名 + * @param password 密码 + * @param captcha 验证码 + * @param uuid 唯一标识 + * @return 结果 + */ + public String login(String username, String password, String code, String uuid) { +// password = URLDecoder.decode(new String(Base64.decode(password), StandardCharsets.UTF_8)); + String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; + String captcha = redisCache.getCacheObject(verifyKey); + redisCache.deleteObject(verifyKey); + if (captcha == null) { + AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"))); + throw new CaptchaExpireException(); + } + if (!code.equalsIgnoreCase(captcha)) { + AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"))); + throw new CaptchaException(); + } + // 用户验证 + Authentication authentication = null; + try { + // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername + authentication = authenticationManager + .authenticate(new UsernamePasswordAuthenticationToken(username, password)); + } catch (Exception e) { + if (e instanceof BadCredentialsException) { + AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"))); + throw new UserPasswordNotMatchException(); + } else { + AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage())); + throw new CustomException(e.getMessage()); + } + } + AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); + LoginUser loginUser = (LoginUser) authentication.getPrincipal(); + // 生成token + return tokenService.createToken(loginUser); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysPermissionService.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysPermissionService.java new file mode 100644 index 0000000..ae7afe7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysPermissionService.java @@ -0,0 +1,56 @@ +package com.alonginfo.framework.security.service; + +import com.alonginfo.project.system.domain.SysUser; +import com.alonginfo.project.system.service.ISysMenuService; +import com.alonginfo.project.system.service.ISysRoleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.HashSet; +import java.util.Set; + +/** + * 用户权限处理 + */ +@Component +public class SysPermissionService { + @Autowired + private ISysRoleService roleService; + + @Autowired + private ISysMenuService menuService; + + /** + * 获取角色数据权限 + * + * @param user 用户信息 + * @return 角色权限信息 + */ + public Set getRolePermission(SysUser user) { + Set roles = new HashSet(); + // 管理员拥有所有权限 + if (user.isAdmin()) { + roles.add("admin"); + } else { + roles.addAll(roleService.selectRolePermissionByUserId(user.getUserId())); + } + return roles; + } + + /** + * 获取菜单数据权限 + * + * @param user 用户信息 + * @return 菜单权限信息 + */ + public Set getMenuPermission(SysUser user) { + Set roles = new HashSet(); + // 管理员拥有所有权限 + if (user.isAdmin()) { + roles.add("*:*:*"); + } else { + roles.addAll(menuService.selectMenuPermsByUserId(user.getUserId())); + } + return roles; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/TokenService.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/TokenService.java new file mode 100644 index 0000000..60a3533 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/TokenService.java @@ -0,0 +1,203 @@ +package com.alonginfo.framework.security.service; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.ip.AddressUtils; +import com.alonginfo.common.utils.ip.IpUtils; +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.framework.security.LoginUser; +import eu.bitwalker.useragentutils.UserAgent; +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * token验证处理 + */ +@Component +public class TokenService { + // 令牌自定义标识 + @Value("${token.header}") + private String header; + + // 令牌秘钥 + @Value("${token.secret}") + private String secret; + + // 令牌有效期(默认30分钟) + @Value("${token.expireTime}") + private int expireTime; + + protected static final long MILLIS_SECOND = 1000; + + protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND; + + private static final Long MILLIS_MINUTE_TEN = 20 * 60 * 1000L; + + @Autowired + private RedisCache redisCache; + + /** + * 获取用户身份信息 + * + * @return 用户信息 + */ + public LoginUser getLoginUser(HttpServletRequest request) { + // 获取请求携带的令牌 + String token = getToken(request); + if (StringUtils.isNotEmpty(token)) + { + Claims claims = parseToken(token); + // 解析对应的权限以及用户信息 + String uuid = (String) claims.get(Constants.LOGIN_USER_KEY); + String userKey = getTokenKey(uuid); + LoginUser user = redisCache.getCacheObject(userKey); + return user; + } + return null; + } + + /** + * 设置用户身份信息 + */ + public void setLoginUser(LoginUser loginUser) { + if (StringUtils.isNotNull(loginUser) && StringUtils.isNotEmpty(loginUser.getToken())) { + String userKey = getTokenKey(loginUser.getToken()); + redisCache.setCacheObject(userKey, loginUser); + } + } + + /** + * 删除用户身份信息 + */ + public void delLoginUser(String token) { + if (StringUtils.isNotEmpty(token)) { + String userKey = getTokenKey(token); + redisCache.deleteObject(userKey); + } + } + + /** + * 创建令牌 + * + * @param loginUser 用户信息 + * @return 令牌 + */ + public String createToken(LoginUser loginUser) { + String token = IdUtils.fastUUID(); + loginUser.setToken(token); + setUserAgent(loginUser); + refreshToken(loginUser); + + Map claims = new HashMap<>(); + claims.put(Constants.LOGIN_USER_KEY, token); + return createToken(claims); + } + + /** + * 验证令牌有效期,相差不足20分钟,自动刷新缓存 + * + * @param token 令牌 + * @return 令牌 + */ + public void verifyToken(LoginUser loginUser) { + long expireTime = loginUser.getExpireTime(); + long currentTime = System.currentTimeMillis(); + if (expireTime - currentTime <= MILLIS_MINUTE_TEN) { + refreshToken(loginUser); + } + } + + /** + * 刷新令牌有效期 + * + * @param loginUser 登录信息 + */ + public void refreshToken(LoginUser loginUser) { + loginUser.setLoginTime(System.currentTimeMillis()); + loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); + // 根据uuid将loginUser缓存 + String userKey = getTokenKey(loginUser.getToken()); + redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES); + } + + /** + * 设置用户代理信息 + * + * @param loginUser 登录信息 + */ + public void setUserAgent(LoginUser loginUser) { + UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); + String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); + loginUser.setIpaddr(ip); + loginUser.setLoginLocation(AddressUtils.getRealAddressByIP(ip)); + loginUser.setBrowser(userAgent.getBrowser().getName()); + loginUser.setOs(userAgent.getOperatingSystem().getName()); + } + + /** + * 从数据声明生成令牌 + * + * @param claims 数据声明 + * @return 令牌 + */ + private String createToken(Map claims) { + String token = Jwts.builder() + .setClaims(claims) + .signWith(SignatureAlgorithm.HS512, secret).compact(); + return token; + } + + /** + * 从令牌中获取数据声明 + * + * @param token 令牌 + * @return 数据声明 + */ + private Claims parseToken(String token) { + return Jwts.parser() + .setSigningKey(secret) + .parseClaimsJws(token) + .getBody(); + } + + /** + * 从令牌中获取用户名 + * + * @param token 令牌 + * @return 用户名 + */ + public String getUsernameFromToken(String token) { + Claims claims = parseToken(token); + return claims.getSubject(); + } + + /** + * 获取请求token + * + * @param request + * @return token + */ + private String getToken(HttpServletRequest request) { + String token = request.getHeader(header); + if (StringUtils.isNotEmpty(token) && token.startsWith(Constants.TOKEN_PREFIX)) { + token = token.replace(Constants.TOKEN_PREFIX, ""); + } + return token; + } + + private String getTokenKey(String uuid) + { + return Constants.LOGIN_TOKEN_KEY + uuid; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/UserDetailsServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/UserDetailsServiceImpl.java new file mode 100644 index 0000000..b6ffb2c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/UserDetailsServiceImpl.java @@ -0,0 +1,50 @@ +package com.alonginfo.framework.security.service; + +import com.alonginfo.common.enums.UserStatus; +import com.alonginfo.common.exception.BaseException; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.project.system.domain.SysUser; +import com.alonginfo.project.system.service.ISysUserService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Service; + +/** + * 用户验证处理 + */ +@Service +public class UserDetailsServiceImpl implements UserDetailsService { + private static final Logger log = LoggerFactory.getLogger(UserDetailsServiceImpl.class); + + @Autowired + private ISysUserService userService; + + @Autowired + private SysPermissionService permissionService; + + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + SysUser user = userService.selectUserByUserName(username); + if (StringUtils.isNull(user)) { + log.info("登录用户:{} 不存在.", username); + throw new UsernameNotFoundException("登录用户:" + username + " 不存在"); + } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { + log.info("登录用户:{} 已被删除.", username); + throw new BaseException("对不起,您的账号:" + username + " 已被删除"); + } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { + log.info("登录用户:{} 已被停用.", username); + throw new BaseException("对不起,您的账号:" + username + " 已停用"); + } + + return createLoginUser(user); + } + + public UserDetails createLoginUser(SysUser user) { + return new LoginUser(user, permissionService.getMenuPermission(user)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/controller/BaseController.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/controller/BaseController.java new file mode 100644 index 0000000..a3f0f6f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/controller/BaseController.java @@ -0,0 +1,79 @@ +package com.alonginfo.framework.web.controller; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.alonginfo.common.constant.HttpStatus; +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.sql.SqlUtil; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.PageDomain; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.framework.web.page.TableSupport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.InitBinder; + +import java.beans.PropertyEditorSupport; +import java.util.Date; +import java.util.List; + +/** + * web层通用数据处理 + */ +public class BaseController { + protected final Logger logger = LoggerFactory.getLogger(BaseController.class); + + /** + * 将前台传递过来的日期格式的字符串,自动转化为Date类型 + */ + @InitBinder + public void initBinder(WebDataBinder binder) { + // Date 类型转换 + binder.registerCustomEditor(Date.class, new PropertyEditorSupport() + { + @Override + public void setAsText(String text) + { + setValue(DateUtils.parseDate(text)); + } + }); + } + + /** + * 设置请求分页数据 + */ + protected void startPage() { + PageDomain pageDomain = TableSupport.buildPageRequest(); + Integer pageNum = pageDomain.getPageNum(); + Integer pageSize = pageDomain.getPageSize(); + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { + String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); + PageHelper.startPage(pageNum, pageSize, orderBy); + } + } + + /** + * 响应请求分页数据 + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + protected TableDataInfo getDataTable(List list) { + TableDataInfo rspData = new TableDataInfo(); + rspData.setCode(HttpStatus.SUCCESS); + rspData.setRows(list); + rspData.setTotal(new PageInfo(list).getTotal()); + return rspData; + } + + /** + * 响应返回结果 + * + * @param rows 影响行数 + * @return 操作结果 + */ + protected AjaxResult toAjax(int rows) + { + return rows > 0 ? AjaxResult.success() : AjaxResult.error(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/AjaxResult.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/AjaxResult.java new file mode 100644 index 0000000..e5dfdd3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/AjaxResult.java @@ -0,0 +1,142 @@ +package com.alonginfo.framework.web.domain; + +import com.alonginfo.common.constant.HttpStatus; +import com.alonginfo.common.utils.StringUtils; + +import java.util.HashMap; + +/** + * 操作消息提醒 + */ +public class AjaxResult extends HashMap { + private static final long serialVersionUID = 1L; + + /** 状态码 */ + public static final String CODE_TAG = "code"; + + /** 返回内容 */ + public static final String MSG_TAG = "msg"; + + /** 数据对象 */ + public static final String DATA_TAG = "data"; + + /** + * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。 + */ + public AjaxResult() { + } + + /** + * 初始化一个新创建的 AjaxResult 对象 + * + * @param code 状态码 + * @param msg 返回内容 + */ + public AjaxResult(int code, String msg) { + super.put(CODE_TAG, code); + super.put(MSG_TAG, msg); + } + + /** + * 初始化一个新创建的 AjaxResult 对象 + * + * @param code 状态码 + * @param msg 返回内容 + * @param data 数据对象 + */ + public AjaxResult(int code, String msg, Object data) { + super.put(CODE_TAG, code); + super.put(MSG_TAG, msg); + if (StringUtils.isNotNull(data)) { + super.put(DATA_TAG, data); + } + } + + /** + * 返回成功消息 + * + * @return 成功消息 + */ + public static AjaxResult success() + { + return AjaxResult.success("操作成功"); + } + + /** + * 返回成功数据 + * + * @return 成功消息 + */ + public static AjaxResult success(Object data) + { + return AjaxResult.success("操作成功", data); + } + + /** + * 返回成功消息 + * + * @param msg 返回内容 + * @return 成功消息 + */ + public static AjaxResult success(String msg) + { + return AjaxResult.success(msg, null); + } + + /** + * 返回成功消息 + * + * @param msg 返回内容 + * @param data 数据对象 + * @return 成功消息 + */ + public static AjaxResult success(String msg, Object data) + { + return new AjaxResult(HttpStatus.SUCCESS, msg, data); + } + + /** + * 返回错误消息 + * + * @return + */ + public static AjaxResult error() + { + return AjaxResult.error("操作失败"); + } + + /** + * 返回错误消息 + * + * @param msg 返回内容 + * @return 警告消息 + */ + public static AjaxResult error(String msg) + { + return AjaxResult.error(msg, null); + } + + /** + * 返回错误消息 + * + * @param msg 返回内容 + * @param data 数据对象 + * @return 警告消息 + */ + public static AjaxResult error(String msg, Object data) + { + return new AjaxResult(HttpStatus.ERROR, msg, data); + } + + /** + * 返回错误消息 + * + * @param code 状态码 + * @param msg 返回内容 + * @return 警告消息 + */ + public static AjaxResult error(int code, String msg) + { + return new AjaxResult(code, msg, null); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/BaseEntity.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/BaseEntity.java new file mode 100644 index 0000000..3819699 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/BaseEntity.java @@ -0,0 +1,152 @@ +package com.alonginfo.framework.web.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; + +import java.io.Serializable; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * Entity基类 + */ +public class BaseEntity implements Serializable { + private static final long serialVersionUID = 1L; + + /** 搜索值 */ + private String searchValue; + + /** 创建者 */ + private String createBy; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** 更新者 */ + private String updateBy; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** 备注 */ + private String remark; + + /** 数据权限 */ + private String dataScope; + + /** 开始时间 */ + @JsonIgnore + private String beginTime; + + /** 结束时间 */ + @JsonIgnore + private String endTime; + + /** 请求参数 */ + private Map params; + + public String getSearchValue() + { + return searchValue; + } + + public void setSearchValue(String searchValue) + { + this.searchValue = searchValue; + } + + public String getCreateBy() + { + return createBy; + } + + public void setCreateBy(String createBy) + { + this.createBy = createBy; + } + + public Date getCreateTime() + { + return createTime; + } + + public void setCreateTime(Date createTime) + { + this.createTime = createTime; + } + + public String getUpdateBy() + { + return updateBy; + } + + public void setUpdateBy(String updateBy) + { + this.updateBy = updateBy; + } + + public Date getUpdateTime() + { + return updateTime; + } + + public void setUpdateTime(Date updateTime) + { + this.updateTime = updateTime; + } + + public String getRemark() + { + return remark; + } + + public void setRemark(String remark) + { + this.remark = remark; + } + + public String getDataScope() + { + return dataScope; + } + + public void setDataScope(String dataScope) + { + this.dataScope = dataScope; + } + + public String getBeginTime() + { + return beginTime; + } + + public void setBeginTime(String beginTime) + { + this.beginTime = beginTime; + } + + public String getEndTime() + { + return endTime; + } + + public void setEndTime(String endTime) + { + this.endTime = endTime; + } + + public Map getParams() { + if (params == null) { + params = new HashMap<>(); + } + return params; + } + + public void setParams(Map params) + { + this.params = params; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/Server.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/Server.java new file mode 100644 index 0000000..9f29e27 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/Server.java @@ -0,0 +1,221 @@ +package com.alonginfo.framework.web.domain; + +import com.alonginfo.common.utils.Arith; +import com.alonginfo.common.utils.ip.IpUtils; +import com.alonginfo.framework.web.domain.server.*; +import oshi.SystemInfo; +import oshi.hardware.CentralProcessor; +import oshi.hardware.CentralProcessor.TickType; +import oshi.hardware.GlobalMemory; +import oshi.hardware.HardwareAbstractionLayer; +import oshi.software.os.FileSystem; +import oshi.software.os.OSFileStore; +import oshi.software.os.OperatingSystem; +import oshi.util.Util; + +import java.net.UnknownHostException; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; + +/** + * 服务器相关信息 + */ +public class Server { + + private static final int OSHI_WAIT_SECOND = 1000; + + /** + * CPU相关信息 + */ + private Cpu cpu = new Cpu(); + + /** + * 內存相关信息 + */ + private Mem mem = new Mem(); + + /** + * JVM相关信息 + */ + private Jvm jvm = new Jvm(); + + /** + * 服务器相关信息 + */ + private Sys sys = new Sys(); + + /** + * 磁盘相关信息 + */ + private List sysFiles = new LinkedList(); + + public Cpu getCpu() + { + return cpu; + } + + public void setCpu(Cpu cpu) + { + this.cpu = cpu; + } + + public Mem getMem() + { + return mem; + } + + public void setMem(Mem mem) + { + this.mem = mem; + } + + public Jvm getJvm() + { + return jvm; + } + + public void setJvm(Jvm jvm) + { + this.jvm = jvm; + } + + public Sys getSys() + { + return sys; + } + + public void setSys(Sys sys) + { + this.sys = sys; + } + + public List getSysFiles() + { + return sysFiles; + } + + public void setSysFiles(List sysFiles) + { + this.sysFiles = sysFiles; + } + + public void copyTo() throws Exception + { + SystemInfo si = new SystemInfo(); + HardwareAbstractionLayer hal = si.getHardware(); + + setCpuInfo(hal.getProcessor()); + + setMemInfo(hal.getMemory()); + + setSysInfo(); + + setJvmInfo(); + + setSysFiles(si.getOperatingSystem()); + } + + /** + * 设置CPU信息 + */ + private void setCpuInfo(CentralProcessor processor) { + // CPU信息 + long[] prevTicks = processor.getSystemCpuLoadTicks(); + Util.sleep(OSHI_WAIT_SECOND); + long[] ticks = processor.getSystemCpuLoadTicks(); + long nice = ticks[TickType.NICE.getIndex()] - prevTicks[TickType.NICE.getIndex()]; + long irq = ticks[TickType.IRQ.getIndex()] - prevTicks[TickType.IRQ.getIndex()]; + long softirq = ticks[TickType.SOFTIRQ.getIndex()] - prevTicks[TickType.SOFTIRQ.getIndex()]; + long steal = ticks[TickType.STEAL.getIndex()] - prevTicks[TickType.STEAL.getIndex()]; + long cSys = ticks[TickType.SYSTEM.getIndex()] - prevTicks[TickType.SYSTEM.getIndex()]; + long user = ticks[TickType.USER.getIndex()] - prevTicks[TickType.USER.getIndex()]; + long iowait = ticks[TickType.IOWAIT.getIndex()] - prevTicks[TickType.IOWAIT.getIndex()]; + long idle = ticks[TickType.IDLE.getIndex()] - prevTicks[TickType.IDLE.getIndex()]; + long totalCpu = user + nice + cSys + idle + iowait + irq + softirq + steal; + cpu.setCpuNum(processor.getLogicalProcessorCount()); + cpu.setTotal(totalCpu); + cpu.setSys(cSys); + cpu.setUsed(user); + cpu.setWait(iowait); + cpu.setFree(idle); + } + + /** + * 设置内存信息 + */ + private void setMemInfo(GlobalMemory memory) { + mem.setTotal(memory.getTotal()); + mem.setUsed(memory.getTotal() - memory.getAvailable()); + mem.setFree(memory.getAvailable()); + } + + /** + * 设置服务器信息 + */ + private void setSysInfo() { + Properties props = System.getProperties(); + sys.setComputerName(IpUtils.getHostName()); + sys.setComputerIp(IpUtils.getHostIp()); + sys.setOsName(props.getProperty("os.name")); + sys.setOsArch(props.getProperty("os.arch")); + sys.setUserDir(props.getProperty("user.dir")); + } + + /** + * 设置Java虚拟机 + */ + private void setJvmInfo() throws UnknownHostException { + Properties props = System.getProperties(); + jvm.setTotal(Runtime.getRuntime().totalMemory()); + jvm.setMax(Runtime.getRuntime().maxMemory()); + jvm.setFree(Runtime.getRuntime().freeMemory()); + jvm.setVersion(props.getProperty("java.version")); + jvm.setHome(props.getProperty("java.home")); + } + + /** + * 设置磁盘信息 + */ + private void setSysFiles(OperatingSystem os) { + FileSystem fileSystem = os.getFileSystem(); + OSFileStore[] fsArray = fileSystem.getFileStores(); + for (OSFileStore fs : fsArray) { + long free = fs.getUsableSpace(); + long total = fs.getTotalSpace(); + long used = total - free; + SysFile sysFile = new SysFile(); + sysFile.setDirName(fs.getMount()); + sysFile.setSysTypeName(fs.getType()); + sysFile.setTypeName(fs.getName()); + sysFile.setTotal(convertFileSize(total)); + sysFile.setFree(convertFileSize(free)); + sysFile.setUsed(convertFileSize(used)); + sysFile.setUsage(Arith.mul(Arith.div(used, total, 4), 100)); + sysFiles.add(sysFile); + } + } + + /** + * 字节转换 + * + * @param size 字节大小 + * @return 转换后值 + */ + public String convertFileSize(long size) { + long kb = 1024; + long mb = kb * 1024; + long gb = mb * 1024; + if (size >= gb) { + return String.format("%.1f GB", (float) size / gb); + } else if (size >= mb) { + float f = (float) size / mb; + return String.format(f > 100 ? "%.0f MB" : "%.1f MB", f); + } else if (size >= kb) { + float f = (float) size / kb; + return String.format(f > 100 ? "%.0f KB" : "%.1f KB", f); + } else { + return String.format("%d B", size); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/TreeSelect.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/TreeSelect.java new file mode 100644 index 0000000..6b31ad4 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/TreeSelect.java @@ -0,0 +1,71 @@ +package com.alonginfo.framework.web.domain; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.alonginfo.project.system.domain.SysDept; +import com.alonginfo.project.system.domain.SysMenu; + +import java.io.Serializable; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Treeselect树结构实体类 + */ +public class TreeSelect implements Serializable { + private static final long serialVersionUID = 1L; + + /** 节点ID */ + private Long id; + + /** 节点名称 */ + private String label; + + /** 子节点 */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + + public TreeSelect() { + } + + public TreeSelect(SysDept dept) { + this.id = dept.getDeptId(); + this.label = dept.getDeptName(); + this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); + } + + public TreeSelect(SysMenu menu) { + this.id = menu.getMenuId(); + this.label = menu.getMenuName(); + this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); + } + + public Long getId() + { + return id; + } + + public void setId(Long id) + { + this.id = id; + } + + public String getLabel() + { + return label; + } + + public void setLabel(String label) + { + this.label = label; + } + + public List getChildren() + { + return children; + } + + public void setChildren(List children) + { + this.children = children; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Cpu.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Cpu.java new file mode 100644 index 0000000..3913d96 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Cpu.java @@ -0,0 +1,98 @@ +package com.alonginfo.framework.web.domain.server; + +import com.alonginfo.common.utils.Arith; + +/** + * CPU相关信息 + */ +public class Cpu { + /** + * 核心数 + */ + private int cpuNum; + + /** + * CPU总的使用率 + */ + private double total; + + /** + * CPU系统使用率 + */ + private double sys; + + /** + * CPU用户使用率 + */ + private double used; + + /** + * CPU当前等待率 + */ + private double wait; + + /** + * CPU当前空闲率 + */ + private double free; + + public int getCpuNum() + { + return cpuNum; + } + + public void setCpuNum(int cpuNum) + { + this.cpuNum = cpuNum; + } + + public double getTotal() + { + return Arith.round(Arith.mul(total, 100), 2); + } + + public void setTotal(double total) + { + this.total = total; + } + + public double getSys() + { + return Arith.round(Arith.mul(sys / total, 100), 2); + } + + public void setSys(double sys) + { + this.sys = sys; + } + + public double getUsed() + { + return Arith.round(Arith.mul(used / total, 100), 2); + } + + public void setUsed(double used) + { + this.used = used; + } + + public double getWait() + { + return Arith.round(Arith.mul(wait / total, 100), 2); + } + + public void setWait(double wait) + { + this.wait = wait; + } + + public double getFree() + { + return Arith.round(Arith.mul(free / total, 100), 2); + } + + public void setFree(double free) + { + this.free = free; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Jvm.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Jvm.java new file mode 100644 index 0000000..84b3660 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Jvm.java @@ -0,0 +1,119 @@ +package com.alonginfo.framework.web.domain.server; + +import com.alonginfo.common.utils.Arith; +import com.alonginfo.common.utils.DateUtils; + +import java.lang.management.ManagementFactory; + +/** + * JVM相关信息 + */ +public class Jvm { + /** + * 当前JVM占用的内存总数(M) + */ + private double total; + + /** + * JVM最大可用内存总数(M) + */ + private double max; + + /** + * JVM空闲内存(M) + */ + private double free; + + /** + * JDK版本 + */ + private String version; + + /** + * JDK路径 + */ + private String home; + + public double getTotal() + { + return Arith.div(total, (1024 * 1024), 2); + } + + public void setTotal(double total) + { + this.total = total; + } + + public double getMax() + { + return Arith.div(max, (1024 * 1024), 2); + } + + public void setMax(double max) + { + this.max = max; + } + + public double getFree() + { + return Arith.div(free, (1024 * 1024), 2); + } + + public void setFree(double free) + { + this.free = free; + } + + public double getUsed() + { + return Arith.div(total - free, (1024 * 1024), 2); + } + + public double getUsage() + { + return Arith.mul(Arith.div(total - free, total, 4), 100); + } + + /** + * 获取JDK名称 + */ + public String getName() + { + return ManagementFactory.getRuntimeMXBean().getVmName(); + } + + public String getVersion() + { + return version; + } + + public void setVersion(String version) + { + this.version = version; + } + + public String getHome() + { + return home; + } + + public void setHome(String home) + { + this.home = home; + } + + /** + * JDK启动时间 + */ + public String getStartTime() { + return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate()); + } + + /** + * JDK运行时间 + */ + public String getRunTime() + { + return DateUtils.getDatePoor(DateUtils.getNowDate(), DateUtils.getServerStartDate()); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Mem.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Mem.java new file mode 100644 index 0000000..d89d21f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Mem.java @@ -0,0 +1,60 @@ +package com.alonginfo.framework.web.domain.server; + +import com.alonginfo.common.utils.Arith; + +/** + * 內存相关信息 + * + * @author sdj + */ +public class Mem { + /** + * 内存总量 + */ + private double total; + + /** + * 已用内存 + */ + private double used; + + /** + * 剩余内存 + */ + private double free; + + public double getTotal() + { + return Arith.div(total, (1024 * 1024 * 1024), 2); + } + + public void setTotal(long total) + { + this.total = total; + } + + public double getUsed() + { + return Arith.div(used, (1024 * 1024 * 1024), 2); + } + + public void setUsed(long used) + { + this.used = used; + } + + public double getFree() + { + return Arith.div(free, (1024 * 1024 * 1024), 2); + } + + public void setFree(long free) + { + this.free = free; + } + + public double getUsage() + { + return Arith.mul(Arith.div(used, total, 4), 100); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Sys.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Sys.java new file mode 100644 index 0000000..0d2c1bb --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Sys.java @@ -0,0 +1,81 @@ +package com.alonginfo.framework.web.domain.server; + +/** + * 系统相关信息 + */ +public class Sys { + /** + * 服务器名称 + */ + private String computerName; + + /** + * 服务器Ip + */ + private String computerIp; + + /** + * 项目路径 + */ + private String userDir; + + /** + * 操作系统 + */ + private String osName; + + /** + * 系统架构 + */ + private String osArch; + + public String getComputerName() + { + return computerName; + } + + public void setComputerName(String computerName) + { + this.computerName = computerName; + } + + public String getComputerIp() + { + return computerIp; + } + + public void setComputerIp(String computerIp) + { + this.computerIp = computerIp; + } + + public String getUserDir() + { + return userDir; + } + + public void setUserDir(String userDir) + { + this.userDir = userDir; + } + + public String getOsName() + { + return osName; + } + + public void setOsName(String osName) + { + this.osName = osName; + } + + public String getOsArch() + { + return osArch; + } + + public void setOsArch(String osArch) + { + this.osArch = osArch; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/SysFile.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/SysFile.java new file mode 100644 index 0000000..9f23206 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/SysFile.java @@ -0,0 +1,111 @@ +package com.alonginfo.framework.web.domain.server; + +/** + * 系统文件相关信息 + */ +public class SysFile { + /** + * 盘符路径 + */ + private String dirName; + + /** + * 盘符类型 + */ + private String sysTypeName; + + /** + * 文件类型 + */ + private String typeName; + + /** + * 总大小 + */ + private String total; + + /** + * 剩余大小 + */ + private String free; + + /** + * 已经使用量 + */ + private String used; + + /** + * 资源的使用率 + */ + private double usage; + + public String getDirName() + { + return dirName; + } + + public void setDirName(String dirName) + { + this.dirName = dirName; + } + + public String getSysTypeName() + { + return sysTypeName; + } + + public void setSysTypeName(String sysTypeName) + { + this.sysTypeName = sysTypeName; + } + + public String getTypeName() + { + return typeName; + } + + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public String getTotal() + { + return total; + } + + public void setTotal(String total) + { + this.total = total; + } + + public String getFree() + { + return free; + } + + public void setFree(String free) + { + this.free = free; + } + + public String getUsed() + { + return used; + } + + public void setUsed(String used) + { + this.used = used; + } + + public double getUsage() + { + return usage; + } + + public void setUsage(double usage) + { + this.usage = usage; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/exception/GlobalExceptionHandler.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/exception/GlobalExceptionHandler.java new file mode 100644 index 0000000..eeef480 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/exception/GlobalExceptionHandler.java @@ -0,0 +1,105 @@ +package com.alonginfo.framework.web.exception; + +import com.alonginfo.common.constant.HttpStatus; +import com.alonginfo.common.exception.BaseException; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.common.exception.DemoModeException; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.access.AccessDeniedException; +import org.springframework.security.authentication.AccountExpiredException; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.validation.BindException; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.NoHandlerFoundException; + +/** + * 全局异常处理器 + */ +@RestControllerAdvice +public class GlobalExceptionHandler { + private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); + + /** + * 基础异常 + */ + @ExceptionHandler(BaseException.class) + public AjaxResult baseException(BaseException e) + { + return AjaxResult.error(e.getMessage()); + } + + /** + * 业务异常 + */ + @ExceptionHandler(CustomException.class) + public AjaxResult businessException(CustomException e) { + if (StringUtils.isNull(e.getCode())) { + return AjaxResult.error(e.getMessage()); + } + return AjaxResult.error(e.getCode(), e.getMessage()); + } + + @ExceptionHandler(NoHandlerFoundException.class) + public AjaxResult handlerNoFoundException(Exception e) { + log.error(e.getMessage(), e); + return AjaxResult.error(HttpStatus.NOT_FOUND, "路径不存在,请检查路径是否正确"); + } + + @ExceptionHandler(AccessDeniedException.class) + public AjaxResult handleAuthorizationException(AccessDeniedException e) { + log.error(e.getMessage()); + return AjaxResult.error(HttpStatus.FORBIDDEN, "没有权限,请联系管理员授权"); + } + + @ExceptionHandler(AccountExpiredException.class) + public AjaxResult handleAccountExpiredException(AccountExpiredException e) { + log.error(e.getMessage(), e); + return AjaxResult.error(e.getMessage()); + } + + @ExceptionHandler(UsernameNotFoundException.class) + public AjaxResult handleUsernameNotFoundException(UsernameNotFoundException e) { + log.error(e.getMessage(), e); + return AjaxResult.error(e.getMessage()); + } + + @ExceptionHandler(Exception.class) + public AjaxResult handleException(Exception e) { + log.error(e.getMessage(), e); + return AjaxResult.error(e.getMessage()); + } + + /** + * 自定义验证异常 + */ + @ExceptionHandler(BindException.class) + public AjaxResult validatedBindException(BindException e) { + log.error(e.getMessage(), e); + String message = e.getAllErrors().get(0).getDefaultMessage(); + return AjaxResult.error(message); + } + + /** + * 自定义验证异常 + */ + @ExceptionHandler(MethodArgumentNotValidException.class) + public Object validExceptionHandler(MethodArgumentNotValidException e) { + log.error(e.getMessage(), e); + String message = e.getBindingResult().getFieldError().getDefaultMessage(); + return AjaxResult.error(message); + } + + /** + * 演示模式异常 + */ + @ExceptionHandler(DemoModeException.class) + public AjaxResult demoModeException(DemoModeException e) + { + return AjaxResult.error("演示模式,不允许操作"); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/PageDomain.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/PageDomain.java new file mode 100644 index 0000000..7b90b0e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/PageDomain.java @@ -0,0 +1,64 @@ +package com.alonginfo.framework.web.page; + +import com.alonginfo.common.utils.StringUtils; + +/** + * 分页数据 + */ +public class PageDomain { + /** 当前记录起始索引 */ + private Integer pageNum; + /** 每页显示记录数 */ + private Integer pageSize; + /** 排序列 */ + private String orderByColumn; + /** 排序的方向 "desc" 或者 "asc". */ + private String isAsc; + + public String getOrderBy() { + if (StringUtils.isEmpty(orderByColumn)) { + return ""; + } + return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc; + } + + public Integer getPageNum() + { + return pageNum; + } + + public void setPageNum(Integer pageNum) + { + this.pageNum = pageNum; + } + + public Integer getPageSize() + { + return pageSize; + } + + public void setPageSize(Integer pageSize) + { + this.pageSize = pageSize; + } + + public String getOrderByColumn() + { + return orderByColumn; + } + + public void setOrderByColumn(String orderByColumn) + { + this.orderByColumn = orderByColumn; + } + + public String getIsAsc() + { + return isAsc; + } + + public void setIsAsc(String isAsc) + { + this.isAsc = isAsc; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableDataInfo.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableDataInfo.java new file mode 100644 index 0000000..1dc003c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableDataInfo.java @@ -0,0 +1,80 @@ +package com.alonginfo.framework.web.page; + +import java.io.Serializable; +import java.util.List; + +/** + * 表格分页数据对象 + */ +public class TableDataInfo implements Serializable { + private static final long serialVersionUID = 1L; + + /** 总记录数 */ + private long total; + + /** 列表数据 */ + private List rows; + + /** 消息状态码 */ + private int code; + + /** 消息内容 */ + private int msg; + + /** + * 表格数据对象 + */ + public TableDataInfo() { + } + + /** + * 分页 + * + * @param list 列表数据 + * @param total 总记录数 + */ + public TableDataInfo(List list, int total) { + this.rows = list; + this.total = total; + } + + public long getTotal() + { + return total; + } + + public void setTotal(long total) + { + this.total = total; + } + + public List getRows() + { + return rows; + } + + public void setRows(List rows) + { + this.rows = rows; + } + + public int getCode() + { + return code; + } + + public void setCode(int code) + { + this.code = code; + } + + public int getMsg() + { + return msg; + } + + public void setMsg(int msg) + { + this.msg = msg; + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableSupport.java b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableSupport.java new file mode 100644 index 0000000..9db08c8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableSupport.java @@ -0,0 +1,45 @@ +package com.alonginfo.framework.web.page; + +import com.alonginfo.common.utils.ServletUtils; + +/** + * 表格数据处理 + */ +public class TableSupport { + /** + * 当前记录起始索引 + */ + public static final String PAGE_NUM = "pageNum"; + + /** + * 每页显示记录数 + */ + public static final String PAGE_SIZE = "pageSize"; + + /** + * 排序列 + */ + public static final String ORDER_BY_COLUMN = "orderByColumn"; + + /** + * 排序的方向 "desc" 或者 "asc". + */ + public static final String IS_ASC = "isAsc"; + + /** + * 封装分页对象 + */ + public static PageDomain getPageDomain() { + PageDomain pageDomain = new PageDomain(); + pageDomain.setPageNum(ServletUtils.getParameterToInt(PAGE_NUM)); + pageDomain.setPageSize(ServletUtils.getParameterToInt(PAGE_SIZE)); + pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN)); + pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC)); + return pageDomain; + } + + public static PageDomain buildPageRequest() + { + return getPageDomain(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxBusinessDataController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxBusinessDataController.java new file mode 100644 index 0000000..f81a8af --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxBusinessDataController.java @@ -0,0 +1,558 @@ +package com.alonginfo.project.business.controller; + +import com.alibaba.fastjson.JSONObject; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.FileTypeDetector; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.config.MxConfig; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.business.domain.MxTableColumn; +import com.alonginfo.project.business.service.IMxBusinessDataService; +import com.alonginfo.project.tool.FileUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import java.io.*; +import java.text.DecimalFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; + +import static com.alonginfo.common.utils.DateUtils.YYYY_MM_DD_HH_MM_SS; + +/** + * @Description 业务数据管理 + * @Author Yalon + * @Date 2020-03-13 12:36 + * @Version mxdata_v + */ +@Api("业务数据管理") +@RestController +@Slf4j +@RequestMapping("/businiss/mxbusinessdata") +public class MxBusinessDataController extends BaseController { + + /** + * 业务数据管理业务层接口 + */ + @Autowired + private IMxBusinessDataService mxBusinessDataService; + + /** + * 查询业务表信息 表名称和表备注 + * tableName tableComment + * + * @return + */ + @ApiOperation("查询业务表信息") + @PostMapping("/getTableInfos") + public AjaxResult getTableInfos() { + try { + return AjaxResult.success(mxBusinessDataService.getTableInfos()); + }catch (Exception e){ + e.printStackTrace(); + return AjaxResult.error("操作失败"); + } + } + + /** + * 根据表名称查询表字段信息 + * + * @param tableName 表名称 + * @return + */ + @ApiOperation("根据表名称查询表字段信息") + @PostMapping("/getColumnByTableName") + public AjaxResult getColumnByTableName(String tableName) { + try { + return AjaxResult.success(mxBusinessDataService.getColumnByTableName(tableName)); + }catch (Exception e){ + e.printStackTrace(); + return AjaxResult.error("操作失败"); + } + } + + /** + * 根据表名称查询表数据 + * + * @param tableName 表名 + * @return + */ + @ApiOperation("根据表名称查询表数据") + @PostMapping("/getTableDataByTableName") + public TableDataInfo getTableDataByTableName(String tableName) { + startPage(); + try { + return getDataTable(mxBusinessDataService.getTableDataByTableName(tableName)); + } catch (Exception e) { + return new TableDataInfo(); + } + } + + /** + * 根据表名 表主键 主键值删除表数据 + * + * @param tableName 表名 + * @param tableKey 表主键 + * @param keyValue 主键值 + * @return + */ + @ApiOperation("根据表名 表主键 主键值删除表数据") + @PostMapping("/removeDataByKey") + public AjaxResult removeDataByKey(String tableName, String tableKey, String keyValue) { + //检查必要参数是否为空 + if (StringUtils.isEmpty(new String[]{tableName, tableKey, keyValue})) { + return AjaxResult.error("删除表数据必要参数有空!"); + } + //组装参数map + Map params = new HashMap<>(3); + params.put("tableName", tableName); + params.put("tableKey", tableKey); + params.put("keyValue", keyValue); + return toAjax(mxBusinessDataService.removeDataByKey(params)); + } + + /** + * 根据表名 主键名 主键值 数据MAP 更新数据 + * + * @param tableName 表名 + * @param tableKey 表主键 + * @param keyValue 主键值 + * @param dataJson 数据JSON + * @return + */ + @ApiOperation("根据表名 表主键 主键值 数据map 更新表数据") + @PostMapping("/updateDataByKey") + public AjaxResult updateDataByKey(String tableName, String tableKey, String keyValue, String dataJson) { + //检查必要参数是否为空 + if (StringUtils.isEmpty(new String[]{tableName, tableKey, keyValue, dataJson})) { + return AjaxResult.error("更新表数据必要参数有空!"); + } + //组装数据map + Map dataMap = JSONObject.parseObject(dataJson); + //数据map为空 返回操作失败 + if (StringUtils.isEmpty(dataMap)) { + return toAjax(0); + } + //组装参数map + Map params = new HashMap<>(4); + params.put("tableName", tableName); + params.put("tableKey", tableKey); + params.put("keyValue", keyValue); + params.put("dataMap", dataMap); + try { + if (mxBusinessDataService.updateDataByKey(params) > 0) { + return AjaxResult.success("修改数据成功"); + } else { + return AjaxResult.error("修改0条数据"); + } + } catch (Exception e) { + log.error("修改业务表数据失败!", e); + return AjaxResult.error("修改业务表数据失败!"); + } + } + + /** + * 根据表名 数据MAP 新增数据 + * + * @param tableName 表名 + * @param dataJson 数据JSON + * @return + */ + @ApiOperation("根据表名 表主键 主键值 数据map 新增表数据") + @PostMapping("/insertData") + public AjaxResult insertData(String tableName, String dataJson) { + //检查必要参数是否为空 + if (StringUtils.isEmpty(new String[]{tableName, dataJson})) { + return AjaxResult.error("更新表数据必要参数有空!"); + } + //组装数据map + Map dataMap = JSONObject.parseObject(dataJson); + //数据map为空 返回操作失败 + if (StringUtils.isEmpty(dataMap)) { + return toAjax(0); + } + //组装参数map + Map params = new HashMap<>(2); + params.put("tableName", tableName); + params.put("dataMap", dataMap); + try { + if (mxBusinessDataService.insertData(params) > 0) { + return AjaxResult.success("新增数据成功"); + } else { + return AjaxResult.error("新增0条数据"); + } + } catch (Exception e) { + log.error("插入业务表数据失败!", e); + return AjaxResult.error("插入业务表数据失败!"); + } + } + + /** + * 导出表模板 + * + * @param tableName 表名字 + * @return 下载url + */ + @ApiOperation("导出表模板") + @GetMapping("/exportHeadExcel") + public AjaxResult exportHeadExcel(String tableName) { + //获取列名 + List columns = mxBusinessDataService.getColumnByTableName(tableName); + //根据表名获取表注释名 + String tableNameCN = mxBusinessDataService.getTableCNName(tableName); + //组装头map + Map headMap = new LinkedHashMap<>(); + for (MxTableColumn column : columns) { + if (!"PRI".equals(column.getColumnKey()) + && !"tdate".equals(column.getColumnName()) + && !"update_time".equals(column.getColumnName())) { + headMap.put(column.getColumnName(), column.getColumnComment()); + } + } + //String fileName = exportExcel(headMap, new ArrayList<>(0), tableName); + //return AjaxResult.success(fileName); + String file = exportExcelTemplate(headMap, tableName, tableNameCN); + return AjaxResult.success(file); + } + + @ApiOperation("批量导入") + @PostMapping("/importData") + @Transactional(rollbackFor = RuntimeException.class) + public AjaxResult importData(MultipartFile file, String tableName) throws IOException { + String fileName2 = file.getOriginalFilename(); + String extension = ""; + boolean validExtension = false; + boolean validExtension2 = false; + if (fileName2 != null && fileName2.contains(".")) { + extension = fileName2.substring(fileName2.lastIndexOf(".")); + String[] validExtensions = {"xlsx","xls"}; + String fileType = FileTypeDetector.getFileType(file); + validExtension = FileUtil.isValidExtension(extension, validExtensions); + validExtension2 = FileUtil.isValidExtension(fileType, validExtensions); + } + if(validExtension && validExtension2){ + List> maps = null; + try { + maps = importExcel(file.getInputStream()); + } catch (Exception e) { + log.error("导入数据时读取文件流失败", e); + return toAjax(0); + } + if (StringUtils.isEmpty(maps)) { + return AjaxResult.error("Excel文件无数据!"); + } + mxBusinessDataService.delData(tableName); + Integer rows = 0; + for (Map dataMap : maps) { + //组装参数map + Map params = new HashMap<>(2); + params.put("tableName", tableName); + params.put("dataMap", dataMap); + rows += mxBusinessDataService.insertData(params); + } + return toAjax(rows); + }else{ + return AjaxResult.error(); + } + } + + /** + * 导出EXCEL + * + * @param header excel头 {headCode:headName} + * @param data [{headCode:value}] + * @param fileName 文件名 + * @return 文件名 + */ + private String exportExcel(Map header, List> data, String fileName) { + OutputStream out = null; + Workbook wb = null; + try { + // 1.创建workbook + wb = new SXSSFWorkbook(500); + // 2.创建工作簿sheet + Sheet sheet = wb.createSheet(); + // 3.设置两行表头 + Row row1 = sheet.createRow(0); + Row row2 = sheet.createRow(1); + //循环表头 插入工作簿的前两行 + int mapIndex = 0; + for (Map.Entry entry : header.entrySet()) { + //第一行写code + Cell row1Cell = row1.createCell(mapIndex); + row1Cell.setCellValue(entry.getKey()); + //第二行写标题 + Cell row2Cell = row2.createCell(mapIndex); + row2Cell.setCellValue(entry.getValue().toString()); + //index+1 + mapIndex++; + } + // 隐藏第一行code + row1.setZeroHeight(true); + // 4.循环写入数据 + for (int i = 0; i < data.size(); i++) { + Row row = sheet.createRow(i + 2); + int j = 0; + for (Map.Entry entry : header.entrySet()) { + Cell cell = row1.createCell(j); + cell.setCellValue(data.get(i).get(entry.getKey()).toString()); + j++; + } + } + // 5.处理文件名 + fileName = UUID.randomUUID().toString() + "_" + fileName + ".xlsx"; + String downloadPath = MxConfig.getDownloadPath() + fileName; + File desc = new File(downloadPath); + if (!desc.getParentFile().exists()) { + desc.getParentFile().mkdirs(); + } + out = new FileOutputStream(downloadPath); + wb.write(out); + } catch (Exception e) { + log.error("导出Excel异常", e); + throw new CustomException("导出Excel失败,请联系网站管理员!"); + } finally { + if (wb != null) { + try { + wb.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + if (out != null) { + try { + out.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + } + return fileName; + } + + /** + * 读取excel数据 + * + * @param is 文件流 + * @return 数据集 + */ + private List> importExcel(InputStream is) throws Exception { + Workbook wb = null; + // 1.获取workbook + wb = WorkbookFactory.create(is); + // 2.获取第一个工作簿 + Sheet sheet = wb.getSheetAt(0); + if (sheet == null) { + throw new IOException("文件sheet不存在"); + } + // 3.获取表头 构造map + Map headCodeMap = new HashMap<>(); + Row headCode = sheet.getRow(0); + for (int i = 0; i < headCode.getPhysicalNumberOfCells(); i++) { + Cell cell = headCode.getCell(i); + String value = null; + if (cell != null) { + value = cell.getStringCellValue(); + } + headCodeMap.put(i, value); + } + //循环数据 构造数据list + int rows = sheet.getPhysicalNumberOfRows(); + List> dataList = new ArrayList<>(); + for (int i = 3; i < rows; i++) { + Map dataMap = new HashMap<>(); + Row row = sheet.getRow(i); + for (Map.Entry entry : headCodeMap.entrySet()) { + Cell cell = row.getCell(entry.getKey()); + Object val = null; + if (cell != null) { + if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA) { + val = cell.getNumericCellValue(); + if (HSSFDateUtil.isCellDateFormatted(cell)) { + // POI Excel 日期格式转换 + val = DateUtils.parseDateToStr(YYYY_MM_DD_HH_MM_SS, DateUtil.getJavaDate((Double) val)); + } else { + if ((Double) val % 1 > 0) { + val = new DecimalFormat("0.00").format(val); + } else { + val = new DecimalFormat("0").format(val); + } + } + } else if (cell.getCellTypeEnum() == CellType.STRING) { + val = cell.getStringCellValue(); + } else if (cell.getCellTypeEnum() == CellType.BOOLEAN) { + val = cell.getBooleanCellValue(); + } else if (cell.getCellTypeEnum() == CellType.ERROR) { + val = cell.getErrorCellValue(); + } + + } + if (val != null) { + dataMap.put(entry.getValue(), val.toString()); + } + } + //避免空行情况 一直添加空map进去 + if (!CollectionUtils.isEmpty(dataMap)) { + dataList.add(dataMap); + } + } + return dataList; + } + + /** + * 业务数据表 excel模板 (新) + * + * @param header 表头字段集合 + * @param tableName 表名 + * @param tableCNName 表中文注释名称 + */ + private String exportExcelTemplate(Map header, String tableName, String tableCNName) { + OutputStream out = null; + Workbook workbook = null; + try { + //创建工作簿 + workbook = new XSSFWorkbook(); + //创建sheet + Sheet sheet = workbook.createSheet(); + + //公共样式 + CellStyle commonStyle = commonExcelStyle(workbook); + + //定义样式 + //表名行样式定义 + CellStyle tableNameCellStyle = workbook.createCellStyle(); + tableNameCellStyle.cloneStyleFrom(commonStyle); + //设置背景色 + tableNameCellStyle.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex()); + tableNameCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + + //创建字体 + Font font = workbook.createFont(); + font.setFontName("Arial"); + font.setBold(true); + font.setColor(IndexedColors.WHITE.getIndex()); + font.setFontHeightInPoints((short) 18); + tableNameCellStyle.setFont(font); + + + //字段中文名行样式定义 + CellStyle columnNameCellStyle = workbook.createCellStyle(); + columnNameCellStyle.cloneStyleFrom(commonStyle); + Font secondFont = workbook.createFont(); + secondFont.setFontName("Arial"); + secondFont.setFontHeightInPoints((short) 12); + secondFont.setBold(true); + columnNameCellStyle.setFont(secondFont); + + //创建三行 + //第一行存放字段名 第二行表中文注释 第三行字段中文名 + Row row0 = sheet.createRow(0); + Row row1 = sheet.createRow(1); + Row row2 = sheet.createRow(2); + + int cellIndex = 0; + for (Map.Entry entry : header.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + //第一行存放字段名 + Cell cell0 = row0.createCell(cellIndex); + cell0.setCellValue(key); + //第二行表中文注释 单元格合并 + Cell cell1 = row1.createCell(cellIndex); + cell1.setCellStyle(tableNameCellStyle); + //第三行字段中文名 + Cell cell2 = row2.createCell(cellIndex); + cell2.setCellValue(value.toString()); + cell2.setCellStyle(columnNameCellStyle); + cellIndex++; + } + for (int i = 3; i <= 50; i++) { + Row row = sheet.createRow(i); + row.setHeightInPoints(25); + for (int j = 0; j < header.entrySet().size(); j++) { + Cell cell = row.createCell(j); + cell.setCellStyle(commonStyle); + } + } + //第一行隐藏 + row0.setZeroHeight(true); + row1.setHeightInPoints(35); + row2.setHeightInPoints(30); + //第二行合并 + sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, cellIndex - 1)); + row1.getCell(0).setCellValue(tableCNName); + + //列宽 + for (int i = 0; i <= cellIndex - 1; i++) { + sheet.setColumnWidth(i, 30 * 256); + } + + // 5.处理文件名 + //tableName = UUID.randomUUID().toString() + "_" + tableName + ".xlsx"; + tableName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + "_" + tableCNName + ".xlsx"; + String downloadPath = MxConfig.getDownloadPath() + tableName; + File desc = new File(downloadPath); + if (!desc.getParentFile().exists()) { + desc.getParentFile().mkdirs(); + } + out = new FileOutputStream(downloadPath); + workbook.write(out); + } catch (Exception e) { + log.error("导出Excel异常", e); + throw new CustomException("导出Excel失败,请联系网站管理员!"); + } finally { + if (workbook != null) { + try { + workbook.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + if (out != null) { + try { + out.close(); + } catch (IOException e1) { + e1.printStackTrace(); + } + } + } + return tableName; + } + + /** + * Excel公共样式 + * + * @param workbook + * @return + */ + private CellStyle commonExcelStyle(Workbook workbook) { + CellStyle cellStyle = workbook.createCellStyle(); + //设置边框 BorderStyle.THIN 细线 + cellStyle.setBorderTop(BorderStyle.THIN); + cellStyle.setBorderBottom(BorderStyle.THIN); + cellStyle.setBorderLeft(BorderStyle.THIN); + cellStyle.setBorderRight(BorderStyle.THIN); + //水平居中、垂直居中 + cellStyle.setAlignment(HorizontalAlignment.CENTER); + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + return cellStyle; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxComponentsController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxComponentsController.java new file mode 100644 index 0000000..df53443 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxComponentsController.java @@ -0,0 +1,88 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.domain.MxComponents; +import com.alonginfo.project.business.domain.MxComponentsType; +import com.alonginfo.project.business.domain.MxDatabase; +import com.alonginfo.project.business.service.IMxComponentsService; +import com.alonginfo.utils.DBUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author Li先生 + * 组件管理 + */ +@Api("控件管理") +@RestController +@RequestMapping("/businiss/mxcomponents") +public class MxComponentsController extends BaseController { + + + @Autowired + IMxComponentsService mxComponentsService; + + // 添加组件类型 + @ApiOperation("添加组件类型") + @PostMapping("/addMxComponentsType") + public AjaxResult insertMxComponentsType(@RequestBody MxComponentsType mxComponentsType) { + return AjaxResult.success(mxComponentsService.insertMxComponentsType(mxComponentsType)); + } + // 删除组件类型 + @ApiOperation("删除组件类型") + @DeleteMapping("/deleteMxComponentsType/{comTypeId}") + public AjaxResult deleteMxComponentsType(@PathVariable("comTypeId") String comTypeId) { + return AjaxResult.success(mxComponentsService.deleteMxComponentsType(comTypeId)); + } + // 修改组件类型 + @ApiOperation("修改组件类型") + @PutMapping("/editMxComponentsType") + public AjaxResult editMxComponentsType(@RequestBody MxComponentsType mxComponentsType) { + return AjaxResult.success(mxComponentsService.editMxComponentsType(mxComponentsType)); + } + // 查询组件类型 list + @ApiOperation("查询组件类型-list") + @GetMapping("/listMxComponentsType") + public AjaxResult listMxComponentsType(@RequestBody(required = false) MxComponentsType mxComponentsType) { + return AjaxResult.success(mxComponentsService.listMxComponentsType()); + } + + /** + * 获取所有的组件信息 + * @param mxComponents + * @return + */ + @ApiOperation("查询所有的组件信息") + @GetMapping("/getAllCompinfo") + public AjaxResult getAllCompinfo(@RequestBody(required = false) MxComponents mxComponents) { + return AjaxResult.success(mxComponentsService.getAllCompinfo()); + } + + // 新增组件 + @ApiOperation("添加组件") + @PostMapping("/addMxComponents") + public AjaxResult insertMxComponents(@RequestBody MxComponents mxComponents) { + return AjaxResult.success(mxComponentsService.insertMxComponents(mxComponents)); + } + // 删除组件 + @ApiOperation("删除组件") + @DeleteMapping("/deleteMxComponents/{comId}") + public AjaxResult deleteMxComponents(@PathVariable("comId") String comId) { + return AjaxResult.success(mxComponentsService.deleteMxComponents(comId)); + } + // 删除组件 根据组件类型id + @ApiOperation("根据组件类型id 删除组件") + @DeleteMapping("/deleteMxComponentsByComTypeId/{comTypeId}") + public AjaxResult deleteMxComponentsByComTypeId(@PathVariable("comTypeId") String comTypeId) { + return AjaxResult.success(mxComponentsService.deleteMxComponentsByComTypeId(comTypeId)); + } + // 修改组件 + @ApiOperation("修改组件") + @PutMapping("/editMxComponents") + public AjaxResult editMxComponents(@RequestBody MxComponents mxComponents) { + return AjaxResult.success(mxComponentsService.editMxComponents(mxComponents)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDataSetController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDataSetController.java new file mode 100644 index 0000000..7add437 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDataSetController.java @@ -0,0 +1,134 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.datasource.DynamicDataSourceContextHolder; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.business.domain.MxDataGroup; +import com.alonginfo.project.business.domain.MxDataSet; +import com.alonginfo.project.business.service.IMxDataSetService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * @author Li先生 + * 数据集管理 + */ +@Api("数据集管理") +@RestController +@RequestMapping("/businiss/mxdataset") +public class MxDataSetController extends BaseController { + + @Autowired + IMxDataSetService mxDataSetService; + + // 数据集分组相关 ====================================== + + + /** + * 获取数据集分组列表+数据集列表 + */ + @ApiOperation("获取数据集分组+数据集列表") + @GetMapping("/mxDataGroupAndDataSetList") + public AjaxResult mxDataGrouplist() { + return AjaxResult.success(mxDataSetService.selectMxDataGroupList()); + } + + /** + * 添加数据集分组 + * @param mxDataGroup + */ + @ApiOperation("添加数据集分组") + @PostMapping("/addMxDataGroup") + public AjaxResult addMxDataGroup(@RequestBody MxDataGroup mxDataGroup){ + return toAjax(mxDataSetService.addMxDataGroup(mxDataGroup)) ; + } + + /** + * 删除数据集分组 + * @param dGroupId + */ + @ApiOperation("删除数据集分组") + @DeleteMapping("/deleteMxDataGroup/{dGroupId}") + public AjaxResult deleteMxDataGroup(@PathVariable("dGroupId") String dGroupId){ + return toAjax(mxDataSetService.deleteMxDataGroup(dGroupId)) ; + } + + /** + * 修改数据集分组 + * @param mxDataGroup + */ + @ApiOperation("修改数据集分组") + @PutMapping("/editMxDataGroup") + public AjaxResult editMxDataGroup(@RequestBody MxDataGroup mxDataGroup){ + return toAjax(mxDataSetService.editMxDataGroup(mxDataGroup)) ; + } + + // 数据集相关 ===================================== + + /** + * 根据数据集id 获取数据集实例 + */ + @ApiOperation("根据数据集id,获取数据集实例") + @GetMapping("/getMxDataSet/{dsId}") + public AjaxResult getMxDataSet(@PathVariable("dsId") String dsId) { + return AjaxResult.success(mxDataSetService.getMxDataSet(dsId)); + } + + /** + * 根据数据集 (数据源id+sql) 展示查询结果 + * @param mxDataSet + * @return + */ + @ApiOperation("执行sql展示结果") + @PostMapping("/showResult") + public TableDataInfo showResult(@RequestBody MxDataSet mxDataSet ){ + // change数据源 + DynamicDataSourceContextHolder.setDataSourceType(mxDataSet.getDatabaseId()); + startPage(); + List> list = mxDataSetService.executeSql(mxDataSet); + DynamicDataSourceContextHolder.clearDataSourceType(); + return getDataTable(list); + + } + + /** + * 添加数据集 + * @param mxDataSet + */ + @ApiOperation("添加数据集") + @PostMapping("/addMxDataSet") + public AjaxResult addMxDataSet(@RequestBody MxDataSet mxDataSet){ + // change数据源 + DynamicDataSourceContextHolder.setDataSourceType(mxDataSet.getDatabaseId()); + return toAjax(mxDataSetService.addMxDataSet(mxDataSet)) ; + } + + /** + * 删除数据集 + * @param dsId + */ + @ApiOperation("删除数据集") + @DeleteMapping("/deleteMxDataSet/{dsId}") + public AjaxResult deleteMxDataSet(@PathVariable("dsId") String dsId){ + return toAjax(mxDataSetService.deleteMxDataSet(dsId)) ; + } + + /** + * 修改数据集 + * @param mxDataSet + */ + @ApiOperation("修改数据集") + @PutMapping("/editMxDataSet") + public AjaxResult editMxDataSet(@RequestBody MxDataSet mxDataSet){ + + return toAjax(mxDataSetService.addMxDataSet(mxDataSet)) ; + } + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDatabaseController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDatabaseController.java new file mode 100644 index 0000000..f078e25 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDatabaseController.java @@ -0,0 +1,122 @@ +package com.alonginfo.project.business.controller; + +import com.alibaba.druid.filter.config.ConfigTools; +import com.alonginfo.common.utils.sign.Base64; +import com.alonginfo.framework.datasource.DynamicDataSourceContextHolder; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.business.domain.MxDataSet; +import com.alonginfo.project.business.domain.MxDatabase; +import com.alonginfo.project.business.service.IMxDatabaseService; +import com.alonginfo.utils.DBUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map; + +/** + * @author Li先生 + * 数据源管理 + */ +@Api("数据源管理") +@RestController +@RequestMapping("/businiss/mxdatabase") +public class MxDatabaseController extends BaseController { + + @Autowired + IMxDatabaseService mxDatabaseService; + + /** + * 获取数据源列表 + */ + @ApiOperation("获取数据源列表-分页") + @GetMapping("/list") + public TableDataInfo list(@RequestBody(required = false) MxDatabase mxDatabase) { + startPage(); + List mxDatabases = mxDatabaseService.selectMxDatabaseList(mxDatabase); + return getDataTable(mxDatabases ); + } + + /** + * 获取数据源列表-全部不分页 + */ + @ApiOperation("获取数据源列表-全部") + @GetMapping("/listall") + public AjaxResult listall() { + List mxDatabases = mxDatabaseService.selectMxDatabaseList(null); + return AjaxResult.success(mxDatabases); + } + + + + /** + * 根据id获取对象 + */ + @ApiOperation("根据id获取对象") + @GetMapping("/{id}") + public AjaxResult getMxDatabase(@PathVariable String id ) { + return AjaxResult.success(mxDatabaseService.getMxDatabase(id)); + } + + /** + * 新增数据 + */ + @ApiOperation("新增数据") + @PostMapping("/add") + public AjaxResult insertMxDatabase(@RequestBody MxDatabase mxDatabase) { + String password = URLDecoder.decode(new String(Base64.decode(mxDatabase.getPassword()), StandardCharsets.UTF_8)); + mxDatabase.setPassword(password); + AjaxResult test = DBUtil.TestMxDatabase(mxDatabase); + if (Integer.parseInt(test.get("code").toString()) != 200 ) { + return test; + } else { + return toAjax(mxDatabaseService.insertMxDatabase(mxDatabase)); + } + } + + /** + * 删除数据 + */ + @ApiOperation("删除数据") + @DeleteMapping("/{id}") + public AjaxResult deleteMxDatabase(@PathVariable String id) { + return toAjax(mxDatabaseService.deleteMxDatabase(id)); + } + + /** + * 修改数据 + */ + @ApiOperation("修改数据") + @PutMapping("/edit") + public AjaxResult editMxDatabase(@RequestBody MxDatabase mxDatabase) { + String password = URLDecoder.decode(new String(Base64.decode(mxDatabase.getPassword()), StandardCharsets.UTF_8)); + mxDatabase.setPassword(password); + AjaxResult test = DBUtil.TestMxDatabase(mxDatabase); + if (Integer.parseInt(test.get("code").toString()) != 200 ) { + return test; + } else { + return toAjax(mxDatabaseService.editMxDatabase(mxDatabase)); + } + } + + /** + * 加密 + */ + @ApiOperation("加密") + @PostMapping("/encrypt") + public AjaxResult encrypt(@RequestBody MxDatabase mxDatabase) { + try { + return AjaxResult.success(ConfigTools.encrypt(mxDatabase.getPassword() == null ? "" : mxDatabase.getPassword())); + } catch (Exception e) { + e.printStackTrace(); + } + return AjaxResult.error("加密错误!"); + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxGroupSettingController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxGroupSettingController.java new file mode 100644 index 0000000..d0457fc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxGroupSettingController.java @@ -0,0 +1,89 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.domain.MxGroupSetting; +import com.alonginfo.project.business.service.IMxGroupSettingService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 配置Controller + * @author LM + * @date 2020-03-10 + */ +@Api("配置操作") +@Controller +@RequestMapping("/business/mxgroupsetting") +public class MxGroupSettingController extends BaseController +{ + + @Autowired + private IMxGroupSettingService mxGroupSettingService; + + + /** + * 查询配置列表 + */ + @ApiOperation("查询配置列表") + @GetMapping("/list") + @ResponseBody + public AjaxResult list(MxGroupSetting mxGroupSetting) + { + List list = mxGroupSettingService.selectMxGroupSettingList(mxGroupSetting); + return AjaxResult.success(list); + } + + + + /** + * 新增保存配置 + */ + @ApiOperation("新增保存配置") + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(@RequestBody MxGroupSetting mxGroupSetting) + { + return toAjax(mxGroupSettingService.insertMxGroupSetting(mxGroupSetting)); + } + + /** + * 修改配置 + * @param mxGroupSetting + * @return + */ + @ApiOperation("修改配置") + @PutMapping("/edit") + @ResponseBody + public AjaxResult editSave(@RequestBody MxGroupSetting mxGroupSetting) + { + return toAjax(mxGroupSettingService.updateMxGroupSetting(mxGroupSetting)); + } + + /** + * 删除配置 + */ + @ApiOperation("删除配置") + @DeleteMapping( "/remove/{settingId}") + @ResponseBody + public AjaxResult remove(@PathVariable("settingId") String settingId) + { + return toAjax(mxGroupSettingService.deleteMxGroupSettingById(settingId)); + } + + /** + * 根据id 查询配置 + */ + @ApiOperation("根据id 查询配置") + @GetMapping( "/get/{settingId}") + @ResponseBody + public AjaxResult get(@PathVariable("settingId") String settingId) + { + return AjaxResult.success(mxGroupSettingService.selectMxGroupSettingById(settingId)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxIntroduceController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxIntroduceController.java new file mode 100644 index 0000000..5539f5e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxIntroduceController.java @@ -0,0 +1,57 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.service.IMxIntroduceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description 解说词管理 控制层 + * @Author Yalon + * @Date 2020-11-18 16:59 + * @Version mxdata_v + */ +@RestController +@RequestMapping("/businiss/mxintroduce") +public class MxIntroduceController { + + @Autowired + private IMxIntroduceService introduceService; + + /** + * 获取所有的工程及工程下的主题 + * @return + */ + @PostMapping("/getProjectPage") + public AjaxResult getProjectPage() { + return AjaxResult.success(introduceService.getProjectPage()); + } + + /** + * 根据主题ID 获取解说词 + * @param pageId 主题ID + * @return + */ + @PostMapping("/getIntroduceByPage") + public AjaxResult getIntroduceByPage(String pageId) { + return AjaxResult.success(introduceService.getIntroduceByPage(pageId)); + } + + /** + * 保存解说词 + * @param pageId 主题ID + * @param introduce 解说词 + * @return + */ + @PostMapping("/saveIntroduce") + public AjaxResult saveIntroduce(String pageId, String introduce) { + try { + introduceService.saveIntroduce(pageId, introduce); + return AjaxResult.success(); + } catch (Exception e) { + return AjaxResult.error(); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxPageGroupController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxPageGroupController.java new file mode 100644 index 0000000..70e153c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxPageGroupController.java @@ -0,0 +1,145 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.domain.MxPageGroup; +import com.alonginfo.project.business.service.IMxPageGroupService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 分组信息Controller + * + * @author LM + * @date 2020-03-10 + */ +@Api("分组信息") +@Controller +@RequestMapping("/business/mxpagegroup") +public class MxPageGroupController extends BaseController +{ + + @Autowired + private IMxPageGroupService mxPageGroupService; + + + /** + * 查询分组信息列表 + */ + @ApiOperation("查询分组列表") + @GetMapping("/list") + @ResponseBody + public AjaxResult list(MxPageGroup mxPageGroup) + { + List list = mxPageGroupService.selectMxPageGroupList(mxPageGroup); + return AjaxResult.success(list); + } + + /** + * 新增保存分组信息 + */ + @ApiOperation("新增分组信息") + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(@RequestBody MxPageGroup mxPageGroup) + { + return toAjax(mxPageGroupService.insertMxPageGroup(mxPageGroup)); + } + + + /** + * 修改保存分组信息 + */ + @ApiOperation("修改分组信息") + @PutMapping("/edit") + @ResponseBody + public AjaxResult editSave(@RequestBody MxPageGroup mxPageGroup) + { + return toAjax(mxPageGroupService.updateMxPageGroup(mxPageGroup)); + } + + /** + * 删除分组信息 + */ + @ApiOperation("删除分组信息") + @DeleteMapping( "/remove/{groupId}") + @ResponseBody + public AjaxResult remove(@PathVariable("groupId") String groupId) + { + return toAjax(mxPageGroupService.deleteMxPageGroupById(groupId)); + } + + /** + * 根据id 获取分组信息 + */ + @ApiOperation("根据id获取分组信息") + @GetMapping( "/get/{groupId}") + @ResponseBody + public AjaxResult get(@PathVariable("groupId") String groupId) + { + return AjaxResult.success(mxPageGroupService.selectMxPageGroupById(groupId)); + } + + /** + * 删除分组中的主题 + */ + @ApiOperation("删除分组中的主题") + @DeleteMapping( "/removePageInGroup/{groupId}/{themeId}") + @ResponseBody + public AjaxResult removePageInGroup(@PathVariable("groupId") String groupId,@PathVariable("themeId") String themeId) + { + return toAjax(mxPageGroupService.removePageInGroup(groupId,themeId)); + } + + /** + * 添加主题到分组 + */ + @ApiOperation("添加主题到分组") + @PostMapping("/addPageToGroup") + @ResponseBody + public AjaxResult addPageToGroup(@RequestBody MxPageGroup mxPageGroup) + { + return toAjax(mxPageGroupService.addPageToGroup(mxPageGroup)); + } + + + /** + * 获取工程列表 + */ + @ApiOperation("获取工程列表 ") + @GetMapping( "/getProjectList") + @ResponseBody + public AjaxResult getProjectList() + { + return AjaxResult.success(mxPageGroupService.getProjectList()); + } + + /** + * 根据工程id 获取主题列表 + */ + @ApiOperation("根据工程id 获取主题列表") + @GetMapping( "/getPagesList/{proId}") + @ResponseBody + public AjaxResult getPagesList(@PathVariable("proId") String proId) + { + return AjaxResult.success(mxPageGroupService.getPagesList(proId)); + } + + + /** + * 修改分组主题排序 + */ + @ApiOperation("修改分组主题排序") + @PostMapping("/editOrderNum") + @ResponseBody + public AjaxResult editOrderNum(@RequestBody MxPageGroup mxPageGroup) + { + return toAjax(mxPageGroupService.editOrderNum(mxPageGroup)); + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxQuartzController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxQuartzController.java new file mode 100644 index 0000000..654e51f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxQuartzController.java @@ -0,0 +1,110 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.business.service.IMxQuartzService; +import com.alonginfo.quartz.domain.SysJob; +import com.alonginfo.quartz.utils.CronUtils; +import org.quartz.SchedulerException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description 定时任务界面 Controller层 + * @Author Haoxs + * @Date 2021-04-26 16:16 + */ +@RestController +@RequestMapping("/quartz") +public class MxQuartzController extends BaseController { + + @Autowired + private IMxQuartzService iMxQuartzService; + + @Autowired + private TokenService tokenService; + + /** + * 获取所有定时任务列表 + * @return + */ + @GetMapping("/getAllQuartzList") + public TableDataInfo getQuartzList(SysJob job) { + startPage(); + return getDataTable(iMxQuartzService.getQuartzList(job)); + } + + /** + * 修改定时任务状态 + * @param job + * @return + */ + @PostMapping("/changeStatus") + public AjaxResult changeStatus(@RequestBody SysJob job) { + try { + SysJob newJob = iMxQuartzService.selectJobById(job.getJobId()); + newJob.setStatus(job.getStatus()); + newJob.setUpdateBy("admin"); + iMxQuartzService.changeStatus(newJob); + return AjaxResult.success("定时任务:"+ job.getJobName() + ", 已成功" + ("0".equals(job.getStatus()) ? "运行!" : "停止!")); + } catch (SchedulerException e) { + e.printStackTrace(); + return AjaxResult.error("定时任务状态修改失败!"); + } + } + + /** + * 新增定时任务 + * @param job + * @return + */ + @PostMapping("/add") + public AjaxResult addQuartz(@RequestBody SysJob job) { + try { + if (!CronUtils.isValid(job.getCronExpression())) { + return AjaxResult.error("cron表达式不正确!"); + } + iMxQuartzService.insertJob(job); + return AjaxResult.success("新增定时任务:" + job.getJobName() + "成功!"); + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("新增定时任务失败!"); + } + } + + /** + * 立即执行定时任务 + * @param job + * @return + */ + @PostMapping("/run") + public AjaxResult runQuartz(@RequestBody SysJob job) { + try { + iMxQuartzService.runJob(job); + return AjaxResult.success("定时任务:" + job.getJobName() + ", 开始执行!"); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("定时任务立即执行失败!"); + } + } + + /** + * 立即执行所有定时任务 + * @param jobList + * @return + */ + @PostMapping("/runAll") + public AjaxResult runAllQuartz(@RequestBody List jobList) { + try { + iMxQuartzService.runAllJob(jobList); + return AjaxResult.success("启动成功! 所有定时任务将被执行一遍!"); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("立即执行所有定时任务失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxRedisController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxRedisController.java new file mode 100644 index 0000000..b94fb72 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxRedisController.java @@ -0,0 +1,28 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * @author Li先生 + */ +@Controller +@RequestMapping("/business/redis") +public class MxRedisController { + + @Autowired + RedisCache redisCache; + + // 根据数据集分组id 查找数据集及数据集对应的字段列名 + @GetMapping("/clear") + @ResponseBody + public AjaxResult mxDataqueryDataSetBydGroupId(){ + redisCache.deleteAllKeys(); + return AjaxResult.success(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxShowDataSetController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxShowDataSetController.java new file mode 100644 index 0000000..fc99ea1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxShowDataSetController.java @@ -0,0 +1,61 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.domain.MxDataInfo; +import com.alonginfo.project.business.domain.MxDataSet; +import com.alonginfo.project.business.domain.MxPageGroup; +import com.alonginfo.project.business.service.IMxShowDataSetService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + * @author Li先生 + * 预览页面 数据集数据加载 免登陆 + */ +@Controller +@RequestMapping("/mxDatav_dataSet") +public class MxShowDataSetController { + + + @Autowired + IMxShowDataSetService mxShowDataSetService; + + @PostMapping("/data") + @ResponseBody + public AjaxResult getData(@RequestBody MxDataInfo mxDataInfo){ + return mxShowDataSetService.getData(mxDataInfo); + + } + +// @PostMapping("/getDataByAjaxId") +// @ResponseBody +// public AjaxResult getDataByAjaxId(@RequestBody MxDataSet mxDataSet){ +// return mxShowDataSetService.getDataByAjaxId(mxDataSet); +// +// } + + // 查询数据集所有分组列表 + @GetMapping("/mxDataqueryGroup") + @ResponseBody + public AjaxResult mxDataqueryGroup(){ + return AjaxResult.success(mxShowDataSetService.mxDataqueryGroup()); + } + // 根据数据集分组id 查找数据集及数据集对应的字段列名 +// @GetMapping("/mxDataqueryDataSetBydGroupId/{dGroupId}") +// @ResponseBody +// public AjaxResult mxDataqueryDataSetBydGroupId(@PathVariable("dGroupId") String dGroupId){ +// return AjaxResult.success(mxShowDataSetService.mxDataqueryDataSetBydGroupId(dGroupId)); +// } + + + // 根据page_path 查找主题id+配置信息 + @PostMapping("/listPagesByGroupPagePath") + @ResponseBody + public AjaxResult listPagesByGroupPagePath(@RequestBody MxPageGroup mxPageGroup){ + return AjaxResult.success(mxShowDataSetService.listPagesByGroupPagePath(mxPageGroup.getPagePath())); + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/WebSocketController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/WebSocketController.java new file mode 100644 index 0000000..c16db52 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/WebSocketController.java @@ -0,0 +1,91 @@ +package com.alonginfo.project.business.controller; + + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.system.service.ISysConfigService; +import com.alonginfo.websocket.server.WebSocketServer; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.Map; + +/** + * @Description websocket控制层,负责接受前端的指令然后向全部会话推送 + * @Author Yalon + * @Date 2020-03-06 10:05 + * @Version mxdata_v + */ +@RestController +@RequestMapping("/business/websocket") +@Slf4j +public class WebSocketController { + + /** + * 注入socket服务 + */ + @Autowired + private WebSocketServer webSocketServer; + + @Autowired + private ISysConfigService sysConfigService; + + /** + * 推送消息 + * @param jsonMsg + */ + @GetMapping("/testPush") + public void list(String jsonMsg) { + log.info("收到前端推送请求,推送内容为{}", jsonMsg); + log.info("----开始推送----"); + webSocketServer.sendMessageToAll(jsonMsg); + log.info("----推送结束----"); + } + + /** + * 推送消息 + * @param groupId 推送给的主题分组ID,没有则推送全部 + * @param jsonMsg 要推送的消息 可以是JSON 例如 {"cmd":"goto","pageNum":1} + */ + @PostMapping("/pushMsg") + public AjaxResult pushMsg(String groupId, String jsonMsg, String themeId) { + if (StringUtils.isEmpty(groupId)) { + //为空 推送全部 + webSocketServer.sendMessageToAll(jsonMsg); + } else { + //不为空 则 推送给themeId + webSocketServer.sendMessageToAssignUser(groupId, jsonMsg); + } + //解说词 + Map introduce = new HashMap<>(); + if (StringUtils.isEmpty(themeId)) { + return AjaxResult.success(introduce); + } + //查询解说词 + String introduceByThemeId = sysConfigService.getIntroduceByThemeId(themeId); + introduce.put("introduce", introduceByThemeId); + return AjaxResult.success(introduce); + } + + /** + * 请求所有在线主题 + */ + @PostMapping("/getOnlineThemeGroups") + public AjaxResult getOnlineThemeGroups() { + return AjaxResult.success(webSocketServer.getOnlineThemeGroups()); + } + + /** + * 获取websocket地址 + * @return + */ + @PostMapping("/getWebsocketAddress") + public AjaxResult getWebsocketAddress() { + return AjaxResult.success(sysConfigService.selectConfigByKey("websocket.address")); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/YwMonthTransactionController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/YwMonthTransactionController.java new file mode 100644 index 0000000..7698343 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/YwMonthTransactionController.java @@ -0,0 +1,50 @@ +package com.alonginfo.project.business.controller; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.service.YwMonthTransactionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description 月度直接交易 + * @Author Haoxs + * @Date 2021-10-21 16:53 + */ +@RestController +@RequestMapping("/monthTransaction") +public class YwMonthTransactionController { + + @Autowired + private YwMonthTransactionService ywMonthTransactionService; + + /** + * 获取月度交易列表 + * @return + */ + @GetMapping("/getTransactionList") + public AjaxResult getTransactionList() { + try { + return AjaxResult.success(ywMonthTransactionService.getTransactionList()); + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("获取月度交易列表失败!"); + } + } + + /** + * 获取交易明细数据 + * @return + */ + @GetMapping("/getTransactionDetailed") + public AjaxResult getTransactionDetailed(String month) { + try { + return AjaxResult.success(ywMonthTransactionService.getTransactionDetailed(month)); + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("获取月度交易明细失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/DataSetMenu.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/DataSetMenu.java new file mode 100644 index 0000000..e9d7128 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/DataSetMenu.java @@ -0,0 +1,16 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +import java.util.List; + +/** + * @author Li先生 + */ +@Data +public class DataSetMenu { + private String name; + private String id; + private Integer dGroupSort; + private List children; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponents.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponents.java new file mode 100644 index 0000000..35e6849 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponents.java @@ -0,0 +1,19 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +/** + * @author Li先生 + * 组件 + */ +@Data +public class MxComponents { + private String comId; + private String comTypeId; + private String comName; + private String comAliasName; + private String remark; + private Integer enabled; + private String comPngUrl; + private String createDate; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponentsType.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponentsType.java new file mode 100644 index 0000000..0d99284 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponentsType.java @@ -0,0 +1,19 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +import java.util.List; + +/** + * @author Li先生 + * 组件类型表 + */ +@Data +public class MxComponentsType { + private String comTypeId; + private String comTypeName; + private String remark; + private String createDate; + + private List children; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataGroup.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataGroup.java new file mode 100644 index 0000000..357c861 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataGroup.java @@ -0,0 +1,16 @@ +package com.alonginfo.project.business.domain; + +import lombok.Builder; +import lombok.Data; + +/** + * @author Li先生 + * 业务分类 + */ +@Data +public class MxDataGroup { + private String dGroupId; + private String dGroupName; + private int dGroupSort; + private String createTime; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataInfo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataInfo.java new file mode 100644 index 0000000..d1ed2be --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataInfo.java @@ -0,0 +1,17 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +import java.util.List; + +/** + * @author Li先生 + */ +@Data +public class MxDataInfo { + private Integer type; + private String dsId; + private List name; + private List label; + private List value; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSet.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSet.java new file mode 100644 index 0000000..361b572 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSet.java @@ -0,0 +1,22 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +import java.util.List; + +/** + * @author Li先生 + * 数据集 + */ +@Data +public class MxDataSet { + private String dsId; + private String dsName; + private String databaseId; + private String dataSql; + private String dGroupId; + private String hasParam; + private String ajaxId; + private String param; + List dataSetKeys; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSetKey.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSetKey.java new file mode 100644 index 0000000..f4e0b39 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSetKey.java @@ -0,0 +1,15 @@ +package com.alonginfo.project.business.domain; + +import lombok.Builder; +import lombok.Data; + +/** + * @author Li先生 + * 数据集 key + */ +@Data +public class MxDataSetKey { + private String keyId; + private String keyName; + private String dsId; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDatabase.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDatabase.java new file mode 100644 index 0000000..9f84855 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDatabase.java @@ -0,0 +1,22 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +/** + * @author Li先生 + * 数据源 实体类 + */ +@Data +public class MxDatabase { + // + private String id; + private String aliasName; + private String configName; + private String type; + private String driverClass; + private String username; + private String password; + private String url; + private String createDate; + private String isOpen; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxGroupSetting.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxGroupSetting.java new file mode 100644 index 0000000..02e362a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxGroupSetting.java @@ -0,0 +1,32 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +/** + * 配置主题对象 mx_group_setting + * + * @author LM + * @date 2020-03-10 + */ +@Data +public class MxGroupSetting +{ + /** 配置id */ + private String settingId; + + /** 配置名称 */ + private String settingName; + + /** 是否自动切换 */ + private String autoSwitch; + + /** 切换动画 */ + private Long switchAnimation; + + /** 切换时长 */ + private Long switchTime; + + /** 配置描述 */ + private String description; + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxPageGroup.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxPageGroup.java new file mode 100644 index 0000000..993a6a8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxPageGroup.java @@ -0,0 +1,44 @@ +package com.alonginfo.project.business.domain; + +import com.alonginfo.project.engine.domain.ThemeManager; +import com.github.pagehelper.Page; +import lombok.Data; + +import java.util.List; + +/** + * 分组信息对象 mx_page_group + * + * @author LM + * @date 2020-03-10 + */ +@Data +public class MxPageGroup +{ + private static final long serialVersionUID = 1L; + + /** 分组id */ + private String groupId; + + /** 分组名称 */ + private String groupName; + + /** 分组访问地址 */ + private String pagePath; + + /** 分组关联配置信息 */ + private String settingId; + + /** 分组描述 */ + private String description; + + /** 分组描述 */ + private String createTime; + + /** 设置信息*/ + private MxGroupSetting mxGroupSetting; + + private List themeManagers; + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableColumn.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableColumn.java new file mode 100644 index 0000000..4c95f64 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableColumn.java @@ -0,0 +1,39 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +/** + * @Description 表字段实体类 + * @Author Yalon + * @Date 2020-03-16 10:59 + * @Version mxdata_v + */ +@Data +public class MxTableColumn { + + /** + * 字段名 + */ + private String columnName; + + /** + * 字段类型 + */ + private String columnType; + + /** + * 是否可控 YES NO + */ + private String isNullable; + + /** + * 字段键 PRI 主键 + */ + private String columnKey; + + /** + * 字段备注 + */ + private String columnComment; + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableInfo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableInfo.java new file mode 100644 index 0000000..9107799 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableInfo.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.business.domain; + +import lombok.Data; + +import java.util.Date; + +/** + * @Description 业务表信息实体类 + * @Author Yalon + * @Date 2020-03-16 9:31 + * @Version mxdata_v + */ +@Data +public class MxTableInfo { + + /** + * 表名 + */ + private String tableName; + + /** + * 表备注 + */ + private String tableComment; + + private String deal_value; + + + private Date updateTime; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxBusinessDataMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxBusinessDataMapper.java new file mode 100644 index 0000000..73b3e5c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxBusinessDataMapper.java @@ -0,0 +1,78 @@ +package com.alonginfo.project.business.mapper; + +import com.alonginfo.project.business.domain.MxTableColumn; +import com.alonginfo.project.business.domain.MxTableInfo; +import com.alonginfo.project.system.domain.SysDictData; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @Description 业务数据管理mapper + * @Author Yalon + * @Date 2020-03-16 9:07 + * @Version mxdata_v + */ +@Mapper +public interface MxBusinessDataMapper { + + /** + * 根据业务表开头关键字集合 查询所有的表名字和备注 TABLE_NAME,TABLE_COMENT + * @param businessKeys 业务表开头关键字集合 + * @return + */ + List getTableInfos(List businessKeys); + + /** + * 根据表名称获取表的字段信息 + * @param tableName 表名称 + * @return + */ + List getColumnByTableName(@Param("tableName") String tableName); + + /** + * 根据表名查找数据 + * @param tableName + * @return + */ + List> getTableDataByTableName(@Param("tableName") String tableName); + + /** + * 根据表名 表主键 主键值删除表数据 + * @param params + * tableName 表名 tableKey主键名 keyValue 主键值 + * @return + */ + Integer removeDataByKey(@Param("params") Map params); + + /** + * 根据表名 主键名 主键值 数据MAP 更新数据 + * @param params + * tableName 表名 tableKey主键名 keyValue 主键值 dataMap数据映射 + * @return + */ + Integer updateDataByKey(@Param("params") Map params); + + /** + * 根据表名 数据MAP 插入数据 + * @param params + * tableName 表名 dataMap数据映射 + * @return + */ + Integer insertData(@Param("params") Map params); + + /** + * 根据表名获取表注释名称 + * @param tableName + * @return + */ + String getTableCNName(String tableName); + + /** + * 根据表名删除表数据 + * @param tableName + */ + void delDataByTableName(@Param("tableName") String tableName); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxComponentsMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxComponentsMapper.java new file mode 100644 index 0000000..fa4d137 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxComponentsMapper.java @@ -0,0 +1,43 @@ +package com.alonginfo.project.business.mapper; + +import com.alonginfo.project.business.domain.MxComponents; +import com.alonginfo.project.business.domain.MxComponentsType; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @author LM + * @create 2020-03-06 15:05 + */ +@Mapper +public interface MxComponentsMapper { + // 添加组件类型 + int insertMxComponentsType(MxComponentsType mxComponentsType); + // deleteMxComponentsType + int deleteMxComponentsType(String comTypeId); + // 修改组件类型 + int editMxComponentsType(MxComponentsType mxComponentsType); + // 查询组件类型 根据id + MxComponentsType getMxComponentsType(String comTypeId); + // 查询组件类型 list + List listMxComponentsType(); + // 新增组件 + int insertMxComponents(MxComponents mxComponents); + // 删除组件 + int deleteMxComponents(String comId); + // 修改组件 + int editMxComponents(MxComponents mxComponents); + // 根据图标组件ID 查询组件 + MxComponents getMxComponents(String comId); + // 根据组件类型id 查询组件list + List getMxComponentsBycomId(String comTypeId); + // 删除组件 根据组件类型id + int deleteMxComponentsByComTypeId(String comTypeId); + + /** + * 获取所有组件信息 + * @return + */ + List getAllCompinfo(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDataSetMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDataSetMapper.java new file mode 100644 index 0000000..4bed65b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDataSetMapper.java @@ -0,0 +1,107 @@ +package com.alonginfo.project.business.mapper; + +import com.alonginfo.project.business.domain.MxDataGroup; +import com.alonginfo.project.business.domain.MxDataSet; +import com.alonginfo.project.business.domain.MxDataSetKey; +import com.alonginfo.project.business.domain.MxPageGroup; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author LM + * @create 2020-03-05 9:25 + * 数据集管理 + */ +@Mapper +public interface MxDataSetMapper { + + /** + * 获取业务分类列表 + * @return + */ + List selectMxDataGroupList(); + + /** + * 添加数据集分组 + * @param mxDataGroup + */ + int addMxDataGroup(MxDataGroup mxDataGroup); + + /** + * 根据业务id获取数据集 + * @param dGroupId + * @return + */ + List getDataSetListByDGroupId(String dGroupId); + + /** + * 添加数据集 + * @param mxDataSet + * @return + */ + int addDataSet(MxDataSet mxDataSet); + + /** + * 根据sql 查询数据(动态sql) + * @param dataSql + * @return + */ + List> executeSql(Map params); + + /** + * 保存数据集key + * @param mxDataSetKey + */ + void addMxDtaSetKey(MxDataSetKey mxDataSetKey); + + /** + * 根据数据集id 删除相关的key信息 + * @param dsId + */ + void deleteMxDataSetKeyByDsId(String dsId); + + /** + * 根据id 删除数据集 + * @param dsId + * @return + */ + int deleteMxDataSetById(String dsId); + + /** + * 删除数据集分组 + * @param dGroupId + * @return + */ + int deleteMxDataGroup(String dGroupId); + + /** + * 修改数据集分组 + * @param mxDataGroup + * @return + */ + int editMxDataGroup(MxDataGroup mxDataGroup); + + /** + * 根据数据集id 获取实例 + * @param dsId + * @return + */ + MxDataSet getMxDataSet(String dsId); + + // 获取所有的mx_data_set_key + List listMxDataSetKey(); + // 根据page_path 查找主题id+配置信息 + List listPagesByGroupPagePath(String pagePath); + // 根据数据集分组id 查找数据集及数据集对应的字段列名 + List mxDataqueryDataSetBydGroupId(String dGroupId); + + /** + * 根据查询名称获取数据集 + * @param ajaxId + * @return + */ + List getDataSetListByAjaxId(@Param("ajaxId") String ajaxId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDatabaseMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDatabaseMapper.java new file mode 100644 index 0000000..49fc5f9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDatabaseMapper.java @@ -0,0 +1,48 @@ +package com.alonginfo.project.business.mapper; + +import com.alonginfo.project.business.domain.MxDatabase; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @author Li先生 + * 数据源 Mapper + */ +@Mapper +public interface MxDatabaseMapper { + /** + * 获取数据源列表 + * @param mxDatabase + * @return + */ + public List selectMxDatabaseList(MxDatabase mxDatabase); + + /** + * 插入数据 + * @param mxDatabase + * @return + */ + public int insertMxDatabase(MxDatabase mxDatabase); + + /** + * 删除数据 + * @param id + * @return + */ + int deleteMxDatabase(String id); + + /** + * 修改数据 + * @param mxDatabase + * @return + */ + int editMxDatabase(MxDatabase mxDatabase); + + /** + * 根据id获取对象 + * @param id + * @return + */ + MxDatabase getMxDatabase(String id); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxGroupSettingMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxGroupSettingMapper.java new file mode 100644 index 0000000..9111717 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxGroupSettingMapper.java @@ -0,0 +1,55 @@ +package com.alonginfo.project.business.mapper; + +import com.alonginfo.project.business.domain.MxGroupSetting; +import java.util.List; + +/** + * 配置Mapper接口 + * + * @author LM + * @date 2020-03-10 + */ +public interface MxGroupSettingMapper +{ + /** + * 查询配置 + * + * @param settingId 配置ID + * @return 配置 + */ + public MxGroupSetting selectMxGroupSettingById(String settingId); + + /** + * 查询配置列表 + * + * @param mxGroupSetting 配置 + * @return 配置集合 + */ + public List selectMxGroupSettingList(MxGroupSetting mxGroupSetting); + + /** + * 新增配置 + * + * @param mxGroupSetting 配置 + * @return 结果 + */ + public int insertMxGroupSetting(MxGroupSetting mxGroupSetting); + + /** + * 修改配置 + * + * @param mxGroupSetting 配置 + * @return 结果 + */ + public int updateMxGroupSetting(MxGroupSetting mxGroupSetting); + + /** + * 删除配置 + * + * @param settingId 配置ID + * @return 结果 + */ + public int deleteMxGroupSettingById(String settingId); + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxIntroduceMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxIntroduceMapper.java new file mode 100644 index 0000000..8dbecf1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxIntroduceMapper.java @@ -0,0 +1,43 @@ +package com.alonginfo.project.business.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @Description 解说词管理 mapper + * @Author Yalon + * @Date 2020-11-18 17:37 + * @Version mxdata_v + */ +public interface MxIntroduceMapper { + + /** + * 查找所有的工程 + * @return + */ + List> selectProject(); + + /** + * 根据工程ID 查找主题 + * @param proId + * @return + */ + List> selectPageByProject(@Param("proId") String proId); + + /** + * 根据主题ID 查找解说词 + * @param pageId 主题ID + * @return + */ + Map selectIntroduceByPage(@Param("pageId") String pageId); + + /** + * 更新解说词 + * @param pageId + * @param introduce + * @return + */ + Integer updateIntroduce(@Param("pageId") String pageId, @Param("introduce") String introduce); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxPageGroupMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxPageGroupMapper.java new file mode 100644 index 0000000..664c884 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxPageGroupMapper.java @@ -0,0 +1,110 @@ +package com.alonginfo.project.business.mapper; + +import com.alonginfo.project.business.domain.MxPageGroup; +import com.alonginfo.project.engine.domain.MxPages; +import com.alonginfo.project.engine.domain.MxProject; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 分组信息Mapper接口 + * + * @author LM + * @date 2020-03-10 + */ +@Mapper +public interface MxPageGroupMapper +{ + /** + * 查询分组信息 + * + * @param groupId 分组信息ID + * @return 分组信息 + */ + public MxPageGroup selectMxPageGroupById(String groupId); + + /** + * 查询分组信息列表 + * + * @param mxPageGroup 分组信息 + * @return 分组信息集合 + */ + public List selectMxPageGroupList(MxPageGroup mxPageGroup); + + /** + * 新增分组信息 + * + * @param mxPageGroup 分组信息 + * @return 结果 + */ + public int insertMxPageGroup(MxPageGroup mxPageGroup); + + /** + * 修改分组信息 + * + * @param mxPageGroup 分组信息 + * @return 结果 + */ + public int updateMxPageGroup(MxPageGroup mxPageGroup); + + /** + * 删除分组信息 + * + * @param groupId 分组信息ID + * @return 结果 + */ + public int deleteMxPageGroupById(String groupId); + + /** + * 删除分组&主题中间表信息 + * @param groupId + */ + int deleteMxPageMidGroupByGroupId(String groupId); + + /** + * 删除分组中的主题 + * @param groupId + * @param themeId + * @return + */ + int removePageInGroup(@Param("groupId") String groupId,@Param("themeId") String themeId); + + /** + * 添加主题到分组 + * @param mxPageGroup + * @return + */ + int addPageToGroup(MxPageGroup mxPageGroup); + + /** + * 获取工程列表 + * @return + */ + List getProjectList(); + + /** + * 根据工程id 获取主题列表 + * @param proId + * @return + */ + List getPagesList(String proId); + + /** + * 根据分组id 获取最大排序只(如果没有新增分组 返回0) + * @param groupId + * @return + */ + int getMaxOrderNum(String groupId); + + /** + * 修改分组主题排序 + * @param groupId + * @param themeId + * @param i + */ + void editOrderNum(@Param("groupId") String groupId,@Param("themeId") String themeId,@Param("orderNum") int orderNum); + // 根据page_path 查找主题id+配置信息 + List listPagesByGroupPagePath(String pagePath); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxQuartzMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxQuartzMapper.java new file mode 100644 index 0000000..4c2102e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxQuartzMapper.java @@ -0,0 +1,43 @@ +package com.alonginfo.project.business.mapper; + +import com.alonginfo.quartz.domain.SysJob; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * @Description 定时任务 数据层接口 + * @Author Haoxs + * @Date 2021-04-27 09:29 + */ +@Mapper +public interface MxQuartzMapper { + + /** + * 获取全部定时任务列表 + * @return + */ + List> getQuartzList(SysJob job); + + /** + * 通过id查询定时任务 + * @param jobId + * @return + */ + SysJob selectJobById(Long jobId); + + /** + * 更新定时任务 + * @param job + * @return + */ + int updateJob(SysJob job); + + /** + * 新增定时任务 + * @param job + * @return + */ + int insertJob(SysJob job); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/YwMonthTransactionMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/YwMonthTransactionMapper.java new file mode 100644 index 0000000..5293f6f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/YwMonthTransactionMapper.java @@ -0,0 +1,71 @@ +package com.alonginfo.project.business.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @Description 月度直接交易Mapper + * @Author Haoxs + * @Date 2021-10-21 18:34 + */ +public interface YwMonthTransactionMapper { + + /** + * 获取月度直接交易列表 + * @return + */ + List> getTransactionList(); + + /** + * 获取交易公告 + * @param transactionName + * @return + */ + Map getTransactionNotice(String transactionName); + + /** + * 根据月份获取购方竞价数据 + * @param month + * @param monthFlag + * @param transactionType + * @return + */ + Map getBuyerData(@Param("month") String month, + @Param("monthFlag") String monthFlag, + @Param("transactionType") Integer transactionType); + + /** + * 根据月份获取购方竞价明细 + * @param month + * @param monthFlag + * @param transactionType + * @return + */ + List> getBuyerDet(@Param("month") String month, + @Param("monthFlag") String monthFlag, + @Param("transactionType") Integer transactionType); + + /** + * 根据月份获取售方竞价数据 + * @param month + * @param monthFlag + * @param transactionType + * @return + */ + Map getSellerData(@Param("month") String month, + @Param("monthFlag") String monthFlag, + @Param("transactionType") Integer transactionType); + + /** + * 根据月份获取售方竞价明细 + * @param month + * @param monthFlag + * @param transactionType + * @return + */ + List> getSellerDet(@Param("month") String month, + @Param("monthFlag") String monthFlag, + @Param("transactionType") Integer transactionType); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxBusinessDataService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxBusinessDataService.java new file mode 100644 index 0000000..cb97835 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxBusinessDataService.java @@ -0,0 +1,73 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.project.business.domain.MxTableColumn; +import com.alonginfo.project.business.domain.MxTableInfo; + +import java.util.List; +import java.util.Map; + +/** + * @Description 业务数据管理 业务层接口 + * @Author Yalon + * @Date 2020-03-16 10:14 + * @Version mxdata_v + */ +public interface IMxBusinessDataService { + + /** + * 根据业务表开头关键字集合 查询所有的表名字和备注 + * @return 集合 tableName tableComment + */ + List getTableInfos(); + + /** + * 根据表名称获取表的字段信息 + * @param tableName 表名称 + * @return + */ + List getColumnByTableName(String tableName); + + /** + * 根据表名称获取表数据 + * @param tableName 表名称 + * @return + */ + List> getTableDataByTableName(String tableName); + + /** + * 根据表名 主键名 主键值 删除数据 + * @param params + * tableName 表名 tableKey主键名 keyValue 主键值 + * @return + */ + Integer removeDataByKey(Map params); + + /** + * 根据表名 主键名 主键值 数据MAP 更新数据 + * @param params + * tableName 表名 tableKey主键名 keyValue 主键值 dataMap数据映射 + * @return + */ + Integer updateDataByKey(Map params); + + /** + * 根据表名 数据MAP 新增数据 + * @param params + * tableName 表名 dataMap数据映射 + * @return + */ + Integer insertData(Map params); + + /** + * 根据表名获取表注释名 + * @param tableName + * @return + */ + String getTableCNName(String tableName); + + /** + * 根据表名删除表数据 + * @param tableName + */ + void delData(String tableName); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxComponentsService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxComponentsService.java new file mode 100644 index 0000000..e5ad2ca --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxComponentsService.java @@ -0,0 +1,42 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.project.business.domain.MxComponents; +import com.alonginfo.project.business.domain.MxComponentsType; + +import java.util.List; + +/** + * @author LM + * @create 2020-03-06 15:00 + * 组件service + */ +public interface IMxComponentsService { + // 添加组件类型 + int insertMxComponentsType(MxComponentsType mxComponentsType); + // 删除组件类型 + int deleteMxComponentsType(String comTypeId); + // 修改组件类型 + int editMxComponentsType(MxComponentsType mxComponentsType); + // 查询组件类型 根据id + MxComponentsType getMxComponentsType(String comTypeId); + // 查询组件类型 list + List listMxComponentsType(); + // 新增组件 + int insertMxComponents(MxComponents mxComponents); + // 删除组件 + int deleteMxComponents(String comId); + // 修改组件 + int editMxComponents(MxComponents mxComponents); + // 根据图标组件ID 查询组件 + MxComponents getMxComponents(String comId); + // 根据组件类型id 查询组件list + List getMxComponentsBycomId(String comTypeId); + // 删除组件 根据组件类型id + int deleteMxComponentsByComTypeId(String comTypeId); + + /** + * 获取所有的组件信息 + * @return + */ + List getAllCompinfo(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDataSetService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDataSetService.java new file mode 100644 index 0000000..4c145e3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDataSetService.java @@ -0,0 +1,84 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.project.business.domain.DataSetMenu; +import com.alonginfo.project.business.domain.MxDataGroup; +import com.alonginfo.project.business.domain.MxDataSet; +import com.alonginfo.project.business.domain.MxDataSetKey; + +import java.util.List; +import java.util.Map; + +/** + * @author LM + * @create 2020-03-05 9:17 + * 数据集管理 + */ +public interface IMxDataSetService { + /** + * 获取数据集分组+数据集列表 + * @return + */ + List selectMxDataGroupList(); + + /** + * 添加业务分类 + * @param mxDataGroup + */ + int addMxDataGroup(MxDataGroup mxDataGroup); + + /** + * 根据数据集分类id获取数据集 + * @param dGroupId + * @return + */ + List getDataSetListByDGroupId(String dGroupId); + + + /** + * 根据数据集 (数据源id+sql) 展示查询结果 + * @param mxDataSet + * @return + */ + List> executeSql(MxDataSet mxDataSet); + + /** + * 添加数据集 + * @param mxDataSet + * @return + */ + int addMxDataSet(MxDataSet mxDataSet); + + /** + * 删除数据集 + * @param dsId + * @return + */ + int deleteMxDataSet(String dsId); + + /** + * 删除数据集分组 + * @param dGroupId + * @return + */ + int deleteMxDataGroup(String dGroupId); + + /** + * 修改数据集分组 + * @param mxDataGroup + * @return + */ + int editMxDataGroup(MxDataGroup mxDataGroup); + + /** + * 根据数据集id 获取数据集实例 + * @param dsId + * @return + */ + MxDataSet getMxDataSet(String dsId); + + /** + * 获取所有mx_data_set_key + * @return + */ + List listMxDataSetKey(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDatabaseService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDatabaseService.java new file mode 100644 index 0000000..021b2f8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDatabaseService.java @@ -0,0 +1,49 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.project.business.domain.MxDataSet; +import com.alonginfo.project.business.domain.MxDatabase; + +import java.util.List; +import java.util.Map; + +/** + * @author Li先生 + * 数据源 业务接口 + */ +public interface IMxDatabaseService { + + /** + * 查询列表 + * @param mxDatabase + * @return + */ + List selectMxDatabaseList(MxDatabase mxDatabase); + + /** + * 插入数据 + */ + int insertMxDatabase(MxDatabase mxDatabase); + + /** + * 删除数据 + * @param id + * @return + */ + int deleteMxDatabase(String id); + + /** + * 修改数据 + * @param + * @return + */ + int editMxDatabase(MxDatabase mxDatabase); + + /** + * 根据id获取对象 + * @param id + * @return + */ + MxDatabase getMxDatabase(String id); + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxGroupSettingService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxGroupSettingService.java new file mode 100644 index 0000000..ba6e42c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxGroupSettingService.java @@ -0,0 +1,54 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.project.business.domain.MxGroupSetting; +import java.util.List; + +/** + * 配置Service接口 + * + * @author LM + * @date 2020-03-10 + */ +public interface IMxGroupSettingService +{ + /** + * 查询配置 + * + * @param settingId 配置ID + * @return 配置 + */ + public MxGroupSetting selectMxGroupSettingById(String settingId); + + /** + * 查询配置列表 + * + * @param mxGroupSetting 配置主题 + * @return 配置集合 + */ + public List selectMxGroupSettingList(MxGroupSetting mxGroupSetting); + + /** + * 新增配置 + * + * @param mxGroupSetting 配置 + * @return 结果 + */ + public int insertMxGroupSetting(MxGroupSetting mxGroupSetting); + + /** + * 修改配置 + * + * @param mxGroupSetting 配置 + * @return 结果 + */ + public int updateMxGroupSetting(MxGroupSetting mxGroupSetting); + + + /** + * 删除配置信息 + * + * @param settingId 配置ID + * @return 结果 + */ + public int deleteMxGroupSettingById(String settingId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxIntroduceService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxIntroduceService.java new file mode 100644 index 0000000..d01f406 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxIntroduceService.java @@ -0,0 +1,33 @@ +package com.alonginfo.project.business.service; + +import java.util.List; +import java.util.Map; + +/** + * @Description 解说词管理 业务层接口 + * @Author Yalon + * @Date 2020-11-18 17:16 + * @Version mxdata_v + */ +public interface IMxIntroduceService { + + /** + * 获取所有的工程及工程下的主题 + * @return + */ + List> getProjectPage(); + + /** + * 根据主题ID 获取解说词 + * @param pageId 主题ID + * @return + */ + Map getIntroduceByPage(String pageId); + + /** + * 保存解说词 + * @param pageId 主题ID + * @param introduce 解说词 + */ + void saveIntroduce(String pageId, String introduce); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxPageGroupService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxPageGroupService.java new file mode 100644 index 0000000..a0db2b7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxPageGroupService.java @@ -0,0 +1,93 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.project.business.domain.MxPageGroup; +import com.alonginfo.project.engine.domain.MxPages; +import com.alonginfo.project.engine.domain.MxProject; + +import java.util.List; + +/** + * 分组信息Service接口 + * + * @author LM + * @date 2020-03-10 + */ +public interface IMxPageGroupService +{ + /** + * 查询分组信息 + * + * @param groupId 分组信息ID + * @return 分组信息 + */ + public MxPageGroup selectMxPageGroupById(String groupId); + + /** + * 查询分组信息列表 + * + * @param mxPageGroup 分组信息 + * @return 分组信息集合 + */ + public List selectMxPageGroupList(MxPageGroup mxPageGroup); + + /** + * 新增分组信息 + * + * @param mxPageGroup 分组信息 + * @return 结果 + */ + public int insertMxPageGroup(MxPageGroup mxPageGroup); + + /** + * 修改分组信息 + * + * @param mxPageGroup 分组信息 + * @return 结果 + */ + public int updateMxPageGroup(MxPageGroup mxPageGroup); + + + + /** + * 删除分组信息信息 + * + * @param groupId 分组信息ID + * @return 结果 + */ + public int deleteMxPageGroupById(String groupId); + + /** + * 删除分组中的主题 + * @param groupId + * @param themeId + * @return + */ + int removePageInGroup(String groupId, String themeId); + + /** + * 添加主题到分组 + * @param mxPageGroup + * @return + */ + int addPageToGroup(MxPageGroup mxPageGroup); + + /** + * 获取工程列表 + * @return + */ + List getProjectList(); + + /** + * 根据工程id 获取主题列表 + * @param proId + * @return + */ + List getPagesList(String proId); + + /** + * 修改分组主题排序 + * @param mxPageGroup + * @return + */ + int editOrderNum(MxPageGroup mxPageGroup); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxQuartzService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxQuartzService.java new file mode 100644 index 0000000..d9c0b2b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxQuartzService.java @@ -0,0 +1,70 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.common.exception.job.TaskException; +import com.alonginfo.quartz.domain.SysJob; +import org.quartz.SchedulerException; + +import java.util.List; +import java.util.Map; + +/** + * @Description 定时任务 业务层接口 + * @Author Haoxs + * @Date 2021-04-26 16:19 + */ +public interface IMxQuartzService { + + /** + * 获取全部定时任务列表 + * @param job SysJob对象 + * @return + */ + List> getQuartzList(SysJob job); + + /** + * 通过id查询定时任务 + * @param jobId + * @return + */ + SysJob selectJobById(Long jobId); + + /** + * 修改调度任务状态 + * @param job + * @return + */ + int changeStatus(SysJob job) throws SchedulerException; + + /** + * 恢复任务 + * @param job + * @return + */ + int resumeJob(SysJob job) throws SchedulerException; + + /** + * 暂停任务 + * @param job + * @return + */ + int pause(SysJob job) throws SchedulerException; + + /** + * 新增定时任务 + * @param job + * @return + */ + int insertJob(SysJob job) throws TaskException, SchedulerException; + + /** + * 立即运行定时任务 + * @param job + */ + void runJob(SysJob job) throws SchedulerException; + + /** + * 立即运行所有定时任务 + * @param jobList + */ + void runAllJob(List jobList) throws SchedulerException; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxShowDataSetService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxShowDataSetService.java new file mode 100644 index 0000000..2365464 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxShowDataSetService.java @@ -0,0 +1,24 @@ +package com.alonginfo.project.business.service; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.domain.*; + +import java.util.List; +import java.util.Map; + +/** + * @author LM + * @create 2020-03-17 9:44 + */ +public interface IMxShowDataSetService { + AjaxResult getData(MxDataInfo mxDataInfo); + + // 查询数据集所有分组列表 + List mxDataqueryGroup(); + // 根据page_path 查找主题id+配置信息 + List listPagesByGroupPagePath(String pagePath); + // 根据数据集分组id 查找数据集及数据集对应的字段列名 + List mxDataqueryDataSetBydGroupId(String dGroupId); + //根据查询名称和参数查询数据集 + AjaxResult getDataByAjaxId(MxDataSet mxDataSet); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/YwMonthTransactionService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/YwMonthTransactionService.java new file mode 100644 index 0000000..6961261 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/YwMonthTransactionService.java @@ -0,0 +1,25 @@ +package com.alonginfo.project.business.service; + +import java.util.List; +import java.util.Map; + +/** + * @Description 月度直接交易service + * @Author Haoxs + * @Date 2021-10-21 18:08 + */ +public interface YwMonthTransactionService { + + /** + * 获取月度直接交易列表 + * @return + */ + List> getTransactionList(); + + /** + * 获取月度交易明细 + * @param month + * @return + */ + Map getTransactionDetailed(String month); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxBusinessDataServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxBusinessDataServiceImpl.java new file mode 100644 index 0000000..07e5c0a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxBusinessDataServiceImpl.java @@ -0,0 +1,156 @@ +package com.alonginfo.project.business.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.business.domain.MxTableColumn; +import com.alonginfo.project.business.domain.MxTableInfo; +import com.alonginfo.project.business.mapper.MxBusinessDataMapper; +import com.alonginfo.project.business.service.IMxBusinessDataService; +import com.alonginfo.project.system.domain.SysDictData; +import com.alonginfo.project.system.mapper.SysDictDataMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @Description 业务数据管理接口实现 + * @Author Yalon + * @Date 2020-03-16 10:19 + * @Version mxdata_v + */ +@Service +public class MxBusinessDataServiceImpl implements IMxBusinessDataService { + + /** + * 系统数据字典参数mapper + */ + @Autowired + private SysDictDataMapper sysDictDataMapper; + + /** + * 业务数据管理mapper + */ + @Autowired + private MxBusinessDataMapper mxBusinessDataMapper; + + /** + * 根据业务表开头关键字集合 查询所有的表名字和备注 + * + * @return 集合 tableName tableComment + */ + @Override + public List getTableInfos() { + //业务表开头关键字的 dictType + String dictType = "yw"; + List sysDictData = sysDictDataMapper.selectDictDataByType(dictType); + return StringUtils.isEmpty(sysDictData) ? new ArrayList<>() : mxBusinessDataMapper.getTableInfos(sysDictData); + } + + /** + * 根据表名称获取表的字段信息 + * + * @param tableName 表名称 + * @return + */ + @Override + public List getColumnByTableName(String tableName) { + List columnByTableName = mxBusinessDataMapper.getColumnByTableName(tableName); + List filterList = columnByTableName.stream().filter(item -> !"tdate".equals(item.getColumnName()) + && !"update_time".equals(item.getColumnName())).collect(Collectors.toList()); + return filterList; + } + + /** + * 根据表名称获取表数据 + * + * @param tableName 表名称 + * @return + */ + @Override + public List> getTableDataByTableName(String tableName) { + List tableInfoList = getTableInfos(); + long count = tableInfoList.stream().filter(mxTableInfo -> tableName.equals(mxTableInfo.getTableName())).count(); + if (count>0){ + return mxBusinessDataMapper.getTableDataByTableName(tableName); + } + return new ArrayList>(); + } + + /** + * 根据表名 主键名 主键值 数据MAP 更新数据 + * + * @param params tableName 表名 tableKey主键名 keyValue 主键值 dataMap数据映射 + * @return + */ + @Override + public Integer removeDataByKey(Map params) { + List tableInfoList = getTableInfos(); + long count = tableInfoList.stream().filter(mxTableInfo -> params.get("tableName").equals(mxTableInfo.getTableName())).count(); + if (count>0){ + return mxBusinessDataMapper.removeDataByKey(params); + } + return 0; + } + + /** + * 根据表名 主键名 主键值 数据MAP 更新数据 + * + * @param params tableName 表名 tableKey主键名 keyValue 主键值 dataMap数据映射 + * @return + */ + @Override + public Integer updateDataByKey(Map params) { + List tableInfoList = getTableInfos(); + long count = tableInfoList.stream().filter(mxTableInfo -> params.get("tableName").equals(mxTableInfo.getTableName())).count(); + if (count>0){ + return mxBusinessDataMapper.updateDataByKey(params); + } + return 0; + + } + + /** + * 根据表名 数据MAP 新增数据 + * + * @param params tableName 表名 dataMap数据映射 + * @return + */ + @Override + public Integer insertData(Map params) { + List tableInfoList = getTableInfos(); + long count = tableInfoList.stream().filter(mxTableInfo -> params.get("tableName").equals(mxTableInfo.getTableName())).count(); + if (count>0){ + return mxBusinessDataMapper.insertData(params); + } + return 0; + } + + /** + * 根据表名获取表注释名称 + * @param tableName + * @return + */ + @Override + public String getTableCNName(String tableName) { + + return mxBusinessDataMapper.getTableCNName(tableName); + } + + /** + * 根据表名删除表数据 + * @param tableName + */ + @Override + public void delData(String tableName) { + List tableInfoList = getTableInfos(); + long count = tableInfoList.stream().filter(mxTableInfo -> tableName.equals(mxTableInfo.getTableName())).count(); + if (count>0){ + mxBusinessDataMapper.delDataByTableName(tableName); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxComponentsServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxComponentsServiceImpl.java new file mode 100644 index 0000000..c971f35 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxComponentsServiceImpl.java @@ -0,0 +1,99 @@ +package com.alonginfo.project.business.service.impl; + +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.project.business.domain.MxComponents; +import com.alonginfo.project.business.domain.MxComponentsType; +import com.alonginfo.project.business.mapper.MxComponentsMapper; +import com.alonginfo.project.business.service.IMxComponentsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author Li先生 + */ +@Service +public class MxComponentsServiceImpl implements IMxComponentsService { + + @Autowired + MxComponentsMapper mapper; + // 添加组件类型 + @Override + public int insertMxComponentsType(MxComponentsType mxComponentsType) { + mxComponentsType.setComTypeId(IdUtils.fastUUID()); + return mapper.insertMxComponentsType(mxComponentsType); + } + + // 删除组件类型 + @Override + public int deleteMxComponentsType(String comTypeId) { + // 删除组件类型下的所有组件 + deleteMxComponentsByComTypeId(comTypeId); + return mapper.deleteMxComponentsType(comTypeId); + } + // 修改组件类型 + @Override + public int editMxComponentsType(MxComponentsType mxComponentsType) { + return mapper.editMxComponentsType(mxComponentsType); + } + // 查询组件类型 根据id + @Override + public MxComponentsType getMxComponentsType(String comTypeId) { + return mapper.getMxComponentsType(comTypeId); + } + // 查询组件类型 list + @Override + public List listMxComponentsType() { + List mxComponentsTypes = mapper.listMxComponentsType(); + mxComponentsTypes.stream().forEach(mxComponentsType -> { + mxComponentsType.setChildren(getMxComponentsBycomId(mxComponentsType.getComTypeId())); + }); + + + return mxComponentsTypes; + } + + /** + * 获取所有的组件信息 + * @return + */ + @Override + public List getAllCompinfo() { + List list = mapper.getAllCompinfo(); + return list; + } + + // 新增组件 + @Override + public int insertMxComponents(MxComponents mxComponents) { + mxComponents.setComId(IdUtils.fastUUID()); + return mapper.insertMxComponents(mxComponents); + } + // 删除组件 + @Override + public int deleteMxComponents(String comId) { + return mapper.deleteMxComponents(comId); + } + // 修改组件 + @Override + public int editMxComponents(MxComponents mxComponents) { + return mapper.editMxComponents(mxComponents); + } + // 根据图标组件ID 查询组件 + @Override + public MxComponents getMxComponents(String comId) { + return mapper.getMxComponents(comId); + } + + // 根据组件类型id 查询组件list + @Override + public List getMxComponentsBycomId(String comTypeId) { + return mapper.getMxComponentsBycomId(comTypeId); + } + // 删除组件 根据组件类型id + @Override + public int deleteMxComponentsByComTypeId(String comTypeId) { + return mapper.deleteMxComponentsByComTypeId(comTypeId); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDataSetServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDataSetServiceImpl.java new file mode 100644 index 0000000..84b8de2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDataSetServiceImpl.java @@ -0,0 +1,220 @@ +package com.alonginfo.project.business.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.datasource.DynamicDataSourceContextHolder; +import com.alonginfo.project.business.domain.DataSetMenu; +import com.alonginfo.project.business.domain.MxDataGroup; +import com.alonginfo.project.business.domain.MxDataSet; +import com.alonginfo.project.business.domain.MxDataSetKey; +import com.alonginfo.project.business.mapper.MxDataSetMapper; +import com.alonginfo.project.business.service.IMxDataSetService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @author Li先生 + * 数据集管理 + * + */ +@Slf4j +@Service +public class MxDataSetServiceImpl implements IMxDataSetService { + + @Autowired + MxDataSetMapper mapper; + + /** + * 获取数据集分组列表 + * @return + */ + @Override + public List selectMxDataGroupList() { + List res = new ArrayList<>(); + List mxDataGroups = mapper.selectMxDataGroupList(); + mxDataGroups.stream().forEach((dataGtoup->{ + DataSetMenu dataSetMenu = new DataSetMenu(); + dataSetMenu.setId(dataGtoup.getDGroupId()); + dataSetMenu.setName(dataGtoup.getDGroupName()); + dataSetMenu.setDGroupSort(dataGtoup.getDGroupSort()); + dataSetMenu.setChildren(getDataSetListByDGroupId(dataGtoup.getDGroupId())); + res.add(dataSetMenu); + })); + + return res; + } + + /** + * 添加业务分类 + * @param mxDataGroup + */ + @Override + public int addMxDataGroup(MxDataGroup mxDataGroup) { + mxDataGroup.setDGroupId(IdUtils.fastUUID()); + return mapper.addMxDataGroup(mxDataGroup); + } + + /** + * 根据数据集分组id获取数据集 + * @param dGroupId + * @return + */ + @Override + public List getDataSetListByDGroupId(String dGroupId) { + List res = new ArrayList<>(); + List mxDataSets = mapper.getDataSetListByDGroupId(dGroupId); + mxDataSets.stream().forEach(mxDataSet -> { + DataSetMenu dataSetMenu = new DataSetMenu(); + dataSetMenu.setName(mxDataSet.getDsName()); + dataSetMenu.setId(mxDataSet.getDsId()); + res.add(dataSetMenu); + }); + return res; + } + + + + + + /** + * 根据数据集 (数据源id+sql) 展示查询结果 + * @param mxDataSet + * @return + */ + @Override + public List> executeSql(MxDataSet mxDataSet) { + Map params = new HashMap<>(); + try { + params = JSONObject.parseObject(Optional.ofNullable(mxDataSet.getParam()).orElse("{}"), Map.class); + } catch (Exception e) { + log.info("数据集参数格式有误!"); + } + + params.put("dataSql", mxDataSet.getDataSql()); + List> res = mapper.executeSql(params); + return res; + } + + /** + * 添加数据集 + * @param mxDataSet + * @return + */ + @Override + public int addMxDataSet(MxDataSet mxDataSet) { + String dsId = ""; + // 修改 先删除再新增 + if (StringUtils.isNotBlank(mxDataSet.getDsId())) { + dsId = mxDataSet.getDsId(); + deleteMxDataSet(dsId); + } else { + // 新增 + dsId = IdUtils.fastUUID(); + mxDataSet.setDsId(dsId); + } + + // 切换数据源 + // change数据源 + DynamicDataSourceContextHolder.setDataSourceType(mxDataSet.getDatabaseId()); + + Map params = new HashMap<>(); + try { + params = JSONObject.parseObject(Optional.ofNullable(mxDataSet.getParam()).orElse("{}"), Map.class); + } catch (Exception e) { + log.info("数据集参数格式有误!"); + } + params.put("dataSql", mxDataSet.getDataSql()); + List> data = mapper.executeSql(params); + + // 切换到主数据源 + DynamicDataSourceContextHolder.setDataSourceType("master"); + + if (data != null && data.size() >0) { + Map tmpData = data.get(0); + tmpData.keySet().stream().forEach(key->{ + MxDataSetKey mxDataSetKey = new MxDataSetKey(); + // 关联数据集 + mxDataSetKey.setDsId(mxDataSet.getDsId()); + // key主键 + mxDataSetKey.setKeyId(IdUtils.fastUUID()); + // key名称 + mxDataSetKey.setKeyName(key); + // 保存数据集key + mapper.addMxDtaSetKey(mxDataSetKey); + }); + // 添加数据集 + return mapper.addDataSet(mxDataSet); + } + return 0; + } + + /** + * 删除数据集 + * @param dsId + * @return + */ + @Override + public int deleteMxDataSet(String dsId) { + // 先删除数据集相关的key + mapper.deleteMxDataSetKeyByDsId(dsId); + // 删除数据集 + return mapper.deleteMxDataSetById(dsId); + } + + /** + * 删除数据集分组 + * @param dGroupId + * @return + */ + @Override + public int deleteMxDataGroup(String dGroupId) { + // 先删除数据分组下所有数据集 + deleteMxDataSetByDGroupId(dGroupId); + // 删除分组 + return mapper.deleteMxDataGroup(dGroupId); + } + + /** + * 删除数据集分组下的所有数据集 + * @param dGroupId + */ + private void deleteMxDataSetByDGroupId(String dGroupId) { + List dataSets = mapper.getDataSetListByDGroupId(dGroupId); + dataSets.stream().forEach(item->{ + deleteMxDataSet(item.getDsId()); + }); + } + + /** + * 修改数据集分组 + * @param mxDataGroup + * @return + */ + @Override + public int editMxDataGroup(MxDataGroup mxDataGroup) { + return mapper.editMxDataGroup(mxDataGroup); + } + + /** + * 根据数据集id 获取实例 + * @param dsId + * @return + */ + @Override + public MxDataSet getMxDataSet(String dsId) { + return mapper.getMxDataSet(dsId); + } + + /** + * 获取所有的mx_data_set_key + * @return + */ + @Override + public List listMxDataSetKey() { + return mapper.listMxDataSetKey(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDatabaseServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDatabaseServiceImpl.java new file mode 100644 index 0000000..8acf2d3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDatabaseServiceImpl.java @@ -0,0 +1,90 @@ +package com.alonginfo.project.business.service.impl; + +import com.alibaba.druid.filter.config.ConfigTools; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.project.business.domain.MxDatabase; +import com.alonginfo.project.business.mapper.MxDatabaseMapper; +import com.alonginfo.project.business.service.IMxDatabaseService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author Li先生 + * 数据源 业务类 + */ +@Service +public class MxDatabaseServiceImpl implements IMxDatabaseService { + + @Autowired + MxDatabaseMapper mapper; + + /** + * 获取数据源列表 + */ + @Override + public List selectMxDatabaseList(MxDatabase mxDatabase) { + return mapper.selectMxDatabaseList(mxDatabase); + } + + /** + * 插入信息 + * @param mxDatabase + * @return + */ + @Override + public int insertMxDatabase(MxDatabase mxDatabase) { + mxDatabase.setId(IdUtils.randomUUID()); + // 密码加密 + try { + mxDatabase.setPassword(ConfigTools.encrypt(mxDatabase.getPassword())); + } catch (Exception e) { + e.printStackTrace(); + } + return mapper.insertMxDatabase(mxDatabase); + } + + /** + * 删除数据 + * @param id + * @return + */ + @Override + public int deleteMxDatabase(String id) { + return mapper.deleteMxDatabase(id); + } + + /** + * 修改数据 + * @param mxDatabase + * @return + */ + @Override + public int editMxDatabase(MxDatabase mxDatabase) { + try { + mxDatabase.setPassword(ConfigTools.encrypt(mxDatabase.getPassword())); + } catch (Exception e) { + //e.printStackTrace(); + } + return mapper.editMxDatabase(mxDatabase); + } + + /** + * 根据id获取对象 + * @param id + * @return + */ + @Override + public MxDatabase getMxDatabase(String id) { + MxDatabase mxDatabase = mapper.getMxDatabase(id); + // 密码解密 + try { + mxDatabase.setPassword(ConfigTools.decrypt(mxDatabase.getPassword())); + } catch (Exception e) { + e.printStackTrace(); + } + return mxDatabase; + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxGroupSettingServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxGroupSettingServiceImpl.java new file mode 100644 index 0000000..32fc1db --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxGroupSettingServiceImpl.java @@ -0,0 +1,85 @@ +package com.alonginfo.project.business.service.impl; + +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.project.business.domain.MxGroupSetting; +import com.alonginfo.project.business.mapper.MxGroupSettingMapper; +import com.alonginfo.project.business.service.IMxGroupSettingService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 配置Service业务层处理 + * + * @author LM + * @date 2020-03-10 + */ +@Service +public class MxGroupSettingServiceImpl implements IMxGroupSettingService +{ + @Autowired + private MxGroupSettingMapper mxGroupSettingMapper; + + /** + * 查询配置 + * + * @param settingId 配置ID + * @return 配置主 + */ + @Override + public MxGroupSetting selectMxGroupSettingById(String settingId) + { + return mxGroupSettingMapper.selectMxGroupSettingById(settingId); + } + + /** + * 查询配置列表 + * + * @param mxGroupSetting 配置 + * @return 配置 + */ + @Override + public List selectMxGroupSettingList(MxGroupSetting mxGroupSetting) + { + return mxGroupSettingMapper.selectMxGroupSettingList(mxGroupSetting); + } + + /** + * 新增配置 + * + * @param mxGroupSetting 配置 + * @return 结果 + */ + @Override + public int insertMxGroupSetting(MxGroupSetting mxGroupSetting) + { + mxGroupSetting.setSettingId(IdUtils.fastUUID()); + return mxGroupSettingMapper.insertMxGroupSetting(mxGroupSetting); + } + + /** + * 修改配置 + * + * @param mxGroupSetting 配置 + * @return 结果 + */ + @Override + public int updateMxGroupSetting(MxGroupSetting mxGroupSetting) + { + return mxGroupSettingMapper.updateMxGroupSetting(mxGroupSetting); + } + + + /** + * 删除配置信息 + * + * @param settingId 配置ID + * @return 结果 + */ + @Override + public int deleteMxGroupSettingById(String settingId) + { + return mxGroupSettingMapper.deleteMxGroupSettingById(settingId); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxIntroduceServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxIntroduceServiceImpl.java new file mode 100644 index 0000000..a5f5989 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxIntroduceServiceImpl.java @@ -0,0 +1,56 @@ +package com.alonginfo.project.business.service.impl; + +import com.alonginfo.project.business.mapper.MxIntroduceMapper; +import com.alonginfo.project.business.service.IMxIntroduceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @Description 解说词管理 业务层实现 + * @Author Yalon + * @Date 2020-11-18 17:31 + * @Version mxdata_v + */ +@Service +public class MxIntroduceServiceImpl implements IMxIntroduceService { + + @Autowired + private MxIntroduceMapper introduceMapper; + + + /** + * 获取所有的工程及工程下的主题 + * + * @return + */ + @Override + public List> getProjectPage() { + return introduceMapper.selectProject().stream().peek(map -> map.put("pages", introduceMapper.selectPageByProject((String) map.get("proId")))).collect(Collectors.toList()); + } + + /** + * 根据主题ID 获取解说词 + * + * @param pageId 主题ID + * @return + */ + @Override + public Map getIntroduceByPage(String pageId) { + return introduceMapper.selectIntroduceByPage(pageId); + } + + /** + * 保存解说词 + * + * @param pageId 主题ID + * @param introduce 解说词 + */ + @Override + public void saveIntroduce(String pageId, String introduce) { + introduceMapper.updateIntroduce(pageId, introduce); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxPageGroupServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxPageGroupServiceImpl.java new file mode 100644 index 0000000..685ab97 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxPageGroupServiceImpl.java @@ -0,0 +1,169 @@ +package com.alonginfo.project.business.service.impl; + +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.project.business.domain.MxPageGroup; +import com.alonginfo.project.business.mapper.MxPageGroupMapper; +import com.alonginfo.project.business.service.IMxPageGroupService; +import com.alonginfo.project.engine.domain.MxPages; +import com.alonginfo.project.engine.domain.MxProject; +import com.alonginfo.project.engine.domain.ThemeManager; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 分组信息Service业务层处理 + * + * @author LM + * @date 2020-03-10 + */ +@Service +public class MxPageGroupServiceImpl implements IMxPageGroupService +{ + @Autowired + private MxPageGroupMapper mxPageGroupMapper; + + /** + * 查询分组信息 + * + * @param groupId 分组信息ID + * @return 分组信息 + */ + @Override + public MxPageGroup selectMxPageGroupById(String groupId) + { + return mxPageGroupMapper.selectMxPageGroupById(groupId); + } + + /** + * 查询分组信息列表 + * + * @param mxPageGroup 分组信息 + * @return 分组信息 + */ + @Override + public List selectMxPageGroupList(MxPageGroup mxPageGroup) + { + return mxPageGroupMapper.selectMxPageGroupList(mxPageGroup); + } + + /** + * 新增分组信息 + * + * @param mxPageGroup 分组信息 + * @return 结果 + */ + @Override + public int insertMxPageGroup(MxPageGroup mxPageGroup) + { // 设置id + mxPageGroup.setGroupId(IdUtils.fastUUID()); + // 设置访问path + mxPageGroup.setPagePath("/"+DateUtils.dateTimeNow()); + return mxPageGroupMapper.insertMxPageGroup(mxPageGroup); + } + + /** + * 修改分组信息 + * + * @param mxPageGroup 分组信息 + * @return 结果 + */ + @Override + public int updateMxPageGroup(MxPageGroup mxPageGroup) + { + return mxPageGroupMapper.updateMxPageGroup(mxPageGroup); + } + + + + /** + * 删除分组信息信息 + * + * @param groupId 分组信息ID + * @return 结果 + */ + @Override + public int deleteMxPageGroupById(String groupId) + { + // 先删除分组&主题中间表信息 + mxPageGroupMapper.deleteMxPageMidGroupByGroupId(groupId); + return mxPageGroupMapper.deleteMxPageGroupById(groupId); + } + + /** + * 删除分组中的主题 + * @param groupId + * @param themeId + * @return + */ + @Override + public int removePageInGroup(String groupId, String themeId) { + return mxPageGroupMapper.removePageInGroup(groupId,themeId); + } + + /** + * 添加主题到分组 + * @param mxPageGroup + * @return + */ + @Override + public int addPageToGroup(MxPageGroup mxPageGroup) { + // 获取分组id + String groupId = mxPageGroup.getGroupId(); + // 获取分组中主题排序最大值 + int maxOrderNum = getMaxOrderNum(groupId); + // 获取所有主题 + List themeManagers = mxPageGroup.getThemeManagers(); + for (int i = 0; i < themeManagers.size(); i++) { + themeManagers.get(i).setOrderNum(++maxOrderNum); + } + return mxPageGroupMapper.addPageToGroup(mxPageGroup); + } + + /** + * 根据分组id 获取最大排序只(如果没有新增分组 返回0) + * @param groupId + * @return + */ + private int getMaxOrderNum(String groupId) { + return mxPageGroupMapper.getMaxOrderNum(groupId); + } + + /** + * 获取工程列表 + * @return + */ + @Override + public List getProjectList() { + return mxPageGroupMapper.getProjectList(); + } + /** + * 根据工程id 获取主题列表 + * @param proId + * @return + */ + @Override + public List getPagesList(String proId) { + return mxPageGroupMapper.getPagesList(proId); + } + + /** + * 修改分组主题排序 + * @param mxPageGroup + * @return + */ + @Override + public int editOrderNum(MxPageGroup mxPageGroup) { + // 获取分组groupId + String groupId = mxPageGroup.getGroupId(); + // 获取 + List themeManagers = mxPageGroup.getThemeManagers(); + // 排序 + for (int j = 0; j > getQuartzList(SysJob job) { + List> quartzList = mxQuartzMapper.getQuartzList(job); + return quartzList; + } + + /** + * 通过id查询定时任务 + * @param jobId + * @return + */ + @Override + public SysJob selectJobById(Long jobId) { + return mxQuartzMapper.selectJobById(jobId); + } + + /** + * 修改调度任务状态 + * @param newJob + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public int changeStatus(SysJob newJob) throws SchedulerException { + int rows = 0; + String status = newJob.getStatus(); + if (ScheduleConstants.Status.NORMAL.getValue().equals(status)) { + rows = resumeJob(newJob); + } else if (ScheduleConstants.Status.PAUSE.getValue().equals(status)) { + rows = pause(newJob); + } + return rows; + } + + /** + * 恢复任务 + * @param job + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public int resumeJob(SysJob job) throws SchedulerException { + Long jobId = job.getJobId(); + String jobGroup = job.getJobGroup(); + job.setStatus(ScheduleConstants.Status.NORMAL.getValue()); + int rows = mxQuartzMapper.updateJob(job); + if (rows > 0) + { + scheduler.resumeJob(ScheduleUtils.getJobKey(jobId, jobGroup)); + } + return rows; + } + + /** + * 暂停任务 + * @param job + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public int pause(SysJob job) throws SchedulerException { + Long jobId = job.getJobId(); + String group = job.getJobGroup(); + job.setStatus(ScheduleConstants.Status.PAUSE.getValue()); + int rows = mxQuartzMapper.updateJob(job); + if (rows > 0) { + scheduler.pauseJob(ScheduleUtils.getJobKey(jobId, group)); + } + return rows; + } + + /** + * 新增定时任务 + * @param job + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public int insertJob(SysJob job) throws TaskException, SchedulerException { + job.setCreateBy(SecurityUtils.getUsername()); + //计划执行错误策略 + job.setMisfirePolicy("3"); + job.setStatus(ScheduleConstants.Status.PAUSE.getValue()); + int rows = mxQuartzMapper.insertJob(job); + if (rows > 0) { + ScheduleUtils.createScheduleJob(scheduler, job); + } + return rows; + } + + /** + * 立即运行定时任务 + * @param job + */ + @Override + public void runJob(SysJob job) throws SchedulerException { + Long jobId = job.getJobId(); + String jobGroup = job.getJobGroup(); + SysJob properties = selectJobById(job.getJobId()); + // 参数 + JobDataMap dataMap = new JobDataMap(); + dataMap.put(ScheduleConstants.TASK_PROPERTIES, properties); + scheduler.triggerJob(ScheduleUtils.getJobKey(jobId, jobGroup), dataMap); + } + + /** + * 立即运行所有定时任务 + * @param jobList + */ + @Override + public void runAllJob(List jobList) throws SchedulerException { + for (SysJob job : jobList) { + Long jobId = job.getJobId(); + String jobGroup = job.getJobGroup(); + SysJob properties = selectJobById(job.getJobId()); + // 参数 + JobDataMap dataMap = new JobDataMap(); + dataMap.put(ScheduleConstants.TASK_PROPERTIES, properties); + scheduler.triggerJob(ScheduleUtils.getJobKey(jobId, jobGroup), dataMap); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxShowDataSetImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxShowDataSetImpl.java new file mode 100644 index 0000000..5e59658 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxShowDataSetImpl.java @@ -0,0 +1,245 @@ +package com.alonginfo.project.business.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alonginfo.framework.datasource.DynamicDataSource; +import com.alonginfo.framework.datasource.DynamicDataSourceContextHolder; +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.domain.*; +import com.alonginfo.project.business.mapper.MxDataSetMapper; +import com.alonginfo.project.business.mapper.MxPageGroupMapper; +import com.alonginfo.project.business.service.IMxShowDataSetService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @author Li先生 + */ +@Service +@Slf4j +public class MxShowDataSetImpl implements IMxShowDataSetService { + + @Autowired + RedisCache redisCache; + @Autowired + MxDataSetMapper dataSetMapper; + + @Autowired + MxPageGroupMapper pageGroupMapper; + + // 获取数据 + @Override + public AjaxResult getData(MxDataInfo mxDataInfo) { + // 数据格式类型 + Integer type = mxDataInfo.getType(); + // type==1 name:[] value:[] + if (type == 1) { + JSONArray result = initDataType1(mxDataInfo); + return AjaxResult.success(result); + } + // type==2 label:[] value:[] + if (type == 2) { + JSONArray result = initDataType2(mxDataInfo); + return AjaxResult.success(result); + } + + // type==3 value:[] + if (type == 3) { + JSONArray result = initDataType3(mxDataInfo); + return AjaxResult.success(result); + } + + return AjaxResult.error("type错误"); + } + + // 查询数据集所有分组列表 + @Override + public List mxDataqueryGroup() { + return dataSetMapper.selectMxDataGroupList(); + } + + // 根据page_path 查找主题id+配置信息 + @Override + public List listPagesByGroupPagePath(String pagePath) { + return pageGroupMapper.listPagesByGroupPagePath(pagePath); + } + // 根据数据集分组id 查找数据集及数据集对应的字段列名 + @Override + public List mxDataqueryDataSetBydGroupId(String dGroupId) { + return dataSetMapper.mxDataqueryDataSetBydGroupId(dGroupId); + } + + //根据数据集查询名称和参数查询数据集 + @Override + public AjaxResult getDataByAjaxId(MxDataSet mxDataSetQuery) { + List sets = dataSetMapper.getDataSetListByAjaxId(mxDataSetQuery.getAjaxId()); + if (sets.size() != 1) { + return AjaxResult.error("根据此查询别名查出的数据集不是一条!"); + } + MxDataSet mxDataSet = sets.get(0); + mxDataSet.setParam(mxDataSetQuery.getParam()); + // 切换数据源 + DynamicDataSourceContextHolder.setDataSourceType(mxDataSet.getDatabaseId()); + Map params = new HashMap<>(); + try { + params = JSONObject.parseObject(Optional.ofNullable(mxDataSet.getParam()).orElse("{}"), Map.class); + } catch (Exception e) { + log.info("数据集参数格式有误!"); + } + params.put("dataSql", mxDataSet.getDataSql()); + // 执行sql + return AjaxResult.success(dataSetMapper.executeSql(params)); + } + + // 加载数据 type==1 + private JSONArray initDataType1(MxDataInfo mxDataInfo){ + // 返回值 + JSONArray result = new JSONArray(); + // name value + List nameKeyNameList = transforKeyIds(mxDataInfo.getName()); + List valueKeyNametList = transforKeyIds(mxDataInfo.getValue()); + // 获取mxDataSet + MxDataSet mxDataSet = dataSetMapper.getMxDataSet(mxDataInfo.getDsId()); + + // 切换数据源 + DynamicDataSourceContextHolder.setDataSourceType(mxDataSet.getDatabaseId()); + + Map params = new HashMap<>(); + try { + params = JSONObject.parseObject(Optional.ofNullable(mxDataSet.getParam()).orElse("{}"), Map.class); + } catch (Exception e) { + log.info("数据集参数格式有误!"); + } + params.put("dataSql", mxDataSet.getDataSql()); + // 执行sql + List> mapData= dataSetMapper.executeSql(params); + // 遍历 组合数据 + mapData.stream().forEach(map->{ + JSONObject entity = new JSONObject(); + transforkeyNameToData(nameKeyNameList,"name",map,entity); + transforkeyNameToDataArr(valueKeyNametList,"value",map,entity); + result.add(entity); + }); + DynamicDataSourceContextHolder.clearDataSourceType(); + return result; + } + // 加载数据 type==2 + private JSONArray initDataType2(MxDataInfo mxDataInfo){ + // 返回值 + JSONArray result = new JSONArray(); + // name value + List labelKeyNameList = transforKeyIds(mxDataInfo.getLabel()); + List valueKeyNametList = transforKeyIds(mxDataInfo.getValue()); + // 获取mxDataSet + MxDataSet mxDataSet = dataSetMapper.getMxDataSet(mxDataInfo.getDsId()); + // 获取sql + String sql = mxDataSet.getDataSql(); + // 切换数据源 + DynamicDataSourceContextHolder.setDataSourceType(mxDataSet.getDatabaseId()); + + Map params = new HashMap<>(); + try { + params = JSONObject.parseObject(Optional.ofNullable(mxDataSet.getParam()).orElse("{}"), Map.class); + } catch (Exception e) { + log.info("数据集参数格式有误!"); + } + params.put("dataSql", mxDataSet.getDataSql()); + // 执行sql + List> mapData= dataSetMapper.executeSql(params); + // 遍历 组合数据 + mapData.stream().forEach(map->{ + JSONObject entity = new JSONObject(); + transforkeyNameToData(labelKeyNameList,"label",map,entity); + transforkeyNameToDataArr(valueKeyNametList,"value",map,entity); + result.add(entity); + }); + DynamicDataSourceContextHolder.clearDataSourceType(); + return result; + } + // value : 1212.22 + private JSONArray initDataType3(MxDataInfo mxDataInfo){ + // 返回值 + JSONArray result = new JSONArray(); + // 获取key_name + List valueKeyNametList = transforKeyIds(mxDataInfo.getValue()); + // 获取mxDataSet + MxDataSet mxDataSet = dataSetMapper.getMxDataSet(mxDataInfo.getDsId()); + // 获取sql + String sql = mxDataSet.getDataSql(); + // 切换数据源 + DynamicDataSourceContextHolder.setDataSourceType(mxDataSet.getDatabaseId()); + + Map params = new HashMap<>(); + try { + params = JSONObject.parseObject(Optional.ofNullable(mxDataSet.getParam()).orElse("{}"), Map.class); + } catch (Exception e) { + log.info("数据集参数格式有误!"); + } + params.put("dataSql", mxDataSet.getDataSql()); + // 执行sql + List> mapData= dataSetMapper.executeSql(params); + // 遍历 组合数据 + mapData.stream().forEach(map->{ + JSONObject entity = new JSONObject(); + transforkeyNameToData(valueKeyNametList,"value",map,entity); + result.add(entity); + }); + DynamicDataSourceContextHolder.clearDataSourceType(); + return result; + } + // key_id --> key_name + private List transforKeyIds(List keyIdList) { + List keyNameList = new ArrayList<>(); + keyIdList.stream().forEach(keyId->{ + // 根据name的key 获取 value 1000->年份 + String keyName = getValue(keyId); + keyNameList.add(keyName); + }); + return keyNameList; + } + // 列名+数据集 --》指定格式数据 --》 一个的情况下 变为字符串 + private void transforkeyNameToData(List colNames,String labelName,Map data,JSONObject entity ){ + JSONObject jsonObject = new JSONObject(); + if (colNames.size() == 1) { + entity.put(labelName,data.get(colNames.get(0))); + } else { + JSONArray nameArr = new JSONArray(); + colNames.stream().forEach(name->{ + nameArr.add(data.get(name)); + }); + entity.put(labelName,nameArr); + } + } + + // 列名+数据集 --》指定格式数据 --》 一个的情况下 变为数组 + private void transforkeyNameToDataArr(List colNames,String labelName,Map data,JSONObject entity ){ + JSONObject jsonObject = new JSONObject(); + JSONArray nameArr = new JSONArray(); + colNames.stream().forEach(name->{ + nameArr.add(data.get(name)); + }); + entity.put(labelName,nameArr); + } + + // 根据key id 获取列名称 + private String getValue(String name){ + String value = redisCache.getCacheMapValue("mx_data_set_key",name); + // 如果redis没有中 去数据库查询 + if (value == null) { + Map map = new HashMap<>(); + List list =dataSetMapper.listMxDataSetKey(); + list.stream().forEach(mxDataSetKey -> { + map.put(mxDataSetKey.getKeyId(),mxDataSetKey.getKeyName()); + }); + // 放到缓存中 + redisCache.setCacheMap("mx_data_set_key",map); + value = map.get(name); + } + return value; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/YwMonthTransactionServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/YwMonthTransactionServiceImpl.java new file mode 100644 index 0000000..efd1244 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/YwMonthTransactionServiceImpl.java @@ -0,0 +1,66 @@ +package com.alonginfo.project.business.service.impl; + +import com.alonginfo.project.business.mapper.YwMonthTransactionMapper; +import com.alonginfo.project.business.service.YwMonthTransactionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Description 月度直接交易service实现 + * @Author Haoxs + * @Date 2021-10-21 18:32 + */ +@Service +public class YwMonthTransactionServiceImpl implements YwMonthTransactionService { + + @Autowired + private YwMonthTransactionMapper ywMonthTransactionMapper; + + /** + * 获取月度直接交易列表 + * @return + */ + @Override + public List> getTransactionList() { + return ywMonthTransactionMapper.getTransactionList(); + } + + /** + * 获取月度交易明细 + * @param transactionName + * @return + */ + @Override + public Map getTransactionDetailed(String transactionName) { + if (transactionName == null || "".equals(transactionName)) { + return new HashMap<>(); + } + //获取交易月份 + String month = transactionName.split("年")[1].substring(0, 1); + //判断当月是否包含月内交易 + String monthFlag = transactionName.contains("月内") ? "月内" : ""; + //判断是燃煤交易还是燃气交易 + Integer transactionType = transactionName.contains("燃煤") ? 300 : 500; + //交易公告 + Map transactionNotice = ywMonthTransactionMapper.getTransactionNotice(transactionName); + //购方数据 + Map buyData = ywMonthTransactionMapper.getBuyerData(month, monthFlag, transactionType); + List> buyDet = ywMonthTransactionMapper.getBuyerDet(month, monthFlag, transactionType); + //售方数据 + Map sellData = ywMonthTransactionMapper.getSellerData(month, monthFlag, transactionType); + List> sellDet = ywMonthTransactionMapper.getSellerDet(month, monthFlag, transactionType); + + //结果封装 + buyData.put("buyDet", buyDet); + sellData.put("sellDet", sellDet); + Map resultMap = new HashMap<>(); + resultMap.put("transactionNotice", transactionNotice); + resultMap.put("buyData", buyData); + resultMap.put("sellData", sellData); + return resultMap; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/common/CaptchaController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/common/CaptchaController.java new file mode 100644 index 0000000..f4af576 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/common/CaptchaController.java @@ -0,0 +1,54 @@ +package com.alonginfo.project.common; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.common.utils.VerifyCodeUtils; +import com.alonginfo.common.utils.sign.Base64; +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.concurrent.TimeUnit; + +/** + * 验证码操作处理 + */ +@RestController +public class CaptchaController { + @Autowired + private RedisCache redisCache; + + /** + * 生成验证码 + */ + @GetMapping("/captchaImage") + public AjaxResult getCode(HttpServletResponse response) throws IOException { + // 生成随机字串 + String verifyCode = VerifyCodeUtils.generateVerifyCode(4); + // 唯一标识 + String uuid = IdUtils.simpleUUID(); + String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; + + redisCache.setCacheObject(verifyKey, verifyCode, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); + // 生成图片 + int w = 111, h = 36; + ByteArrayOutputStream stream = new ByteArrayOutputStream(); + VerifyCodeUtils.outputImage(w, h, stream, verifyCode); + try { + AjaxResult ajax = AjaxResult.success(); + ajax.put("uuid", uuid); + ajax.put("img", Base64.encode(stream.toByteArray())); + return ajax; + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("操作失败"); + } finally { + stream.close(); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/common/CommonController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/common/CommonController.java new file mode 100644 index 0000000..74e009f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/common/CommonController.java @@ -0,0 +1,131 @@ +package com.alonginfo.project.common; + +import com.alonginfo.common.utils.FileTypeDetector; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.tool.FileUtil; +import com.alonginfo.utils.FileUploadUtils; +import com.alonginfo.common.utils.file.FileUtils; +import com.alonginfo.framework.config.MxConfig; +import com.alonginfo.framework.config.ServerConfig; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +/** + * 通用请求处理 + */ +@RestController +public class CommonController { + private static final Logger log = LoggerFactory.getLogger(CommonController.class); + + @Autowired + private ServerConfig serverConfig; + + static String[] validExtensions = {"xlsx","xls","docx","doc","txt","mp4","mov","jpg","gif","png"}; + + /** + * 通用下载请求 + * + * @param fileName 文件名称 + * @param delete 是否删除 + */ +// @GetMapping("common/download") +// public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) { +// try { +// if (!FileUtils.isValidFilename(fileName)) { +// throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName)); +// } +// //文件名称 例如甘肃电力交易中心 +// String fileNamePrefix = fileName.substring(fileName.indexOf("_") + 1).split("\\.")[0]; +// //后缀 .xlsx +// String fileNameSuffix = "." + fileName.substring(fileName.indexOf("_") + 1).split("\\.")[1]; +// String realFileName = fileNamePrefix + System.currentTimeMillis() + fileNameSuffix; +// String filePath = MxConfig.getDownloadPath() + fileName; +// +// response.setCharacterEncoding("utf-8"); +// response.setContentType("multipart/form-data"); +//// response.setHeader("Content-Disposition", +//// "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName)); +// FileUtils.writeBytes(filePath, response.getOutputStream()); +// if (delete) { +// FileUtils.deleteFile(filePath); +// } +// } catch (Exception e) { +// log.error("下载文件失败", e); +// } +// } + + /** + * 通用上传请求 + */ + @PostMapping("/common/upload") + public AjaxResult uploadFile(MultipartFile file) throws Exception { + try { + // 上传文件路径 + String filePath = MxConfig.getUploadPath(); + String fileName2 = file.getOriginalFilename(); + String extension = ""; + boolean validExtension = false; + boolean validExtension2 = false; + if (fileName2 != null && fileName2.contains(".")) { + extension = fileName2.substring(fileName2.lastIndexOf(".")); + String fileType = FileTypeDetector.getFileType(file); + validExtension = FileUtil.isValidExtension(extension, validExtensions); + validExtension2 = FileUtil.isValidExtension(fileType, validExtensions); + } + AjaxResult ajax = AjaxResult.success(); + if(validExtension && validExtension2){ + String fileName = FileUploadUtils.upload(filePath, file); + String url = serverConfig.getUrl() + fileName; + ajax.put("fileName", fileName); + ajax.put("url", url); + } + // 上传并返回新文件名称 + return ajax; + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("上传失败"); + } + } + + /** + * 通用上传请求 + */ + @PostMapping("/common/uploadMedia") + public AjaxResult uploadMedia(MultipartFile file) throws Exception { + try { + // 上传文件路径 + String filePath = MxConfig.getUploadPath(); + String fileName2 = file.getOriginalFilename(); + String extension = ""; + boolean validExtension = false; + if (fileName2 != null && fileName2.contains(".")) { + extension = fileName2.substring(fileName2.lastIndexOf(".")); + validExtension = FileUtil.isValidExtension(extension, validExtensions); + } + AjaxResult ajax = AjaxResult.success(); + // 上传并返回新文件名称 + if(validExtension){ + String fileName = FileUploadUtils.uploadMedia(filePath, file); + String url = serverConfig.getUrl() + fileName; + ajax.put("fileName", fileName); + ajax.put("url", url); + } + return ajax; + } catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("操作失败"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxPagesController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxPagesController.java new file mode 100644 index 0000000..0f3b81c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxPagesController.java @@ -0,0 +1,97 @@ +package com.alonginfo.project.engine.controller; + +import com.alonginfo.common.constant.DatavConstans; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.engine.domain.MxPages; +import com.alonginfo.project.engine.service.IMxPagesService; +import com.alonginfo.utils.SecurityUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Api(value="主题页面,信息操作处理") +@RestController +@RequestMapping("/engine/mxPages") +public class MxPagesController extends BaseController { + + @Autowired + private IMxPagesService mxPageService; + + /** + * 获取主题页面 + * @param mxPages + * @return + */ + @ApiOperation("获取所有主题页面") + @GetMapping("/getPages") + public AjaxResult getPages (MxPages mxPages) { + List listPages = mxPageService.getPagesForId(mxPages); + return AjaxResult.success(listPages); + } + + + /** + * 新增主题页 + * @param mxPages + * @return + */ + @ApiOperation("新增主题页") + @PostMapping("/addPages") + public AjaxResult addPages(@Validated @RequestBody MxPages mxPages){ + if (DatavConstans.NOT_UNIQUE.equals(mxPageService.checkPageNameUnique(mxPages))){ + return AjaxResult.error("新增页面'" + mxPages.getPageName() + "'失败,名称已存在"); + } + mxPages.setPageId(IdUtils.simpleUUID()); + mxPages.setCreateBy(SecurityUtils.getUsername()); + return toAjax(mxPageService.insertPages(mxPages)); + } + + /** + * 更新工程信息 + * @param mxPages + * @return + */ + @ApiOperation("修改工程页面信息") + @PutMapping("/updatePages") + public AjaxResult updatePages(@Validated @RequestBody MxPages mxPages){ + if (DatavConstans.NOT_UNIQUE.equals(mxPageService.checkPageNameUnique(mxPages))){ + return AjaxResult.error("更新页面'" + mxPages.getPageName() + "'失败,名称已存在"); + } + return toAjax(mxPageService.updatePages(mxPages)); + } + + /** + * 主题发布 + * @param mxPages + * @return + */ + @ApiOperation("主题发布接口") + @PutMapping("/releasePage") + public AjaxResult releasePage(@Validated @RequestBody MxPages mxPages){ + return toAjax(mxPageService.releasePage(mxPages)); + } + + /** + * 删除主题 + * @param pageId + * @return + */ + @Log(title = "删除主题", businessType = BusinessType.DELETE) + @DeleteMapping("/mxDeletePage/{pageId}") + public AjaxResult remove(@PathVariable String pageId){ + return toAjax(mxPageService.mxDeletePage(pageId)); + } + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxProjectController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxProjectController.java new file mode 100644 index 0000000..c2f5c49 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxProjectController.java @@ -0,0 +1,121 @@ +package com.alonginfo.project.engine.controller; + +import com.alonginfo.common.constant.DatavConstans; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.engine.domain.MxProject; +import com.alonginfo.project.engine.service.IMxProjectService; +import com.alonginfo.utils.SecurityUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 工程管理 控制成 + * @author shidj + */ + +@Api(value="工程管理,信息操作处理") +@RestController +@RequestMapping("/engine/mxProject") +public class MxProjectController extends BaseController { + + @Autowired + private IMxProjectService mxProjectService; + + /** + * 工程管理列表 + * @param mxProject + * @return + */ + @ApiOperation("获取工程管理列表") + @PreAuthorize("@ss.hasPermi('engine:mxProject:list')") + @GetMapping("/list") + public TableDataInfo list(MxProject mxProject) { + startPage(); + String userName = SecurityUtils.getUsername(); + mxProject.setCreateBy(userName); + mxProject.setUserId(SecurityUtils.getUserId()); + List list = mxProjectService.selectProject(mxProject); + return getDataTable(list); + } + + /** + * 新增工程 + * @param mxProject + * @return + */ + @ApiOperation("新增工程") + @PreAuthorize("@ss.hasPermi('engine:mxProject:add')") + @Log(title = "工程管理", businessType = BusinessType.INSERT) + @PostMapping("/addProject") + public AjaxResult addProject(@Validated @RequestBody MxProject mxProject){ + if (DatavConstans.NOT_UNIQUE.equals(mxProjectService.checkProjectNameUnique(mxProject))){ + return AjaxResult.error("新增工程'" + mxProject.getProName() + "'失败,工程名称已存在"); + } + mxProject.setProId(IdUtils.simpleUUID()); + // 新增时默认状态为开启 + mxProject.setProState("0"); + mxProject.setCreateBy(SecurityUtils.getUsername()); + return toAjax(mxProjectService.insertMxProject(mxProject)); + } + + /** + * 获取信息 + * @param proId + * @return + */ + @GetMapping(value = "/getmxProjectKey/{proId}") + public AjaxResult getInfo(@PathVariable String proId) { + return AjaxResult.success(mxProjectService.getInfo(proId)); + } + + /** + * 工程信息修改 + * @param mxProject + * @return + */ + @ApiOperation("修改工程信息") + @PreAuthorize("@ss.hasPermi('engine:mxProject:edit')") + @Log(title = "工程管理", businessType = BusinessType.UPDATE) + @PutMapping("/updateMxProject") + public AjaxResult updateMxProject(@Validated @RequestBody MxProject mxProject){ + if (DatavConstans.NOT_UNIQUE.equals(mxProjectService.checkProjectNameUnique(mxProject))){ + return AjaxResult.error("修改工程'" + mxProject.getProName() + "'失败,工程名称已存在"); + } + mxProject.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(mxProjectService.updateMxProject(mxProject)); + } + + /** + * 删除工程 + * @param proIds + * @return + */ + @PreAuthorize("@ss.hasPermi('engine:themeMamager:remove')") + @Log(title = "删除工程", businessType = BusinessType.DELETE) + @DeleteMapping("/delMxPorject/{proIds}") + public AjaxResult remove(@PathVariable String[] proIds){ + return toAjax(mxProjectService.delMxPorject(proIds)); + } + + /** + * 改变工程状态 + * @param mxProject + * @return + */ + @ApiOperation("改变工程状态") + @GetMapping("/changeProState") + public AjaxResult changeProState(MxProject mxProject) { + return toAjax(mxProjectService.changeProState(mxProject)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ReleaseDataController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ReleaseDataController.java new file mode 100644 index 0000000..379232d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ReleaseDataController.java @@ -0,0 +1,58 @@ +package com.alonginfo.project.engine.controller; + +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.engine.domain.MxPages; +import com.alonginfo.project.engine.service.IMxPagesService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +/** + * 获取所有页面信息 + * 不需要权限过滤 + * @author shidj + */ + +@Api(value="主题页面信息获取") +@RestController +@RequestMapping("/mxDatav_Pages") +@CrossOrigin +public class ReleaseDataController extends BaseController { + + @Autowired + private IMxPagesService mxPageService; + + /** + * 获取主题页面 + * @param mxPages + * @return + */ + @ApiOperation("获取所有主题页面") + @GetMapping("/getPages") + public AjaxResult getPages (MxPages mxPages) { + List listPages = mxPageService.getPages(mxPages); + return AjaxResult.success(listPages); + } + + /** + * 获取页面想关联信息 + * @param mxPages + * @return + */ + @ApiOperation("获取所有主题页面") + @PostMapping("/getReleaseData") + public AjaxResult getReleaseData(MxPages mxPages) { + Map map = mxPageService.getReleaseData(mxPages); + if ("0".equals(map.get("notPublish"))) { + return AjaxResult.error("页面未发布,无法访问!"); + } + return AjaxResult.success(map); + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ThemeManagerController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ThemeManagerController.java new file mode 100644 index 0000000..2114cdd --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ThemeManagerController.java @@ -0,0 +1,118 @@ +package com.alonginfo.project.engine.controller; + +import com.alonginfo.common.constant.DatavConstans; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.engine.domain.ThemeManager; +import com.alonginfo.project.engine.service.IThemeManagerService; +import com.alonginfo.utils.SecurityUtils; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 主推管理Controller + * @author shidj + */ + +@Api(value="主题管理,信息操作处理") +@RestController +@RequestMapping("/engine/themeManager") +public class ThemeManagerController extends BaseController { + + @Autowired + private IThemeManagerService themeManagerService; + + @ApiOperation("获取图表主题管理列表") + @PreAuthorize("@ss.hasPermi('engine:themeMamager:list')") + @GetMapping("/list") + public TableDataInfo list(ThemeManager themeManager) { + startPage(); + Long userId = SecurityUtils.getUserId(); + themeManager.setUserId(userId); + List list = themeManagerService.selectThemeManagerList(themeManager); + return getDataTable(list); + } + + /** + * 获取当前用户创建的所有主题 + * @param themeManager + * @return + */ + @ApiOperation("获取当前用户创建的所有主题") + @GetMapping("/allList") + public AjaxResult allList(ThemeManager themeManager) { + Long userId = SecurityUtils.getUserId(); + themeManager.setUserId(userId); + List list = themeManagerService.selectThemeManagerList(themeManager); + return AjaxResult.success(list); + } + + + /** + * 新增图表主题 + * @param themeManager + * @return + */ + @ApiOperation("新增图表主题") + @PreAuthorize("@ss.hasPermi('engine:themeMamager:add')") + @Log(title = "图表主题管理", businessType = BusinessType.INSERT) + @PostMapping("/addTheme") + public AjaxResult addTheme(@Validated @RequestBody ThemeManager themeManager) { + if (DatavConstans.NOT_UNIQUE.equals(themeManagerService.checkThemeNameUnique(themeManager))){ + return AjaxResult.error("新增图表主题'" + themeManager.getThemeName() + "'失败,主题名称已存在"); + } + themeManager.setThemeId(IdUtils.simpleUUID()); + themeManager.setUserId(SecurityUtils.getUserId()); + return toAjax(themeManagerService.insertThemeManager(themeManager)); + } + + /** + * 根据图表主题id获取信息 + * @param themeId + * @return + */ + @GetMapping(value = "/chartThememKey/{themeId}") + public AjaxResult getInfo(@PathVariable String themeId) { + return AjaxResult.success(themeManagerService.getInfoChartThemeId(themeId)); + } + + /** + * 修改图表主题 + * @param themeManager + * @return + */ + @ApiOperation("修改图表主题") + @PreAuthorize("@ss.hasPermi('engine:themeMamager:edit')") + @Log(title = "图表主题管理", businessType = BusinessType.UPDATE) + @PutMapping("/updateChartTheme") + public AjaxResult updateChartTheme(@Validated @RequestBody ThemeManager themeManager) { + if (DatavConstans.NOT_UNIQUE.equals(themeManagerService.checkThemeNameUnique(themeManager))){ + return AjaxResult.error("修改图表主题'" + themeManager.getThemeName() + "'失败,主题名称已存在"); + } + return toAjax(themeManagerService.updateThemeManager(themeManager)); + } + + /** + * 删除图表主题 + * @param themeIds + * @return + */ + @PreAuthorize("@ss.hasPermi('engine:themeMamager:remove')") + @Log(title = "图表主题管理", businessType = BusinessType.DELETE) + @DeleteMapping("/delChartTheme/{themeIds}") + public AjaxResult remove(@PathVariable String[] themeIds){ + return toAjax(themeManagerService.delChartTheme(themeIds)); + } + +} + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxPages.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxPages.java new file mode 100644 index 0000000..dd6df79 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxPages.java @@ -0,0 +1,60 @@ +package com.alonginfo.project.engine.domain; + +import com.alonginfo.framework.web.domain.BaseEntity; +import lombok.Data; + +/** + * 主题页面实体类 + * @author shidj + */ +@Data +public class MxPages extends BaseEntity { + + /** 主题页面id*/ + private String pageId; + + /** 主题页面名称*/ + private String pageName; + + /** 工程id*/ + private String proId; + + /** 主题页面路径*/ + private String pagePath; + + /** 关联组件*/ + private String pageComponent; + + /** 主布局方案*/ + private String pageDevelopCanvas; + + /** 页面布局样式*/ + private String pageLayout; + + /** 是否独立主题样式*/ + private String isOwnChartTheme; + + /** 图表主题id*/ + private String themeId; + + /** 发布状态*/ + private String pagePublish; + + /** 是否加密*/ + private String isEncrypt; + + /** 加密密码*/ + private String password; + + /** 主题页面 图标背景图地址*/ + private String pageImgPath; + + /** 主题json*/ + private String jsonText; + + /** app控制按钮JSON*/ + private String appCtrl; + + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxProject.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxProject.java new file mode 100644 index 0000000..44c61e9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxProject.java @@ -0,0 +1,37 @@ +package com.alonginfo.project.engine.domain; + +import com.alonginfo.framework.web.domain.BaseEntity; +import lombok.Data; + +import java.util.List; + +/** + * 工程实体 + * @author shidj + */ +@Data +public class MxProject extends BaseEntity { + /** 工程id*/ + private String proId; + + /** 工程名*/ + private String proName; + + /** 工程状态*/ + private String proState; + + /** 主题id*/ + private String themeId; + + /** 主题名称*/ + private String themeName; + + /** 用户id*/ + private Long userId; + + /** 主题json*/ + private String jsonText; + + /** 主题页面对应的信息*/ + private List pageInfo; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/ThemeManager.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/ThemeManager.java new file mode 100644 index 0000000..ee2e8ce --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/ThemeManager.java @@ -0,0 +1,119 @@ +package com.alonginfo.project.engine.domain; + +import java.util.Date; + +/** + * 主题管理实体 + * @author 师登举 + */ +public class ThemeManager { + private static final long serialVersionUID = 1L; + + /** 主题id*/ + private String themeId; + + /** 主题名称 */ + private String themeName; + + /** 主题JSON */ + private String jsonText; + + /** 备注*/ + private String remark; + + /** 用户id*/ + private Long userId; + + /** 用户名称*/ + private String userName; + + private Date createDate; + /** 排序 新增主题到分组的时候使用 */ + private int orderNum; + + /** 页面APP json信息 */ + private String appCtrl; + + /** 解说词 */ + private String introduce; + + public String getThemeId() { + return themeId; + } + + public void setThemeId(String themeId) { + this.themeId = themeId; + } + + public String getThemeName() { + return themeName; + } + + public void setThemeName(String themeName) { + this.themeName = themeName; + } + + public String getJsonText() { + return jsonText; + } + + public void setJsonText(String jsonText) { + this.jsonText = jsonText; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public void setOrderNum(int orderNum) { + this.orderNum = orderNum; + } + + public int getOrderNum() { + return orderNum; + } + + public String getAppCtrl() { + return appCtrl; + } + + public void setAppCtrl(String appCtrl) { + this.appCtrl = appCtrl; + } + + public String getIntroduce() { + return introduce; + } + + public void setIntroduce(String introduce) { + this.introduce = introduce; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxPagesMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxPagesMapper.java new file mode 100644 index 0000000..a375a2e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxPagesMapper.java @@ -0,0 +1,66 @@ +package com.alonginfo.project.engine.mapper; + +import com.alonginfo.project.engine.domain.MxPages; + +import java.util.List; + +/** + * 工程页面管理 数据层 + */ +public interface MxPagesMapper { + /** + * 获取工程页面信息 + * @param mxPages + * @return + */ + List getPages(MxPages mxPages); + + /** + * 检测页面名称是否唯一 + * @param mxPages + * @return + */ + MxPages selectPageForName(MxPages mxPages); + + /** + * 新增主题页面信息 + * @param mxPages + * @return + */ + int insertPages(MxPages mxPages); + + /** + * 根据id获取页面信息 + * @param mxPages + * @return + */ + MxPages getPageInfo(MxPages mxPages); + + /** + * 更新页面信息 + * @param mxPages + * @return + */ + int updatePages(MxPages mxPages); + + /** + * 主题发布 + * @param mxPages + * @return + */ + int releasePage(MxPages mxPages); + + /** + * 删除页面 + * @param pageId + * @return + */ + int mxDeletePage(String pageId); + + /** + * 删除页面信息根据工程id + * @param proIds + * @return + */ + int deletePagesForProId(String[] proIds); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxProjectMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxProjectMapper.java new file mode 100644 index 0000000..0b52ad9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxProjectMapper.java @@ -0,0 +1,61 @@ +package com.alonginfo.project.engine.mapper; + +import com.alonginfo.project.engine.domain.MxProject; + +import java.util.List; + +/** + * 工程管理 数据层 + */ +public interface MxProjectMapper { + + /** + * 工程管理 + * @param mxProject + * @return + */ + List selectProject(MxProject mxProject); + + /** + * + * @param mxProject + * @return + */ + MxProject selectProjectForName(MxProject mxProject); + + /** + * 插入工程 + * @param mxProject + * @return + */ + int insertPro(MxProject mxProject); + + /** + * 根据id获取工程信息 + * @param mx + * @return + */ + MxProject getInfo(MxProject mx); + + /** + * 修改工程信息 + * @param mxProject + * @return + */ + int updateMxProject(MxProject mxProject); + + /** + * 删除工程信息 + * @param proIds + * @return + */ + int deleteProjects(String[] proIds); + + /** + * 改变工程状态 + * @param mxProject + * @return + */ + int changeProState(MxProject mxProject); + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/ThemeManagerMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/ThemeManagerMapper.java new file mode 100644 index 0000000..ae94749 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/ThemeManagerMapper.java @@ -0,0 +1,54 @@ +package com.alonginfo.project.engine.mapper; + +import com.alonginfo.project.engine.domain.ThemeManager; + +import java.util.List; + +/** + * 主题管理 数据层 + * @author shidj + */ +public interface ThemeManagerMapper { + + /** + * 查询主题列表 + * @param themeManager + * @return + */ + List selectThemeManagerList(ThemeManager themeManager); + + /** + * 检测主题名称是否唯一 + * @return + * @param themeManager + */ + ThemeManager selectThemeManagerForName(ThemeManager themeManager); + + /** + * 新增图表主题管理 + * @param themeManager + * @return + */ + int insertThemeManager(ThemeManager themeManager); + + /** + * 根据id获取信息 + * @param th + * @return + */ + ThemeManager getInfoChartThemeId(ThemeManager th); + + /** + * 修改图表主题 + * @param themeManager + * @return + */ + int updateThemeManager(ThemeManager themeManager); + + /** + * 删除图表主题 + * @param themeIds + * @return + */ + int delChartTheme(String[] themeIds); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxPagesService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxPagesService.java new file mode 100644 index 0000000..cd10127 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxPagesService.java @@ -0,0 +1,62 @@ +package com.alonginfo.project.engine.service; + +import com.alonginfo.project.engine.domain.MxPages; + +import java.util.List; +import java.util.Map; + +/** + * 页面主题管理 服务接口层 + */ +public interface IMxPagesService { + /** + * 获取主题页面 + * @return + * @param mxPages + */ + List getPages(MxPages mxPages); + + /** + * 判断页面名称是否存在 + * @param mxPages + * @return + */ + String checkPageNameUnique(MxPages mxPages); + + /** + * 插入主题页面信息 + * @param mxPages + * @return + */ + int insertPages(MxPages mxPages); + + /** + * 获取页面相关联信息 + * @param mxPages + * @return + */ + Map getReleaseData(MxPages mxPages); + + /** + * 更新工程 + * @param mxPages + * @return + */ + int updatePages(MxPages mxPages); + + /** + * 主题发布 + * @param mxPages + * @return + */ + int releasePage(MxPages mxPages); + + /** + * 删除主题 + * @param pageId + * @return + */ + int mxDeletePage(String pageId); + + List getPagesForId(MxPages mxPages); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxProjectService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxProjectService.java new file mode 100644 index 0000000..80d2dd0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxProjectService.java @@ -0,0 +1,61 @@ +package com.alonginfo.project.engine.service; + +import com.alonginfo.project.engine.domain.MxProject; + +import java.util.List; + +/** + * 工程管理 接口层 + * @author shidj + */ +public interface IMxProjectService { + + /** + * 工程列表 + * @param mxProject + * @return + */ + List selectProject(MxProject mxProject); + + /** + * 检测工程名是否唯一 + * @param mxProject + * @return + */ + String checkProjectNameUnique(MxProject mxProject); + + /** + * 插入工程 + * @param mxProject + * @return + */ + int insertMxProject(MxProject mxProject); + + /** + * 获取项目信息 + * @param proId + * @return + */ + MxProject getInfo(String proId); + + /** + * 修改工程信息 + * @param mxProject + * @return + */ + int updateMxProject(MxProject mxProject); + + /** + * 删除工程信息 + * @param proIds + * @return + */ + int delMxPorject(String[] proIds); + + /** + * 改变工程状态 + * @param mxProject + * @return + */ + int changeProState(MxProject mxProject); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IThemeManagerService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IThemeManagerService.java new file mode 100644 index 0000000..ca7807e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IThemeManagerService.java @@ -0,0 +1,53 @@ +package com.alonginfo.project.engine.service; + +import com.alonginfo.project.engine.domain.ThemeManager; + +import java.util.List; + +/** + * 主题管理实现接口 + * @author shidj + */ +public interface IThemeManagerService { + /** + * 查询主题列表 + * @param themeManager + * @return + */ + List selectThemeManagerList(ThemeManager themeManager); + + /** + * 检测主题名称是否唯一 + * @param themeManager + * @return + */ + String checkThemeNameUnique(ThemeManager themeManager); + + /** + * 新增图表主题 + * @param themeManager + * @return + */ + int insertThemeManager(ThemeManager themeManager); + + /** + * id获取信息 + * @param themeId + * @return + */ + ThemeManager getInfoChartThemeId(String themeId); + + /** + * 修改图表主题 + * @param themeManager + * @return + */ + int updateThemeManager(ThemeManager themeManager); + + /** + * 删除图表主题 + * @param themeIds + * @return + */ + int delChartTheme(String[] themeIds); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxPagesServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxPagesServiceImpl.java new file mode 100644 index 0000000..ad90d1f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxPagesServiceImpl.java @@ -0,0 +1,176 @@ +package com.alonginfo.project.engine.service.impl; + +import com.alonginfo.common.constant.DatavConstans; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.project.engine.domain.MxPages; +import com.alonginfo.project.engine.domain.MxProject; +import com.alonginfo.project.engine.domain.ThemeManager; +import com.alonginfo.project.engine.mapper.MxPagesMapper; +import com.alonginfo.project.engine.mapper.MxProjectMapper; +import com.alonginfo.project.engine.mapper.ThemeManagerMapper; +import com.alonginfo.project.engine.service.IMxPagesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +/** + * 主题页面管理 -- 服务实现层 + * @author shidj + */ +@Service +public class MxPagesServiceImpl implements IMxPagesService { + + @Autowired + RedisCache redisCache; + + @Autowired + private MxPagesMapper pagesMapper; + + @Autowired + private ThemeManagerMapper themeManagerMapper; + + @Autowired + private MxProjectMapper mxProjectMapper; + + /** + * 获取工程页面信息 + * 根据工程id 或页面id查询 + * @param mxPages + * @return + */ + @Override + public List getPagesForId(MxPages mxPages) { + return pagesMapper.getPages(mxPages); + } + + /** + * 获取工程页面信息 + * 根据工程id 或页面id查询 + * @param mxPages + * @return + */ + @Override + public List getPages(MxPages mxPages) { + List listPages = redisCache.getCacheList("all_Pages"); + if (listPages == null || listPages.size() == 0) { + listPages = pagesMapper.getPages(mxPages); + redisCache.setCacheList("all_Pages",listPages); + } + return listPages; + } + + /** + * 判断页面名称是否存在 + * @param mxPages + * @return + */ + @Override + public String checkPageNameUnique(MxPages mxPages) { + String pageId = StringUtils.isNull(mxPages.getPageId()) ? "-1" : mxPages.getPageId(); + MxPages pages = pagesMapper.selectPageForName(mxPages); + if (StringUtils.isNotNull(pages) && !pageId.equals(pages.getPageId())){ + return DatavConstans.NOT_UNIQUE; + } + return DatavConstans.UNIQUE; + } + + /** + * 插入主题页面信息 + * @param mxPages + * @return + */ + @Override + public int insertPages(MxPages mxPages) { + int row = pagesMapper.insertPages(mxPages); + if (row > 0) { + redisCache.deleteObject("all_Pages"); + } + return row; + } + + /** + * 获取页面相关联信息 + * @param mxPages + * @return + */ + @Override + public Map getReleaseData(MxPages mxPages) { + // 准备入redis + String pageId = mxPages.getPageId(); + Map map = redisCache.getCacheMap(pageId); + if (map != null && map.size() != 0) { + return map; + } + // 根据页面id获取页面信息 + MxPages pageInfo = pagesMapper.getPageInfo(mxPages); + + if("0".equals(pageInfo.getPagePublish())) {// 未发布 + map.put("notPublish","0"); + return map; + } + // 判断设计主题json + if("1".equals(pageInfo.getIsOwnChartTheme()) && StringUtils.isNotEmpty(pageInfo.getThemeId())) { + ThemeManager th = new ThemeManager(); + th.setThemeId(pageInfo.getThemeId()); + ThemeManager chartTheme = themeManagerMapper.getInfoChartThemeId(th); + pageInfo.setJsonText(chartTheme.getJsonText()); + } + map.put("pageMetadata", pageInfo); + + MxProject mx = new MxProject(); + mx.setProId(pageInfo.getProId()); + MxProject mxProject = mxProjectMapper.getInfo(mx); + + if (StringUtils.isNotEmpty(mxProject.getThemeId())) { + ThemeManager th = new ThemeManager(); + th.setThemeId(mxProject.getThemeId()); + ThemeManager chartTheme = themeManagerMapper.getInfoChartThemeId(th); + mxProject.setJsonText(chartTheme.getJsonText()); + } + map.put("projectInfo", mxProject); + // 放入redis + redisCache.setCacheMap(pageId,map); + return map; + } + + /** + * 更新页面信息 + * @param mxPages + * @return + */ + @Override + public int updatePages(MxPages mxPages) { + int rows = pagesMapper.updatePages(mxPages); + if (rows > 0) {// 更新页面信息,清除缓存 + redisCache.deleteObject(mxPages.getPageId()); + } + return rows; + } + + /** + * 主题发布 + * @param mxPages + * @return + */ + @Override + public int releasePage(MxPages mxPages) { + if (StringUtils.isNotEmpty(mxPages.getPageId())) { + return pagesMapper.releasePage(mxPages); + } else { + return -1; + } + } + + /** + * 删除主题 + * @param pageId + * @return + */ + @Override + public int mxDeletePage(String pageId) { + return pagesMapper.mxDeletePage(pageId); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxProjectServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxProjectServiceImpl.java new file mode 100644 index 0000000..bb86c29 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxProjectServiceImpl.java @@ -0,0 +1,115 @@ +package com.alonginfo.project.engine.service.impl; + +import com.alonginfo.common.constant.DatavConstans; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.engine.domain.MxPages; +import com.alonginfo.project.engine.domain.MxProject; +import com.alonginfo.project.engine.mapper.MxPagesMapper; +import com.alonginfo.project.engine.mapper.MxProjectMapper; +import com.alonginfo.project.engine.service.IMxProjectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 工程管理 实现层 + */ +@Service +public class MxProjectServiceImpl implements IMxProjectService { + + @Autowired + private MxProjectMapper mxProjectMapper; + + @Autowired + private MxPagesMapper pagesMapper; + + /** + * 工程列表 + * @param mxProject + * @return + */ + @Override + public List selectProject(MxProject mxProject) { + List proList = mxProjectMapper.selectProject(mxProject); + proList.stream().forEach( mxPro -> { + MxPages mx = new MxPages(); + mx.setProId(mxPro.getProId()); + mxPro.setPageInfo(pagesMapper.getPages(mx)); + }); + return proList; + } + + /** + * 检测工程名是否唯一 + * @param mxProject + * @return + */ + @Override + public String checkProjectNameUnique(MxProject mxProject) { + String proId = StringUtils.isNull(mxProject.getProId()) ? "-1" : mxProject.getProId(); + MxProject mx = mxProjectMapper.selectProjectForName(mxProject); + if (StringUtils.isNotNull(mx) && !proId.equals(mx.getProId())){ + return DatavConstans.NOT_UNIQUE; + } + return DatavConstans.UNIQUE; + } + + /** + * 插入工程 + * @param mxProject + * @return + */ + @Override + public int insertMxProject(MxProject mxProject) { + return mxProjectMapper.insertPro(mxProject); + } + + /** + * 获取项目信息 + * @param proId + * @return + */ + @Override + public MxProject getInfo(String proId) { + MxProject mx = new MxProject(); + mx.setProId(proId); + return mxProjectMapper.getInfo(mx); + } + + /** + * 修改工程信息 + * @param mxProject + * @return + */ + @Override + public int updateMxProject(MxProject mxProject) { + return mxProjectMapper.updateMxProject(mxProject); + } + + /** + * 删除工程信息 + * @param proIds + * @return + */ + @Override + public int delMxPorject(String[] proIds) { + // 1:删除页面信息 + int row = pagesMapper.deletePagesForProId(proIds); + // 2: 删除工程信息 + if (row > 0) { + return mxProjectMapper.deleteProjects(proIds); + } + return 0; + } + + /** + * 改变工程状态 + * @param mxProject + * @return + */ + @Override + public int changeProState(MxProject mxProject) { + return mxProjectMapper.changeProState(mxProject); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/ThemeManagerServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/ThemeManagerServiceImpl.java new file mode 100644 index 0000000..9394688 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/ThemeManagerServiceImpl.java @@ -0,0 +1,90 @@ +package com.alonginfo.project.engine.service.impl; + +import com.alonginfo.common.constant.DatavConstans; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.engine.domain.ThemeManager; +import com.alonginfo.project.engine.mapper.ThemeManagerMapper; +import com.alonginfo.project.engine.service.IThemeManagerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 主题管理 服务层实现 + * @author shidj + */ +@Service +public class ThemeManagerServiceImpl implements IThemeManagerService { + + @Autowired + private ThemeManagerMapper themeManagerMapper; + + /** + * 查询主题管理列表 + * @param themeManager + * @return + */ + @Override + public List selectThemeManagerList(ThemeManager themeManager) { + return themeManagerMapper.selectThemeManagerList(themeManager); + } + + /** + * 检测图表主题是否唯一 + * @param themeManager + * @return + */ + @Override + public String checkThemeNameUnique(ThemeManager themeManager) { + String themeId = StringUtils.isNull(themeManager.getThemeId()) ? "-1" : themeManager.getThemeId(); + ThemeManager theme = themeManagerMapper.selectThemeManagerForName(themeManager); + if (StringUtils.isNotNull(theme) && !themeId.equals(theme.getThemeId())){ + return DatavConstans.NOT_UNIQUE; + } + return DatavConstans.UNIQUE; + } + + /** + * 新增图表主题 + * @param themeManager + * @return + */ + @Override + public int insertThemeManager(ThemeManager themeManager) { + return themeManagerMapper.insertThemeManager(themeManager); + } + + /** + * 根据id获取信息 + * @param themeId + * @return + */ + @Override + public ThemeManager getInfoChartThemeId(String themeId) { + ThemeManager th = new ThemeManager(); + th.setThemeId(themeId); + ThemeManager reth = themeManagerMapper.getInfoChartThemeId(th); + return reth; + } + + /** + * 修改图表主题 + * @param themeManager + * @return + */ + @Override + public int updateThemeManager(ThemeManager themeManager) { + return themeManagerMapper.updateThemeManager(themeManager); + } + + /** + * 删除图表主题 + * @param themeIds + * @return + */ + @Override + public int delChartTheme(String[] themeIds) { + return themeManagerMapper.delChartTheme(themeIds); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/DynamicDataPushController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/DynamicDataPushController.java new file mode 100644 index 0000000..3691212 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/DynamicDataPushController.java @@ -0,0 +1,431 @@ +package com.alonginfo.project.gansu.controller; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.sync.BilateralConsultDataSync; +import com.google.common.base.Strings; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.*; + +/** + * 此Controller提供 + * 1.获取双边、集中、挂牌交易序列id数据 + * 2.双边、集中、挂牌、D+3实时页面交易公告预览功能 + * 3.交易平台token获取 + */ +@Controller +@RequestMapping("/trade") +public class DynamicDataPushController{ + + @Autowired + private BilateralConsultDataSync bilateralConsultDataSync; + + /** + * 预览pdf -- 自备电厂 + */ + private static final String[] ELEC_FATCORY= {"PXBGS20220331A0009", "PXBGS20220331A0008"}; + + /** + * 预览pdf -- 大用户 + */ + private static final String[] BIG_USER = {"PXBGS20220331A0007", "PXBGS20220331A0006", "PXBGS20220331A0005", "PXBGS20220331A0004", "PXBGS20220331A0003"}; + + /** + * 预览pdf -- 双边协商公告 + */ + private static final String[] CONSULT_NOTICE = {"PXBGS20220318A0010", "PXBGS20220318A0014", "PXBGS20220318A0009"}; + + /** + * 5月双边协商公告 + */ + private static final String[] NOTICE_FIVE = {"PXBGS20220412A0003", "PXBGS20220412A0002", "PXBGS20220412A0001"}; + + /** + * 甘肃省2022年省内电力用户与发电企业直接交易6月双边协商交易公告 + */ + private static final String[] NOTICE_SIX_SBXS = {"PXBGS20220513A0001", "PXBGS20220513A0002", "PXBGS20220513A0003"}; + + /** + * 甘肃省电力用户2022年6月月度合同转让交易公告 + */ + private static final String[] NOTICE_SIX_HTZR = {"PXBGS20220513A0006"}; + + /** + * 甘肃省非现货电力用户2022年5月月内合同转让交易公告 + */ + private static final String[] NOTICE_FIVE_HTZR = {"PXBGS20220513A0007"}; + + /** + * 甘肃省2022年省内电力用户与发电企业直接交易7月双边协商交易公告 + */ + private static final String[] NOTICE_SEVEN_SBXS = {"PXBGS20220616A0001", "PXBGS20220616A0003"}; + + /** + * 甘肃省2022年省内直接交易7月第二周双边协商交易公告 + */ + private static final String[] NOTICE_SEVEN_SBXS_TWO_WEEK= {"PXBGS20220628A0003"}; + + /** + * 甘肃省发电企业2022年9月省间月度合同转让交易公告 + */ + private static final String[] NOTICE_NINE_COMPANY_SJJY = {"PXBGS20220812A0001"}; + + /** + * 甘肃省发电企业2022年9月省内月度合同转让交易公告 + */ + private static final String[] NOTICE_NINE_COMPANY_SNJY = {"PXBGS20220812A0002"}; + + /** + * 甘肃省电力用户2022年9月月度合同转让交易公告 + */ + private static final String[] NOTICE_NINE_USER_HTZR = {"PXBGS20220812A0003"}; + + /** + * D+3交易公告 + */ + private static final String[] NOTIC_D_ADD_3 = {"d3"}; + + // 2022-09-05 新增交易公关 + /** + * (2022-G-08-018)2022年9月甘肃送浙江月内省间绿色电力外送交易公告 + */ + private static final String[] SZJ = {"PXBGS20220831A0003"}; + + /** + * (2022-G-08-023)2022年9月甘肃送上海月度省间绿色电力外送交易公告 + */ + private static final String[] SSH = {"PXBGS20220831A0002"}; + + /** + * (2022-G-08-024号)2022年9月甘肃灵绍送浙江月度省间绿色电力外送交易2 + */ + private static final String[] SZJ2 = {"PXBGS20220831A0001"}; + + /** + * 2022年自备电厂8月第三周发电权置换交易 + */ + private static final String[] ZHJY3 = {"PXBGS20220810A0005", "PXBGS20220810A0006"}; + + /** + * 2022年自备电厂8月第四周发电权置换交易 + */ + private static final String[] ZHJY4 = {"PXBGS20220819A0004", "PXBGS20220819A0005"}; + + /** + * 2022年自备电厂9月第二周发电权置换交易 + */ + private static final String[] ZHJY2 = {"PXBGS20220901A0004", "PXBGS20220901A0006"}; + + /** + * 2022年自备电厂9月第一周发电权置换交易 + */ + private static final String[] ZHJY1 = {"PXBGS20220824A0004", "PXBGS20220825A0005"}; + + /** + * 甘肃省2022年省内直接交易8月第三周双边协商交易 + */ + private static final String[] EIGHT_MONTH_3 = {"PXBGS20220810A0002", "PXBGS20220810A0004", "PXBGS20220810A0003"}; + + /** + * 甘肃省2022年省内直接交易8月第四周双边协商交易 + */ + private static final String[] EIGHT_MONTH_4 = {"PXBGS20220819A0001", "PXBGS20220819A0002", "PXBGS20220819A0003"}; + + /** + * 甘肃省2022年省内直接交易9月第二周双边协商交易 + */ + private static final String[] NINE_MONTH_2 = {"PXBGS20220901A0002", "PXBGS20220901A0001", "PXBGS20220901A0003"}; + + /** + * 甘肃省2022年省内直接交易9月第一周双边协商交易 + */ + private static final String[] NINE_MONTH_1 = {"PXBGS20220825A0003", "PXBGS20220825A0006", "PXBGS20220825A0002"}; + + /** + * 甘肃省2022年省内直接交易9月双边协商交易 + */ + private static final String[] NINE_MONTH_SBXS = {"PXBGS20220816A0003", "PXBGS20220816A0001", "PXBGS20220816A0005"}; + + /** + * 甘肃省2022年省内自备电厂发电权置换交易9-12月双边协商交易 + */ + private static final String[] ZHJY_NINE_TWELVE = {"PXBGS20220809A0001"}; + + /** + * 甘肃省2022年省内直接交易10月双边协商交易(普通用户-新能源) + * 甘肃省2022年省内直接交易10月双边协商交易(普通用户-火电) + * 甘肃省2022年省内直接交易10月双边协商交易(普通用户-电铁-新能源、火电) + */ + private static final String[] TEN_MONTH_SBXS = {"PXBGS20220916A0009", "PXBGS20220916A0010", "PXBGS20220916A0011"}; + + /** + * 甘肃省2022年省内直接交易10月第一周双边协商交易(普通用户-新能源) + * 甘肃省2022年省内直接交易10月第一周双边协商交易(普通用户-火电) + * 甘肃省2022年省内直接交易10月第一周双边协商交易(普通用户-电铁-新能源、火电) + */ + private static final String[] TEN_MONTH_ONE_WEEK_SBXS = {"PXBGS20220921A0003", "PXBGS20220921A0004", "PXBGS20220921A0007"}; + + /** + * 甘肃省2022年省内直接交易10月第二周双边协商交易(普通用户-新能源) + * 甘肃省2022年省内直接交易10月第二周双边协商交易(电铁-新能源、火电) + * 甘肃省2022年省内直接交易10月第二周双边协商交易(普通用户-火电) + * 甘肃省2022年10月第二周省内民生保障电力用户(民生保障-新能源)与发电企业双边协商交易 + * 甘肃省2022年10月第二周省内民生保障电力用户(民生保障-火电)与发电企业双边协商交易 + */ + private static final String[] TEN_MONTH_TWO_WEEK_SBXS = {"PXBGS20221008A0003", "PXBGS20221008A0004", "PXBGS20221008A0005","PXBGS20221008A0001","PXBGS20221008A0002"}; + + /** + * 2022年自备电厂10月第二周发电权置换交易(新能源) + * 2022年自备电厂10月第二周发电权置换交易(火电) + */ + private static final String[] TEN_MONTH_TWO_WEEK_FDQJX = {"PXBGS20221008A0006", "PXBGS20221008A0007"}; + + /** + * 甘肃省非现货电力用户2022年10月月内合同转让交易 + */ + private static final String[] TEN_MONTH_INNER_HTZR = {"PXBGS20221011A0001"}; + + /** + * 获取双边协商/集中竞价/挂牌交易的交易序列 + * @param tradeSeqType 0-双边协商 1-集中竞价 2-挂牌交易 + * @throws Exception + */ + @GetMapping("/getTradeSeq") + @ResponseBody + public AjaxResult getTradeSeqList(String tradeSeqType){ + if (Strings.isNullOrEmpty(tradeSeqType)) { + return AjaxResult.error("交易序列类型:tradeSeqType 不可为空!"); + } + Map selectTradeSeqs = bilateralConsultDataSync.selectTradeSeqs(tradeSeqType); + return AjaxResult.success(selectTradeSeqs); + } + + /** + * 交易公告详情-预览pdf + */ + @GetMapping("/viewPdf") + @ResponseBody + public AjaxResult viewPdf(String seqId) { + System.out.println("seqId = " + seqId); + List> resList = new LinkedList>(); + if (Arrays.asList(ELEC_FATCORY).contains(seqId)) { + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内自备电厂发电权置换4月第二周双边协商交易公告.pdf"); + }}); + } else if (Arrays.asList(BIG_USER).contains(seqId)) { + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易4月第二周双边协商交易公告.pdf"); + }}); + } else if (Arrays.asList(CONSULT_NOTICE).contains(seqId)) { + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内电力用户与发电企业直接交易4月双边协商交易公告.pdf"); + }}); + } else if (Arrays.asList(NOTICE_FIVE).contains(seqId)) { + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内电力用户与发电企业直接交易5月双边协商交易公告.pdf"); + }}); + }else if (Arrays.asList(NOTICE_SIX_SBXS).contains(seqId)) { + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内电力用户与发电企业直接交易6月双边协商交易公告.pdf"); + }}); + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/(2022-1-04-012号)2022年5-12月甘肃送湖南月度省间外送交易公告.pdf"); + }}); + }else if (Arrays.asList(NOTICE_SIX_HTZR).contains(seqId)) { + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省电力用户2022年6月月度合同转让交易公告.pdf"); + }}); + resList.add(new HashMap() {{ + put("name", "省间交易"); + put("url", "views/(2022-1-04-012号)2022年5-12月甘肃送湖南月度省间外送交易公告.pdf"); + }}); + }else if (Arrays.asList(NOTICE_FIVE_HTZR).contains(seqId)) { + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省非现货电力用户2022年5月月内合同转让交易公告.pdf"); + }}); + resList.add(new HashMap() {{ + put("name", "省间交易"); + put("url", "views/(2022-1-04-012号)2022年5-12月甘肃送湖南月度省间外送交易公告.pdf"); + }}); + }else if(Arrays.asList(NOTICE_SEVEN_SBXS).contains(seqId)){ + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内电力用户与发电企业直接交易7月双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(NOTICE_SEVEN_SBXS_TWO_WEEK).contains(seqId)){ + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易7月第二周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(NOTICE_NINE_COMPANY_SJJY).contains(seqId)){ + resList.add(new HashMap() {{ + put("name", "省间交易"); + put("url", "views/甘肃省发电企业2022年9月省间月度合同转让交易公告.pdf"); + }}); + }else if(Arrays.asList(NOTICE_NINE_COMPANY_SNJY).contains(seqId)){ + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省发电企业2022年9月省内月度合同转让交易公告.pdf"); + }}); + }else if(Arrays.asList(NOTICE_NINE_USER_HTZR).contains(seqId)){ + resList.add(new HashMap() {{ + put("name", "省内交易"); + put("url", "views/甘肃省电力用户2022年9月月度合同转让交易公告.pdf"); + }}); + }else if(Arrays.asList(NOTIC_D_ADD_3).contains(seqId)){ + //D+3页面所有交易序列都展示这一个pdf; seqId默认都传"d3"字符串 + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/关于开展9至12月发电侧合同电量转让日滚动交易的公告.pdf"); + }}); + }else if(Arrays.asList(SZJ).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/(2022-G-08-018)2022年9月甘肃送浙江月内省间绿色电力外送交易公告.pdf"); + }}); + }else if(Arrays.asList(SSH).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/(2022-G-08-023)2022年9月甘肃送上海月度省间绿色电力外送交易公告.pdf"); + }}); + }else if(Arrays.asList(SZJ2).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/(2022-G-08-024)2022年9月甘肃送浙江省间绿色电力外送交易2.pdf"); + }}); + }else if(Arrays.asList(ZHJY3).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内自备电厂发电权置换8月第三周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(ZHJY4).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内自备电厂发电权置换8月第四周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(ZHJY2).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内自备电厂发电权置换9月第二周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(ZHJY1).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内自备电厂发电权置换9月第一周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(EIGHT_MONTH_3).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易8月第三周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(EIGHT_MONTH_4).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易8月第四周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(NINE_MONTH_2).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易9月第二周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(NINE_MONTH_1).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易9月第一周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(NINE_MONTH_SBXS).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内电力用户与发电企业直接交易9月双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(ZHJY_NINE_TWELVE).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内自备电厂发电权置换交易9-12月双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(TEN_MONTH_SBXS).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内电力用户与发电企业直接交易10月双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(TEN_MONTH_ONE_WEEK_SBXS).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易10月第一周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(TEN_MONTH_TWO_WEEK_SBXS).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内直接交易10月第二周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(TEN_MONTH_TWO_WEEK_FDQJX).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省2022年省内自备电厂发电权置换10月第二周双边协商交易公告.pdf"); + }}); + }else if(Arrays.asList(TEN_MONTH_INNER_HTZR).contains(seqId)){ + resList.add(new HashMap(){{ + put("name", "省内交易"); + put("url", "views/甘肃省非现货电力用户2022年10月月内合同转让交易公告.pdf"); + }}); + }else { + + } + return AjaxResult.success(resList); + } + + @GetMapping("/getToken") + @ResponseBody + public AjaxResult getToken() { + Map result = new HashMap<>(); + result.put("token", bilateralConsultDataSync.getToken()); + return AjaxResult.success(result); + } + + /** + * 交易公告预览 + * @return + */ + @GetMapping("/viewNotice") + @ResponseBody + public AjaxResult viewNotice(String tradeSeqId) { + try { + Map viewNotice = bilateralConsultDataSync.getViewNotice(tradeSeqId); + if (StringUtils.isEmpty(viewNotice)) { + return AjaxResult.error("该交易序列下暂未上传交易公告!"); + } + return AjaxResult.success(viewNotice); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("交易公告文件预览失败!"); + } + } + + /** + * 获取市场建设情况-图片、文件列表信息 + * @return + */ + @GetMapping("/getMarketBuildFiles") + @ResponseBody + public AjaxResult getMarketBuildFiles() { + try { + return AjaxResult.success(bilateralConsultDataSync.getMarketBuildFiles()); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("获取市场建设情况-图片、文件列表信息失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/Heguigk/HggkController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/Heguigk/HggkController.java new file mode 100644 index 0000000..8f0038e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/Heguigk/HggkController.java @@ -0,0 +1,99 @@ +package com.alonginfo.project.gansu.controller.Heguigk; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.BsHggkGzzd; +import com.alonginfo.project.gansu.domain.BsHggkGzzk; +import com.alonginfo.project.gansu.domain.BsHggkLybh; +import com.alonginfo.project.gansu.mapper.BsHggkGzzdMapper; +import com.alonginfo.project.gansu.mapper.BsHggkGzzkMapper; +import com.alonginfo.project.gansu.mapper.BsHggkLybhMapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@RestController +@RequestMapping("/heguigk") +public class HggkController { + + @Autowired + private BsHggkGzzdMapper bsHggkGzzdMapper; + + @Autowired + private BsHggkGzzkMapper bsHggkGzzkMapper; + + @Autowired + private BsHggkLybhMapper bsHggkLybhMapper; + + /** + * 当年规章制度建设情况 + */ + @PostMapping("/gzzd") + public AjaxResult selGzzd() { + List bsHggkGzzds = bsHggkGzzdMapper.selAll(); + + List x1; + List y1; + List y2; + + x1 = bsHggkGzzds.stream().map(BsHggkGzzd::getDataX).collect(Collectors.toList()); + y1 = bsHggkGzzds.stream().map(BsHggkGzzd::getDataY1).collect(Collectors.toList()); + y2 = bsHggkGzzds.stream().map(BsHggkGzzd::getDataY2).collect(Collectors.toList()); + + HashMap> map = new HashMap<>(); + map.put("xAxis", x1); + map.put("yAxis1", y1); + map.put("yAxis2", y2); + log.warn("selGzzd() map: {}", map); + + return AjaxResult.success(map); + } + + /** + * 当年信用工作开展成效 + */ + @PostMapping("/gzzk") + public AjaxResult selGzzk() { + List bsHggkGzzks = bsHggkGzzkMapper.selAll(); + + List x1; + List y1; + + x1 = bsHggkGzzks.stream().map(BsHggkGzzk::getDataX).collect(Collectors.toList()); + y1 = bsHggkGzzks.stream().map(BsHggkGzzk::getDataY).collect(Collectors.toList()); + + HashMap> map = new HashMap<>(); + map.put("xAxis", x1); + map.put("yAxis", y1); + log.warn("selGzzk() map: {}", map); + + return AjaxResult.success(map); + } + + /** + * 当年履约保函工作成效 + */ + @PostMapping("/lybh") + public AjaxResult selLybh() { + List bsHggkLybhs = bsHggkLybhMapper.selAll(); + + List x1; + List y1; + + x1 = bsHggkLybhs.stream().map(BsHggkLybh::getDataX).collect(Collectors.toList()); + y1 = bsHggkLybhs.stream().map(BsHggkLybh::getDataY).collect(Collectors.toList()); + + HashMap> map = new HashMap<>(); + map.put("xAxis", x1); + map.put("yAxis", y1); + log.warn("selLybh() map: {}", map); + + return AjaxResult.success(map); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/BilateralConsultController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/BilateralConsultController.java new file mode 100644 index 0000000..3ba8dbc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/BilateralConsultController.java @@ -0,0 +1,43 @@ +package com.alonginfo.project.gansu.controller.bilateralconsult; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.bilateralconsult.BilateralConsultService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/2/2 17:58 + * @Description: 双边协商controller + */ +@Api(tags = "双边协商交易实况") +@RestController +@RequestMapping("/bilateralConsult") +public class BilateralConsultController { + + @Autowired + private BilateralConsultService bilateralConsultService; + + /** + * 获取双边协商页面实时数据 + * @param seqId + * @return + */ + @ApiOperation(value = "获取双边协商交易实况页面数据") + @ApiImplicitParams({@ApiImplicitParam(name = "seqId", value = "双边协商交易序列id; PXBGS20230104A0002-回演交易; PXBGS20230105A0001-实时多日交易; PXBGS20230110A0004-实时非多日交易", required = true, paramType = "query")}) + @PostMapping("/getData") + public AjaxResult getBilateralConsult(String seqId) { + try { + return AjaxResult.success(bilateralConsultService.getBilateralConsult(seqId)); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("-获取双边协商数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/package-info.java new file mode 100644 index 0000000..982c792 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/package-info.java @@ -0,0 +1,9 @@ +/** + * 包说明(service、mapper同理): + * + * "双边协商页面"相关接口 + * + * 接口说明: 定时任务同步到mysql, sync/BilateralConsultDataSync + * + */ +package com.alonginfo.project.gansu.controller.bilateralconsult; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/CarbonMonitorController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/CarbonMonitorController.java new file mode 100644 index 0000000..5a9cb58 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/CarbonMonitorController.java @@ -0,0 +1,105 @@ +package com.alonginfo.project.gansu.controller.carbon; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.CarbonMapTopContentDTO; +import com.alonginfo.project.gansu.domain.ClearInstallTrendDTO; +import com.alonginfo.project.gansu.domain.IndustryEmissionDTO; +import com.alonginfo.project.gansu.service.carbon.ICarbonMonitorService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/19 10:04 + * @Description: 双碳检测 + */ +@Api(value = "双碳监测", tags = {"双碳监测"}) +@RestController +@RequestMapping("/carbonMonitor") +@Slf4j +public class CarbonMonitorController { + + @Autowired + private ICarbonMonitorService iCarbonMonitorService; + + /** + * 发电企业碳排放情况 + * @return + */ + @ApiOperation(value = "(导入数据)发电企业碳排放情况", response = EchartsCommonDTO.class) + @PostMapping("/getEnterpriseEmission") + public AjaxResult getEnterpriseEmission() { + try { + return AjaxResult.success(iCarbonMonitorService.getEnterpriseEmission()); + }catch (Exception e) { + log.error("error: 获取双碳监测-发电企业碳排放情况失败!", e); + return AjaxResult.error("获取双碳监测-发电企业碳排放情况失败!"); + } + } + + /** + * 各行业电力用户碳排放情况 + * @return + */ + @ApiOperation(value = "(导入数据)各行业电力用户碳排放情况", response = IndustryEmissionDTO.class) + @PostMapping("/getIndustryEmission") + public AjaxResult getIndustryEmission() { + try { + return AjaxResult.success(iCarbonMonitorService.getIndustryEmission()); + }catch (Exception e) { + log.error("error: 获取双碳监测-各行业电力用户碳排放情况数据失败!", e); + return AjaxResult.error("获取双碳监测-各行业电力用户碳排放情况数据失败!"); + } + } + + /** + * 清洁能源装机趋势 + * @return + */ + @ApiOperation(value = "(导入数据)清洁能源装机趋势", response = ClearInstallTrendDTO.class) + @PostMapping("/getClearInstallTrend") + public AjaxResult getClearInstallTrend() { + try { + return AjaxResult.success(iCarbonMonitorService.getClearInstallTrend()); + }catch (Exception e) { + log.error("error: 获取双碳监测-清洁能源装机趋势数据失败!", e); + return AjaxResult.error("获取双碳监测-清洁能源装机趋势数据失败!"); + } + } + + /** + * 清洁能源减排成果 + * @return + */ + @ApiOperation(value = "(导入数据)清洁能源减排成果") + @PostMapping("/getClearReduceGain") + public AjaxResult getClearReduceGain() { + try { + return AjaxResult.success(iCarbonMonitorService.getClearReduceGain()); + }catch (Exception e) { + log.error("error: 获取双碳监测-清洁能源减排成果数据失败!", e); + return AjaxResult.error("获取双碳监测-清洁能源减排成果数据失败!"); + } + } + + /** + * 地图上方概览 + * @return + */ + @ApiOperation(value = "(导入数据)地图上方概览", response = CarbonMapTopContentDTO.class) + @PostMapping("/getCarbonMapTopContent") + public AjaxResult getMapTopContent() { + try { + return AjaxResult.success(iCarbonMonitorService.getCarbonMapTopContent()); + }catch (Exception e) { + log.error("error: 获取双碳监测-地图上方概览数据失败!", e); + return AjaxResult.error("获取双碳监测-地图上方概览数据失败"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/package-info.java new file mode 100644 index 0000000..83a7685 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "双碳检测页面"相关接口 + * + * 接口说明: 接口为手动导入Excel接口 + */ +package com.alonginfo.project.gansu.controller.carbon; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/ClearEnergyAbsorptionController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/ClearEnergyAbsorptionController.java new file mode 100644 index 0000000..e302a9a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/ClearEnergyAbsorptionController.java @@ -0,0 +1,105 @@ +package com.alonginfo.project.gansu.controller.clearenergy; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.ClearAbsorptionAnalysisDTO; +import com.alonginfo.project.gansu.domain.ClearRationDTO; +import com.alonginfo.project.gansu.domain.MapTopContentDTO; +import com.alonginfo.project.gansu.service.clearenergy.IClearEnergyAbsorptionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/16 15:33 + * @Description: 清洁能源消纳 + */ +@Api(value = "清洁能源消纳", tags = {"清洁能源消纳"}) +@RestController +@RequestMapping("/clearEnergyAbsorption") +@Slf4j +public class ClearEnergyAbsorptionController { + + @Autowired + private IClearEnergyAbsorptionService iClearEnergyAbsorptionService; + + /** + * 当年清洁能源消纳趋势 + * @return + */ + @ApiOperation(value = "(导入数据)当年清洁能源消纳趋势", response = EchartsCommonDTO.class) + @PostMapping("/getAbsorptionTrendCurrentYear") + public AjaxResult getAbsorptionTrendCurrentYear() { + try { + return AjaxResult.success(iClearEnergyAbsorptionService.getAbsorptionTrendCurrentYear()); + }catch (Exception e) { + log.error("error: 获取当年清洁能源消纳趋势数据失败!", e); + return AjaxResult.error("获取当年清洁能源消纳趋势数据失败"); + } + } + + /** + * 历年清洁能源占比情况 + * @return + */ + @ApiOperation(value = "(导入数据)历年清洁能源消纳情况", response = ClearRationDTO.class) + @PostMapping("/getClearRatioByCalendarYear") + public AjaxResult getClearRatioByCalendarYear() { + try { + return AjaxResult.success(iClearEnergyAbsorptionService.getClearRatioByCalendarYear()); + }catch (Exception e){ + log.error("error: 获取历年清洁能源消纳情况数据失败!", e); + return AjaxResult.error("获取历年清洁能源消纳情况数据失败!"); + } + } + + /** + * 清洁能源消纳分析 + * @return + */ + @ApiOperation(value = "(导入数据)清洁能源消纳分析", response = ClearAbsorptionAnalysisDTO.class) + @PostMapping("/getClearAbsorptionAnalysis") + public AjaxResult getClearAbsorptionAnalysis() { + try { + return AjaxResult.success(iClearEnergyAbsorptionService.getClearAbsorptionAnalysis()); + }catch (Exception e) { + log.error("error: 获取清洁能源消纳分析数据失败!", e); + return AjaxResult.error("获取清洁能源消纳分析数据失败!"); + } + } + + /** + * 清洁能源消纳趋势 + * @return + */ + @ApiOperation(value = "(导入数据)清洁能源消纳趋势", response = EchartsCommonDTO.class) + @PostMapping("/getClearAbsorptionTrend") + public AjaxResult getClearAbsorptionTrend() { + try { + return AjaxResult.success(iClearEnergyAbsorptionService.getClearAbsorptionTrend()); + }catch (Exception e) { + log.error("error: 获取清洁能源消纳趋势数据失败!", e); + return AjaxResult.error("获取清洁能源消纳趋势数据失败!"); + } + } + + /** + * 地图上方概览 + * @return + */ + @ApiOperation(value = "(导入数据)地图上方概览", response = MapTopContentDTO.class) + @PostMapping("/getMapTopContent") + public AjaxResult getMapTopContent() { + try { + return AjaxResult.success(iClearEnergyAbsorptionService.getMapTopContent()); + }catch (Exception e) { + log.error("error: 获取地图上方概览数据失败!", e); + return AjaxResult.error("获取地图上方概览数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/package-info.java new file mode 100644 index 0000000..95f75b6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "清洁能源消纳"相关接口 + * + * 接口说明:接口为手动导入Excel接口 + */ +package com.alonginfo.project.gansu.controller.clearenergy; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/DayAddThreeController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/DayAddThreeController.java new file mode 100644 index 0000000..9cd8034 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/DayAddThreeController.java @@ -0,0 +1,55 @@ +package com.alonginfo.project.gansu.controller.dayaddthree; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.dayaddthree.DayAddThreeService; +import com.alonginfo.project.gansu.service.dayaddthree.DayAddThreeSyncGet; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/2/3 15:36 + * @Description: D+3交易controller + */ +@RestController +@RequestMapping("/dayAddThree") +public class DayAddThreeController { + + @Autowired + private DayAddThreeService dayAddThreeService; + + @Autowired + private DayAddThreeSyncGet dayAddThreeSyncGet; + + /** + * 获取D+3实时交易-交易序列数据 + * @return + */ + @GetMapping("/getDayAddThreeSeqId") + public AjaxResult getDayAddThreeSeqId() { + try { + return AjaxResult.success(dayAddThreeService.getDayAddTreeTradeSeq().get()); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("获取D+3交易-交易序列数据失败!"); + } + } + + /** + * 获取D+3实时交易页面数据 + * @param seqId + * @return + */ + @PostMapping("/getDayAddThree") + public AjaxResult getDayAddThree(String seqId) { + try { + return AjaxResult.success(dayAddThreeSyncGet.dayAddThreeDataReturn(seqId)); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("获取D+3交易-页面数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/package-info.java new file mode 100644 index 0000000..e8faf21 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "D+3页面"相关接口 + * + * 接口说明: 接口直接调用甘肃交易平台接口 + */ +package com.alonginfo.project.gansu.controller.dayaddthree; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/FocusListingController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/FocusListingController.java new file mode 100644 index 0000000..d5d5b3f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/FocusListingController.java @@ -0,0 +1,49 @@ +package com.alonginfo.project.gansu.controller.focuslisting; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.focuslisting.FocusBiddingListingDealCommonService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/2/3 15:36 + * @Description: 集中竞价、挂牌交易controller + */ +@RestController +@RequestMapping("/focusListing") +public class FocusListingController { + + @Autowired + private FocusBiddingListingDealCommonService focusBiddingListingDealCommonService; + + /** + * 集中竞价页面数据获取 + * @return + */ + @RequestMapping("/getFocus") + public AjaxResult getFocus(String seqId) { + try { + return AjaxResult.success(focusBiddingListingDealCommonService.getFocusBidding("1", seqId)); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("获取集中竞价页面数据错误!"); + } + } + + /** + * 挂牌交易页面数据获取 + * @param seqId + * @return + */ + @RequestMapping("/getListing") + public AjaxResult getListing(String seqId) { + try { + return AjaxResult.success(focusBiddingListingDealCommonService.getFocusBidding("2", seqId)); + }catch (Exception e) { + e.printStackTrace(); + return AjaxResult.error("获取挂牌交易页面数据错误!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/package-info.java new file mode 100644 index 0000000..d33766c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "集中竞价页面"相关接口 + * + * 接口说明: 接口直接调用甘肃交易平台接口 + */ +package com.alonginfo.project.gansu.controller.focuslisting; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/DeliveryController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/DeliveryController.java new file mode 100644 index 0000000..4c00483 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/DeliveryController.java @@ -0,0 +1,275 @@ +package com.alonginfo.project.gansu.controller.forward; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.forward.IDeliveryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +/** + * @author: HaoXs + * @Date: 2023/7/7 17:32 + * @Description: 远程接口服务: http://25.215.196.215:/px-trade-show + */ +@Api(tags = "接口转接-delivery") +@RestController +@RequestMapping("/delivery") +@Slf4j +@Validated +public class DeliveryController { + + @Autowired + private IDeliveryService iDeliveryService; + + @ApiOperation(value = "市场概况-当年各月各类型发电情况") + @PostMapping("/trackingPower") + public AjaxResult trackingPower() { + try { + return AjaxResult.success(iDeliveryService.trackingPower()); + }catch (Exception e) { + log.error("error: 接口/delivery/trackingPower调用失败!"); + return AjaxResult.error("获取市场概况-当年各月各类型发电情况数据失败!"); + } + } + + @ApiOperation(value = "外送实际执行情况-当年外送电量成分") + @PostMapping("/getShortSendAllData") + public AjaxResult getShortSendAllData() { + try { + return AjaxResult.success(iDeliveryService.getShortSendAllData()); + }catch (Exception e) { + log.error("error: 接口/delivery/getShortSendAllData调用失败!"); + return AjaxResult.error("获取外送实际执行情况-当年外送电量成分数据失败!"); + } + } + + @ApiOperation(value = "外送通道") + @PostMapping("/getSendByAllChannel") + public AjaxResult getSendByAllChannel() { + try { + return AjaxResult.success(iDeliveryService.getSendByAllChannel()); + }catch (Exception e) { + log.error("error: 接口/delivery/getSendByAllChannel调用失败!"); + return AjaxResult.error("获取外送通道数据失败!"); + } + } + + @ApiOperation("装机情况总览") + @PostMapping("/selectMachineLoadList") + public AjaxResult selectMachineLoadList() { + try { + return AjaxResult.success(iDeliveryService.selectMachineLoadList()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectMachineLoadList调用失败!"); + return AjaxResult.error("获取装机情况总览数据失败!"); + } + } + + @ApiOperation("企业装机容量排名") + @PostMapping("/selectGroupCap") + public AjaxResult selectGroupCap() { + try { + return AjaxResult.success(iDeliveryService.selectGroupCap()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectGroupCap调用失败!"); + return AjaxResult.error("获取企业装机容量排名数据失败!"); + } + } + + @ApiOperation("合同交易情况") + @PostMapping("/selectContractInfo") + public AjaxResult selectContractInfo() { + try { + return AjaxResult.success(iDeliveryService.selectContractInfo()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectContractInfo调用失败!"); + return AjaxResult.error("获取合同交易情况数据失败"); + } + } + + @ApiOperation("各品类交易结算情况") + @PostMapping("/selectEmossContractList") + public AjaxResult selectEmossContractList() { + try { + return AjaxResult.success(iDeliveryService.selectEmossContractList()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectEmossContractList调用失败!"); + return AjaxResult.error("获取各品类交易结算情况数据失败!"); + } + } + + @ApiOperation("当年各类型交易结算电量趋势") + @PostMapping("/selectEmossContractListByMonth") + public AjaxResult selectEmossContractListByMonth() { + try { + return AjaxResult.success(iDeliveryService.selectEmossContractListByMonth()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectEmossContractListByMonth调用失败!"); + return AjaxResult.error("获取当年各类型交易结算电量趋势数据失败!"); + } + } + + @ApiOperation("当年发电侧结算情况") + @PostMapping("/selectPowerContractListByMonth") + public AjaxResult selectPowerContractListByMonth() { + try { + return AjaxResult.success(iDeliveryService.selectPowerContractListByMonth()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectPowerContractListByMonth调用失败!"); + return AjaxResult.error("获取当年发电侧结算情况数据失败!"); + } + } + + @ApiOperation("当年各类型交易情况") + @PostMapping("/selectInnerTradeByType") + public AjaxResult selectInnerTradeByType() { + try { + return AjaxResult.success(iDeliveryService.selectInnerTradeByType()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectInnerTradeByType!"); + return AjaxResult.error("获取当年各类型交易情况数据失败!"); + } + } + + @ApiOperation("电力用户直接交易量价情况") + @PostMapping("/selectDirTradeInfo") + public AjaxResult selectDirTradeInfo() { + try { + return AjaxResult.success(iDeliveryService.selectDirTradeInfo()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectDirTradeInfo!"); + return AjaxResult.error("获取电力用户直接交易量价情况数据失败!"); + } + } + + + + @ApiOperation("结算地市供电情况") + @PostMapping("/newQueryProviceProviderEle") + public AjaxResult newQueryProviceProviderEle() { + try { + return AjaxResult.success(iDeliveryService.newQueryProviceProviderEle()); + }catch (Exception e) { + log.error("error: 接口/delivery/newQueryProviceProviderEle调用失败!"); + return AjaxResult.error("获取结算地市供电情况数据失败!"); + } + } + + @ApiOperation("装机机组数量") + @PostMapping("/selectGeneratorCount") + public AjaxResult selectGeneratorCount() { + try { + return AjaxResult.success(iDeliveryService.selectGeneratorCount()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectGeneratorCount调用失败!"); + return AjaxResult.error("获取装机机组数量数据失败!"); + } + } + + /** + * 目前正在用 + * @return + */ + @ApiOperation("市场概览-当年市场主体参与市场情况") + @PostMapping("/selectParticipantByMonth") + public AjaxResult selectParticipantByMonth() { + try { + return AjaxResult.success(iDeliveryService.selectParticipantByMonth()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectParticipantByMonth调用失败!"); + return AjaxResult.error("获取当年个月市场主体参与交易情况数据失败!"); + } + } + + /** + * 已舍弃-目前没被调用 + * @param year + * @return + */ + @ApiOperation("市场概览-当年市场主体参与市场情况") + @ApiImplicitParam(name = "year", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectTradeCountByMonth") + public AjaxResult selectTradeCountByMonth(@Valid @NotNull String year) { + try { + return AjaxResult.success(iDeliveryService.selectTradeCountByMonth(year)); + }catch (Exception e) { + log.error("error: 接口/delivery/selectTradeCountByMonth调用失败!"); + return AjaxResult.error("获取/delivery/selectTradeCountByMonth数据失败!"); + } + } + + @ApiOperation("省间") + @PostMapping("/selectGreenPower") + public AjaxResult selectGreenPower() { + try { + return AjaxResult.success(iDeliveryService.selectGreenPower()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectGreenPower!"); + return AjaxResult.error("获取/delivery/selectGreenPower数据失败!"); + } + } + + @ApiOperation("省内") + @PostMapping("/selectInnerGreenPower") + public AjaxResult selectInnerGreenPower() { + try { + return AjaxResult.success(iDeliveryService.selectInnerGreenPower()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectInnerGreenPower!"); + return AjaxResult.error("获取/delivery/selectInnerGreenPower数据失败!"); + } + } + + @ApiOperation("各月市场主体注册") + @PostMapping("/selectParticipantReg") + public AjaxResult selectParticipantReg() { + try { + return AjaxResult.success(iDeliveryService.selectParticipantReg()); + }catch (Exception e) { + log.error("error: 接口/delivery/selectParticipantReg调用失败!"); + return AjaxResult.error("获取各月市场主体注册数据失败!"); + } + } + + @ApiOperation("各月市场主体参与交易") + @PostMapping("/selectParticipantTrade") + public AjaxResult selectParticipantTrade() { + try { + return AjaxResult.success(iDeliveryService.selectParticipantTrade()); + }catch (Exception e) { + log.error("error: 接口: /delivery/selectParticipantTrade调用失败!"); + return AjaxResult.error("获取各月市场主体参与交易数据失败!"); + } + } + + @ApiOperation("累计参与交易") + @PostMapping("/selectParticipantTradeByYear") + public AjaxResult selectParticipantTradeByYear() { + try { + return AjaxResult.success(iDeliveryService.selectParticipantTradeByYear()); + }catch (Exception e) { + log.error("error: 接口: /delivery/selectParticipantTradeByYear调用失败!"); + return AjaxResult.error("获取累计参与交易数据失败!"); + } + } + + @ApiOperation("省内交易情况-当年各类型交易情况/直接交易电量") + @PostMapping("/selectYearDirEnergy") + public AjaxResult selectYearDirEnergy() { + try { + return AjaxResult.success(iDeliveryService.selectYearDirEnergy()); + }catch (Exception e) { + log.error("error: 接口: /delivery/selectYearDirEnergy调用失败!"); + return AjaxResult.error("获取省内交易情况-当年各类型交易情况/直接交易电量数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/GreenConsumerController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/GreenConsumerController.java new file mode 100644 index 0000000..4500220 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/GreenConsumerController.java @@ -0,0 +1,101 @@ +package com.alonginfo.project.gansu.controller.forward; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.forward.IGreenConsumer; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/7/7 17:02 + * @Description: 远程接口服务: http://25.215.196.215:/px-trade-show + */ +@Api(tags = "接口转接-GreenConsumer") +@RestController +@RequestMapping("/greenConsumer") +@Slf4j +public class GreenConsumerController { + + @Autowired + private IGreenConsumer iGreenConsumer; + + /** + * 历年外送电规模 + * @return + */ + @ApiOperation(value = "历年外送电规模") + @PostMapping("/getYearHitorySend") + public AjaxResult getYearHitorySend() { + try { + return AjaxResult.success(iGreenConsumer.getYearHitorySend()); + }catch (Exception e) { + log.error("error: 接口:/greenConsumer/getYearHitorySend调用失败!"); + return AjaxResult.error("获取历年外送电规模数据失败!"); + } + } + + /** + * 装机总量/新能源变化趋势 + * @return + */ + @ApiOperation(value = "装机总量/新能源变化趋势") + @PostMapping("/getMachineHistory") + public AjaxResult getMachineHistory() { + try { + return AjaxResult.success(iGreenConsumer.getMachineHistory()); + }catch (Exception e) { + log.error("error: 接口: /greenConsumer/getMachineHistory调用失败!"); + return AjaxResult.error("获取装机总量/新能源变化趋势数据失败!"); + } + } + + /** + * 新能源装机结构 + * @return + */ + @ApiOperation(value = "新能源装机结构") + @PostMapping("/getGreenProportion") + public AjaxResult getGreenProportion() { + try { + return AjaxResult.success(iGreenConsumer.getGreenProportion()); + }catch (Exception e) { + log.error("error: 接口: /greenConsumer/getGreenProportion调用失败!"); + return AjaxResult.error("获取新能源装机结构数据失败!"); + } + } + + /** + * 新能源发电趋势 + * @return + */ + @ApiOperation(value = "新能源发电趋势") + @PostMapping("/getHistoryGreenPower") + public AjaxResult getHistoryGreenPower() { + try { + return AjaxResult.success(iGreenConsumer.getHistoryGreenPower()); + }catch (Exception e) { + log.error("error: 接口: /greenConsumer/getHistoryGreenPower调用失败!"); + return AjaxResult.error("获取新能源发电趋势数据失败!"); + } + } + + /** + * 新能源参与交易情况 + * @return + */ + @ApiOperation(value = "新能源参与交易情况") + @PostMapping("/getGreenTrade") + public AjaxResult getGreenTrade() { + try { + return AjaxResult.success(iGreenConsumer.getGreenTrade()); + }catch (Exception e) { + log.error("error: 接口: /greenConsumer/getGreenTrade调用失败!"); + return AjaxResult.error("获取新能源发电趋势数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/InfoDisclosureController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/InfoDisclosureController.java new file mode 100644 index 0000000..839f6b8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/InfoDisclosureController.java @@ -0,0 +1,86 @@ +package com.alonginfo.project.gansu.controller.forward; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.forward.IInfoDisclosureService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/7/6 14:20 + * @Description: 信息披露 服务地址: http://25.215.196.215/px-settlement-infpubgrid-lz + */ +@Api(tags = "接口转接-menuStatist") +@RestController +@RequestMapping("/menuStatist") +@Slf4j +public class InfoDisclosureController { + + @Autowired + private IInfoDisclosureService iInfoDisclosureService; + + /** + * 月度披露数据 + * @return + */ + @ApiOperation("月度披露数据") + @PostMapping("/getMonthInfpubData") + public AjaxResult getMonthInfpubData() { + try { + return AjaxResult.success(iInfoDisclosureService.getMonthInfpubData()); + }catch (Exception e) { + log.error("error: 获取信息披露-月底披露数据失败!", e); + return AjaxResult.error("获取信息披露-月底披露数据失败!"); + } + } + + /** + * 获取累计披露数据 + * @return + */ + @ApiOperation("累计披露数据") + @PostMapping("/getTotalCount") + public AjaxResult getTotalCount() { + try { + return AjaxResult.success(iInfoDisclosureService.getTotalCount()); + }catch (Exception e) { + log.error("error: 获取信息披露-累计披露数据失败!", e); + return AjaxResult.error("获取信息披露-累计披露数据失败!"); + } + } + + /** + * 年度披露数据 + * @return + */ + @ApiOperation("年度披露数据") + @PostMapping("/getYearInfpubData") + public AjaxResult getYearInfpubData() { + try { + return AjaxResult.success(iInfoDisclosureService.getYearInfpubData()); + }catch (Exception e) { + log.error("error: 获取信息披露-年底披露数据失败!", e); + return AjaxResult.error("获取信息披露-年底披露数据失败!"); + } + } + + /** + * 累计披露数据条数及占比 + * @return + */ + @ApiOperation("累计披露数据条数及占比") + @PostMapping("/getToalInfpubData") + public AjaxResult getToalInfpubData() { + try { + return AjaxResult.success(iInfoDisclosureService.getToalInfpubData()); + }catch (Exception e) { + log.error("error: 获取信息披露-累计披露数据条数及占比数据失败!", e); + return AjaxResult.error("获取信息披露-累计披露数据条数及占比数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeInfoController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeInfoController.java new file mode 100644 index 0000000..5e8a165 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeInfoController.java @@ -0,0 +1,157 @@ +package com.alonginfo.project.gansu.controller.forward; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.forward.ITradeInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.constraints.NotNull; + +/** + * @author: HaoXs + * @Date: 2023/7/13 16:17 + * @Description: + */ +@Api(tags = "接口转接-tradeInfo") +@RestController +@RequestMapping("/tradeInfo") +@Slf4j +public class TradeInfoController { + + @Autowired + private ITradeInfoService iTradeInfoService; + + /** + * 交易情况总览统计 + * @param yearCode + * @return + */ + @ApiOperation(value = "交易情况总览统计-selectTotalTradeInfoByYear") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectTotalTradeInfoByYear") + public AjaxResult selectTotalTradeInfoByYear(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeInfoService.selectTotalTradeInfoByYear(yearCode)); + }catch (Exception e) { + log.error("error: 接口:/tradeInfo/selectTotalTradeInfoByYear调用失败!"); + return AjaxResult.error("获取交易情况总览统计结果数据失败!"); + } + } + + /** + * 各类型交易组织情况 + * @param yearCode + * @return + */ + @ApiOperation(value = "各类型交易组织情况-selectTradeDetailByType") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectTradeDetailByType") + public AjaxResult selectTradeDetailByType(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeInfoService.selectTradeDetailByType(yearCode)); + }catch (Exception e) { + log.error("error: 接口:/tradeInfo/selectTradeDetailByType调用失败!"); + return AjaxResult.error("获取各类型交易组织情况数据失败!"); + } + } + + /** + * 各类市场主体参与市场情况 + * @param yearCode + * @return + */ + @ApiOperation(value = "各类市场主体参与市场情况-selectMarketMemberNumByType") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectMarketMemberNumByType") + public AjaxResult selectMarketMemberNumByType(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeInfoService.selectMarketMemberNumByType(yearCode)); + }catch (Exception e) { + log.error("error: 接口:/tradeInfo/selectMarketMemberNumByType调用失败!"); + return AjaxResult.error("获取各类市场主体参与市场情况数据失败!"); + } + } + + /** + * 历年直接交易规模 + * @param yearCode + * @return + */ + @ApiOperation(value = "历年直接交易规模-selectDirectTradeByType") + @PostMapping("/selectDirectTradeByType") + public AjaxResult selectDirectTradeByType() { + try { + return AjaxResult.success(iTradeInfoService.selectDirectTradeByType()); + }catch (Exception e) { + log.error("error: 接口:/tradeInfo/selectDirectTradeByType调用失败!"); + return AjaxResult.error("获取历年直接交易规模数据失败!"); + } + } + + /** + * 各地市市场主体情况 + * @return + */ + @ApiOperation(value = "各地市市场主体情况-selectTradeCityMemberResult") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectTradeCityMemberResult") + public AjaxResult selectTradeCityMemberResult(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeInfoService.selectTradeCityMemberResult(yearCode)); + }catch (Exception e) { + log.error("error: 接口:/tradeInfo/selectTradeCityMemberResult调用失败!"); + return AjaxResult.error("获取各地市市场主体情况数据失败!"); + } + } + + /** + * 历年省内交易均价交易电量 + * @return + */ + @ApiOperation(value = "历年省内交易均价交易电量") + @PostMapping("/selectAvgPriceEnergyByYearResult") + public AjaxResult selectAvgPriceEnergyByYearResult() { + try { + return AjaxResult.success(iTradeInfoService.selectAvgPriceEnergyByYearResult()); + }catch (Exception e) { + log.error("error: 接口:/selectAvgPriceEnergyByYearResult调用失败!"); + return AjaxResult.error("获取历年省内交易均价交易电量数据失败!"); + } + } + + /** + * 历年省间外送交易均价交易电量 + * @return + */ + @ApiOperation(value = "历年省间外送交易均价交易电量") + @PostMapping("/selectOutSendAvgPriceEnergyByYearResult") + public AjaxResult selectOutSendAvgPriceEnergyByYearResult() { + try { + return AjaxResult.success(iTradeInfoService.selectOutSendAvgPriceEnergyByYearResult()); + }catch (Exception e) { + log.error("error: 接口:/selectOutSendAvgPriceEnergyByYearResult调用失败!"); + return AjaxResult.error("获取历年省同外送交易均价交易电量数据失败!"); + } + } + + /** + * 省间外送历年水火风光电量 + * @return + */ + @ApiOperation(value = "省间外送历年水火风光电量") + @PostMapping("/selectTradeEnergyPowerTypeResult") + public AjaxResult selectTradeEnergyPowerTypeResult() { + try { + return AjaxResult.success(iTradeInfoService.selectTradeEnergyPowerTypeResult()); + }catch (Exception e) { + log.error("error: 接口:/tradeInfo/selectTradeEnergyPowerTypeResult调用失败!"); + return AjaxResult.error("获取省间外送历年水火风光电量数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeMarketInfoController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeMarketInfoController.java new file mode 100644 index 0000000..85ba7d4 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeMarketInfoController.java @@ -0,0 +1,159 @@ +package com.alonginfo.project.gansu.controller.forward; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.forward.ITradeMarketInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.weaver.loadtime.Aj; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.constraints.NotNull; + +/** + * @author: HaoXs + * @Date: 2023/7/7 16:51 + * @Description: 远程接口服务: http://25.215.196.215:/px-trade-show + */ +@RestController +@RequestMapping("/tradeMarketInfo") +@Api(tags = "接口转接-tradeMarketInfo") +@Slf4j +public class TradeMarketInfoController { + + @Autowired + private ITradeMarketInfoService iTradeMarketInfoService; + + /** + * (接口调用)顶部发电数据 + * @param yearCode + * @return + */ + @ApiOperation(value = "(接口调用)顶部发电数据") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectGeneratePowerDataByYear") + public AjaxResult selectGeneratePowerDataByYear(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeMarketInfoService.selectGeneratePowerDataByYear(yearCode)); + }catch (Exception e) { + log.error("error: 获取发电用电-发电数据失败!", e); + return AjaxResult.error("获取发电用电-发电数据失败!"); + } + } + + /** + * (接口调用)当年市场化电量累计执行情况 + * @return + */ + @ApiOperation(value = "(接口调用)当年市场化电量累计执行情况") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectTradeEnergyRatio") + public AjaxResult selectTradeEnergyRatio(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeMarketInfoService.selectTradeEnergyRatio(yearCode)); + }catch (Exception e){ + log.error("error: 获取当年市场化电量累计执行情况数据失败!", e); + return AjaxResult.error("获取当年市场化电量累计执行情况数据失败!"); + } + } + + /** + * (接口调用)当年交易量价走势 + * @return + */ + @ApiOperation(value = "(接口调用)当年交易量价走势") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectTradePowerAvgPriceResult") + public AjaxResult selectTradePowerAvgPriceResult(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeMarketInfoService.selectTradePowerAvgPriceResult(yearCode)); + }catch (Exception e) { + log.error("error: 获取当年交易量价走势数据失败!", e); + return AjaxResult.error("获取当年交易量价走势数据失败!"); + } + } + + /** + * (接口调用)发电装机情况与利用小时数 + * @return + */ + @ApiOperation(value = "(接口调用)发电装机情况与利用小时数") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectGeneratorCapacity") + public AjaxResult selectGeneratorCapacity(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeMarketInfoService.selectGeneratorCapacity(yearCode)); + }catch (Exception e) { + log.error("error: 获取发电装机情况与利用小时数数据失败!", e); + return AjaxResult.error("获取发电装机情况与利用小时数数据失败!"); + } + } + + /** + * (接口调用)各类型资源装机容量与发电量 + * @param yearCode + * @return + */ + @ApiOperation(value = "(接口调用)各类型资源装机容量与发电量") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectResourceCapacity") + public AjaxResult selectResourceCapacity(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeMarketInfoService.selectResourceCapacity(yearCode)); + }catch (Exception e) { + log.error("error: 获取各类型资源装机容量与发电量失败!", e); + return AjaxResult.error("获取各类型资源装机容量与发电量失败!"); + } + } + + /** + * (接口调用)当年发电情况统计 + * @param yearCode + * @return + */ + @ApiOperation(value = "(接口调用)当年发电情况统计") + @ApiImplicitParam(name = "yearCode", value = "年份(4位)", dataType = "String", paramType = "query", required = true) + @PostMapping("/selectResourceDevDataList") + public AjaxResult selectResourceDevDataList(@NotNull String yearCode) { + try { + return AjaxResult.success(iTradeMarketInfoService.selectResourceDevDataList(yearCode)); + }catch (Exception e) { + log.error("error: 获取当年发电情况统计数据失败!", e); + return AjaxResult.error("获取当年发电情况统计数据失败!"); + } + } + + /** + * 查询当年电力用户交易量价情况 + * @return + */ + @ApiOperation(value = "(接口调用)查询当年电力用户交易量价情况") + @PostMapping("/selectUserSumEnergyAvgPrice") + public AjaxResult selectUserSumEnergyAvgPrice() { + try { + return AjaxResult.success(iTradeMarketInfoService.selectUserSumEnergyAvgPrice()); + }catch (Exception e) { + log.error("error: 获取当年电力用户交易量价情况数据失败!", e); + return AjaxResult.error("获取当年电力用户交易量价情况数据失败!"); + } + } + + /** + * 当年发电企业交易量价情况数据 + * @return + */ + @ApiOperation(value = "(接口调用)当年发电企业交易量价情况数据") + @PostMapping("/selectEnterpriseSumEnergyAvgPrice") + public AjaxResult selectEnterpriseSumEnergyAvgPrice() { + try { + return AjaxResult.success(iTradeMarketInfoService.selectEnterpriseSumEnergyAvgPrice()); + }catch (Exception e) { + log.error("error: 获取当年发电企业交易量价情况数据失败!", e); + return AjaxResult.error("获取当年发电企业交易量价情况数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TransactionPowerController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TransactionPowerController.java new file mode 100644 index 0000000..63abb22 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TransactionPowerController.java @@ -0,0 +1,88 @@ +package com.alonginfo.project.gansu.controller.forward; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.forward.IDeliveryService; +import com.alonginfo.project.gansu.service.forward.TransactionPowerService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * transactionPowerController + * + * @package_name: com.alonginfo.project.gansu.controller.forward + * @author: 樊群靖 + * @date: 2023/8/9 + * @description: + **/ + +@Api(tags = "接口转接-transactionPowerController") +@RestController +@RequestMapping("/transactionPowerController") +@Slf4j +@Validated +public class TransactionPowerController { + + @Autowired + private TransactionPowerService transactionPowerService; + + @ApiOperation("直接交易电量") + @PostMapping("/selectDirectPowerList") + public AjaxResult selectDirectPowerList() { + try { + return AjaxResult.success(transactionPowerService.selectDirectPowerList()); + }catch (Exception e) { + log.error("error: 接口/transactionPowerController/selectDirectPowerList!"); + return AjaxResult.error("获取直接交易电量数据失败!"); + } + } + + @ApiOperation("发电权交易电量") + @PostMapping("/selectGenerationRightPowerList") + public AjaxResult selectGenerationRightPowerList() { + try { + return AjaxResult.success(transactionPowerService.selectGenerationRightPowerList()); + }catch (Exception e) { + log.error("error: 接口/transactionPowerController/selectGenerationRightPowerList!"); + return AjaxResult.error("获取发电权交易电量数据失败!"); + } + } + + @ApiOperation("当年发电侧结算情况") + @PostMapping("/selectPowerList") + public AjaxResult selectPowerList() { + try { + return AjaxResult.success(transactionPowerService.selectPowerList()); + }catch (Exception e) { + log.error("error: 接口/transactionPowerController/selectPowerList!"); + return AjaxResult.error("获取当年发电侧结算情况数据失败!"); + } + } + + @ApiOperation("省内交易情况") + @PostMapping("/transactionInTheProvince") + public AjaxResult transactionInTheProvince() { + try { + return AjaxResult.success(transactionPowerService.transactionInTheProvince()); + }catch (Exception e) { + log.error("error: 接口/transactionPowerController/transactionInTheProvince调用失败!"); + return AjaxResult.error("获取省内交易情况数据失败!"); + } + } + + @ApiOperation("月度结算") + @PostMapping("/abschluss") + public AjaxResult abschluss() { + try { + return AjaxResult.success(transactionPowerService.abschluss()); + }catch (Exception e) { + log.error("error: 接口/transactionPowerController/abschluss调用失败!"); + return AjaxResult.error("获取月度结算数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/package-info.java new file mode 100644 index 0000000..0d05fad --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/package-info.java @@ -0,0 +1,9 @@ +/** + * 包说明(service、mapper同理): + * + * + * 此包下的接口: 全部为直接调用交易平台接口转发前端接口; + * 一个接口数据可能多个页面共用, 所以没有按照页面模块区分 + * + */ +package com.alonginfo.project.gansu.controller.forward; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/GenerationRightController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/GenerationRightController.java new file mode 100644 index 0000000..0957746 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/GenerationRightController.java @@ -0,0 +1,92 @@ +package com.alonginfo.project.gansu.controller.generation; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.DealOrganizeDTO; +import com.alonginfo.project.gansu.domain.PowerByYearDTO; +import com.alonginfo.project.gansu.domain.PowerByYearMonthDTO; +import com.alonginfo.project.gansu.domain.SubjectJoinDTO; +import com.alonginfo.project.gansu.service.generation.IGenerationRightService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +/** + * @author: HaoXs + * @Date: 2023/5/17 15:09 + * @Description: 发电权交易情况 controller + */ +@Api(value = "发电权交易情况", tags = {"发电权交易情况"}) +@RestController +@RequestMapping("/generation") +@Validated +public class GenerationRightController { + + @Autowired + private IGenerationRightService iGenerationRightService; + + /** + * (同步数据)当年发电权交易组织情况 + * @return + */ + @ApiOperation(value = "(同步数据)当年发电权交易组织情况", response = DealOrganizeDTO.class) + @PostMapping("/getDealOrganize") + public AjaxResult getDealOrganize() { + return AjaxResult.success(iGenerationRightService.getDealOrganize()); + } + + /** + * (同步数据)当年发电权交易市场主体参与情况 + * @return + */ + @ApiOperation(value = "(同步数据)当年发电权交易市场主体参与情况", response = SubjectJoinDTO.class) + @PostMapping("/getSubjectJoin") + public AjaxResult getSubjectJoin() { + return AjaxResult.success(iGenerationRightService.getSubjectJoin()); + } + + /** + * (同步数据)买入、卖出企业电量排名 + * @param type 0-卖出电量企业 1-买入电量企业 + * @return + */ + @ApiOperation(value = "(同步数据)买入、卖出企业电量排名") + @ApiImplicitParams({ + @ApiImplicitParam(name = "type", value = "0-卖出电量企业排名, 1-买入电量企业排名", + dataType = "String", paramType = "query", required = true) + }) + @PostMapping("/getSaleBuyOrder") + public AjaxResult getSaleBuyOrder(@NotNull @Min(value = 0, message = "请输入0或1!") + @Max(value = 1, message = "请输入0或1!") String type) { + return AjaxResult.success(iGenerationRightService.getSaleBuyOrder(type)); + } + + /** + * (同步数据)历年发电权交易电量趋势 + * @return + */ + @ApiOperation(value = "(同步数据)历年发电权交易、结算电量趋势", response = PowerByYearDTO.class) + @PostMapping("/getPowerByYear") + public AjaxResult getPowerByYear() { + return AjaxResult.success(iGenerationRightService.getPowerByYear()); + } + + /** + * (同步数据)当年分月发电权交易、结算电量趋势 + * @return + */ + @ApiOperation(value = "(同步数据)当年分月发电权交易、结算电量趋势", response = PowerByYearMonthDTO.class) + @PostMapping("/getPowerByYearMonth") + public AjaxResult getPowerByYearMonth() { + return AjaxResult.success(iGenerationRightService.getPowerByYearMonth()); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/package-info.java new file mode 100644 index 0000000..7d6227d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "发电权交易情况"相关接口 + * + * 接口说明: 定时任务同步数据至mysql sync/GenerationRightDataSync + */ +package com.alonginfo.project.gansu.controller.generation; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/GreenTradeController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/GreenTradeController.java new file mode 100644 index 0000000..e95563f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/GreenTradeController.java @@ -0,0 +1,50 @@ +package com.alonginfo.project.gansu.controller.green; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.GreenSyndromeTradeByYearDTO; +import com.alonginfo.project.gansu.domain.GreenTradeInfoDTO; +import com.alonginfo.project.gansu.service.green.IGreenTradeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/19 16:34 + * @Description: 绿证绿电交易情况 + */ +@Api(value = "绿证绿电交易情况", tags = {"绿证绿电交易情况"}) +@RestController +@RequestMapping("/green") +@Slf4j +public class GreenTradeController { + + @Autowired + private IGreenTradeService iGreenTradeService; + + @ApiOperation(value = "(导入数据)绿证绿电交易电量、均价", response = GreenTradeInfoDTO.class) + @PostMapping("/getGreenTradeInfo") + public AjaxResult getGreenTradeInfo() { + try { + return AjaxResult.success(iGreenTradeService.getGreenTradeInfo()); + }catch (Exception e) { + log.error("error: 获取绿证绿电交易电量、均价数据失败!", e); + return AjaxResult.error("获取绿证绿电交易电量、均价数据失败!"); + } + } + + @ApiOperation(value = "(导入数据)历年绿证市场交易情况", response = GreenSyndromeTradeByYearDTO.class) + @PostMapping("/greenSyndromeTradeByYear") + public AjaxResult greenSyndromeTradeByYear() { + try { + return AjaxResult.success(iGreenTradeService.greenSyndromeTradeByYear()); + }catch (Exception e) { + log.error("error: 获取历年绿证市场交易情况数据失败!", e); + return AjaxResult.error("获取历年绿证市场交易情况数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/package-info.java new file mode 100644 index 0000000..bd594df --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "绿电交易页面"相关接口 + * + * 接口说明: 接口为手动导入Excel接口 + */ +package com.alonginfo.project.gansu.controller.green; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/GridController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/GridController.java new file mode 100644 index 0000000..611ea07 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/GridController.java @@ -0,0 +1,89 @@ +package com.alonginfo.project.gansu.controller.grid; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.LineCapacityDTO; +import com.alonginfo.project.gansu.domain.LineTransportDTO; +import com.alonginfo.project.gansu.domain.TransformerInfoVO; +import com.alonginfo.project.gansu.service.grid.IGridService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/13 10:11 + * @Description: 甘肃网架图 Controller + */ +@Api(value = "甘肃网架图", tags = "甘肃网架图") +@Slf4j +@RestController +@RequestMapping("/grid") +public class GridController { + + @Autowired + private IGridService iGridService; + + /** + * 左下角文本框数据 + * @return + */ + @ApiOperation(value = "(导入数据)左下角文本框数据") + @PostMapping("/getTextBoxData") + public AjaxResult getTextBoxData() { + try { + return AjaxResult.success(iGridService.getTextBoxData()); + }catch (Exception e) { + log.error("error: 获取左下角文本框数据失败!", e); + return AjaxResult.error("获取左下角文本框数据失败!"); + } + } + + /** + * 变电站信息 + * @return + */ + @ApiOperation(value = "(导入数据)变电站信息", response = TransformerInfoVO.class) + @PostMapping("/getTransformerInfo") + public AjaxResult transformerSubstationInfo() { + try { + return AjaxResult.success(iGridService.getTransformerInfo()); + }catch (Exception e) { + log.error("error: 获取变电站信息数据失败!", e); + return AjaxResult.error("获取变电站信息数据失败!"); + } + } + + /** + * 各线路输送电量分析 + * @return + */ + @ApiOperation(value = "(导入数据)各线路输送电量分析", response = LineTransportDTO.class) + @PostMapping("/getLineTransport") + public AjaxResult lineTransport() { + try { + return AjaxResult.success(iGridService.getLineTransport()); + }catch (Exception e) { + log.error("error: 获取各线路输送电量分析数据失败!", e); + return AjaxResult.error("获取各线路输送电量分析数据失败!"); + } + } + + /** + * 各线路整体容量情况 + * @return + */ + @ApiOperation(value = "(导入数据)各线路整体容量情况", response = LineCapacityDTO.class) + @PostMapping("/getLineCapacity") + public AjaxResult lineCapacity() { + try { + return AjaxResult.success(iGridService.getLineCapacity()); + }catch (Exception e) { + log.error("error: 获取各线路整体容量情况数据失败!", e); + return AjaxResult.error("获取各线路整体容量情况数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/package-info.java new file mode 100644 index 0000000..f1cf6de --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "甘肃网架图页面"相关接口 + * + * 接口说明: 接口为手动导入Excel接口 + */ +package com.alonginfo.project.gansu.controller.grid; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/MarketBuildController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/MarketBuildController.java new file mode 100644 index 0000000..a39b53d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/MarketBuildController.java @@ -0,0 +1,153 @@ +package com.alonginfo.project.gansu.controller.marketbuild; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.DirectDealDTO; +import com.alonginfo.project.gansu.domain.EveryTypeSubjectDTO; +import com.alonginfo.project.gansu.service.marketbuild.IMarketBuildService; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/2/8 16:25 + * @Description: 市场建设情况controller + */ +@Api(value = "市场建设情况", tags = {"市场建设情况"}) +@RestController +@RequestMapping("/marketBuild") +public class MarketBuildController { + + @Autowired + private IMarketBuildService iMarketBuildService; + + //@ApiOperation("市场主体注册发展趋势") +// @ApiResponses({ +// @ApiResponse(code = 200, message = "请求成功!", response = RegisterTrendVo.class) +// }) +// @GetMapping("/getRegisterTrend") +// public AjaxResult getRegisterTrend() { +// try { +// return AjaxResult.success(iMarketBuildService.getRegisterTrend()); +// }catch (Exception e) { +// e.printStackTrace(); +// return AjaxResult.error("获取市场建设情况-市场主体注册发展趋势数据失败!"); +// } +// } + + //@ApiOperation("各类型发电企业数量变化情况") +// @ApiResponses({ +// @ApiResponse(code = 200, message = "请求成功!", response = EnterpriseChangesVo.class) +// }) +// @GetMapping("/getEnterpriseChanges") +// public AjaxResult getEnterpriseChanges() { +// try { +// return AjaxResult.success(iMarketBuildService.getEnterpriseChanges()); +// }catch (Exception e){ +// e.printStackTrace(); +// return AjaxResult.error("获取市场建设情况-各类型发电企业数量变化情况数据失败!"); +// } +// } + + //@ApiOperation("市场主体参与市场情况") +// @ApiResponses({ +// @ApiResponse(code = 200, message = "请求成功!", response = RegisterTrendVo.class) +// }) +// @GetMapping("/getSubjectJoin") +// public AjaxResult getSubjectJoin() { +// try { +// return AjaxResult.success(iMarketBuildService.getSubjectJoin()); +// }catch (Exception e) { +// e.printStackTrace(); +// return AjaxResult.error("获取市场建设情况-市场主体参与市场情况数据失败!"); +// } +// } + + //@ApiOperation("历年交易组织规模发展趋势") +// @ApiResponses({ +// @ApiResponse(code = 200, message = "请求成功!", response = DealOrganizeVo.class) +// }) +// @GetMapping("/getDealOrganize") +// public AjaxResult getDealOrganize() { +// try { +// return AjaxResult.success(iMarketBuildService.getDealOrganize()); +// }catch (Exception e) { +// e.printStackTrace(); +// return AjaxResult.error("获取市场建设情况-历年交易组织规模发展趋势"); +// } +// } + + //@ApiOperation("当年现货市场交易情况") +// @ApiResponses({ +// @ApiResponse(code = 200, message = "请求成功!", response = RegisterTrendVo.class) +// }) +// @GetMapping("/getStockMarket") +// public AjaxResult getStockMarketDeal() { +// try{ +// return AjaxResult.success(iMarketBuildService.getStockMarketDeal()); +// }catch (Exception e) { +// e.printStackTrace(); +// return AjaxResult.error("获取市场建设情况-当年现货市场交易情况数据失败!"); +// } +// } + + //@ApiOperation("当年绿电市场交易情况") +// @ApiResponses({ +// @ApiResponse(code = 200, message = "请求成功!", response = GreenElectricDealVo.class) +// }) +// @GetMapping("/greenElectricDeal") +// public AjaxResult getGreenElectricDeal() { +// try { +// return AjaxResult.success(iMarketBuildService.getGreenElectricDeal()); +// }catch (Exception e) { +// e.printStackTrace(); +// return AjaxResult.error("获取市场建设情况-当年绿电市场交易情况"); +// } +// } + + /** + * 交易类别/组织方式及当年成交电量 + * @param type 0-交易类别 1-组织方式 + * @return + */ + //@ApiOperation("交易类别/组织方式及当年成交电量") +// @ApiImplicitParam(name = "type", value = "0-交易类别及当年成交电量 1-组织方式及当年成交电量", required = true, dataType = "String", paramType = "query") +// @ApiResponses({ +// @ApiResponse(code = 200, message = "请求成功!") +// }) +// @GetMapping("/transactionPower") +// public AjaxResult getTransactionPower(@NotNull String type) { +// try { +// if (!"0".equals(type) && !"1".equals(type)) { +// return AjaxResult.error("type参数请输入0或1"); +// } +// return AjaxResult.success(iMarketBuildService.getTransactionPower(type)); +// }catch (Exception e) { +// e.printStackTrace(); +// return AjaxResult.error("获取市场建设情况-交易类别/组织方式及当年成交电量数据失败!"); +// } +// } + + /** + * 年度电力直接交易规模 + * @return + */ + @ApiOperation(value = "(同步数据)年度电力直接交易规模", response = DirectDealDTO.class) + @PostMapping("/getDirectDeal") + public AjaxResult getDirectDeal() { + return AjaxResult.success(iMarketBuildService.getDirectDeal()); + } + + /** + * 各类市场主体数量 + * @return + */ + @ApiOperation(value = "(同步数据)各类市场主体数量", response = EveryTypeSubjectDTO.class) + @PostMapping("/getEveryTypeSubject") + public AjaxResult getEveryTypeSubject() { + return AjaxResult.success(iMarketBuildService.getEveryTypeSubject()); + } +} + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/package-info.java new file mode 100644 index 0000000..f6b464e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "市场建设情况"相关接口 + * + * 接口说明: 定时任务同步数据至mysql sync/MarketBuildDataSync + */ +package com.alonginfo.project.gansu.controller.marketbuild; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/MarketSurveyController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/MarketSurveyController.java new file mode 100644 index 0000000..1acc388 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/MarketSurveyController.java @@ -0,0 +1,145 @@ +package com.alonginfo.project.gansu.controller.marketsurvey; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.service.marketsurvey.IMarketSurveyService; +import io.swagger.annotations.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +/** + * @author: HaoXs + * @Date: 2023/1/4 10:37 + * @Description: 市场概况controller + */ +@Api(value = "市场概况", tags = {"市场概况"}) +@RestController +@RequestMapping("/") +@Slf4j +@Validated +public class MarketSurveyController { + + @Autowired + private IMarketSurveyService iMarketSurveyService; + + /** + * (同步数据)当前市场主体情况 + * @return + */ + @ApiOperation(value = "(同步数据)当前市场主体情况", response = SubjectInfoDTO.class) + @PostMapping("/marketSurvey/getMarketSubjectInfo") + public AjaxResult marketSubjectInfo(){ + return AjaxResult.success(iMarketSurveyService.getMarketSubjectInfo()); + } + + /** + * (导入数据)发电、用电 + * + * 注:接口取消 + * + * @return 发电信息 【当年全口径发电量,火电发电量,水电发电量,新能源发电量】 + * 用电信息 【全社会用电量,第一产业用电量,第二产业用电量,第三产业用电量】 + */ + @ApiOperation(value = "(导入数据)发电、用电; 返回结果:{发电: 【当年全口径发电量,火电发电量,水电发电量,新能源发电量】, 用电:【全社会用电量,第一产业用电量,第二产业用电量,第三产业用电量】}") + @ApiImplicitParams({ + @ApiImplicitParam(name = "flag", value = "0-用电数据、1-发电数据", + dataType = "String", paramType = "query", required = true) + }) + @PostMapping("/marketSurvey/getUseGeneration") + public AjaxResult getUseGeneration(@NotNull @Max(value = 1, message = "请输入0或1!") + @Min(value = 0, message = "请输入0或1!") String flag) { + try { + return AjaxResult.success(iMarketSurveyService.getUseGeneration(flag)); + }catch (Exception e) { + log.error("error: 获取发电、用电数据失败!", e); + return AjaxResult.error("获取发电、用电数据失败!"); + } + } + + /** + * (导入数据)发电情况-各类型电量累计发用电 + * @return + */ + @ApiOperation(value = "(导入数据)发电情况-各类型电量累计发用电", response = CountPowerByTypeDTO.class) + @PostMapping("/marketSurvey/getCountPowerByType") + public AjaxResult getCountPowerByType() { + try { + return AjaxResult.success(iMarketSurveyService.getCountPowerByType()); + }catch (Exception e) { + log.error("error: 获取各类型电量累计发用电数据失败!", e); + return AjaxResult.error("获取各类型电量累计发用电数据失败!"); + } + } + + /** + * (导入数据)发电情况-当年用电趋势 + * @return + */ + @ApiOperation(value = "(导入数据)发电情况-当年用电趋势", response = UseTrendCurrentYearDTO.class) + @PostMapping("/marketSurvey/getUseTrendCurrentYear") + public AjaxResult getUseTrendCurrentYear() { + try { + return AjaxResult.success(iMarketSurveyService.getUseTrendCurrentYear()); + }catch (Exception e) { + log.error("error: 获取当年用电趋势数据失败!", e); + return AjaxResult.error("获取当年用电趋势数据失败!"); + } + } + + /** + * (导入数据)当年交易量趋势 + * @return + */ + //@ApiOperation(value = "(导入数据)当年交易量趋势") + //@PostMapping("/marketSurvey/getTradeVolumeTrendCurrent") + public AjaxResult getTradeVolumeTrendCurrent() { + try { + return AjaxResult.success(iMarketSurveyService.getTradeVolumeTrendCurrent()); + }catch (Exception e) { + log.error("error: 获取当年交易量趋势数据失败!", e); + return AjaxResult.error("获取当年交易量趋势数据失败!"); + } + } + + /** + * (导入数据)当年市场化电量累计执行情况 + * 注: 接口取消 + * @return + */ + @ApiOperation(value = "(导入数据)当年市场化电量累计执行情况", response = MarketCountExecuteDTO.class) + @PostMapping("/marketSurvey/getMarketCountExecute") + public AjaxResult getMarketCountExecute() { + try { + return AjaxResult.success(iMarketSurveyService.getMarketCountExecute()); + }catch (Exception e) { + log.error("error: 当年市场化电量累计执行情况数据失败!", e); + return AjaxResult.error("当年市场化电量累计执行情况数据失败!"); + } + } + + /** + * (导入数据)发电装机情况与利用小时数 + * @return + */ + @ApiOperation(value = "(导入数据)发电装机情况与利用小时数", response = InstallAndHoursDTO.class) + @PostMapping("/marketSurvey/getInstallAndHours") + public AjaxResult getInstallAndHours() { + try { + return AjaxResult.success(iMarketSurveyService.getInstallAndHours()); + }catch (Exception e) { + log.error("error: 获取发电装机情况与利用小时数数据失败!", e); + return AjaxResult.error("获取发电装机情况与利用小时数数据失败!"); + } + } + +} + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/package-info.java new file mode 100644 index 0000000..c47fba0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/package-info.java @@ -0,0 +1,10 @@ +/** + * 包说明(service、mapper同理): + * + * "市场概览"相关接口 + * + * 接口说明: (同步数据)定时任务同步数据至mysql sync/MarketSurveyDataSync + * (导入数据) 手动excel导入 + * (接口调用) 接口转接 直接调用交易平台接口 + */ +package com.alonginfo.project.gansu.controller.marketsurvey; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/MediumLongTermContractController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/MediumLongTermContractController.java new file mode 100644 index 0000000..e785225 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/MediumLongTermContractController.java @@ -0,0 +1,80 @@ +package com.alonginfo.project.gansu.controller.mltermcontract; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.SupplyTypeDTO; +import com.alonginfo.project.gansu.domain.TypePowerDTO; +import com.alonginfo.project.gansu.domain.OutsideDeliverDTO; +import com.alonginfo.project.gansu.service.mltermcontract.IMediumLongTermContractService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/5/15 11:26 + * @Description: 中长期合同签订情况controller + */ +@Api(value = "中长期合同签订情况", tags = {"中长期合同签订情况"}) +@RestController +@RequestMapping("/mediumLongTerm") +@Slf4j +public class MediumLongTermContractController { + + @Autowired + private IMediumLongTermContractService iMediumLongTermContractService; + + /** + * (同步数据)中长期省内交易品种及电量 + * @return + */ + @ApiOperation(value = "(同步数据)省内交易品种及电量", response = TypePowerDTO.class) + @PostMapping("/getTypePower") + public AjaxResult getTypePower() { + return AjaxResult.success(iMediumLongTermContractService.getTypePower()); + } + + /** + * (同步数据)电源类型及成交电量 + * @return + */ + @ApiOperation(value = "(同步数据)电源类型及成交电量", response = SupplyTypeDTO.class) + @PostMapping("/getSupplyType") + public AjaxResult getSupplyType() { + return AjaxResult.success(iMediumLongTermContractService.getSupplyType()); + } + + /** + * (导入数据)外送交易 + * @return + */ + @ApiOperation(value = "(导入数据)外送交易", response = OutsideDeliverDTO.class) + @PostMapping("/getOutsideDeliver") + public AjaxResult getOutsideDeliver() { + try { + return AjaxResult.success(iMediumLongTermContractService.getOutsideDeliver()); + }catch (Exception e) { + log.error("error: 获取中长期合同签订情况-外送交易数据失败!", e); + return AjaxResult.error("获取中长期合同签订情况-外送交易数据失败!"); + } + } + + /** + * (导入数据)外购交易 + * @return + */ + @ApiOperation(value = "(导入数据)外购交易", response = EchartsCommonDTO.class) + @PostMapping("/getOutsideBuy") + public AjaxResult getOutsideBuy() { + try { + return AjaxResult.success(iMediumLongTermContractService.getOutsideBuy()); + }catch (Exception e) { + log.error("error: 获取中长期合同签订情况-外购交易数据失败!", e); + return AjaxResult.error("获取中长期合同签订情况-外购交易数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/package-info.java new file mode 100644 index 0000000..a01ca62 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/package-info.java @@ -0,0 +1,9 @@ +/** + * 包说明(service、mapper同理): + * + * "中长期合同签订情况"相关接口 + * + * 接口说明: (同步数据)定时任务同步数据至mysql sync/MediumLongTermContractDataSync + * (导入数据) 手动excel导入 + */ +package com.alonginfo.project.gansu.controller.mltermcontract; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/NewEnergySurveyController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/NewEnergySurveyController.java new file mode 100644 index 0000000..31d5cd6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/NewEnergySurveyController.java @@ -0,0 +1,131 @@ +package com.alonginfo.project.gansu.controller.newenergy; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.domain.JoinEnergyTrendDTO; +import com.alonginfo.project.gansu.service.newEnergy.INewEnergySurveyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/5/17 14:33 + * @Description: 新能源概览controller + */ +@Api(value = "新能源概览", tags = {"新能源概览"}) +@RestController +@RequestMapping("/newEnergySurvey") +@Slf4j +public class NewEnergySurveyController { + + @Autowired + private INewEnergySurveyService iNewEnergySurveyService; + + /** + * (同步数据)新能源参与交易电量趋势 + * @return + */ + @ApiOperation(value = "(同步数据)新能源参与交易电量趋势", response = JoinEnergyTrendDTO.class) + @PostMapping("/getJoinEnergyTrend") + public AjaxResult getJoinEnergyTrend() { + return AjaxResult.success(iNewEnergySurveyService.getJoinEnergyTrend()); + } + + /** + * (导入数据)新能源装机结构 + * + * @return + */ + @ApiOperation(value = "(导入数据)新能源装机结构", response = InstallStructureDTO.class) + @PostMapping("/getInstallStructure") + public AjaxResult getInstallStructure() { + try { + return AjaxResult.success(iNewEnergySurveyService.getInstallStructure()); + } catch (Exception e) { + log.error("error: 获取新能源装机结构数据失败!", e); + return AjaxResult.error("获取新能源装机结构数据失败!"); + } + } + + /** + * (导入数据)新能源装机情况 + * + * @return + */ + @ApiOperation(value = "(导入数据)新能源装机情况", response = InstallSituationDTO.class) + @PostMapping("/getInstallSituation") + public AjaxResult getInstallSituation() { + try { + return AjaxResult.success(iNewEnergySurveyService.getInstallSituation()); + } catch (Exception e) { + log.error("error: 获取新能源装机情况数据失败!", e); + return AjaxResult.error("获取新能源装机情况数据失败!"); + } + } + + /** + * (导入数据)新能源发电趋势 + * + * @return + */ + @ApiOperation(value = "(导入数据)新能源发电趋势", response = ElectricTrendDTO.class) + @PostMapping("/getElectricTrend") + public AjaxResult getElectricTrend() { + try { + return AjaxResult.success(iNewEnergySurveyService.getElectricTrend()); + } catch (Exception e) { + log.error("error: 获取新能源发电趋势数据失败!", e); + return AjaxResult.error("获取新能源发电趋势数据失败!"); + } + } + + /** + * (导入数据)新能源发电与消纳情况 + * @return + */ + @ApiOperation(value = "(导入数据)新能源发电与消纳情况", response = ElectricAbsorptionDTO.class) + @PostMapping("/getElectricAbsorption") + public AjaxResult getElectricAbsorption() { + try { + return AjaxResult.success(iNewEnergySurveyService.getElectricAbsorption()); + }catch (Exception e) { + log.error("error: 获取新能源发电与消纳情况数据失败!", e); + return AjaxResult.error("获取新能源发电与消纳情况数据失败!"); + } + } + + /** + * (导入数据)新能源参与交易情况 + * @return + */ + @ApiOperation(value = "(导入数据)新能源参与交易情况", response = JoinTradeDTO.class) + @PostMapping("/getJoinTrade") + public AjaxResult getJoinTrade() { + try { + return AjaxResult.success(iNewEnergySurveyService.getJoinTrade()); + }catch (Exception e) { + log.error("error: 获取新能源参与交易情况数据失败!", e); + return AjaxResult.error("获取新能源参与交易情况数据失败!"); + } + } + + /** + * (导入数据)地图上方概览 + * @return + */ + @ApiOperation(value = "(导入数据)地图上方概览", response = MapTopOverviewDTO.class) + @PostMapping("/getMapTopOverview") + public AjaxResult getMapTopOverview() { + try { + return AjaxResult.success(iNewEnergySurveyService.getMapTopOverview()); + }catch (Exception e) { + log.error("error: 获取地图上方概览数据失败!", e); + return AjaxResult.error("获取地图上方概览数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/package-info.java new file mode 100644 index 0000000..1e9b09d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/package-info.java @@ -0,0 +1,9 @@ +/** + * 包说明(service、mapper同理): + * + * "新能源概览"相关接口 + * + * 接口说明: (同步数据)定时任务同步数据至mysql sync/NewEnergySurveyDataSync + * (导入数据) 手动excel导入 + */ +package com.alonginfo.project.gansu.controller.newenergy; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/ProvinceInnerController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/ProvinceInnerController.java new file mode 100644 index 0000000..25e2e33 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/ProvinceInnerController.java @@ -0,0 +1,122 @@ +package com.alonginfo.project.gansu.controller.provinceinner; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.service.provinceinner.IProvinceInnerService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/5/12 09:56 + * @Description: 省内交易情况 + */ +@Api(value = "省内交易情况", tags = {"省内交易情况"}) +@RestController +@RequestMapping("/provinceInner") +@Slf4j +public class ProvinceInnerController { + + @Autowired + private IProvinceInnerService iProvinceInnerService; + + /** + * (同步数据当年交易组织情况 + * @return + */ + @ApiOperation(value = "(同步数据)当年交易组织情况", response = PiDealOrganizeVo.class) + @PostMapping("/getDealOrganize") + public AjaxResult getDealOrganize() { + return AjaxResult.success(iProvinceInnerService.getDealOrganize()); + } + + /** + * (同步数据当年市场主体参与情况 + * @return + */ + @ApiOperation(value = "(同步数据)当年市场主体参与情况", response = PiSubjectJoinVo.class) + @PostMapping("/getSubjectJoinInfo") + public AjaxResult getSubjectJoinInfo() { + return AjaxResult.success(iProvinceInnerService.getSubjectJoinInfo()); + } + + /** + * (同步数据各电源类型交易电量占比 + * @return + */ + @ApiOperation(value = "(同步数据)各电源类型交易电量占比", response = PiCleanEnergyVo.class) + @PostMapping("/getCleanEnergy") + public AjaxResult getCleanEnergy() { + return AjaxResult.success(iProvinceInnerService.getCleanEnergy()); + } + + /** + * (同步数据交易概览 + * @return + */ + @ApiOperation(value = "(同步数据)交易概览", response = PiDealSurveyDTO.class) + @PostMapping("/getDealSurvey") + public AjaxResult getDealSurvey() { + return AjaxResult.success(iProvinceInnerService.getDealSurvey()); + } + + /** + * (同步数据当年交易量价走势 + * @return + */ + @ApiOperation(value = "(同步数据)当年交易量价走势", response = PiPowerPriceTrendDTO.class) + @PostMapping("/getPowerPriceTrend") + public AjaxResult getPowerPriceTrend() { + return AjaxResult.success(iProvinceInnerService.getPowerPriceTrend()); + } + + /** + * (导入数据)地图弹框数据 + * @return + */ + @ApiOperation(value = "(导入数据)地图弹框数据", response = MapTextDTO.class) + @PostMapping("/getMapText") + public AjaxResult getMapText() { + try { + return AjaxResult.success(iProvinceInnerService.getMapText()); + }catch (Exception e) { + log.error("error: 获取省内交易情况-地图弹框数据失败!", e); + return AjaxResult.error("获取省内交易情况-地图弹框数据失败!"); + } + } + + /** + * (导入数据)历年降低购电成本与交易均价 + * @return + */ + @ApiOperation(value = "(导入数据)历年降低购电成本与交易均价", response = CostAndAvgDTO.class) + @PostMapping("/costAndAvgByYear") + public AjaxResult getCostAndAvgByYear() { + try { + return AjaxResult.success(iProvinceInnerService.getCostAndAvgByYear()); + }catch (Exception e) { + log.error("error: 获取历年降低购电成本与交易均价数据失败!", e); + return AjaxResult.error("获取历年降低购电成本与交易均价数据失败!"); + } + } + + /** + * (导入数据)历年交易规模趋势 + * @return + */ + @ApiOperation(value = "(导入数据)历年交易规模趋势", response = TradeSizeDTO.class) + @PostMapping("/tradeSizeByYear") + public AjaxResult getTradeSizeByYear() { + try { + return AjaxResult.success(iProvinceInnerService.getTradeSizeByYear()); + }catch (Exception e) { + log.error("error: 获取历年交易规模趋势数据失败!", e); + return AjaxResult.error("获取历年交易规模趋势数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/package-info.java new file mode 100644 index 0000000..248999c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/package-info.java @@ -0,0 +1,9 @@ +/** + * 包说明(service、mapper同理): + * + * "省内交易情况"相关接口 + * + * 接口说明: (同步数据)定时任务同步数据至mysql sync/ProvinceInnerDataSync + * (导入数据) 手动excel导入 + */ +package com.alonginfo.project.gansu.controller.provinceinner; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/ProvinceMiddleController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/ProvinceMiddleController.java new file mode 100644 index 0000000..7823e31 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/ProvinceMiddleController.java @@ -0,0 +1,117 @@ +package com.alonginfo.project.gansu.controller.provincemiddle; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.service.provincemiddle.IProvinceMiddleService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/14 16:00 + * @Description: 省间交易情况(导入数据) + */ +@Api(value = "省间交易情况", tags = "省间交易情况") +@Slf4j +@RestController +@RequestMapping("/provinceMiddle") +public class ProvinceMiddleController { + + @Autowired + private IProvinceMiddleService iProvinceMiddleService; + + /** + * (导入数据)交易组织情况 + * @return + */ + @ApiOperation(value = "(导入数据)交易组织情况", response = OrganizeAndTypeVO.class) + @PostMapping("/getOrganize") + public AjaxResult getOrganize() { + try { + return AjaxResult.success(iProvinceMiddleService.getOrganize()); + }catch (Exception e) { + log.error("error: 获取省内交易情况-交易组织情况与交易类型数据失败!", e); + return AjaxResult.error("获取省内交易情况-交易组织情况与交易类型数据失败!"); + } + } + + /** + * (导入数据)当年外送电量成分 + * @return + */ + @ApiOperation(value = "(导入数据)当年外送电量成分", response = TradeElectricTypeDTO.class) + @PostMapping("/getElectricType") + public AjaxResult getTradeElectricType() { + try { + return AjaxResult.success(iProvinceMiddleService.getTradeElectricType()); + }catch (Exception e) { + log.error("error: 获取各类型电量交易情况数据失败!", e); + return AjaxResult.error("获取各类型电量交易情况数据失败!"); + } + } + + /** + * (导入数据)本年省间交易电量情况 + * @return + */ + @ApiOperation(value = "(导入数据)本年省间交易电量情况", response = TradeElectricCurrentYearDTO.class) + @PostMapping("/getTradeElectricCurrentYear") + public AjaxResult getTradeElectricCurrentYear() { + try { + return AjaxResult.success(iProvinceMiddleService.getTradeElectricCurrentYear()); + }catch (Exception e) { + log.error("error: 获取本年省间交易电量情况数据失败!", e); + return AjaxResult.error("获取本年省间交易电量情况数据失败!"); + } + } + + /** + * (导入数据)历年省间交易电量情况 + * @return + */ + @ApiOperation(value = "(导入数据)历年省间交易电量情况", response = TradeELectricCalendarYearDTO.class) + @PostMapping("/getTradeElectricCalendarYear") + public AjaxResult getTradeElectricCalendarYear() { + try { + return AjaxResult.success(iProvinceMiddleService.getTradeElectricCalendarYear()); + }catch (Exception e) { + log.error("error: 获取历年省间交易电量情况数据失败!", e); + return AjaxResult.error("获取历年省间交易电量情况数据失败!"); + } + } + + /** + * (导入数据)地图上方概览 + * @return + */ + @ApiOperation(value = "(导入数据)地图上方概览", response = OverviewDTO.class) + @PostMapping("/getOverview") + public AjaxResult getOverview() { + try { + return AjaxResult.success(iProvinceMiddleService.getOverview()); + }catch (Exception e) { + log.error("error: 获取地图上方概览数据失败!", e); + return AjaxResult.error("获取地图上方概览数据失败!"); + } + } + + /** + * (导入数据)外送省份及外送电量 + * @return + */ + @ApiOperation(value = "(导入数据)外送省份及外送电量", response = OutProvinceDTO.class) + @PostMapping("/getOutProvince") + public AjaxResult getOutProvince() { + try { + return AjaxResult.success(iProvinceMiddleService.getOutProvince()); + }catch (Exception e) { + log.error("error: 获取外送省份及外送电量数据失败!", e); + return AjaxResult.error("获取外送省份及外送电量数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/package-info.java new file mode 100644 index 0000000..f91da02 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "省间交易情况"相关接口 + * + * 接口说明: (导入数据) 手动excel导入 + */ +package com.alonginfo.project.gansu.controller.provincemiddle; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/ResourcesController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/ResourcesController.java new file mode 100644 index 0000000..b4500d5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/ResourcesController.java @@ -0,0 +1,104 @@ +package com.alonginfo.project.gansu.controller.resources; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.InstallCapicatyPowerDTO; +import com.alonginfo.project.gansu.domain.MapInfoDTO; +import com.alonginfo.project.gansu.domain.MapTopCanvasDTO; +import com.alonginfo.project.gansu.service.resources.IResourcesService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/9 16:38 + * @Description: 资源概况 + */ +@Api(value = "资源概览", tags = {"资源概览"}) +@RestController +@RequestMapping("/resources") +@Slf4j +public class ResourcesController { + + @Autowired + private IResourcesService iResourcesService; + + /** + * (导入数据)地图分布数据 + * @return + */ + @ApiOperation(value = "(导入数据)地图分布; modelText-弹框数据, mapText-地图数据", response = MapInfoDTO.class) + @PostMapping("/getMapInfo") + public AjaxResult getMapInfo() { + try { + return AjaxResult.success(iResourcesService.getMapInfo()); + }catch (Exception e) { + log.error("error: 资源概览-地图分布数据获取失败!"); + return AjaxResult.error("资源概览-地图分布数据获取失败!"); + } + } + + /** + * (导入数据)地图右上方图表 + * @return + */ + @ApiOperation(value = "(导入数据)地图右上方图表", response = MapTopCanvasDTO.class) + @PostMapping("/getMapTopCanvas") + public AjaxResult getMapTopData() { + try { + return AjaxResult.success(iResourcesService.getMapTopCanvas()); + }catch (Exception e) { + log.error("error: 资源概览-地图右上方图表数据获取失败!"); + return AjaxResult.error("资源概览-地图右上方图表数据获取失败!"); + } + } + + /** + * (导入数据)各类资源装机容量发电量对比 + * @return + */ + @ApiOperation(value = "(导入数据)各类资源装机容量发电量对比", response = InstallCapicatyPowerDTO.class) + @PostMapping("/getInstallAndPower") + public AjaxResult getInstallAndPower() { + try { + return AjaxResult.success(iResourcesService.getInstallAndPower()); + }catch (Exception e) { + log.error("error: 资源概览-各类资源装机容量发电量对比数据获取失败!"); + return AjaxResult.error("资源概览-各类资源装机容量发电量对比数据获取失败!"); + } + } + + /** + * (导入数据)资源开发情况 + * @return + */ + @ApiOperation(value = "(导入数据)资源开发情况") + @PostMapping("/getResourcesDevelop") + public AjaxResult getResourcesDevelop() { + try { + return AjaxResult.success(iResourcesService.getResourcesDevelop()); + }catch (Exception e) { + log.error("error: 资源概览-资源开发情况统计数据获取失败!"); + return AjaxResult.error("资源概览-资源开发情况统计数据获取失败!"); + } + } + + /** + * (导入数据)各地市资源装机情况 + * @return + */ + @ApiOperation(value = "(导入数据)各地市资源装机情况") + @PostMapping("/getPrefectureInstall") + public AjaxResult getPrefectureInstall() { + try { + return AjaxResult.success(iResourcesService.getPrefectureInstall()); + }catch (Exception e) { + log.error("error: 资源概览-各地市资源装机情况统计数据获取失败!"); + return AjaxResult.error("资源概览-各地市资源装机情况统计数据获取失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/package-info.java new file mode 100644 index 0000000..05158db --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "资源概览"相关接口 + * + * 接口说明: (导入数据) 手动excel导入 + */ +package com.alonginfo.project.gansu.controller.resources; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/TradeSettleController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/TradeSettleController.java new file mode 100644 index 0000000..fcbd9dc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/TradeSettleController.java @@ -0,0 +1,72 @@ +package com.alonginfo.project.gansu.controller.tradeSettle; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.service.provincemiddle.IProvinceMiddleService; +import com.alonginfo.project.gansu.service.tradeSettle.TradeSettleService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/14 16:00 + * @Description: 交易结算情况(导入数据) + */ +@Api(value = "交易结算情况", tags = "交易结算情况") +@Slf4j +@RestController +@RequestMapping("/tradeSettle") +public class TradeSettleController { + + @Autowired + private TradeSettleService tradeSettleService; + + /** + * (导入数据)省间交易结算情况 + * @return + */ + @ApiOperation(value = "(导入数据)省间交易结算情况", response = OrganizeAndTypeVO.class) + @PostMapping("/getProvinceTradeSettle") + public AjaxResult getProvinceTradeSettle() { + try { + return AjaxResult.success(tradeSettleService.getProvinceTradeSettle()); + }catch (Exception e) { + log.error("error: 获取交易结算情况-省间交易结算情况数据失败!", e); + return AjaxResult.error("获取交易结算情况-省间交易结算情况数据失败!"); + } + } + + /** + * 中间顶部-年度结算电量、年度结算笔数、年度结算均价 + * @return + */ + @PostMapping("/emossData/emossInfo") + public AjaxResult getEmossInfo() { + try { + return AjaxResult.success(tradeSettleService.getEmossInfo()); + }catch (Exception e) { + log.error("error: 获取交易结算情况-年度结算电量、年度结算笔数、年度结算均价数据失败!", e); + return AjaxResult.error("获取交易结算情况-年度结算电量、年度结算笔数、年度结算均价数据失败!"); + } + } + + /** + * (导入数据)中间地图数据 + * @return + */ + @ApiOperation(value = "(导入数据)中间地图数据", response = MapTextDTO.class) + @PostMapping("/getMapInfo") + public AjaxResult getMapInfo() { + try { + return AjaxResult.success(tradeSettleService.getMapInfo()); + }catch (Exception e) { + log.error("error: 获取交易结算情况-中间地图数据失败!", e); + return AjaxResult.error("获取交易结算情况-中间地图数据失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/package-info.java new file mode 100644 index 0000000..5d07e9d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "交易结算情况"相关接口 + * + * 接口说明: (导入数据) 手动excel导入 + */ +package com.alonginfo.project.gansu.controller.tradeSettle; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/TradingCenterController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/TradingCenterController.java new file mode 100644 index 0000000..9248f61 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/TradingCenterController.java @@ -0,0 +1,57 @@ +package com.alonginfo.project.gansu.controller.tradecenter; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.LegalPersonDTO; +import com.alonginfo.project.gansu.domain.ShareHoldingDTO; +import com.alonginfo.project.gansu.domain.StaffTeamDTO; +import com.alonginfo.project.gansu.service.tradecenter.ITradingCenterService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author: HaoXs + * @Date: 2023/6/8 16:09 + * @Description: 甘肃电力交易中心页面 + */ +@Api(value = "甘肃电力交易中心", tags = {"甘肃电力交易中心"}) +@RestController +@RequestMapping("/tradeCenter") +public class TradingCenterController { + + @Autowired + private ITradingCenterService ITradingCenterService; + + /** + * (导入数据)法人治理 + * @return + */ + @ApiOperation(value = "(导入数据)法人治理", response = LegalPersonDTO.class) + @PostMapping("/legal") + public AjaxResult getLegalPerson() { + return AjaxResult.success(ITradingCenterService.getLegalPerson()); + } + + /** + * (导入数据)内设机构及员工队伍 + * @return + */ + @ApiOperation(value = "(导入数据)内设机构及员工队伍", response = StaffTeamDTO.class) + @PostMapping("/staffTeam") + public AjaxResult getStaffTeam() { + return AjaxResult.success(ITradingCenterService.getStaffTeam()); + } + + /** + * (导入数据)公司股权结构 + * @return + */ + @ApiOperation(value = "(导入数据)公司股权结构", response = ShareHoldingDTO.class) + @PostMapping("/shareholding") + public AjaxResult getShareholdingRatio() { + return AjaxResult.success(ITradingCenterService.getShareHolding()); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/package-info.java new file mode 100644 index 0000000..bfa9279 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/package-info.java @@ -0,0 +1,8 @@ +/** + * 包说明(service、mapper同理): + * + * "甘肃电力交易中心"相关接口 + * + * 接口说明: (导入数据) 手动excel导入 + */ +package com.alonginfo.project.gansu.controller.tradecenter; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/UploadNoticeController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/UploadNoticeController.java new file mode 100644 index 0000000..197bb89 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/UploadNoticeController.java @@ -0,0 +1,121 @@ +package com.alonginfo.project.gansu.controller.uploadnotice; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.domain.MarketBuildUploadVo; +import com.alonginfo.project.gansu.domain.UploadNoticeVo; +import com.alonginfo.project.gansu.service.uploadnotice.IUploadNoticeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.Map; + +/** + * 交易公告上传页面相关接口 + */ +@RestController +@RequestMapping("/uploadNotice") +@Slf4j +public class UploadNoticeController { + + @Autowired + private IUploadNoticeService iUploadNoticeService; + + /** + * 获取交易公告上传记录列表 + * @param searchParam + * @return + */ + @PostMapping("/getSeqList") + public AjaxResult getSeqList(@RequestBody Map searchParam) { + try { + return AjaxResult.success(iUploadNoticeService.getSeqList(searchParam)); + }catch (Exception e) { + log.error("error: 获取交易公告上传记录列表失败!", e); + return AjaxResult.error("获取交易公告上传记录列表失败!"); + } + } + + /** + * 交易公告上传-文件上传 + * @param uploadNoticeVo + * @param result + * @return + */ + @PostMapping("/uploadNotice") + public AjaxResult uploadNotice(@Valid UploadNoticeVo uploadNoticeVo, BindingResult result) { + if (result.hasFieldErrors()) { + return AjaxResult.error(result.getFieldError().getDefaultMessage()); + } + try { + iUploadNoticeService.uploadNotice(uploadNoticeVo); + return AjaxResult.success("交易公告上传成功!"); + }catch (Exception e) { + log.error("error: 交易公告上传失败!", e); + return AjaxResult.error("error: 交易公告上传失败!"); + } + } + + /** + * 交易公告上传-删除交易公告 + * @return + */ + @PostMapping("/delNotice") + public AjaxResult delNotice(@Valid @NotNull(message = "交易序列id不可为空!") String seqId, + @NotNull(message = "文件路径不可为空!") String filePath) { + iUploadNoticeService.delNotice(seqId, filePath); + return AjaxResult.success(); + } + + /** + * 市场建设情况 公告文件上传 + * @param marketBuildUpload + * @return + */ + @PostMapping("/marketBuildUpload") + public AjaxResult marketBuildUpload(@Valid MarketBuildUploadVo marketBuildUpload, BindingResult result) { + if (result.hasFieldErrors()) { + return AjaxResult.error(result.getFieldError().getDefaultMessage()); + } + try { + iUploadNoticeService.marketBuildUpload(marketBuildUpload); + return AjaxResult.success("市场建设信息-公告信息上传成功!"); + }catch (Exception e) { + log.error("error: 市场建设信息-公告信息上传失败!", e); + return AjaxResult.error("error: 市场建设信息-公告信息上传失败!"); + } + } + + /** + * 获取市场建设情况公告列表 + * @param searchParam + * @return + */ + @PostMapping("/getMarketList") + public AjaxResult getMarketList(@RequestBody Map searchParam) { + try { + return AjaxResult.success(iUploadNoticeService.getMarketList(searchParam)); + }catch (Exception e) { + log.error("error: 获取市场建设情况公告列表失败!", e); + return AjaxResult.error("获取市场建设情况公告列表失败!"); + } + } + + /** + * 市场建设情况-删除交易公告 + * @return + */ + @PostMapping("/delMarketImageAndFile") + public AjaxResult delNotice(@Valid @NotNull(message = "文件标题不可为空!") String fileTitle, + @NotNull(message = "文件路径不可为空!") String fileUploadPath, + @NotNull(message = "图片路径不可为空!") String imageUploadPath) { + iUploadNoticeService.delMarketImageAndFile(fileTitle, fileUploadPath, imageUploadPath); + return AjaxResult.success(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/package-info.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/package-info.java new file mode 100644 index 0000000..5551322 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/package-info.java @@ -0,0 +1,7 @@ +/** + * 包说明(service、mapper同理): + * + * "系统-上传功能菜单"相关接口 + * + */ +package com.alonginfo.project.gansu.controller.uploadnotice; \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BilateralConsultResultVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BilateralConsultResultVo.java new file mode 100644 index 0000000..5dd5be0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BilateralConsultResultVo.java @@ -0,0 +1,20 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author: HaoXs + * @Date: 2023/2/3 09:51 + * @Description: 双边协商页面 返回结果vo对象 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@ApiModel("双边协商返回数据结果") +public class BilateralConsultResultVo { + + private DealTrends dealTrends; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzd.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzd.java new file mode 100644 index 0000000..741efae --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzd.java @@ -0,0 +1,40 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 合规概况-当年规章制度建设情况 + * @TableName bs_hggk_gzzd + */ +@Data +public class BsHggkGzzd implements Serializable { + /** + * 主键 + */ + private Integer dataId; + + /** + * 年份 + */ + private String dataX; + + /** + * 计划 + */ + private String dataY1; + + /** + * 完成 + */ + private String dataY2; + + /** + * 数据更新时间 + */ + private Date updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzk.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzk.java new file mode 100644 index 0000000..1fa3586 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzk.java @@ -0,0 +1,35 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 合规概况-当年信用工作开展成效 + * @TableName bs_hggk_gzzk + */ +@Data +public class BsHggkGzzk implements Serializable { + /** + * 主键 + */ + private Integer dataId; + + /** + * 信用评价试运行、信用见签 + */ + private String dataX; + + /** + * value + */ + private String dataY; + + /** + * 数据更新时间 + */ + private Date updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkLybh.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkLybh.java new file mode 100644 index 0000000..ee10c04 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkLybh.java @@ -0,0 +1,35 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 合规概况-当年履约保函工作成效 + * @TableName bs_hggk_lybh + */ +@Data +public class BsHggkLybh implements Serializable { + /** + * 主键 + */ + private Integer dataId; + + /** + * 售电公司、履约保函 + */ + private String dataX; + + /** + * value + */ + private String dataY; + + /** + * 数据更新时间 + */ + private Date updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BuySaleDetail.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BuySaleDetail.java new file mode 100644 index 0000000..896eb19 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BuySaleDetail.java @@ -0,0 +1,119 @@ +package com.alonginfo.project.gansu.domain; + +/** + * 购售方明细数据 表格数据 + * @author Administrator + * + */ +public class BuySaleDetail { + + private String tradeSeqId; + + private String tradeTimePart; + + private String tradeTimeRange; + + private String saleUnitsNames; + + private String vendeeUnitsNames; + + private String saleParticipantName; + + private String vendeeParticipantName; + + private String confirmEnergy; + + private String confirmTime; + + private String dataTime; + + public String getTradeSeqId() { + return tradeSeqId; + } + + public void setTradeSeqId(String tradeSeqId) { + this.tradeSeqId = tradeSeqId; + } + + public String getTradeTimePart() { + return tradeTimePart; + } + + public void setTradeTimePart(String tradeTimePart) { + this.tradeTimePart = tradeTimePart; + } + + public String getTradeTimeRange() { + return tradeTimeRange; + } + + public void setTradeTimeRange(String tradeTimeRange) { + this.tradeTimeRange = tradeTimeRange; + } + + public String getSaleUnitsNames() { + return saleUnitsNames; + } + + public void setSaleUnitsNames(String saleUnitsNames) { + this.saleUnitsNames = saleUnitsNames; + } + + public String getVendeeUnitsNames() { + return vendeeUnitsNames; + } + + public void setVendeeUnitsNames(String vendeeUnitsNames) { + this.vendeeUnitsNames = vendeeUnitsNames; + } + + public String getSaleParticipantName() { + return saleParticipantName; + } + + public void setSaleParticipantName(String saleParticipantName) { + this.saleParticipantName = saleParticipantName; + } + + public String getVendeeParticipantName() { + return vendeeParticipantName; + } + + public void setVendeeParticipantName(String vendeeParticipantName) { + this.vendeeParticipantName = vendeeParticipantName; + } + + public String getConfirmEnergy() { + return confirmEnergy; + } + + public void setConfirmEnergy(String confirmEnergy) { + this.confirmEnergy = confirmEnergy; + } + + public String getConfirmTime() { + return confirmTime; + } + + public void setConfirmTime(String confirmTime) { + this.confirmTime = confirmTime; + } + + public String getDataTime() { + return dataTime; + } + + public void setDataTime(String dataTime) { + this.dataTime = dataTime; + } + + @Override + public String toString() { + return "BuySaleDetail [tradeSeqId=" + tradeSeqId + ", tradeTimePart=" + tradeTimePart + ", tradeTimeRange=" + + tradeTimeRange + ", saleUnitsNames=" + saleUnitsNames + ", vendeeUnitsNames=" + vendeeUnitsNames + + ", saleParticipantName=" + saleParticipantName + ", vendeeParticipantName=" + vendeeParticipantName + + ", confirmEnergy=" + confirmEnergy + ", confirmTime=" + confirmTime + ", dataTime=" + dataTime + "]"; + } + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO.java new file mode 100644 index 0000000..54f67b6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO.java @@ -0,0 +1,39 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author: HaoXs + * @Date: 2023/6/19 15:19 + * @Description: 双碳监测-地图上方概览 + */ +@ApiModel +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class CarbonMapTopContentDTO { + + @ApiModelProperty("全社会用电量") + private String societyUsePower; + + @ApiModelProperty("全社会用电量同比") + private String societyUsePowerYoy; + + @ApiModelProperty("清洁能源碳减排量") + private String clearReduce; + + @ApiModelProperty("清洁能源碳减排量同比") + private String clearReduceYoy; + + @ApiModelProperty("清洁能源占比") + private String clearEnergyRatio; + + @ApiModelProperty("清洁能源占比同比") + private String clearEnergyRatioYoy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearAbsorptionAnalysisDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearAbsorptionAnalysisDTO.java new file mode 100644 index 0000000..3759f00 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearAbsorptionAnalysisDTO.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/16 16:49 + * @Description: 清洁能源消纳分析DTO + */ +@ApiModel +@Data +public class ClearAbsorptionAnalysisDTO { + + @ApiModelProperty("饼图数据") + private List> echartData; + + @ApiModelProperty("水电消纳") + private Map water; + + @ApiModelProperty("风电消纳") + private Map wind; + + @ApiModelProperty("光伏消纳") + private Map light; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearInstallTrendDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearInstallTrendDTO.java new file mode 100644 index 0000000..b58aaa5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearInstallTrendDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/19 11:35 + * @Description: 双碳监测-清洁能源装机趋势 + */ +@ApiModel +@Data +public class ClearInstallTrendDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("装机容量") + private List installCapacity; + + @ApiModelProperty("装机占比") + private List installRatio; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearRationDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearRationDTO.java new file mode 100644 index 0000000..439991e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearRationDTO.java @@ -0,0 +1,29 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/16 16:06 + * @Description: 历年清洁能源占比情况DTO + */ +@ApiModel +@Data +public class ClearRationDTO { + + @ApiModelProperty("y轴数据") + private List yData; + + @ApiModelProperty("光伏") + private List gf; + + @ApiModelProperty("风电") + private List fd; + + @ApiModelProperty("水电") + private List sd; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearReduceGainDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearReduceGainDTO.java new file mode 100644 index 0000000..e33c756 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearReduceGainDTO.java @@ -0,0 +1,17 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author: HaoXs + * @Date: 2023/6/19 11:55 + * @Description: 双碳监测-清洁能源减排成果 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@ApiModel +public class ClearReduceGainDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CostAndAvgDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CostAndAvgDTO.java new file mode 100644 index 0000000..3b7d381 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CostAndAvgDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/14 11:11 + * @Description: 省内交易情况(手动维护数据)-历年降低成本与交易均价 + */ +@Data +@ApiModel +public class CostAndAvgDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("降低购电成本") + private List costDown; + + @ApiModelProperty("平均交易电价") + private List avgPrice; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO.java new file mode 100644 index 0000000..62672e0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO.java @@ -0,0 +1,29 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/20 16:45 + * @Description: 发电情况-各类型电量累计发用电 + */ +@ApiModel +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class CountPowerByTypeDTO { + + @ApiModelProperty("用电量: [火电、其他、光伏、风电、水电]") + private List electricityConsumption; + + @ApiModelProperty("发电量: [火电、其他、光伏、风电、水电]") + private List powerGeneration; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DayAddThreeNotice.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DayAddThreeNotice.java new file mode 100644 index 0000000..505b4a5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DayAddThreeNotice.java @@ -0,0 +1,87 @@ +package com.alonginfo.project.gansu.domain; + +public class DayAddThreeNotice { + + private String tradeMode; + + private String organizationDate; + + private String beginTime; + + private String endTime; + + private String sellerAdmit; + + private String buyerAdmit; + + private String tradeCycle; + + private String resultIssue; + + public String getTradeMode() { + return tradeMode; + } + + public void setTradeMode(String tradeMode) { + this.tradeMode = tradeMode; + } + + public String getOrganizationDate() { + return organizationDate; + } + + public void setOrganizationDate(String organizationDate) { + this.organizationDate = organizationDate; + } + + public String getBeginTime() { + return beginTime; + } + + public void setBeginTime(String beginTime) { + this.beginTime = beginTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getSellerAdmit() { + return sellerAdmit; + } + + public void setSellerAdmit(String sellerAdmit) { + this.sellerAdmit = sellerAdmit; + } + + public String getBuyerAdmit() { + return buyerAdmit; + } + + public void setBuyerAdmit(String buyerAdmit) { + this.buyerAdmit = buyerAdmit; + } + + public String getTradeCycle() { + return tradeCycle; + } + + public void setTradeCycle(String tradeCycle) { + this.tradeCycle = tradeCycle; + } + + public String getResultIssue() { + return resultIssue; + } + + public void setResultIssue(String resultIssue) { + this.resultIssue = resultIssue; + } + + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeDTO.java new file mode 100644 index 0000000..9bfd35e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeDTO.java @@ -0,0 +1,33 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/19 16:42 + * @Description: 发电权交易情况 发电权交易组织情况DTO + */ +@Data +@ApiModel("发电权交易组织情况") +public class DealOrganizeDTO { + + @ApiModelProperty("组织次数") + private String powerCount; + + @ApiModelProperty("组织次数同比") + private String powerCountPer; + + @ApiModelProperty("成交笔数") + private String dealNum; + + @ApiModelProperty("成交笔数同比") + private String dealNumPer; + + @ApiModelProperty("成交电量") + private String dealEnergy; + + @ApiModelProperty("成交电量同比") + private String dealEnergyPer; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeVo.java new file mode 100644 index 0000000..dc89485 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeVo.java @@ -0,0 +1,25 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/2/9 16:57 + * @Description: 历年交易组织规模发展趋势 + */ +@ApiModel("历年交易组织规模发展趋势") +@Data +public class DealOrganizeVo { + + @ApiModelProperty(value = "曲线数据: index0-柱形数据 index1-折线数据") + private List> curveData = new ArrayList<>(); + + @ApiModelProperty(value = "x轴数据") + private List xAxis = new ArrayList<>(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealTrends.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealTrends.java new file mode 100644 index 0000000..7fe677b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealTrends.java @@ -0,0 +1,37 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.poi.ss.formula.functions.T; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/2/3 09:53 + * @Description: 交易量价趋势 返回结果 + */ +@Data +@ApiModel("交易量价趋势") +public class DealTrends { + + @ApiModelProperty("x轴数据") + private List xAxisData; + + private List countEnergy; + + private T peakAvg; + + private T flatAvg; + + private T valleyAvg; + + private T flat; + + private T valley; + + private T peak; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealDTO.java new file mode 100644 index 0000000..f75fa92 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealDTO.java @@ -0,0 +1,12 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 14:38 + * @Description: 市场建设情况场景-年度电力直接交易规模DTO + */ +public class DirectDealDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealPo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealPo.java new file mode 100644 index 0000000..d4a528e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealPo.java @@ -0,0 +1,17 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 14:29 + * @Description: + */ +@Data +public class DirectDealPo { + + private String tradeYear; + + private String sumVendeeEnergy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricAbsorptionDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricAbsorptionDTO.java new file mode 100644 index 0000000..b352993 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricAbsorptionDTO.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiOperation; +import lombok.Data; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/15 17:21 + * @Description: 新能源概览 - 新能源发电与消纳情况 + */ +@Data +@ApiModel +public class ElectricAbsorptionDTO { + + @ApiModelProperty("雷达图-消纳量") + private List> echartXN; + + @ApiModelProperty("雷达图-发电量") + private List> echartFD; + + @ApiModelProperty("表格数据") + private List> table; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricTrendDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricTrendDTO.java new file mode 100644 index 0000000..f1665a4 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricTrendDTO.java @@ -0,0 +1,13 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/15 17:02 + * @Description: 新能源概览-新能源发电趋势 + */ +@Data +public class ElectricTrendDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnergyCensus.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnergyCensus.java new file mode 100644 index 0000000..2b46ef1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnergyCensus.java @@ -0,0 +1,65 @@ +package com.alonginfo.project.gansu.domain; + +/** + * 发电类型统计 + * @author Administrator + * + */ +public class EnergyCensus { + + /** + * 交易序列id + */ + private String tradeSeqId; + + /** + * 电量值 + */ + private String saleEnergy; + + /** + * 发电类型 + */ + private String groupNames; + + private String dataTime; + + public String getTradeSeqId() { + return tradeSeqId; + } + + public void setTradeSeqId(String tradeSeqId) { + this.tradeSeqId = tradeSeqId; + } + + public String getSaleEnergy() { + return saleEnergy; + } + + public void setSaleEnergy(String saleEnergy) { + this.saleEnergy = saleEnergy; + } + + public String getGroupNames() { + return groupNames; + } + + public void setGroupNames(String groupNames) { + this.groupNames = groupNames; + } + + public String getDataTime() { + return dataTime; + } + + public void setDataTime(String dataTime) { + this.dataTime = dataTime; + } + + @Override + public String toString() { + return "EnergyCensus [tradeSeqId=" + tradeSeqId + ", saleEnergy=" + saleEnergy + ", groupNames=" + groupNames + + ", dataTime=" + dataTime + "]"; + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterpriseChangesVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterpriseChangesVo.java new file mode 100644 index 0000000..987aa95 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterpriseChangesVo.java @@ -0,0 +1,32 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/2/9 14:46 + * @Description: 各类型发电企业数量变化情况 + */ +@ApiModel("各类型发电企业数量变化情况") +@Data +public class EnterpriseChangesVo { + + /** + * 企业数量数据 + */ + @ApiModelProperty(value = "企业数量数据") + private List> seriesData = new ArrayList<>(); + + /** + *年份数据 + */ + @ApiModelProperty(value = "年份数据") + private List xAxis = new ArrayList<>(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterprisePo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterprisePo.java new file mode 100644 index 0000000..0cc9878 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterprisePo.java @@ -0,0 +1,32 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 11:49 + * @Description: + */ +@Data +public class EnterprisePo { + + private String waterCount; + + private String fireCount; + + private String windCount; + + private String sunCount; + + private String otherCount; + + private String water; + + private String fire; + + private String wind; + + private String sun; + + private String other; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectDTO.java new file mode 100644 index 0000000..bf59740 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectDTO.java @@ -0,0 +1,12 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 15:08 + * @Description: 各类市场主体数量DTO + */ +public class EveryTypeSubjectDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectPo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectPo.java new file mode 100644 index 0000000..bb1602d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectPo.java @@ -0,0 +1,20 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 15:16 + * @Description: + */ +@Data +public class EveryTypeSubjectPo { + + private String year; + + private String power; + + private String sale; + + private String user; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenElectricDealVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenElectricDealVo.java new file mode 100644 index 0000000..807f8af --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenElectricDealVo.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/2/10 15:39 + * @Description: 当年绿电市场交易情况 + */ +@Data +@ApiModel("当年绿电市场交易情况") +public class GreenElectricDealVo { + + @ApiModelProperty(value = "省间外送") + private List outer = new LinkedList<>(); + + @ApiModelProperty(value = "省内交易") + private List inner = new LinkedList<>(); +} + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenSyndromeTradeByYearDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenSyndromeTradeByYearDTO.java new file mode 100644 index 0000000..acfadae --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenSyndromeTradeByYearDTO.java @@ -0,0 +1,28 @@ +package com.alonginfo.project.gansu.domain; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/9/6 17:03 + * @Description: 绿证绿电交易情况 历年绿证市场交易情况 + */ +@Data +@ApiModel +public class GreenSyndromeTradeByYearDTO { + + @ApiModelProperty("x轴") + @JsonProperty("xAxis") + List xAxis; + + @ApiModelProperty("绿证交易数量") + List greenTradeNum; + + @ApiModelProperty("绿证交易价格") + List greenTradePrice; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO.java new file mode 100644 index 0000000..b75b697 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author: HaoXs + * @Date: 2023/6/19 16:55 + * @Description: 绿证绿电交易情况-绿证绿电交易电量、均价DTO + */ +@Data +@ApiModel +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class GreenTradeInfoDTO { + + @ApiModelProperty("2022省内绿电交易电量") + private String snlddl; + + @ApiModelProperty("2022省内绿电交易均价") + private String snldjj; + + @ApiModelProperty("2022年跨区绿电交易电量") + private String kqlvdl; + + @ApiModelProperty("2022年跨区绿电交易均价") + private String kqlvjj; + + @ApiModelProperty("2022年绿证交易电量") + private String lzjydl; + + @ApiModelProperty("2022年绿证交易均价") + private String lzjyjj; + + @ApiModelProperty("2023年绿证交易电量") + private String lzjydl1; + + @ApiModelProperty("2023年绿证交易均价") + private String lzjyjj1; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/IndustryEmissionDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/IndustryEmissionDTO.java new file mode 100644 index 0000000..f53fdd8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/IndustryEmissionDTO.java @@ -0,0 +1,57 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author: HaoXs + * @Date: 2023/6/19 11:06 + * @Description: 双碳监测-各行业电力用户碳排放情况DTO + */ +@ApiModel +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class IndustryEmissionDTO { + + @ApiModelProperty("汇总总数") + private String sum; + + @ApiModelProperty("农林牧渔业") + private String nlmyy; + + @ApiModelProperty("工业") + private String gy; + + @ApiModelProperty("建筑业") + private String jzy; + + @ApiModelProperty("交通运输仓储") + private String jtyscc; + + @ApiModelProperty("软件和信息") + private String rjxxjs; + + @ApiModelProperty("批发和零售") + private String pflsy; + + @ApiModelProperty("住宿和餐饮业") + private String zscyy; + + @ApiModelProperty("金融业") + private String jry; + + @ApiModelProperty("房地产业") + private String fdcy; + + @ApiModelProperty("租赁商服务业") + private String zlsfwy; + + @ApiModelProperty("公共服务及管理组织") + private String ggfwglzz; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallAndHoursDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallAndHoursDTO.java new file mode 100644 index 0000000..e8d16d0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallAndHoursDTO.java @@ -0,0 +1,35 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/21 11:00 + * @Description: (导入数据)发电装机情况与利用小时数 + */ +@ApiModel +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class InstallAndHoursDTO { + + @ApiModelProperty("装机容量 [总装机容量,火,水,风,光]") + private List installedCapacity; + + @ApiModelProperty("装机容量同比 [总同比,火,水,风,光]") + private List installedCapacityComparedToSame; + + @ApiModelProperty("利用小时 [总利用小时,火,水,风,光]") + private List usingHour; + + @ApiModelProperty("利用小时同比 [总同比,火,水,风,光]") + private List usingHourComparedToSame; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallCapicatyPowerDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallCapicatyPowerDTO.java new file mode 100644 index 0000000..2ed8227 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallCapicatyPowerDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/12 16:45 + * @Description: 装机容量发电量对比 + */ +@ApiModel +@Data +public class InstallCapicatyPowerDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("装机容量") + private List zjry; + + @ApiModelProperty("发电量") + private List fdy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallSituationDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallSituationDTO.java new file mode 100644 index 0000000..d78a5dc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallSituationDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/15 16:43 + * @Description: 新能源概览-新能源装机情况 + */ +@ApiModel +@Data +public class InstallSituationDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("风电") + private List windElectric; + + @ApiModelProperty("光电") + private List lightElectric; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureCount.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureCount.java new file mode 100644 index 0000000..82421ac --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureCount.java @@ -0,0 +1,28 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author: HaoXs + * @Date: 2023/6/15 15:26 + * @Description: 新能源装机结构 - 表格数据 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel +public class InstallStructureCount { + + @ApiModelProperty("新能源总装机容量") + private String xnyzzjry; + + @ApiModelProperty("同比") + private String tb; + + @ApiModelProperty("箭头标识 0下/1上") + private String flag; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureDTO.java new file mode 100644 index 0000000..9ed804e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureDTO.java @@ -0,0 +1,23 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/15 15:24 + * @Description: 新能源装机结构DTO + */ +@Data +@ApiModel +public class InstallStructureDTO { + + @ApiModelProperty("新能源总装机容量") + private InstallStructureCount count; + + @ApiModelProperty("表格数据") + private List table; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureTable.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureTable.java new file mode 100644 index 0000000..39dfda1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureTable.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/15 15:26 + * @Description: 新能源装机结构 - 总装机容量 + */ +@ApiModel +@Data +public class InstallStructureTable { + + @ApiModelProperty("装机类型") + private String name; + + @ApiModelProperty("装机容量值") + private String price; + + @ApiModelProperty("同比") + private String units; + + @ApiModelProperty("箭头标识 0下/1上") + private String flag; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinEnergyTrendDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinEnergyTrendDTO.java new file mode 100644 index 0000000..8456677 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinEnergyTrendDTO.java @@ -0,0 +1,13 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/19 16:24 + * @Description: 新能源概览 新能源参与交易电量趋势DTO + */ +@Data +public class JoinEnergyTrendDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinTradeDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinTradeDTO.java new file mode 100644 index 0000000..998af66 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinTradeDTO.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/15 18:14 + * @Description: 新能源概览 - 新能源参与交易情况 + */ +@Data +@ApiModel +public class JoinTradeDTO { + + @ApiModelProperty("环形图数据") + private List> echartData; + + @ApiModelProperty("交易电量总量") + private Map title; + + @ApiModelProperty("表格数据") + private List> table; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LegalPersonDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LegalPersonDTO.java new file mode 100644 index 0000000..29c28d1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LegalPersonDTO.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/8 16:18 + * @Description: 甘肃电力交易中心 法人治理 + */ +@ApiModel +@Data +public class LegalPersonDTO { + + @ApiModelProperty("股东会") + private String gd; + + @ApiModelProperty("董事会") + private String dsh; + + @ApiModelProperty("监事会") + private String jsh; + + @ApiModelProperty("经营层") + private String jyc; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineCapacityDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineCapacityDTO.java new file mode 100644 index 0000000..6ba9cb3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineCapacityDTO.java @@ -0,0 +1,15 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/13 14:58 + * @Description: 各线路整体容量情况 + */ +@Data +@ApiModel +public class LineCapacityDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineTransportDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineTransportDTO.java new file mode 100644 index 0000000..b311a7e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineTransportDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/13 14:40 + * @Description: 各线路输送电量分析 + */ +@Data +@ApiModel +public class LineTransportDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("清洁能源") + private List qjny; + + @ApiModelProperty("火电") + private List hd; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ManyDayRealTime.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ManyDayRealTime.java new file mode 100644 index 0000000..894f10d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ManyDayRealTime.java @@ -0,0 +1,69 @@ +package com.alonginfo.project.gansu.domain; + +/** + * 多日交易-实时状态 交易量价走势 实体类 + * @author Administrator + * + */ +public class ManyDayRealTime { + + /** + * 总电量 + */ + private String sumEnergy; + + /** + * 均价 + */ + private String avgPrice; + + /** + * 时间 + */ + private String createTime; + + /** + * 时段类型 + */ + private String timeRange; + + @Override + public String toString() { + // TODO Auto-generated method stub + return super.toString(); + } + + public String getSumEnergy() { + return sumEnergy; + } + + public void setSumEnergy(String sumEnergy) { + this.sumEnergy = sumEnergy; + } + + public String getAvgPrice() { + return avgPrice; + } + + public void setAvgPrice(String avgPrice) { + this.avgPrice = avgPrice; + } + + public String getCreateTime() { + return createTime; + } + + public void setCreateTime(String createTime) { + this.createTime = createTime; + } + + public String getTimeRange() { + return timeRange; + } + + public void setTimeRange(String timeRange) { + this.timeRange = timeRange; + } + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoDTO.java new file mode 100644 index 0000000..efcbbdc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoDTO.java @@ -0,0 +1,33 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/12 10:30 + * @Description: 地图分布 DTO + */ +@ApiModel +@Data +public class MapInfoDTO { + + @ApiModelProperty("光伏") + private Map gf; + + @ApiModelProperty("风电") + private Map fd; + + @ApiModelProperty("储能") + private Map cn; + + @ApiModelProperty("火电") + private Map hd; + + @ApiModelProperty("水电") + private Map sd; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoVO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoVO.java new file mode 100644 index 0000000..f42f475 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoVO.java @@ -0,0 +1,34 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/12 10:37 + * @Description: 地图分布 vo + */ +@Data +public class MapInfoVO { + + private String resourcesType; + + private String powerStation; + + private String installCapacity; + + private String stationOneNum; + + private String stationOnePower; + + private String stationTwoNum; + + private String stationTwoPower; + + private String stationThreeNum; + + private String stationThreePower; + + private String stationFourNum; + + private String stationFourPower; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextDTO.java new file mode 100644 index 0000000..44dc70d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextDTO.java @@ -0,0 +1,59 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/14 09:26 + * @Description: 省内交易情况(手动维护数据)、(手动维护数据)中间地图数据-地图弹框数据 DTO + */ +@ApiModel +@Data +public class MapTextDTO { + + @ApiModelProperty("酒泉市") + private List jqs; + + @ApiModelProperty("嘉峪关市") + private List jygs; + + @ApiModelProperty("张掖市") + private List zys; + + @ApiModelProperty("金昌市") + private List jcs; + + @ApiModelProperty("武威市") + private List wws; + + @ApiModelProperty("兰州市") + private List lzs; + + @ApiModelProperty("临夏回族自治州") + private List lxhzzzq; + + @ApiModelProperty("白银市") + private List bys; + + @ApiModelProperty("甘南藏族自治州") + private List gnzzzzq; + + @ApiModelProperty("定西市") + private List dxs; + + @ApiModelProperty("陇南市") + private List lns; + + @ApiModelProperty("天水市") + private List tss; + + @ApiModelProperty("平凉市") + private List pls; + + @ApiModelProperty("庆阳市") + private List qys; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextVO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextVO.java new file mode 100644 index 0000000..5c2037c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextVO.java @@ -0,0 +1,22 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/14 10:03 + * @Description: 省内交易情况(手动维护数据)、中间地图数据(手动维护数据)-地图弹框数据 VO + */ +@Data +public class MapTextVO { + + /** + * 地市名称 + */ + private String cityName; + + /** + * 交易电量 + */ + private String tradeElectric; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopCanvasDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopCanvasDTO.java new file mode 100644 index 0000000..9c4d009 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopCanvasDTO.java @@ -0,0 +1,23 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/12 16:20 + * @Description: 地图右上角图表 DTO + */ +@ApiModel +@Data +public class MapTopCanvasDTO { + + @ApiModelProperty("纵轴数据") + private List yData; + + @ApiModelProperty("横轴数据") + private List seriesData; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopContentDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopContentDTO.java new file mode 100644 index 0000000..5af60d6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopContentDTO.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/16 17:47 + * @Description: 地图上方概览 + */ +@Data +@ApiModel +public class MapTopContentDTO { + + @ApiModelProperty("清洁能源消纳") + private String absorption; + + @ApiModelProperty("清洁能源发电量") + private String power; + + @ApiModelProperty("新能源消纳率") + private String absorptionRate; + + @ApiModelProperty("节约标煤") + private String saveCoal; + + @ApiModelProperty("减排Co2") + private String reductionCo2; + + @ApiModelProperty("清洁能源消纳同比") + private String absorptionRateTb; + + @ApiModelProperty("可再生能源电力消纳责任占比-全部-最低") + private String absorptionRateAllLow; + + @ApiModelProperty("可再生能源电力消纳责任占比-非水-最低") + private String absorptionRateNoWaterLow; + + @ApiModelProperty("可再生能源电力消纳责任占比-实际完成-全部") + private String absorptionRateCompleteAll; + + @ApiModelProperty("可再生能源电力消纳责任占比-实际完成-非水") + private String absorptionRateCompleteNoWater; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopOverviewDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopOverviewDTO.java new file mode 100644 index 0000000..ffd660d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopOverviewDTO.java @@ -0,0 +1,24 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/15 18:41 + * @Description: 地图上方概览数据 + */ +@Data +@ApiModel +public class MapTopOverviewDTO { + + @ApiModelProperty("新能源总发电量") + private String xnyzfdy; + + @ApiModelProperty("新能源消纳") + private String xnyxn; + + @ApiModelProperty("消纳率") + private String xnl; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketBuildUploadVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketBuildUploadVo.java new file mode 100644 index 0000000..8d884bc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketBuildUploadVo.java @@ -0,0 +1,24 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.NotNull; + +/** + * @author: HaoXs + * @Date: 2023/7/3 16:11 + * @Description: + */ +@Data +public class MarketBuildUploadVo { + + @NotNull(message = "文件名称不可为空!") + private String fileTitle; + + @NotNull(message = "封面图片不可为空!") + private MultipartFile coverImage; + + @NotNull(message = "公告文件不可为空!") + private MultipartFile noticeFile; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO.java new file mode 100644 index 0000000..03efdea --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO.java @@ -0,0 +1,39 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/21 09:37 + * @Description: 市场概览-当年市场化电量累计执行情况DTO + */ +@ApiModel +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class MarketCountExecuteDTO { + + @ApiModelProperty("外送电量") + private Map powerToBeDeliveredToOutside; + + @ApiModelProperty("外购电量") + private Map purchasedElectricity; + + @ApiModelProperty("省内直接交易") + private Map inProvinceTheOtc; + + @ApiModelProperty("发电权交易") + private Map powerGenerationRightTrad; + + @ApiModelProperty("现货交易") + private Map spotTrad; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OrganizeAndTypeVO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OrganizeAndTypeVO.java new file mode 100644 index 0000000..3fe51c8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OrganizeAndTypeVO.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/14 16:31 + * @Description: 省间交易情况(导入数据)-交易组织情况 + */ +@Data +@ApiModel +public class OrganizeAndTypeVO { + + @ApiModelProperty("交易类型") + private String tradeType; + + @ApiModelProperty("组织次数") + private Integer organizeNum; + + @ApiModelProperty("成交电量") + private String tradeElectric; + + @ApiModelProperty("占比") + private String ratio; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutProvinceDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutProvinceDTO.java new file mode 100644 index 0000000..361fac7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutProvinceDTO.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/14 18:38 + * @Description: 省间交易情况(导入数据)-概览数据 + */ +@Data +@ApiModel +public class OutProvinceDTO { + + @ApiModelProperty("外送省份名称") + private String provinceName; + + @ApiModelProperty("外送电量") + private String outNum; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutsideDeliverDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutsideDeliverDTO.java new file mode 100644 index 0000000..b15d320 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutsideDeliverDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/20 10:18 + * @Description: (导入数据)中长期合约签订情况 - 外送交易 + */ +@ApiModel +@Data +public class OutsideDeliverDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("绿电电量") + private List greenElectric; + + @ApiModelProperty("外送电量") + private List outside; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OverviewDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OverviewDTO.java new file mode 100644 index 0000000..ce80668 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OverviewDTO.java @@ -0,0 +1,33 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/14 18:38 + * @Description: 省间交易情况(导入数据)-概览数据 + */ +@Data +@ApiModel +public class OverviewDTO { + + @ApiModelProperty("组织电量") + private String organizationElectric; + + @ApiModelProperty("外送电量") + private String outerElectric; + + @ApiModelProperty("祁韶直流电量") + private String QSDcElectric; + + @ApiModelProperty("配套电源电量") + private String powerElectric; + + @ApiModelProperty("市场化电量") + private String markerElectric; + + @ApiModelProperty("外送绿电") + private String outerGreenElectric; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiCleanEnergyVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiCleanEnergyVo.java new file mode 100644 index 0000000..9e3c2ce --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiCleanEnergyVo.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 17:30 + * @Description: 各类清洁能源成交电量 + */ +@Data +@ApiModel +public class PiCleanEnergyVo { + + @ApiModelProperty("清洁能源类型") + private String energyType; + + @ApiModelProperty("成交电量") + private String energyValue; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealOrganizeVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealOrganizeVo.java new file mode 100644 index 0000000..af1615e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealOrganizeVo.java @@ -0,0 +1,39 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 16:33 + * @Description: + */ +@ApiModel +@Data +public class PiDealOrganizeVo { + + @ApiModelProperty("双边协商交易-组织次数") + private String sbNum; + + @ApiModelProperty("集中竞价交易-组织次数") + private String jzNum; + + @ApiModelProperty("挂牌交易-组织次数") + private String gpNum; + + @ApiModelProperty("D+3交易-组织次数") + private String d3Num; + + @ApiModelProperty("双边协商交易-成交电量") + private String sbEnergy; + + @ApiModelProperty("双边协商交易-成交电量") + private String jzEnergy; + + @ApiModelProperty("挂牌交易-成交电量") + private String gpEnergy; + + @ApiModelProperty("D+3交易-成交电量") + private String d3Energy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealSurveyDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealSurveyDTO.java new file mode 100644 index 0000000..f7a677e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealSurveyDTO.java @@ -0,0 +1,35 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author: HaoXs + * @Date: 2023/5/18 17:44 + * @Description: 省内交易情况-交易概览DTO + */ +@Data +@ApiModel +public class PiDealSurveyDTO { + + @ApiModelProperty("市场准入数") + private String accessNum; + + @ApiModelProperty("市场准入同比") + private String accessYoy; + + @ApiModelProperty("交易组织次数") + private BigDecimal tradeNum; + + @ApiModelProperty("交易组织同比") + private BigDecimal tradeYoy; + + @ApiModelProperty("成交电量") + private BigDecimal vendeeEnergyNum; + + @ApiModelProperty("成交电量同比") + private BigDecimal vendeeEnergyYoy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendDTO.java new file mode 100644 index 0000000..6dde8b2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendDTO.java @@ -0,0 +1,13 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/19 10:43 + * @Description: 省内交易情况-当年交易量价走势DTO + */ +@Data +public class PiPowerPriceTrendDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendVo.java new file mode 100644 index 0000000..0b86f67 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendVo.java @@ -0,0 +1,22 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/19 10:56 + * @Description: 当年交易量价走势Vo + */ +@Data +public class PiPowerPriceTrendVo { + + private String tradeMonth; + + private String vendeeEnergy; + + private String vendeePrice; + + private String saleEnergy; + + private String salePrice; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiSubjectJoinVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiSubjectJoinVo.java new file mode 100644 index 0000000..b6a7756 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiSubjectJoinVo.java @@ -0,0 +1,33 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 17:01 + * @Description: 省内交易情况-当年市场主体参与情况 + */ +@Data +@ApiModel +public class PiSubjectJoinVo { + + @ApiModelProperty("发电企业-市场准入家数") + private String orgYield; + + @ApiModelProperty("售电公司-市场准入家数") + private String orgSale; + + @ApiModelProperty("电力用户-市场准入家数") + private String orgUser; + + @ApiModelProperty("发电企业-参与交易家数") + private String joinYield; + + @ApiModelProperty("售电公司-参与交易家数") + private String joinSale; + + @ApiModelProperty("电力用户-参与交易家数") + private String joinUser; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearDTO.java new file mode 100644 index 0000000..7ac937c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearDTO.java @@ -0,0 +1,13 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/25 15:23 + * @Description: 历年发电权交易电量趋势DTO + */ +@Data +public class PowerByYearDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearMonthDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearMonthDTO.java new file mode 100644 index 0000000..c0eda1e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearMonthDTO.java @@ -0,0 +1,13 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/25 15:56 + * @Description: 当年分月发电权交易电量趋势DTO + */ +@Data +public class PowerByYearMonthDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PrefectureInstallDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PrefectureInstallDTO.java new file mode 100644 index 0000000..87310cc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PrefectureInstallDTO.java @@ -0,0 +1,35 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/12 17:10 + * @Description: 资源开发情况 + */ +@Data +@ApiModel +public class PrefectureInstallDTO { + + @ApiModelProperty("地市/州") + private String prefectureName; + + @ApiModelProperty("火电") + private String fire; + + @ApiModelProperty("水电") + private String water; + + @ApiModelProperty("风电") + private String wind; + + @ApiModelProperty("光伏") + private String light; + + @ApiModelProperty("储能") + private String storage; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrend.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrend.java new file mode 100644 index 0000000..c1c224f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrend.java @@ -0,0 +1,146 @@ +package com.alonginfo.project.gansu.domain; + +import java.math.BigDecimal; + +/** + * 交易量价走势 + * @author Administrator + * + */ +public class PriceTrend { + + /** + * 交易序列id + */ + private String tradeSeqId; + + /** + * 交易序列名称 + */ + private String tradeSeqCaption; + + /** + * 申报时间点 + */ + private String reportTime; + + /** + * 峰值电量 + */ + private BigDecimal peakEnergy; + + /** + * 平值电量 + */ + private BigDecimal flatEnergy; + + /** + * 谷值电量 + */ + private String valleyEnergy; + + /** + * 峰段均价 + */ + private String peakAvgValue; + + /** + * 平段均价 + */ + private String flatAvgValue; + + /** + * 谷段均价 + */ + private String valleyAvgValue; + + private String dataTime; + + public String getTradeSeqId() { + return tradeSeqId; + } + + public void setTradeSeqId(String tradeSeqId) { + this.tradeSeqId = tradeSeqId; + } + + public String getTradeSeqCaption() { + return tradeSeqCaption; + } + + public void setTradeSeqCaption(String tradeSeqCaption) { + this.tradeSeqCaption = tradeSeqCaption; + } + + public String getReportTime() { + return reportTime; + } + + public void setReportTime(String reportTime) { + this.reportTime = reportTime; + } + + public BigDecimal getPeakEnergy() { + return peakEnergy; + } + + public void setPeakEnergy(BigDecimal peakEnergy) { + this.peakEnergy = peakEnergy; + } + + public BigDecimal getFlatEnergy() { + return flatEnergy; + } + + public void setFlatEnergy(BigDecimal flatEnergy) { + this.flatEnergy = flatEnergy; + } + + public String getValleyEnergy() { + return valleyEnergy; + } + + public void setValleyEnergy(String valleyEnergy) { + this.valleyEnergy = valleyEnergy; + } + + public String getPeakAvgValue() { + return peakAvgValue; + } + + public void setPeakAvgValue(String peakAvgValue) { + this.peakAvgValue = peakAvgValue; + } + + public String getFlatAvgValue() { + return flatAvgValue; + } + + public void setFlatAvgValue(String flatAvgValue) { + this.flatAvgValue = flatAvgValue; + } + + public String getValleyAvgValue() { + return valleyAvgValue; + } + + public void setValleyAvgValue(String valleyAvgValue) { + this.valleyAvgValue = valleyAvgValue; + } + + public String getDataTime() { + return dataTime; + } + + public void setDataTime(String dataTime) { + this.dataTime = dataTime; + } + + @Override + public String toString() { + return "PriceTrend [tradeSeqId=" + tradeSeqId + ", tradeSeqCaption=" + tradeSeqCaption + ", reportTime=" + + reportTime + ", peakEnergy=" + peakEnergy + ", flatEnergy=" + flatEnergy + ", valleyEnergy=" + + valleyEnergy + ", peakAvgValue=" + peakAvgValue + ", flatAvgValue=" + flatAvgValue + + ", valleyAvgValue=" + valleyAvgValue + "]"; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrendReplay.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrendReplay.java new file mode 100644 index 0000000..abf5653 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrendReplay.java @@ -0,0 +1,74 @@ +package com.alonginfo.project.gansu.domain; + +import java.math.BigDecimal; + +public class PriceTrendReplay { + + private String tradeSeqId; + + private String tradeTimeRange; + + private String countEnergy; + + private String timeDivisionNmae; + + private BigDecimal avgValue; + + private String dataTime; + + public String getTradeSeqId() { + return tradeSeqId; + } + + public void setTradeSeqId(String tradeSeqId) { + this.tradeSeqId = tradeSeqId; + } + + public String getTradeTimeRange() { + return tradeTimeRange; + } + + public void setTradeTimeRange(String tradeTimeRange) { + this.tradeTimeRange = tradeTimeRange; + } + + public String getCountEnergy() { + return countEnergy; + } + + public void setCountEnergy(String countEnergy) { + this.countEnergy = countEnergy; + } + + + public String getTimeDivisionNmae() { + return timeDivisionNmae; + } + + public void setTimeDivisionNmae(String timeDivisionNmae) { + this.timeDivisionNmae = timeDivisionNmae; + } + + public BigDecimal getAvgValue() { + return avgValue; + } + + public void setAvgValue(BigDecimal avgValue) { + this.avgValue = avgValue; + } + + public String getDataTime() { + return dataTime; + } + + public void setDataTime(String dataTime) { + this.dataTime = dataTime; + } + + @Override + public String toString() { + return "PriceTrendReplay [tradeSeqId=" + tradeSeqId + ", tradeTimeRange=" + tradeTimeRange + ", countEnergy=" + + countEnergy + ", timeDivisionName=" + timeDivisionNmae + ", avgValue=" + avgValue + ", dataTime=" + + dataTime + "]"; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/RegisterTrendVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/RegisterTrendVo.java new file mode 100644 index 0000000..899e491 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/RegisterTrendVo.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/2/8 16:35 + * @Description: 市场建设情况-市场主体注册发展趋势 + */ +@Data +@ApiModel("市场建设情况-市场主体注册发展趋势") +public class RegisterTrendVo { + + @ApiModelProperty(value = "y轴数据; 子元素属性: data: y轴数据值, name: 柱形图名称") + private List> seriesData = new ArrayList<>(); + + @ApiModelProperty(value = "x轴数据") + private List xAxis = new LinkedList<>(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ResourcesDevelopDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ResourcesDevelopDTO.java new file mode 100644 index 0000000..7fc59cf --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ResourcesDevelopDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/12 17:10 + * @Description: 资源开发情况 + */ +@Data +@ApiModel +public class ResourcesDevelopDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("已开发") + private List ykf; + + @ApiModelProperty("未开发") + private List wkf; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SaleBuyEnterpriseOrderDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SaleBuyEnterpriseOrderDTO.java new file mode 100644 index 0000000..18c035f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SaleBuyEnterpriseOrderDTO.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/25 11:32 + * @Description: 买入、卖出电量企业 DTO + */ +@Data +@ApiModel +public class SaleBuyEnterpriseOrderDTO { + + @ApiModelProperty("企业名称") + private String participantName; + + @ApiModelProperty("电量") + private String energy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SgccAddress.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SgccAddress.java new file mode 100644 index 0000000..574d33a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SgccAddress.java @@ -0,0 +1,44 @@ +package com.alonginfo.project.gansu.domain; + +public class SgccAddress { + + private Integer id; + + private String env; + + private String sgccName; + + private String sgccAddress; + + public String getSgccName() { + return sgccName; + } + + public void setSgccName(String sgccName) { + this.sgccName = sgccName; + } + + public String getSgccAddress() { + return sgccAddress; + } + + public void setSgccAddress(String sgccAddress) { + this.sgccAddress = sgccAddress; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ShareHoldingDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ShareHoldingDTO.java new file mode 100644 index 0000000..2e8ad42 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ShareHoldingDTO.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/9 10:31 + * @Description: 公司股权结构 + */ +@ApiModel +@Data +public class ShareHoldingDTO { + + @ApiModelProperty("公司名称") + private String companyName; + + @ApiModelProperty("股权占比") + private String shareholdingRatio; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/StaffTeamDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/StaffTeamDTO.java new file mode 100644 index 0000000..d91448b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/StaffTeamDTO.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/9 09:55 + * @Description: 内设机构及员工队伍 + */ +@ApiModel +@Data +public class StaffTeamDTO { + + @ApiModelProperty("在岗职工") + private String zg; + + @ApiModelProperty("本科学历") + private String bk; + + @ApiModelProperty("党员人数") + private String dy; + + @ApiModelProperty("中高级职称") + private String zgj; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectInfoDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectInfoDTO.java new file mode 100644 index 0000000..2a6323d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectInfoDTO.java @@ -0,0 +1,63 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 11:54 + * @Description: 当前市场主体情况 + */ +@Data +@ApiModel +public class SubjectInfoDTO { + + @ApiModelProperty(value = "售电公司数量") + private String saleCount; + + @ApiModelProperty("电力用户数量") + private String userCount; + + @ApiModelProperty("发电企业数量") + private String powerCount; + + @ApiModelProperty("售电公司占比") + private String sale; + + @ApiModelProperty("电力用户占比") + private String user; + + @ApiModelProperty("发电企业占比") + private String power; + + @ApiModelProperty("水电企业数量") + private String waterCount; + + @ApiModelProperty("火电企业数量") + private String fireCount; + + @ApiModelProperty("风电企业数量") + private String windCount; + + @ApiModelProperty("光伏企业数量") + private String sunCount; + + @ApiModelProperty("其他企业数量") + private String otherCount; + + @ApiModelProperty("水电企业占比") + private String water; + + @ApiModelProperty("火电企业占比") + private String fire; + + @ApiModelProperty("风电企业占比") + private String wind; + + @ApiModelProperty("光伏企业占比") + private String sun; + + @ApiModelProperty("其他企业占比") + private String other; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectJoinDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectJoinDTO.java new file mode 100644 index 0000000..fb7db68 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectJoinDTO.java @@ -0,0 +1,24 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/19 17:05 + * @Description: 发电权交易情况 当年发电权交易市场主体参与情况 + */ +@Data +@ApiModel("当年发电权交易市场主体参与情况") +public class SubjectJoinDTO { + + @ApiModelProperty("发电权交易市场参与主体数") + private String participantCount; + + @ApiModelProperty("买入方数量") + private String vendeeParticipantCount; + + @ApiModelProperty("卖出方数量") + private String saleParticipantCount; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectRatioPo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectRatioPo.java new file mode 100644 index 0000000..cba40ff --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectRatioPo.java @@ -0,0 +1,32 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/18 11:28 + * @Description: 市场主体类型、数量、占比 + */ +@Data +public class SubjectRatioPo { + + @ApiModelProperty(value = "售电公司数量") + private String saleCount; + + @ApiModelProperty("电力用户数量") + private String userCount; + + @ApiModelProperty("发电企业数量") + private String powerCount; + + @ApiModelProperty("售电公司占比") + private String sale; + + @ApiModelProperty("电力用户占比") + private String user; + + @ApiModelProperty("发电企业占比") + private String power; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SupplyTypeDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SupplyTypeDTO.java new file mode 100644 index 0000000..f4f0fa3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SupplyTypeDTO.java @@ -0,0 +1,38 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author: HaoXs + * @Date: 2023/5/19 15:16 + * @Description: 中长期合同签订情况 电源类型及成交电量 + */ +@Data +@ApiModel +public class SupplyTypeDTO { + + @ApiModelProperty("总成交量") + private String countEnergy; + + @ApiModelProperty("火电成交量") + private String fireEnergy; + + @ApiModelProperty("火电占比") + private String fireRatio; + + @ApiModelProperty("水电成交量") + private String waterEnergy; + + @ApiModelProperty("水电占比") + private String waterRatio; + + @ApiModelProperty("新能源成交量") + private String newEnergy; + + @ApiModelProperty("新能源占比") + private String newRatio; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TextBoxVO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TextBoxVO.java new file mode 100644 index 0000000..3637da6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TextBoxVO.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/13 10:23 + * @Description: 甘肃网架图 VO + */ +@Data +@ApiModel +public class TextBoxVO { + + @ApiModelProperty("最高输电能力") + private String maxTransportCapacity; + + @ApiModelProperty("累计输送电量") + private String totalTransportCapacity; + + @ApiModelProperty("累计输送绿电") + private String totalTransportGreenCapacity; + + @ApiModelProperty("绿电占比") + private String greenPowerRate; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeELectricCalendarYearDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeELectricCalendarYearDTO.java new file mode 100644 index 0000000..50326db --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeELectricCalendarYearDTO.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiOperation; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/14 18:23 + * @Description: 省间交易情况(导入数据)-历年省间交易电量情况 + */ +@Data +@ApiModel +public class TradeELectricCalendarYearDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("电量") + private List electric; + + @ApiModelProperty("外送电价") + private List outerPrice; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricCurrentYearDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricCurrentYearDTO.java new file mode 100644 index 0000000..8752f45 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricCurrentYearDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/14 17:58 + * @Description: 省间交易情况(导入数据)-本年省间交易电量情况 + */ +@Data +@ApiModel +public class TradeElectricCurrentYearDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("电量") + private List electric; + + @ApiModelProperty("外送电价") + private List outerPrice; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricTypeDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricTypeDTO.java new file mode 100644 index 0000000..420c030 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricTypeDTO.java @@ -0,0 +1,25 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiOperation; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/14 17:13 + * @Description: 各类型电量交易情况 + */ +@Data +@ApiModel +public class TradeElectricTypeDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("y轴数据") + private List yData; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeNotice.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeNotice.java new file mode 100644 index 0000000..4059291 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeNotice.java @@ -0,0 +1,153 @@ +package com.alonginfo.project.gansu.domain; + +public class TradeNotice { + + private String tradeSeqId; + + private String beginDate; + + private String endDate; + + private String conBegDate; + + private String conEndDate; + + private Integer bandNum; + + private String tradetypeMode; + + private String tradeseqCycle; + + private Integer saleNum; + + private Integer vendeeNum; + + private String pubTime; + + private String file; + + private String resPubTime; + + private String dataTime; + + public String getTradeSeqId() { + return tradeSeqId; + } + + public void setTradeSeqId(String tradeSeqId) { + this.tradeSeqId = tradeSeqId; + } + + public String getBeginDate() { + return beginDate; + } + + public void setBeginDate(String beginDate) { + this.beginDate = beginDate; + } + + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + public String getConBegDate() { + return conBegDate; + } + + public void setConBegDate(String conBegDate) { + this.conBegDate = conBegDate; + } + + public String getConEndDate() { + return conEndDate; + } + + public void setConEndDate(String conEndDate) { + this.conEndDate = conEndDate; + } + + public Integer getBandNum() { + return bandNum; + } + + public void setBandNum(Integer bandNum) { + this.bandNum = bandNum; + } + + public String getTradetypeMode() { + return tradetypeMode; + } + + public void setTradetypeMode(String tradetypeMode) { + this.tradetypeMode = tradetypeMode; + } + + public String getTradeseqCycle() { + return tradeseqCycle; + } + + public void setTradeseqCycle(String tradeseqCycle) { + this.tradeseqCycle = tradeseqCycle; + } + + public Integer getSaleNum() { + return saleNum; + } + + public void setSaleNum(Integer saleNum) { + this.saleNum = saleNum; + } + + public Integer getVendeeNum() { + return vendeeNum; + } + + public void setVendeeNum(Integer vendeeNum) { + this.vendeeNum = vendeeNum; + } + + public String getPubTime() { + return pubTime; + } + + public void setPubTime(String pubTime) { + this.pubTime = pubTime; + } + + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + public String getResPubTime() { + return resPubTime; + } + + public void setResPubTime(String resPubTime) { + this.resPubTime = resPubTime; + } + + public String getDataTime() { + return dataTime; + } + + public void setDataTime(String dataTime) { + this.dataTime = dataTime; + } + + @Override + public String toString() { + return "TradeNotice [tradeSeqId=" + tradeSeqId + ", beginDate=" + beginDate + ", endDate=" + endDate + + ", conBegDate=" + conBegDate + ", conEndDate=" + conEndDate + ", bandNum=" + bandNum + + ", tradetypeMode=" + tradetypeMode + ", tradeseqCycle=" + tradeseqCycle + ", saleNum=" + saleNum + + ", vendeeNum=" + vendeeNum + ", pubTime=" + pubTime + ", file=" + file + ", resPubTime=" + resPubTime + + ", dataTime=" + dataTime + "]"; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSeq.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSeq.java new file mode 100644 index 0000000..c464334 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSeq.java @@ -0,0 +1,90 @@ +package com.alonginfo.project.gansu.domain; + +/** + * 甘肃二期-双边协商交易过程监视及回演 交易序列信息 + * @author Administrator + * + */ +public class TradeSeq { + + /** + * 交易序列id + */ + private String tradeSeqId; + + /** + * 交易序列名称 + */ + private String tradeSeqCaption; + + private String subTradetype; + + private String tradeSeqType; + + private String creatTime; + + /** + * 入库时间 + */ + private String dataTime; + + public String getTradeSeqId() { + return tradeSeqId; + } + + public void setTradeSeqId(String tradeSeqId) { + this.tradeSeqId = tradeSeqId; + } + + public String getTradeSeqCaption() { + return tradeSeqCaption; + } + + public void setTradeSeqCaption(String tradeSeqCaption) { + this.tradeSeqCaption = tradeSeqCaption; + } + + public String getDataTime() { + return dataTime; + } + + public void setDataTime(String dataTime) { + this.dataTime = dataTime; + } + + public String getSubTradetype() { + return subTradetype; + } + + public void setSubTradetype(String subTradetype) { + this.subTradetype = subTradetype; + } + + public String getTradeSeqType() { + return tradeSeqType; + } + + public void setTradeSeqType(String tradeSeqType) { + this.tradeSeqType = tradeSeqType; + } + + public String getCreatTime() { + return creatTime; + } + + public void setCreatTime(String creatTime) { + this.creatTime = creatTime; + } + + @Override + public String toString() { + return "TradeSeq{" + + "tradeSeqId='" + tradeSeqId + '\'' + + ", tradeSeqCaption='" + tradeSeqCaption + '\'' + + ", subTradetype='" + subTradetype + '\'' + + ", tradeSeqType='" + tradeSeqType + '\'' + + ", creatTime='" + creatTime + '\'' + + ", dataTime='" + dataTime + '\'' + + '}'; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleDTO.java new file mode 100644 index 0000000..bc4cd80 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleDTO.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/14 18:38 + * @Description: 省间交易情况(导入数据)-概览数据 + */ +@Data +@ApiModel +public class TradeSettleDTO { + + @ApiModelProperty("x轴数据") + private List xData; + + @ApiModelProperty("中长期交易电量") + private List zcqTradeElectric; + + @ApiModelProperty("短期交易电量") + private List dqTradeElectric; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleMapInfoVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleMapInfoVo.java new file mode 100644 index 0000000..769d03f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleMapInfoVo.java @@ -0,0 +1,18 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/9/7 17:15 + * @Description: + */ +@Data +public class TradeSettleMapInfoVo { + + private String cityName; + + private String powerSupply; + + private String powerSupplyYoy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSizeDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSizeDTO.java new file mode 100644 index 0000000..e741513 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSizeDTO.java @@ -0,0 +1,15 @@ +package com.alonginfo.project.gansu.domain; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/14 11:30 + * @Description: 省内交易情况(手动维护数据)-历年交易规模趋势 + */ +@Data +@ApiModel +public class TradeSizeDTO extends EchartsCommonDTO { +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeStatus.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeStatus.java new file mode 100644 index 0000000..ad18245 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeStatus.java @@ -0,0 +1,197 @@ +package com.alonginfo.project.gansu.domain; + +import java.math.BigDecimal; + +/** + * 交易情况实体类 + * @author Administrator + * + */ +public class TradeStatus { + + private String tradeSeqId; + + /** + * 售方申报家数 + */ + private Integer saleSuoteNum; + + /** + * 售方成交家数 + */ + private Integer saleResultNum; + + /** + * 售方申报电量 + */ + private BigDecimal saleEnergy; + + /** + * 购方确认家数 + */ + private Integer vendeeConfimNum; + + /** + * 购方成交笔数 + */ + private Integer vendeeNum; + + /** + * 购方确认电量 + */ + private BigDecimal vendeeEnergy; + + /** + * 直接交易用户 + */ + private Integer directResultNum; + + /** + * 售电公司家数 + */ + private Integer retailResultNum; + + /**\ + * 成交电量 + */ + private BigDecimal energy; + + /** + * 成交均价 + */ + private BigDecimal avgPrice; + + /** + * 最高成交价 + */ + private BigDecimal maxPrice; + + /** + * 最低成交价 + */ + private BigDecimal minPrice; + + private String dataTime; + + public String getTradeSeqId() { + return tradeSeqId; + } + + public void setTradeSeqId(String tradeSeqId) { + this.tradeSeqId = tradeSeqId; + } + + public Integer getSaleSuoteNum() { + return saleSuoteNum; + } + + public void setSaleSuoteNum(Integer saleSuoteNum) { + this.saleSuoteNum = saleSuoteNum; + } + + public Integer getSaleResultNum() { + return saleResultNum; + } + + public void setSaleResultNum(Integer saleResultNum) { + this.saleResultNum = saleResultNum; + } + + public BigDecimal getSaleEnergy() { + return saleEnergy; + } + + public void setSaleEnergy(BigDecimal saleEnergy) { + this.saleEnergy = saleEnergy; + } + + public Integer getVendeeConfimNum() { + return vendeeConfimNum; + } + + public void setVendeeConfimNum(Integer vendeeConfimNum) { + this.vendeeConfimNum = vendeeConfimNum; + } + + public Integer getVendeeNum() { + return vendeeNum; + } + + public void setVendeeNum(Integer vendeeNum) { + this.vendeeNum = vendeeNum; + } + + public BigDecimal getVendeeEnergy() { + return vendeeEnergy; + } + + public void setVendeeEnergy(BigDecimal vendeeEnergy) { + this.vendeeEnergy = vendeeEnergy; + } + + public BigDecimal getEnergy() { + return energy; + } + + public void setEnergy(BigDecimal energy) { + this.energy = energy; + } + + public BigDecimal getAvgPrice() { + return avgPrice; + } + + public void setAvgPrice(BigDecimal avgPrice) { + this.avgPrice = avgPrice; + } + + public BigDecimal getMaxPrice() { + return maxPrice; + } + + public void setMaxPrice(BigDecimal maxPrice) { + this.maxPrice = maxPrice; + } + + public BigDecimal getMinPrice() { + return minPrice; + } + + public void setMinPrice(BigDecimal minPrice) { + this.minPrice = minPrice; + } + + public String getDataTime() { + return dataTime; + } + + public void setDataTime(String dataTime) { + this.dataTime = dataTime; + } + + public Integer getDirectResultNum() { + return directResultNum; + } + + public void setDirectResultNum(Integer directResultNum) { + this.directResultNum = directResultNum; + } + + public Integer getRetailResultNum() { + return retailResultNum; + } + + public void setRetailResultNum(Integer retailResultNum) { + this.retailResultNum = retailResultNum; + } + + @Override + public String toString() { + return "TradeStatus [tradeSeqId=" + tradeSeqId + ", saleSuoteNum=" + saleSuoteNum + ", saleResultNum=" + + saleResultNum + ", saleEnergy=" + saleEnergy + ", vendeeConfimNum=" + vendeeConfimNum + ", vendeeNum=" + + vendeeNum + ", vendeeEnergy=" + vendeeEnergy + ", directResultNum=" + directResultNum + + ", retailResultNum=" + retailResultNum + ", energy=" + energy + ", avgPrice=" + avgPrice + + ", maxPrice=" + maxPrice + ", minPrice=" + minPrice + ", dataTime=" + dataTime + "]"; + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO.java new file mode 100644 index 0000000..af18892 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO.java @@ -0,0 +1,41 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/21 10:19 + * @Description: (导入数据)当年交易量趋势 + */ +@ApiModel +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class TradeVolumeCurrentDTO { + + @ApiModelProperty("省内电量") + private List electricityInProvince; + + @ApiModelProperty("外送电量") + private List powerToBeDeliveredToOutside; + + @ApiModelProperty("外购电量") + private List purchasedElectricity; + + @ApiModelProperty("省内均价") + private List inProvinceTheAverage; + + @ApiModelProperty("外送均价") + private List averagePriceToBeDeliveredToOutside; + + @ApiModelProperty("外购均价") + private List outsourcingAverage; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransactionPowerVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransactionPowerVo.java new file mode 100644 index 0000000..ef0b920 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransactionPowerVo.java @@ -0,0 +1,25 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/2/10 17:22 + * @Description: 交易类别/组织方式及当年成交电量 + */ +@Data +@ApiModel("交易类别/组织方式及当年成交电量") +public class TransactionPowerVo { + + @ApiModelProperty(value = "表格数据") + private List> tableData = new ArrayList<>(); + + @ApiModelProperty(value = "饼图数据") + private List> graphData = new ArrayList<>(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransformerInfoVO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransformerInfoVO.java new file mode 100644 index 0000000..f2bce94 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransformerInfoVO.java @@ -0,0 +1,33 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/6/13 11:46 + * @Description: 变电站信息 DTO + */ +@ApiModel +@Data +public class TransformerInfoVO { + + @ApiModelProperty("变压等级(kV)") + private String voltageGrade; + + @ApiModelProperty("变电站") + private String transformer; + + @ApiModelProperty("主变") + private String mainTransformer; + + @ApiModelProperty("线路条数") + private String lineNum; + + @ApiModelProperty("线路长度") + private String lineLength; + + @ApiModelProperty("容量") + private String capacity; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerDTO.java new file mode 100644 index 0000000..f49b93d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerDTO.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/19 14:45 + * @Description: 中长期合同签订情况 中长期省内交易品种及电量 + */ +@Data +@ApiModel +public class TypePowerDTO { + + @ApiModelProperty("省内直购电") + private String directElectric; + + @ApiModelProperty("电网代理购电") + private String proxyElectric; + + @ApiModelProperty("省内绿电") + private String greenElectric; + + @ApiModelProperty("总成交量") + private String countElectric; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerVo.java new file mode 100644 index 0000000..57640fc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerVo.java @@ -0,0 +1,16 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; + +/** + * @author: HaoXs + * @Date: 2023/5/19 14:51 + * @Description: 中长期省内交易品种及电量Vo + */ +@Data +public class TypePowerVo { + + private String energyType; + + private String sumEnergy; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UploadNoticeVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UploadNoticeVo.java new file mode 100644 index 0000000..b7a3d8f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UploadNoticeVo.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.domain; + +import lombok.Data; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.NotNull; + +/** + * @author: HaoXs + * @Date: 2023/3/28 16:09 + * @Description: 交易公告上传Vo对象 + */ +@Data +@Validated +public class UploadNoticeVo { + + @NotNull(message = "交易序列ID不可为空!") + private String seqId; + + @NotNull(message = "交易序列名称不可为空!") + private String seqName; + + @NotNull(message = "上传文件不可为空!") + private MultipartFile noticeFile; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO.java new file mode 100644 index 0000000..77cc472 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO.java @@ -0,0 +1,29 @@ +package com.alonginfo.project.gansu.domain; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/20 17:06 + * @Description: (导入数据)发电情况-当年用电趋势DTO + */ +@ApiModel +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class UseTrendCurrentYearDTO { + + @ApiModelProperty("用电量 1-12月") + private List electricityConsumption; + + @ApiModelProperty("发电量 1-12月") + private List powerGeneration; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/common/EchartsCommonDTO.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/common/EchartsCommonDTO.java new file mode 100644 index 0000000..6f05ae6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/common/EchartsCommonDTO.java @@ -0,0 +1,24 @@ +package com.alonginfo.project.gansu.domain.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/5/18 14:41 + * @Description: 返回echarts 图表类型数据 + */ +@ApiModel +@Data +public class EchartsCommonDTO { + + @ApiModelProperty("x轴数据") + @JsonProperty("xAxisData") + private List xAxisData; + + @ApiModelProperty("y轴数据") + private List seriesData; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzdMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzdMapper.java new file mode 100644 index 0000000..eadac46 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzdMapper.java @@ -0,0 +1,15 @@ +package com.alonginfo.project.gansu.mapper; + + +import com.alonginfo.project.gansu.domain.BsHggkGzzd; + +import java.util.List; + +public interface BsHggkGzzdMapper { + + List selAll(); +} + + + + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzkMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzkMapper.java new file mode 100644 index 0000000..0c52cd1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzkMapper.java @@ -0,0 +1,14 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.BsHggkGzzk; + +import java.util.List; + +public interface BsHggkGzzkMapper { + + List selAll(); +} + + + + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkLybhMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkLybhMapper.java new file mode 100644 index 0000000..eb57bcc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkLybhMapper.java @@ -0,0 +1,14 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.BsHggkLybh; + +import java.util.List; + +public interface BsHggkLybhMapper { + + List selAll(); +} + + + + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BuySaleDetailDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BuySaleDetailDao.java new file mode 100644 index 0000000..1eb00aa --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BuySaleDetailDao.java @@ -0,0 +1,31 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.BuySaleDetail; + +import java.util.List; +import java.util.Map; + +/** + * 购售方明细数据 - 表格数据 + * @author Administrator + * + */ +public interface BuySaleDetailDao { + + /** + * 购售方明细数据 - 表格数据入库 + * @param ids + */ + void pushBuySaleDetail(List ids); + + /** + * 通过交易序列id获取购售方明细数据 - 表格数据 + * @param seqId + */ + List> getDetailBySeqId(String seqId); + + /** + * 删除之前的数据 + */ + void delDeclareDetail(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/CarbonMonitorMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/CarbonMonitorMapper.java new file mode 100644 index 0000000..177a68a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/CarbonMonitorMapper.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.mapper; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/19 10:22 + * @Description: 双碳检测 + */ +public interface CarbonMonitorMapper { + + /** + * 发电企业碳排放情况 + * @return + */ + List> queryEnterpriseEmission(); + + Map queryIndustryEmission(); + + List> queryClearInstallTrend(); + + List> queryClearReduceGain(); + + Map queryCarbonMapTopContent(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ClearEnergyAbsorptionMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ClearEnergyAbsorptionMapper.java new file mode 100644 index 0000000..f370b34 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ClearEnergyAbsorptionMapper.java @@ -0,0 +1,38 @@ +package com.alonginfo.project.gansu.mapper; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/16 15:37 + * @Description: 清洁能源消纳 + */ +public interface ClearEnergyAbsorptionMapper { + + /** + * 当年清洁能源消纳趋势 + * @return + */ + List> queryAbsorptionTrendByNowYear(); + + /** + * 历年清洁能源消纳情况 + * @return + */ + List> queryClearRatioByCalendarYear(); + + /** + * 清洁能源消纳分析 + * @return + */ + List> queryClearAbsorptionAnalysis(); + + List> queryClearAbsorptionTrend(); + + /** + * 地图上方概览 + * @return + */ + Map queryMapTopContent(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/DayAddThreeDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/DayAddThreeDao.java new file mode 100644 index 0000000..4f02a2b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/DayAddThreeDao.java @@ -0,0 +1,17 @@ +package com.alonginfo.project.gansu.mapper; + +import java.util.Map; + +/** + * D+3滚动交易 + * @author Administrator + * + */ +public interface DayAddThreeDao { + + /** + * D+3滚动交易 -- 交易公告 + * @return + */ + Map getDayAddThreeNotice(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/EnergyCensusDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/EnergyCensusDao.java new file mode 100644 index 0000000..01228e6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/EnergyCensusDao.java @@ -0,0 +1,62 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.EnergyCensus; + +import java.util.List; +import java.util.Map; + +/** + * 发电类型统计Dao + * @author Administrator + * + */ +public interface EnergyCensusDao { + + /** + * 发电类型统计数据入库 == 正式数据 + */ + void pushEnergyCensus(List ids); + + /** + * 删除旧数据 ==正式数据 + */ + void delEnergyCensus(); + + /** + * 获取当前交易序列下的发电类型统计 + * @param seqId + * @return + */ + List> getCenSusBySeqId(String seqId); + + /** + * 发电类型统计数据入库 == 测试数据 + */ + void pushTestEnergyCensus(List ids); + + /** + * 删除旧数据 == 测试数据 + */ + void delTestEnergyCensus(); + + /** + * 获取当前交易序列下的发电类型统计 == 测试数据 + * @param seqId + * @return + */ + List> getTestCenSusBySeqId(String seqId); + + /** + * 发电类型统计-多日实时交易 - 正式环境 + * @param seqId + * @return + */ + Map getManyDayCensusBySeqId(String seqId); + + /** + * 发电类型统计-多日实时成交 - 测试环境 + * @param seqId + * @return + */ + Map getTestManyDayCensusBySeqId(String seqId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightDataSyncMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightDataSyncMapper.java new file mode 100644 index 0000000..06ceb63 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightDataSyncMapper.java @@ -0,0 +1,59 @@ +package com.alonginfo.project.gansu.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/17 16:30 + * @Description: 发电权交易情况 数据同步 mapper + */ +public interface GenerationRightDataSyncMapper { + + /** + * 发电权交易组织情况 + * @param dealOrganizeResMap + */ + void insertDealOrganize(@Param("data") Map dealOrganizeResMap); + + /** + * 发电权交易市场主体参与情况 + * @param subjectJoinResMap + */ + void insertSubjectJoin(@Param("data") Map subjectJoinResMap); + + /** + * 当年买入卖出电量企业排名 清空数据 + */ + void delBuySaleOrder(); + + /** + * 当年买入卖出电量企业排名 + * @param insertList + */ + void insertBuySaleOrder(@Param("data") List> insertList); + + /** + * 发电权交易与结算电量-历年数据 清空数据 + */ + void delTradeSettlementYear(); + + /** + * 发电权交易与结算电量-历年数据 + * @param insertParamList + */ + void insertTradeSettlementYear(@Param("data") List> insertParamList); + + /** + * 发电权交易与结算电量-当年各月数据 清空数据 + */ + void delTradeSettlementYearMonth(); + + /** + * 发电权交易与结算电量-当年各月数据 + * @param insertList + */ + void insertTradeSettlementYearMonth(@Param("data") List> insertList); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightMapper.java new file mode 100644 index 0000000..5393a80 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightMapper.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.gansu.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/19 16:55 + * @Description: 发电权交易情况Mapper + */ +public interface GenerationRightMapper { + + /** + * 当年发电权交易组织情况 + * @return + */ + Map getDealOrganize(); + + /** + * 当年发电权交易市场主体参与情况 + * @return + */ + Map getSubjectJoin(); + + /** + * 买入、卖出电量企业排名 + * @param type + * @return + */ + List> getSaleBuyOrder(@Param("type") String type); + + /** + * 历年交易电量与结算电量 + * @return + */ + List> getPowerByYear(); + + /** + * 当年分月交易电量与结算电量 + * @return + */ + List> getPowerByYearMonth(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GreenTradeMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GreenTradeMapper.java new file mode 100644 index 0000000..83599ff --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GreenTradeMapper.java @@ -0,0 +1,16 @@ +package com.alonginfo.project.gansu.mapper; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/19 16:49 + * @Description: 绿证绿电交易情况 + */ +public interface GreenTradeMapper { + + Map queryGreenTradeInfo(); + + List> queryGreenSyndromeTradeByYear(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GridMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GridMapper.java new file mode 100644 index 0000000..f3b65de --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GridMapper.java @@ -0,0 +1,39 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.TextBoxVO; +import com.alonginfo.project.gansu.domain.TransformerInfoVO; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/13 10:29 + * @Description: 甘肃网架图 + */ +public interface GridMapper { + + /** + * 左下角文本框数据 + * @return + */ + TextBoxVO getTextBoxData(); + + /** + * 变电站信息 + * @return + */ + List queryTransformerInfo(); + + /** + * 各线路输送电量分析 + * @return + */ + List> queryLineTransport(); + + /** + * 各线路整体容量情况 + * @return + */ + List> queryLineCapacity(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildDataSyncMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildDataSyncMapper.java new file mode 100644 index 0000000..e14dc33 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildDataSyncMapper.java @@ -0,0 +1,36 @@ +package com.alonginfo.project.gansu.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/11 16:38 + * @Description: 市场建设情况 数据同步mapper + */ +public interface MarketBuildDataSyncMapper { + + /** + * 年度电力直接交易规模 清空数据 + */ + void delPowerDirectDeal(); + + /** + * 年度电力直接交易规模 数据入库 + * @param + */ + void insertPowerDirectDeal(@Param("data") List> dataRes); + + /** + * 各类市场主体数量 清空数据 + */ + void delEveryTypeSubject(); + + /** + * 各类市场主体数量 数据入库 + * @param yearDataRes + */ + void insertEveryTypeSubject(@Param("yearData") List> yearDataRes); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildMapper.java new file mode 100644 index 0000000..a9c03e2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildMapper.java @@ -0,0 +1,71 @@ +package com.alonginfo.project.gansu.mapper; + + +import com.alonginfo.project.gansu.domain.DirectDealPo; +import com.alonginfo.project.gansu.domain.EveryTypeSubjectPo; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/2/8 16:46 + * @Description: 市场建设情况 + */ +public interface MarketBuildMapper { + + /** + * 市场主体注册发展趋势 + * @return + */ +// List> getRegisterTrend(); + + /** + * 各类型发电企业数量变化情况 + * @return + */ +// List> getEnterpriseChanges(); + + /** + * 市场主体参与市场情况 + * @return + */ +// List> getSubjectJoin(); + + /** + * 历年交易组织规模发展趋势 + * @return + */ +// List> getDealOrganize(); + + /** + * 当年现货市场交易情况 + * @return + */ +// List> getStockMarketDeal(); + + /** + * 当年绿电市场交易情况 + * @return + */ +// List> getGreenElectricDeal(); + + /** + * 交易类别/组织方式及当年成交电量 + * @param types + * @return + */ +// List> getTransactionPower(@Param("data") List types); + + /** + * 年度电力直接交易情况 + * @return + */ + List getDirectDeal(); + + /** + * 各类市场主体数量 + * @return + */ + List getEveryTypeSubject(); + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyDataSyncMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyDataSyncMapper.java new file mode 100644 index 0000000..a1da983 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyDataSyncMapper.java @@ -0,0 +1,25 @@ +package com.alonginfo.project.gansu.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/11 15:41 + * @Description: 市场概览-数据抽取 + */ +public interface MarketSurveyDataSyncMapper { + + /** + * 当前市场主体情况-市场主体类型、数量、占比 + * @param dataRes + */ + void insertMarketSubject(@Param("data") Map dataRes); + + /** + * 当前市场主体情况-发电企业类型、数量、占比接口 + * @param dataRes + */ + void insertYieldEnterprise(@Param("data") Map dataRes); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyMapper.java new file mode 100644 index 0000000..1a65ac8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyMapper.java @@ -0,0 +1,65 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.EnterprisePo; +import com.alonginfo.project.gansu.domain.SubjectRatioPo; + +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/2/7 15:10 + * @Description: 市场概况Mapper + */ +public interface MarketSurveyMapper { + + /** + * 当前市场主体情况-市场主体类型、数量、占比 + * @return + */ + SubjectRatioPo getSubjectInfo(); + + /** + * 当前市场主体情况-发电企业类型、数量、占比 + * @return + */ + EnterprisePo getEnterpriseInfo(); + + /** + * (导入数据)用电 + * @return + */ + List queryUseInfo(); + + /** + * (导入数据)发电 + */ + List queryGenerationInfo(); + + /** + * (导入数据)发电情况-各类型电量累计发用电 + * @return + */ + List> queryCountPowerByType(); + + /** + * (导入数据)发电情况-当年用电趋势 + * @return + */ + List> queryUseTrendCurrentYear(); + + /** + * (导入数据)发电情况-当年市场化电量累计执行情况 + * @return + */ + List> queryMarketCountExecute(); + + /** + * (导入数据)当年交易量趋势 + * @return + */ + List> queryTradeVolumeTrendCurrent(); + + Map queryInstallAndHours(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractDataSyncMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractDataSyncMapper.java new file mode 100644 index 0000000..b48342c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractDataSyncMapper.java @@ -0,0 +1,37 @@ +package com.alonginfo.project.gansu.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/15 11:52 + * @Description: 中长期合约签订情况Mapper + */ +public interface MediumLongTermContractDataSyncMapper { + + /** + * 省内交易品种及成交电量 清空数据 + */ + void delTradeTypeAndPower(); + + + /** + * 省内交易品种及成交电量 + * @param tradeTypeAndPowerResList + */ + void insertTradeTypeAndPower(@Param("dataList") List> tradeTypeAndPowerResList); + + /** + * 省内电源类型及成交电量 + */ + void delPowerSupply(); + + /** + * 省内电源类型及成交电量 + * @param powerSupplyResList + */ + void insertPowerSupply(@Param("dataList") List> powerSupplyResList); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractMapper.java new file mode 100644 index 0000000..220a52e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractMapper.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.TypePowerVo; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/19 14:49 + * @Description: 中长期合同签订情况 Mapper + */ +public interface MediumLongTermContractMapper { + + List getTypePower(); + + Map getSupplyType(); + + /** + * 外送交易 + * @return + */ + List> queryOutsideDeliver(); + + /** + * 外购交易 + * @return + */ + List> queryOutsideBuy(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyDataSyncMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyDataSyncMapper.java new file mode 100644 index 0000000..68437cc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyDataSyncMapper.java @@ -0,0 +1,25 @@ +package com.alonginfo.project.gansu.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/17 14:57 + * @Description: 新能源概览 mapper + */ +public interface NewEnergySurveyDataSyncMapper { + + /** + * 新能源参与交易电量趋势 清空数据 + */ + void delJoinElectricTrend(); + + /** + * 新能源参与交易电量趋势 + * @param insertParamList + */ + void insertJoinElectricTrend(@Param("dataList") List> insertParamList); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyMapper.java new file mode 100644 index 0000000..bb0dce2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyMapper.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.gansu.mapper; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/19 16:29 + * @Description: 新能源概览Mapper + */ +public interface NewEnergySurveyMapper { + + /** + * 新能源参与交易电量趋势 + * @return + */ + List> getJoinEnergyTrend(); + + List> getInstallStructureInfo(); + + List> queryInstallSituation(); + + List> queryElectricTrend(); + + List> queryElectricAbsorption(); + + List> queryJoinTrade(); + + Map queryMapTopOverview(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendDao.java new file mode 100644 index 0000000..3e65070 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendDao.java @@ -0,0 +1,50 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.PriceTrend; + +import java.util.List; +import java.util.Map; + +/** + * 交易量价走势分析 + * @author Administrator + * + */ +public interface PriceTrendDao { + + /** + * 交易量价走势分析数据入库 == 正式数据 + * @param ids + */ + void pushPriceTrend(List ids); + + /** + * 删除旧交易量价走势数据 == 正式数据 + */ + void delPriceTrend(); + + /** + * 通过交易序列id获取交易量价走势数据 == 正式数据 + * @param seqId + * @return + */ + List> getTrendBySeqId(String seqId); + + /** + * 交易量价走势分析数据入库 == 测试数据 + * @param ids + */ + void pushTestPriceTrend(List ids); + + /** + * 删除旧交易量价走势数据 == 测试数据 + */ + void delTestPriceTrend(); + + /** + * 通过交易序列id获取交易量价走势数据 == 测试数据 + * @param seqId + * @return + */ + List> getTestTrendBySeqId(String seqId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendReplayDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendReplayDao.java new file mode 100644 index 0000000..56381bf --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendReplayDao.java @@ -0,0 +1,51 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.PriceTrendReplay; + +import java.util.List; +import java.util.Map; + +/** + * 交易量价曲线 回演数据 + * @author Administrator + * + */ +public interface PriceTrendReplayDao { + + /** + * 插入交易量价 - 回演数据 === 正式数据 + * @param priceTrendReplay + */ + void pushPriceTrendReplay(List ids); + + /** + * 删除交易量价 - 回演数据 === 正式数据 + */ + void delPriceTrendReplay(); + + /** + * 查询回演数据 === 正式数据 + * @param seqId + */ + List> getTrendReplayBySeqId(String seqId); + + /** + * 插入交易量价 - 回演数据 === 测试数据 + * @param ids + */ + void pushTestPriceTrendReplay(List ids); + + /** + * 删除交易量价 - 回演数据 === 测试数据 + */ + void delTestPriceTrendReplay(); + + /** + * 查询回演数据 === 测试数据 + * @param seqId + * @return + */ + List> getTestTrendReplayBySeqId(String seqId); + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerDataSyncMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerDataSyncMapper.java new file mode 100644 index 0000000..481db1f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerDataSyncMapper.java @@ -0,0 +1,70 @@ +package com.alonginfo.project.gansu.mapper; + +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/12 10:47 + * @Description: 省内交易Mapper + */ +public interface ProvinceInnerDataSyncMapper { + + /** + * 交易组织情况 清空数据 + */ + void delDealOrganize(); + + /** + * 交易组织情况 入库 + * @param insertParamList + */ + void insertDealOrganize(@Param("dataList") List> insertParamList); + + /** + * 市场主体参与情况 清空数据 + */ + void delSubjectJoin(); + + /** + * 市场主体参与情况 + * @param insertParam + */ + void insertSubjectJoin(@Param("data") List> insertParam); + + /** + * 各类清洁能源成交电量 清空数据 + */ + void delCleanEnergy(); + + /** + * 各类清洁能源成交电量 + */ + void insertCleanEnergy(@Param("dataList") List> insertParam); + + /** + * 当年交易电量电价趋势 清空数据 + */ + void delPowerPriceTrend(); + + /** + * 当年交易电量电价趋势 + * @param insertList + */ + void insertPowerPriceTrend(@Param("dataList") List> insertList); + + /** + * 交易概览 清空数据 + */ + void delDealSurvey(String year); + + /** + * 交易概览 + * @param insertParam + */ + void insertDealSurvey(@Param("data") List> insertParam); + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerMapper.java new file mode 100644 index 0000000..2c44e11 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerMapper.java @@ -0,0 +1,74 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.PiCleanEnergyVo; +import com.alonginfo.project.gansu.domain.PiDealOrganizeVo; +import com.alonginfo.project.gansu.domain.PiPowerPriceTrendVo; +import com.alonginfo.project.gansu.domain.PiSubjectJoinVo; +import com.alonginfo.project.gansu.domain.MapTextVO; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/18 16:39 + * @Description: + */ +public interface ProvinceInnerMapper { + + /** + * (同步数据)当年交易组织情况 + * 获取当年数据 + * @return + */ + PiDealOrganizeVo getDealOrganize(); + + /** + * (同步数据)当年市场主体参与情况 + * @return + */ + PiSubjectJoinVo getSubjectJoinInfo(); + + /** + * (同步数据)各类清洁能源成交电量 + * @return + */ + List getCleanEnergy(); + + /** + * (同步数据)交易概览-获取市场准入数 + * @param year 年份 + * @return + */ + String getMarketAccessByYear(String year); + + /** + * (同步数据)交易概览-交易组织次数及同比、成交电量及同比 + * @return + */ + List> getSurveyInfo(); + + /** + * (同步数据)当年交易量价走势 + * @return + */ + List getPowerPriceTrend(); + + /** + * (导入数据)查询地图弹框数据 + * @return + */ + List queryMapText(); + + /** + * (导入数据)历年降低购电成本与交易均价 + * @return + */ + List> queryCostAndAvgByYear(); + + /** + *(导入数据) + * @return + */ + List> queryTradeSizeByYear(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceMiddleMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceMiddleMapper.java new file mode 100644 index 0000000..3b40320 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceMiddleMapper.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.OrganizeAndTypeVO; +import com.alonginfo.project.gansu.domain.OutProvinceDTO; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/14 17:02 + * @Description: 省间交易情况(导入数据) + */ +public interface ProvinceMiddleMapper { + + List queryOrganizeData(); + + Map queryTradeElectricType(); + + List> queryTradeElectricCurrentYear(); + + List> queryTradeElectricCalendarYear(); + + Map queryOverview(); + + List getOutProvince(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/RealTimeManyDayDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/RealTimeManyDayDao.java new file mode 100644 index 0000000..0cae865 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/RealTimeManyDayDao.java @@ -0,0 +1,49 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.ManyDayRealTime; + +import java.util.List; +import java.util.Map; + +/** + * 多日交易-实时状态 交易量价走势dao + * @author Administrator + * + */ + +public interface RealTimeManyDayDao { + + /** + * 根据时段类型查询交易量价走势 - 正式环境 + * @param type + */ + List> getRealTimeManyDay(String type); + + /** + * 插入多日交易-实时状态 交易量价走势 - 正式环境 + * @param ids + */ + void pushRealTimeManyDay(List ids); + + /** + * 删除多日交易-实时状态 交易量价走势 - 正式环境 + */ + void delRealTimeManyDay(); + + /** + * 插入多日交易-实时状态 交易量价走势 - 测试环境 + * @param ids + */ + void pushTestRealTimeManyDay(List ids); + + /** + * 删除多日交易-实时状态 交易量价走势 - 测试环境 + */ + void delTestRealTimeManyDay(); + + /** + * 根据时段类型查询交易量价走势 - 测试环境 + * @param type + */ + List> getTestRealTimeManyDay(String type); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ResourcesMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ResourcesMapper.java new file mode 100644 index 0000000..cc97914 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ResourcesMapper.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.MapInfoVO; +import com.alonginfo.project.gansu.domain.PrefectureInstallDTO; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/12 10:41 + * @Description: 资源概览 + */ +public interface ResourcesMapper { + + /** + * 获取地图分布数据 + * @return + */ + List getMapInfoData(); + + /** + * 获取地图右上角图表数据 + * @return + */ + List> getMapTopCanvas(); + + /** + * 各类资源装机容量、发电量对比 + * @return + */ + List> getInstallAndPower(); + + /** + * 资源开发情况 + * @return + */ + List> getResourcesDevelop(); + + /** + * 各地市资源装机情况 + * @return + */ + List getPrefectureInstall(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/SgccAddressDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/SgccAddressDao.java new file mode 100644 index 0000000..9006e3e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/SgccAddressDao.java @@ -0,0 +1,40 @@ +package com.alonginfo.project.gansu.mapper; +import com.alonginfo.project.gansu.domain.SgccAddress; + +import java.util.List; + +public interface SgccAddressDao { + + /** + * 插入电力交易平台地址 + * @param params + */ + void insertSgccAddress(SgccAddress sgccAddress); + + /** + * 查询SgccAddress列表 + * @param sgccAddress + * @return + */ + List findAll(SgccAddress sgccAddress,int offset,int limit); + + /** + * 查询SgccAddress总条数 + * @param sgccAddress + * @return + */ + int sgccAddressTableCount(SgccAddress sgccAddress); + + /** + * 修改电力交易平台地址 + * @param sgccAddress + */ + void updSgccAddress(SgccAddress sgccAddress); + + /** + * 删除电力交易平台地址 + * @param sgccAddress + */ + void delSgccAddress(List ids); + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeNoticeDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeNoticeDao.java new file mode 100644 index 0000000..cc98b3f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeNoticeDao.java @@ -0,0 +1,51 @@ +package com.alonginfo.project.gansu.mapper; + + +import com.alonginfo.project.gansu.domain.TradeNotice; + +import java.util.List; +import java.util.Map; + +/** + * 交易公告详情 Dao + * @author Administrator + * + */ +public interface TradeNoticeDao { + + /** + * 交易公告详情数据入库 == 正式环境 + * @param ids + */ + void pushTradeNotice(List ids); + + /** + * 清空之前的交易公告详情数据 == 正式环境 + */ + void delNotice(); + + /** + * 通过交易序列id获取交易公告详情 == 正式环境 + * @param seqId + * @return + */ + Map getNoticeBySeqId(String seqId); + + /** + * 交易公告详情数据入库 == 测试环境 + * @param ids + */ + void pushTestTradeNotice(List ids); + + /** + * 清空之前的交易公告详情数据 == 测试环境 + */ + void delTestNotice(); + + /** + * 通过交易序列id获取交易公告详情 === 测试环境 + * @param seqId + * @return + */ + Map getTestNoticeBySeqId(String seqId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSeqDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSeqDao.java new file mode 100644 index 0000000..178ca41 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSeqDao.java @@ -0,0 +1,48 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.TradeSeq; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 二期-交易序列信息 + * @author Administrator + * + */ +public interface TradeSeqDao { + + /** + * 交易序列信息入库 --正式环境数据 + * @param tradeSeqList + */ + void pushTradeSeq(List ids); + + /** + * 删除旧交易序列数据 -- 正式环境数据 + */ + void delTradeSeq(); + + /** + * 获取所有交易序列数据-- 正式环境数据 + */ + List> getAll(@Param("tradeSeqType") String tradeSeqType); + + /** + * 交易序列信息入库 -- 测试环境数据 + * @param data + */ + void pushTestTradeSeq(List ids); + + /** + * 交易序列信息入库 -- 测试环境数据 + */ + void delTestTradeSeq(); + + /** + * 获取所有交易序列数据 ==== 测试环境 + * @return + */ + List> getAllTest(@Param("tradeSeqType") String tradeSeqType); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSettleDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSettleDao.java new file mode 100644 index 0000000..c3c3cef --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSettleDao.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.TradeSettleMapInfoVo; + +import java.util.List; +import java.util.Map; + +/** + * TradeSettleDao + * + * @package_name: com.alonginfo.project.gansu.mapper + * @author: 樊群靖 + * @date: 2023/8/18 + * @description: + **/ + +public interface TradeSettleDao { + List> getProvinceTradeSettle(); + + List queryMapInfo(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeStatusDao.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeStatusDao.java new file mode 100644 index 0000000..f23f85e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeStatusDao.java @@ -0,0 +1,50 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.TradeStatus; + +import java.util.List; +import java.util.Map; + +/** + * 交易情况Dao + * @author Administrator + * + */ +public interface TradeStatusDao { + + /** + * 交易情况数据入库 == 正式环境数据 + * @param ids + */ + void pushTradeStatus(List ids); + + /** + * 删除旧数据 == 正式环境数据 + */ + void delStatus(); + + /** + * 通过交易序列id获取交易情况 + * @param seqId + * @return + */ + Map getStatusBySeqId(String seqId); + + /** + * 交易情况数据入库 == 测试环境数据 + * @param ids + */ + void pushTestTradeStatus(List ids); + + /** + * 删除旧数据 == 测试环境数据 + */ + void delTestStatus(); + + /** + * 通过交易序列id获取交易情况 测试环境 + * @param seqId + * @return + */ + Map getTestStatusBySeqId(String seqId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradingCenterMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradingCenterMapper.java new file mode 100644 index 0000000..ec4e284 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradingCenterMapper.java @@ -0,0 +1,33 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.LegalPersonDTO; +import com.alonginfo.project.gansu.domain.ShareHoldingDTO; +import com.alonginfo.project.gansu.domain.StaffTeamDTO; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/8 16:21 + * @Description: 甘肃电力交易中心Mapper + */ +public interface TradingCenterMapper { + + /** + * 法人治理 + * @return + */ + LegalPersonDTO getLegalPerson(); + + /** + * 内设机构及员工队伍 + * @return + */ + StaffTeamDTO getStaffTeam(); + + /** + * 公司股权结构 + * @return + */ + List getShareHolding(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/UploadNoticeMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/UploadNoticeMapper.java new file mode 100644 index 0000000..da70077 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/UploadNoticeMapper.java @@ -0,0 +1,89 @@ +package com.alonginfo.project.gansu.mapper; + +import com.alonginfo.project.gansu.domain.TradeNotice; +import com.alonginfo.project.gansu.domain.TradeSeq; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * @author Haoxs + */ +public interface UploadNoticeMapper { + + /** + * 查询交易序列列表 + * @param searchParam + * @return + */ + List> getSeqList(@Param("searchParam") Map searchParam); + + /** + * 交易公告上传 + * @param uuid + * @param seqId + * @param seqName + * @param originalFilename + */ + void upload(@Param("uuid") String uuid, + @Param("seqId") String seqId, + @Param("seqName") String seqName, + @Param("fileName") String originalFilename, + @Param("encodeName") String encodeName, + @Param("visitPath") String visitPath); + + /** + * 检查该交易序列是否已经上传交易公告 + * @param seqId + * @return + */ + Map checkUpload(@Param("seqId") String seqId); + + /** + * 删除mysql交易公告记录 + * @param seqId + * @return + */ + int delNoticeNotes(@Param("seqId") String seqId); + + /** + * 市场建设情况-公告上传 + * @param uuid + * @param fileTitle + * @param imageName + * @param imageEncodeName + * @param imageVisitPath + * @param noticeFileName + * @param fileEncodeName + * @param fileVisitPath + */ + void uploadMarketBuild(@Param("uuid") String uuid, + @Param("fileTitle") String fileTitle, + @Param("imageName") String imageName, + @Param("imageEncodeName") String imageEncodeName, + @Param("imageVisitPath") String imageVisitPath, + @Param("noticeFileName")String noticeFileName, + @Param("fileEncodeName")String fileEncodeName, + @Param("fileVisitPath")String fileVisitPath); + + /** + * 市场建设情况-获取列表 + * @param searchParam + * @return + */ + List> getMarketList(@Param("searchParam") Map searchParam); + + /** + * 市场建设情况-删除交易公告 + * @param fileTitle 文件标题 + * @return + */ + int delMarketImageAndFile(@Param("fileTitle") String fileTitle); + + /** + * 检查是否已上传同标题文件 + * @param fileTitle + */ + Map checkMarketBuildHave(@Param("fileTitle") String fileTitle); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/SgccAddressService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/SgccAddressService.java new file mode 100644 index 0000000..afac98d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/SgccAddressService.java @@ -0,0 +1,51 @@ +package com.alonginfo.project.gansu.service; + + +import com.alonginfo.project.gansu.domain.SgccAddress; + +import java.util.List; + +public interface SgccAddressService { + + /** + * 获取电力交易平台url + * @param envKey 环境标识 + * @return + */ + String getSgccAddress(String envKey); + + /** + * 新增电力交易平台地址 + * @param sgccName + * @param sgccAddress + */ + void addAddress(SgccAddress sgccAddress); + + /** + * 查询所有数据 + * @param dataSource + * @param offset + * @param limit + * @return + */ + public List findAll(SgccAddress sgccAddress,int offset,int limit); + + /** + * 查询数据条数 + * @param dataSource + * @return + */ + int sgccAddressTableCount(SgccAddress sgccAddress); + + /** + * 修改电力交易平台地址 + * @param sgccAddress + */ + void updSgccAddress(SgccAddress sgccAddress); + + /** + * 删除电力交易平台地址 + * @param sgccAddress + */ + void delSgccAddress(List ids); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/bilateralconsult/BilateralConsultService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/bilateralconsult/BilateralConsultService.java new file mode 100644 index 0000000..e96a66b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/bilateralconsult/BilateralConsultService.java @@ -0,0 +1,16 @@ +package com.alonginfo.project.gansu.service.bilateralconsult; + +import java.util.Map; + +/** + * 双边协商 + */ +public interface BilateralConsultService { + + /** + * 获取双边协商页面数据 + * @param seqId 交易序列id + * @return + */ + Map getBilateralConsult(String seqId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/carbon/ICarbonMonitorService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/carbon/ICarbonMonitorService.java new file mode 100644 index 0000000..0441900 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/carbon/ICarbonMonitorService.java @@ -0,0 +1,25 @@ +package com.alonginfo.project.gansu.service.carbon; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.CarbonMapTopContentDTO; +import com.alonginfo.project.gansu.domain.ClearInstallTrendDTO; +import com.alonginfo.project.gansu.domain.ClearReduceGainDTO; +import com.alonginfo.project.gansu.domain.IndustryEmissionDTO; + +/** + * @author: HaoXs + * @Date: 2023/6/19 10:20 + * @Description: 双碳检测 业务层 + */ +public interface ICarbonMonitorService { + + EchartsCommonDTO getEnterpriseEmission(); + + IndustryEmissionDTO getIndustryEmission(); + + ClearInstallTrendDTO getClearInstallTrend(); + + ClearReduceGainDTO getClearReduceGain(); + + CarbonMapTopContentDTO getCarbonMapTopContent(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/clearenergy/IClearEnergyAbsorptionService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/clearenergy/IClearEnergyAbsorptionService.java new file mode 100644 index 0000000..37ffc82 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/clearenergy/IClearEnergyAbsorptionService.java @@ -0,0 +1,24 @@ +package com.alonginfo.project.gansu.service.clearenergy; + +import com.alonginfo.project.gansu.domain.MapTopContentDTO; +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.ClearAbsorptionAnalysisDTO; +import com.alonginfo.project.gansu.domain.ClearRationDTO; + +/** + * @author: HaoXs + * @Date: 2023/6/16 15:35 + * @Description: 清洁能源消纳 + */ +public interface IClearEnergyAbsorptionService { + + EchartsCommonDTO getAbsorptionTrendCurrentYear(); + + ClearRationDTO getClearRatioByCalendarYear(); + + ClearAbsorptionAnalysisDTO getClearAbsorptionAnalysis(); + + EchartsCommonDTO getClearAbsorptionTrend(); + + MapTopContentDTO getMapTopContent(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeService.java new file mode 100644 index 0000000..9983bd0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeService.java @@ -0,0 +1,76 @@ +package com.alonginfo.project.gansu.service.dayaddthree; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +/** + * D+3滚动交易Service + * @author Administrator + * + */ +public interface DayAddThreeService { + + /** + * 获取D+3滚动交易 -- 交易序列 + * @throws Exception + */ + CompletableFuture> getDayAddTreeTradeSeq(); + + /** + * 获取D+3滚动交易 -- 交易公告 + * @return + */ + CompletableFuture> getDayAddThreeTradeNotice(); + + /** + * 获取D+3滚动交易 -- 交易情况 + * @return + * @throws Exception + */ + CompletableFuture> getDayAddThreeTradeStatus(); + + /** + * 获取D+3滚动交易 -- 申报明细数据 + * @return + * @throws Exception + */ + CompletableFuture>> getDayAddThreeReportDetails(String seqId); + + /** + * 获取D+3滚动交易 -- 各时段成交 + * @return + * @throws Exception + */ + CompletableFuture> getDayAddThreeEveryTimeSlotDeal(); + + /** + * 获取D+3滚动交易 -- 实时成交数据 + * @return + * @throws Exception + */ + CompletableFuture>> getDayAddThreeRealTimeDeal(); + + /** + * 获取D+3滚动交易 -- 各日成交情况 + * @return + * @throws Exception + */ + CompletableFuture> getDayAddThreeEveryDayDeal(); + + /** + * 获取申报、成交总笔数 + * @return + */ + CompletableFuture> getReportDealNum(); + + /** + * 交易情况-发电、用户申报电量、成交电量 + */ + CompletableFuture> getYieldUserForStatus(); + + /** + * 申报明细-买卖方申报电量、申报均价 + */ + CompletableFuture> getEnergyPriceForDetails(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeSyncGet.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeSyncGet.java new file mode 100644 index 0000000..0dee07c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeSyncGet.java @@ -0,0 +1,12 @@ +package com.alonginfo.project.gansu.service.dayaddthree; + +import java.util.Map; + +public interface DayAddThreeSyncGet { + + /** + * D+3页面异步数据返回 + * @return + */ + Map dayAddThreeDataReturn(String seqId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/focuslisting/FocusBiddingListingDealCommonService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/focuslisting/FocusBiddingListingDealCommonService.java new file mode 100644 index 0000000..9df3e2c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/focuslisting/FocusBiddingListingDealCommonService.java @@ -0,0 +1,17 @@ +package com.alonginfo.project.gansu.service.focuslisting; + +import java.util.Map; + +/** + * 集中竞价、挂牌交易公共接口 + */ +public interface FocusBiddingListingDealCommonService { + + /** + * 获取集中竞价、挂牌交易页面数据 + * @param screenId 1-集中竞价 2-挂牌交易 + * @param seqId 交易序列id + * @return + */ + Map getFocusBidding(String screenId, String seqId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IDeliveryService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IDeliveryService.java new file mode 100644 index 0000000..9fc2ce5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IDeliveryService.java @@ -0,0 +1,55 @@ +package com.alonginfo.project.gansu.service.forward; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/7 17:34 + * @Description: + */ +public interface IDeliveryService { + + List> trackingPower(); + + List> getShortSendAllData(); + + List> getSendByAllChannel(); + + List> selectMachineLoadList(); + + List> selectGroupCap(); + + List> selectContractInfo(); + + List> selectEmossContractList(); + + List> selectEmossContractListByMonth(); + + List> selectInnerTradeByType(); + + List> selectDirTradeInfo(); + + + + List> selectPowerContractListByMonth(); + + List> newQueryProviceProviderEle(); + + List> selectGeneratorCount(); + + List> selectParticipantByMonth(); + List> selectTradeCountByMonth(String year) throws IOException; + + List> selectGreenPower(); + List> selectInnerGreenPower(); + + List> selectParticipantReg(); + + List> selectParticipantTrade(); + + List> selectParticipantTradeByYear(); + + List> selectYearDirEnergy(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IGreenConsumer.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IGreenConsumer.java new file mode 100644 index 0000000..62543ab --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IGreenConsumer.java @@ -0,0 +1,23 @@ +package com.alonginfo.project.gansu.service.forward; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/7 17:03 + * @Description: + */ +public interface IGreenConsumer { + + List> getYearHitorySend() throws IOException; + + List> getMachineHistory() throws IOException; + + Map getGreenProportion() throws IOException; + + List> getHistoryGreenPower() throws IOException; + + Map getGreenTrade() throws IOException; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IInfoDisclosureService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IInfoDisclosureService.java new file mode 100644 index 0000000..9d6e4dc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IInfoDisclosureService.java @@ -0,0 +1,20 @@ +package com.alonginfo.project.gansu.service.forward; + +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/6 14:33 + * @Description: + */ +public interface IInfoDisclosureService { + + List getMonthInfpubData(); + + Map getTotalCount(); + + Map getYearInfpubData(); + + List> getToalInfpubData(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeInfoService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeInfoService.java new file mode 100644 index 0000000..40556c0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeInfoService.java @@ -0,0 +1,29 @@ +package com.alonginfo.project.gansu.service.forward; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/13 16:21 + * @Description: + */ +public interface ITradeInfoService { + + Map selectTotalTradeInfoByYear(String yearCode) throws IOException; + + List> selectTradeDetailByType(String yearCode) throws IOException; + + Map selectMarketMemberNumByType(String yearCode) throws IOException; + + List> selectDirectTradeByType() throws IOException; + + List> selectTradeCityMemberResult(String yearCode) throws IOException; + + List> selectTradeEnergyPowerTypeResult() throws IOException; + + List> selectAvgPriceEnergyByYearResult() throws IOException; + + List> selectOutSendAvgPriceEnergyByYearResult() throws IOException; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeMarketInfoService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeMarketInfoService.java new file mode 100644 index 0000000..48d6105 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeMarketInfoService.java @@ -0,0 +1,63 @@ +package com.alonginfo.project.gansu.service.forward; + +import java.io.IOException; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/7 16:51 + * @Description: + */ +public interface ITradeMarketInfoService { + /** + * (接口调用)当年市场化电量累计执行情况 + * @return + */ + Map selectTradeEnergyRatio(String yearCode) throws IOException; + + /** + * (接口调用)顶部发电数据 + * @param yearCode + * @return + */ + Map selectGeneratePowerDataByYear(String yearCode) throws IOException; + + /** + * (接口调用)当年交易量价走势 + * @param yearCode + * @return + */ + Map selectTradePowerAvgPriceResult(String yearCode) throws IOException; + + /** + * (接口调用)发电装机情况与利用小时数 + * @return + */ + Map selectGeneratorCapacity(String yearCode) throws IOException; + + /** + * (接口调用)各类型资源装机容量与发电量 + * @param yearCode + * @return + */ + Map selectResourceCapacity(String yearCode) throws IOException; + + /** + * (接口调用)当年发电情况统计 + * @param yearCode + * @return + */ + Map selectResourceDevDataList(String yearCode) throws IOException; + + /** + * 查询当年电力用户交易量价情况 + * @return + */ + Map selectUserSumEnergyAvgPrice(); + + /** + * 当年发电企业交易量价情况数据 + * @return + */ + Map selectEnterpriseSumEnergyAvgPrice(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/TransactionPowerService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/TransactionPowerService.java new file mode 100644 index 0000000..d1285ac --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/TransactionPowerService.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.service.forward; + +import java.util.List; +import java.util.Map; + +/** + * TransactionPowerService + * + * @package_name: com.alonginfo.project.gansu.service.forward + * @author: 樊群靖 + * @date: 2023/8/9 + * @description: + **/ + +public interface TransactionPowerService { + + List> selectDirectPowerList(); + + List> selectGenerationRightPowerList(); + + List> selectPowerList(); + + Map transactionInTheProvince(); + + Map abschluss(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/generation/IGenerationRightService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/generation/IGenerationRightService.java new file mode 100644 index 0000000..3025cb9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/generation/IGenerationRightService.java @@ -0,0 +1,23 @@ +package com.alonginfo.project.gansu.service.generation; + +import com.alonginfo.project.gansu.domain.*; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/5/17 15:11 + * @Description: 发电权交易情况 业务层接口 + */ +public interface IGenerationRightService { + + DealOrganizeDTO getDealOrganize(); + + SubjectJoinDTO getSubjectJoin(); + + List getSaleBuyOrder(String type); + + PowerByYearDTO getPowerByYear(); + + PowerByYearMonthDTO getPowerByYearMonth(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/green/IGreenTradeService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/green/IGreenTradeService.java new file mode 100644 index 0000000..7fa87c2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/green/IGreenTradeService.java @@ -0,0 +1,15 @@ +package com.alonginfo.project.gansu.service.green; + +import com.alonginfo.project.gansu.domain.GreenSyndromeTradeByYearDTO; +import com.alonginfo.project.gansu.domain.GreenTradeInfoDTO; + +/** + * @author: HaoXs + * @Date: 2023/6/19 16:47 + * @Description: 绿证绿电交易情况 + */ +public interface IGreenTradeService { + GreenTradeInfoDTO getGreenTradeInfo(); + + GreenSyndromeTradeByYearDTO greenSyndromeTradeByYear(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/grid/IGridService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/grid/IGridService.java new file mode 100644 index 0000000..8ada9e0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/grid/IGridService.java @@ -0,0 +1,40 @@ +package com.alonginfo.project.gansu.service.grid; + +import com.alonginfo.project.gansu.domain.LineCapacityDTO; +import com.alonginfo.project.gansu.domain.LineTransportDTO; +import com.alonginfo.project.gansu.domain.TextBoxVO; +import com.alonginfo.project.gansu.domain.TransformerInfoVO; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/13 10:19 + * @Description: 甘肃网架图 业务层 + */ +public interface IGridService { + + /** + * 获取左下角文本框数据 + * @return + */ + TextBoxVO getTextBoxData(); + + /** + * 变电站信息 + * @return + */ + List getTransformerInfo(); + + /** + * 各线路输送电量分析 + * @return + */ + LineTransportDTO getLineTransport(); + + /** + * 各线路整体容量情况 + * @return + */ + LineCapacityDTO getLineCapacity(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketbuild/IMarketBuildService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketbuild/IMarketBuildService.java new file mode 100644 index 0000000..0347c90 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketbuild/IMarketBuildService.java @@ -0,0 +1,67 @@ +package com.alonginfo.project.gansu.service.marketbuild; + +import com.alonginfo.project.gansu.domain.DirectDealDTO; +import com.alonginfo.project.gansu.domain.EveryTypeSubjectDTO; + +/** + * @author: HaoXs + * @Date: 2023/2/8 16:29 + * @Description: 市场建设情况service + */ +public interface IMarketBuildService { + + /** + * 市场主体注册发展趋势 + * @return + */ +// RegisterTrendVo getRegisterTrend(); + + /** + * 各类型发电企业数量变化情况 + * @return + */ +// EnterpriseChangesVo getEnterpriseChanges(); + + /** + * 市场主体参与市场情况 + * @return + */ +// RegisterTrendVo getSubjectJoin(); + + /** + * 历年交易组织规模发展趋势 + * @return + */ +// DealOrganizeVo getDealOrganize(); + + /** + * 当年现货市场交易情况 + * @return + */ +// RegisterTrendVo getStockMarketDeal(); + + /** + * 当年绿电市场交易情况 + * @return + */ +// GreenElectricDealVo getGreenElectricDeal(); + + /** + * 交易类别/组织方式及当年成交电量 + * @param type 0-交易类别 1-组织方式 + * @return + */ +// TransactionPowerVo getTransactionPower(String type); + + /** + * 年度电力直接交易情况 + * @return + */ + DirectDealDTO getDirectDeal(); + + /** + * 各类市场主体数量 + * @return + */ + EveryTypeSubjectDTO getEveryTypeSubject(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketsurvey/IMarketSurveyService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketsurvey/IMarketSurveyService.java new file mode 100644 index 0000000..3deb093 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketsurvey/IMarketSurveyService.java @@ -0,0 +1,57 @@ +package com.alonginfo.project.gansu.service.marketsurvey; + +import com.alonginfo.project.gansu.domain.*; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/2/7 15:00 + * @Description: 市场概况service + */ +public interface IMarketSurveyService { + + /** + * (同步数据)当前市场主体情况 + * @return + */ + SubjectInfoDTO getMarketSubjectInfo(); + + /** + * (导入数据)发电、用电 + * @return + */ + List getUseGeneration(String flag); + + /** + * (导入数据)发电情况-各类型电量累计发用电 + * @return + */ + CountPowerByTypeDTO getCountPowerByType(); + + /** + * (导入数据)发电情况-当年用电趋势 + * @return + */ + UseTrendCurrentYearDTO getUseTrendCurrentYear(); + + /** + * (导入数据)当年交易量趋势 + * @return + */ + TradeVolumeCurrentDTO getTradeVolumeTrendCurrent(); + + /** + * (导入数据)当年市场化电量累计执行情况 + * @return + */ + MarketCountExecuteDTO getMarketCountExecute(); + + /** + * (导入数据)发电装机情况与利用小时数 + * @return + */ + InstallAndHoursDTO getInstallAndHours(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/mltermcontract/IMediumLongTermContractService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/mltermcontract/IMediumLongTermContractService.java new file mode 100644 index 0000000..e4527c9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/mltermcontract/IMediumLongTermContractService.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.gansu.service.mltermcontract; + +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.SupplyTypeDTO; +import com.alonginfo.project.gansu.domain.TypePowerDTO; +import com.alonginfo.project.gansu.domain.OutsideDeliverDTO; + +/** + * @author: HaoXs + * @Date: 2023/5/19 11:49 + * @Description: 中长期合同签订情况 业务层接口 + */ +public interface IMediumLongTermContractService { + + TypePowerDTO getTypePower(); + + SupplyTypeDTO getSupplyType(); + + /** + * (导入数据)外送交易 + * @return + */ + OutsideDeliverDTO getOutsideDeliver(); + + /** + * (导入数据)外购交易 + * @return + */ + EchartsCommonDTO getOutsideBuy(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/newEnergy/INewEnergySurveyService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/newEnergy/INewEnergySurveyService.java new file mode 100644 index 0000000..3382f0b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/newEnergy/INewEnergySurveyService.java @@ -0,0 +1,58 @@ +package com.alonginfo.project.gansu.service.newEnergy; + +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.domain.JoinEnergyTrendDTO; + +/** + * @author: HaoXs + * @Date: 2023/5/17 14:36 + * @Description: 新能源概览 业务层接口 + */ +public interface INewEnergySurveyService { + + /** + * (同步数据)新能源参与交易电量趋势 + * @return + */ + JoinEnergyTrendDTO getJoinEnergyTrend(); + + /** + * (导入数据)新能源装机结构 + * + * @return + */ + InstallStructureDTO getInstallStructure(); + + /** + * (导入数据)新能源装机情况 + * + * @return + */ + InstallSituationDTO getInstallSituation(); + + /** + * (导入数据)新能源发电趋势 + * + * @return + */ + ElectricTrendDTO getElectricTrend(); + + /** + * (导入数据)新能源发电与消纳情况 + * + * @return + */ + ElectricAbsorptionDTO getElectricAbsorption(); + + /** + * (导入数据)新能源参与交易情况 + * @return + */ + JoinTradeDTO getJoinTrade(); + + /** + * (导入数据)地图上方概览 + * @return + */ + MapTopOverviewDTO getMapTopOverview(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provinceinner/IProvinceInnerService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provinceinner/IProvinceInnerService.java new file mode 100644 index 0000000..2cf23af --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provinceinner/IProvinceInnerService.java @@ -0,0 +1,41 @@ +package com.alonginfo.project.gansu.service.provinceinner; + +import com.alonginfo.project.gansu.domain.*; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/5/18 16:13 + * @Description: 省内交易情况 业务接口 + */ +public interface IProvinceInnerService { + + PiDealOrganizeVo getDealOrganize(); + + PiSubjectJoinVo getSubjectJoinInfo(); + + List getCleanEnergy(); + + PiDealSurveyDTO getDealSurvey(); + + PiPowerPriceTrendDTO getPowerPriceTrend(); + + /** + * (导入数据)地图弹框数据 + * @return + */ + MapTextDTO getMapText(); + + /** + * (导入数据)历年降低购电成本与交易均价 + * @return + */ + CostAndAvgDTO getCostAndAvgByYear(); + + /** + * (导入数据)历年交易规模趋势 + * @return + */ + TradeSizeDTO getTradeSizeByYear(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provincemiddle/IProvinceMiddleService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provincemiddle/IProvinceMiddleService.java new file mode 100644 index 0000000..fb46ed9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provincemiddle/IProvinceMiddleService.java @@ -0,0 +1,26 @@ +package com.alonginfo.project.gansu.service.provincemiddle; + +import com.alonginfo.project.gansu.domain.*; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/14 16:25 + * @Description: 省间交易情况 + */ +public interface IProvinceMiddleService { + + List getOrganize(); + + TradeElectricTypeDTO getTradeElectricType(); + + TradeElectricCurrentYearDTO getTradeElectricCurrentYear(); + + TradeELectricCalendarYearDTO getTradeElectricCalendarYear(); + + OverviewDTO getOverview(); + + List getOutProvince(); + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/resources/IResourcesService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/resources/IResourcesService.java new file mode 100644 index 0000000..efcd71c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/resources/IResourcesService.java @@ -0,0 +1,23 @@ +package com.alonginfo.project.gansu.service.resources; + +import com.alonginfo.project.gansu.domain.*; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/12 10:26 + * @Description: 资源概览 业务层 + */ +public interface IResourcesService { + + MapInfoDTO getMapInfo(); + + MapTopCanvasDTO getMapTopCanvas(); + + InstallCapicatyPowerDTO getInstallAndPower(); + + ResourcesDevelopDTO getResourcesDevelop(); + + List getPrefectureInstall(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradeSettle/TradeSettleService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradeSettle/TradeSettleService.java new file mode 100644 index 0000000..6dce949 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradeSettle/TradeSettleService.java @@ -0,0 +1,27 @@ +package com.alonginfo.project.gansu.service.tradeSettle; + +import com.alonginfo.project.gansu.domain.MapTextDTO; +import com.alonginfo.project.gansu.domain.TradeSettleDTO; + +import java.util.Map; + +/** + * TradeSettleService + * + * @package_name: com.alonginfo.project.gansu.service.tradeSettle + * @author: 樊群靖 + * @date: 2023/8/18 + * @description: + **/ + +public interface TradeSettleService { + TradeSettleDTO getProvinceTradeSettle(); + + /** + * 中间顶部-年度结算电量、年度结算笔数、年度结算均价 + * @return + */ + Map getEmossInfo(); + + MapTextDTO getMapInfo(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradecenter/ITradingCenterService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradecenter/ITradingCenterService.java new file mode 100644 index 0000000..cb66e44 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradecenter/ITradingCenterService.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.service.tradecenter; + +import com.alonginfo.project.gansu.domain.LegalPersonDTO; +import com.alonginfo.project.gansu.domain.ShareHoldingDTO; +import com.alonginfo.project.gansu.domain.StaffTeamDTO; + +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/8 16:15 + * @Description: 甘肃电力交易中心 业务层 + */ +public interface ITradingCenterService { + + LegalPersonDTO getLegalPerson(); + + StaffTeamDTO getStaffTeam(); + + List getShareHolding(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/uploadnotice/IUploadNoticeService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/uploadnotice/IUploadNoticeService.java new file mode 100644 index 0000000..b06b801 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/uploadnotice/IUploadNoticeService.java @@ -0,0 +1,52 @@ +package com.alonginfo.project.gansu.service.uploadnotice; + +import com.alonginfo.project.gansu.domain.MarketBuildUploadVo; +import com.alonginfo.project.gansu.domain.TradeSeq; +import com.alonginfo.project.gansu.domain.UploadNoticeVo; + +import java.util.List; +import java.util.Map; + +/** + * 交易公告上传 + */ +public interface IUploadNoticeService { + + /** + * 查询交易序列列表 + * @param searchParam + * @return + */ + Map getSeqList(Map searchParam); + + /** + * 上传交易公告 + * @param uploadNoticeVo + */ + void uploadNotice(UploadNoticeVo uploadNoticeVo) throws Exception; + + /** + * 删除交易公告 + * @param seqId + */ + void delNotice(String seqId, String filePath); + + /** + * 市场建设情况-上传封面图片、公告 + * @param marketBuildUpload + */ + void marketBuildUpload(MarketBuildUploadVo marketBuildUpload) throws Exception; + + /** + * 获取市场建设情况公告列表 + * @param searchParam + * @return + */ + Map getMarketList(Map searchParam); + + /** + * 市场建设情况-删除交易公告 + * @return + */ + void delMarketImageAndFile(String fileTitle, String fileUploadPath, String imageUploadPath); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/SgccAddressServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/SgccAddressServiceImpl.java new file mode 100644 index 0000000..c7097c0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/SgccAddressServiceImpl.java @@ -0,0 +1,85 @@ +package com.alonginfo.project.gansu.serviceimpl; + +import com.alonginfo.project.gansu.domain.SgccAddress; +import com.alonginfo.project.gansu.mapper.SgccAddressDao; +import com.alonginfo.project.gansu.service.SgccAddressService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 甘肃电力交易平台url编辑页面 + * @author Administrator + * + */ +@Service +public class SgccAddressServiceImpl implements SgccAddressService { + + @Autowired + private SgccAddressDao sgccAddressDao; + + /** + * 获取电力交易平台url + * @return + */ + @Override + public String getSgccAddress(String envKey) { + List findAll = findAll(new SgccAddress(), 0, 100); + //String sgccAddress = findAll.stream().filter(sgcc -> "甘肃电力交易平台".equals(sgcc.getSgccName())).findAny().map(m -> m.getSgccAddress()).orElse(""); + String sgccAddressStr = ""; + for (SgccAddress sgccAddress : findAll) { + if (envKey.equals(sgccAddress.getEnv())) { + sgccAddressStr = sgccAddress.getSgccAddress(); + } + } + return sgccAddressStr; + } + + /** + * 甘肃电力交易平台添加地址 + */ + @Override + public void addAddress(SgccAddress sgccAddress) { + sgccAddressDao.insertSgccAddress(sgccAddress); + } + + /** + * 查询甘肃电力交易平台表所有数据 + * @param sgccAddress + * @param offset + * @param limit + * @return + */ + @Override + public List findAll(SgccAddress sgccAddress, int offset, int limit) { +// return sgccAddressDao.findAll(sgccAddress, offset, limit); + return null; + } + + /** + * 查询甘肃电力交易平台数据条数 + * @param sgccAddress + * @return + */ + @Override + public int sgccAddressTableCount(SgccAddress sgccAddress) { + return sgccAddressDao.sgccAddressTableCount(sgccAddress); + } + + /** + * 修改电力平台地址 + */ + @Override + public void updSgccAddress(SgccAddress sgccAddress) { + sgccAddressDao.updSgccAddress(sgccAddress); + } + + /** + * 删除电力交易平台地址 + */ + @Override + public void delSgccAddress(List ids) { + sgccAddressDao.delSgccAddress(ids); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl.java new file mode 100644 index 0000000..328b92f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl.java @@ -0,0 +1,236 @@ +package com.alonginfo.project.gansu.serviceimpl.bilateraconsult; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.*; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.BilateralConsultDataSync; +import com.alonginfo.project.gansu.service.bilateralconsult.BilateralConsultService; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.stream.Collectors; + +/** + * 双边协商 业务数据处理 + * @author Haoxs + */ +@Service +@Slf4j +public class BilateralConsultServiceImpl implements BilateralConsultService { + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String PUBLIC_KEY; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private BilateralConsultDataSync bilateralConsultDataSync; + + @Autowired + private TradeSeqDao tradeSeqDao; + + @Autowired + private TradeNoticeDao tradeNoticeDao; + + @Autowired + private TradeStatusDao tradeStatusDao; + + @Autowired + private EnergyCensusDao energyCensusDao; + + @Autowired + private RealTimeManyDayDao realTimeManyDayDao; + + @Autowired + private PriceTrendDao priceTrendDao; + + @Autowired + private PriceTrendReplayDao priceTrendReplayDao; + + @Override + public Map getBilateralConsult(String seqId) { + //判断当前是连接电力交易平台测试环境 or 正式环境 + int environmentId = DataPushUtils.isFormal(sgccAddressService.getSgccAddress(ENV_KEY)); + + //获取该屏幕的交易序列列表数据(新增交易序列时, 页面及时刷新) + Map seqList = environmentId == 1 ? DataPushUtils.handleSeqList(tradeSeqDao.getAll("0")) : DataPushUtils.handleSeqList(tradeSeqDao.getAllTest("0")); + //获取当前交易序列下的交易公告详情数据 + Map notice = DataPushUtils.mapIsEmpty(environmentId == 1 ? tradeNoticeDao.getNoticeBySeqId(seqId) : tradeNoticeDao.getTestNoticeBySeqId(seqId)); + //获取当前交易序列下的购售方确认信息 - 表格数据 + //处理表格数据 + List> buySaleDetails = DataPushUtils.dealBuySaleDetail(bilateralConsultDataSync.getDeclareDetailList(seqId)); + //获取当前交易序列下的交易情况 + Map tradeStatus = DataPushUtils.mapIsEmpty(environmentId == 1 ? tradeStatusDao.getStatusBySeqId(seqId) : tradeStatusDao.getTestStatusBySeqId(seqId)); + //获取当前交易序列下的发电类型统计 + List> cenSus = environmentId == 1 ? energyCensusDao.getCenSusBySeqId(seqId) : energyCensusDao.getTestCenSusBySeqId(seqId); + //获取当前交易序列下的交易量价走势分析 + //处理交易量价走势数据 + //判断是实时多日成交/实时非多日成交还是回演 + List> seqDataList= (List>) seqList.get("list"); + int type = 0; + for (Map map : seqDataList) { + String tradeSeqId = map.get("tradeSeqId"); + if (seqId.equals(tradeSeqId)) { + type = Integer.valueOf(map.get("type")); + } + } + //交易量价走势 + Map dealTrends = new HashMap<>(); + if (type == 2) { + //实时多日成交 + Map> peak = DataPushUtils.handleRealTimeManyDay(environmentId == 1 ? realTimeManyDayDao.getRealTimeManyDay("峰") : realTimeManyDayDao.getTestRealTimeManyDay("峰")); + Map> flat = DataPushUtils.handleRealTimeManyDay(environmentId == 1 ? realTimeManyDayDao.getRealTimeManyDay("平") : realTimeManyDayDao.getTestRealTimeManyDay("平")); + Map> valley = DataPushUtils.handleRealTimeManyDay(environmentId == 1 ? realTimeManyDayDao.getRealTimeManyDay("谷") : realTimeManyDayDao.getTestRealTimeManyDay("谷")); + dealTrends.put("peak", peak); + dealTrends.put("flat", flat); + dealTrends.put("valley", valley); + }else if (type == 1) { + //实时非多日成交 20230824修改: 接口传递全量峰、平、谷数据 + try { + dealTrends = dealTrendsByAllData(getTrendsReplayByInterface(seqId)); + } catch (Exception e) { + log.error("交易量价走势-实时非多日成交Error: ", e); + } + }else { + //回演 + dealTrends = DataPushUtils.dealTrendReplays(environmentId == 1 ? priceTrendReplayDao.getTrendReplayBySeqId(seqId) : priceTrendReplayDao.getTestTrendReplayBySeqId(seqId)); + + } + //封装结果 + Map resultMap = new HashMap<>(); + resultMap.put("seqList", seqList); + resultMap.put("tradeNotice", notice == null ? new HashMap<>() : notice); + resultMap.put("buySaleDetails", buySaleDetails); + resultMap.put("tradeStatus", tradeStatus == null ? new HashMap<>() : tradeStatus); + resultMap.put("cenSus", cenSus); + resultMap.put("dealTrends", dealTrends); + return resultMap; + } + + + /** + * 处理交易量价走势数据 - 实时月度数据(峰、平、谷全量数据) + * @param trends + * @return + * @throws ExecutionException + * @throws InterruptedException + */ + private Map dealTrendsByAllData(List> trends) throws InterruptedException, ExecutionException { + long start = System.currentTimeMillis(); + if (trends==null || trends.size()==0) { + return new HashMap<>(); + } + //按createTime分组 + Map>> treadsGroupResult = trends.stream().collect(Collectors.groupingBy(t -> t.get("createTime"))); + //将map进行拆分 + List>>> splitByGroupList = DataPushUtils.splitByGroupSize(treadsGroupResult, 10); + + ExecutorService executor = Executors.newFixedThreadPool(10); + //多线程处理 + List>>> handleFutures = splitByGroupList.stream().map(groupList -> + CompletableFuture.supplyAsync(() -> handlePeakFlatValley(groupList), executor)).collect(Collectors.toList()); + //收集结果数据 + CompletableFuture allFutures = CompletableFuture + .allOf(handleFutures.toArray(new CompletableFuture[handleFutures.size()])); + //阻塞 + allFutures.get(); + + List> noOrderResList = new ArrayList<>(); + for(CompletableFuture>> future : handleFutures) { + List> list = future.get(); + noOrderResList.addAll(list); + } + long endOne = System.currentTimeMillis(); + log.info("处理峰、平、谷数据耗时: {}毫秒 ", (endOne - start)); + + List> orderList = noOrderResList.stream().sorted(Comparator.comparing(map -> String.valueOf(map.get("reportTime")))).collect(Collectors.toList()); + Map result = DataPushUtils.dealTrends(orderList); + long endTwo = System.currentTimeMillis(); + log.info("封装前端所需数据耗时: {} 毫秒", (endTwo - start)); + return result; + } + + /** + * 数据处理 + * @param map + * @return + */ + private List> handlePeakFlatValley(Map>> map) { + if (map == null || map.size() == 0) { + return new ArrayList<>(); + } + + List> result = new ArrayList<>(); + try { + for(Map.Entry>> m : map.entrySet()) { + String time = m.getKey(); + //峰 + Map peakMap = m.getValue().stream().filter(f -> "峰".equals(f.get("timeRange"))).findFirst().orElse(new HashMap<>()); + //平 + Map flatMap = m.getValue().stream().filter(f -> "平".equals(f.get("timeRange"))).findFirst().orElse(new HashMap<>()); + //谷 + Map valleyMap = m.getValue().stream().filter(f -> "谷".equals(f.get("timeRange"))).findFirst().orElse(new HashMap<>()); + + Map itemMap = new HashMap<>(); + itemMap.put("reportTime", time); + itemMap.put("peakEnergy", Optional.ofNullable(peakMap.get("sumEnergy")).orElse("0")); + itemMap.put("peakAvgValue", Optional.ofNullable(peakMap.get("avgPrice")).orElse("0")); + itemMap.put("flatEnergy", Optional.ofNullable(flatMap.get("sumEnergy")).orElse("0")); + itemMap.put("flatAvgValue", Optional.ofNullable(flatMap.get("avgPrice")).orElse("0")); + itemMap.put("valleyEnergy", Optional.ofNullable(valleyMap.get("sumEnergy")).orElse("0")); + itemMap.put("valleyAvgValue", Optional.ofNullable(valleyMap.get("avgPrice")).orElse("0")); + result.add(itemMap); + } + } catch (Exception e) { + log.error("error:", e); + } + return result; + } + + /** + * 获取交易量价走势(非多日成交) - 实时数据 + * @param seqId + * @throws Exception + */ + private List> getTrendsReplayByInterface(String seqId) { + + try { + long startTime = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + String priceTrendResult = HttpUtils.sendPost(sgccUrl + "/dataPush/tradeEnergyPriceLine/selectTradeEnergyPriceBySeqId", "seqId="+seqId, DataPushUtils.createToken(PUBLIC_KEY)); + //String priceTrendResult = HttpUtils.sendPost("http://localhost:16016/dataPush/tradeEnergyPriceLine/selectTradeEnergyPriceLineData", "seqId="+seqId, DataPushUtils.createToken(PUBLIC_KEY)); + log.info("获取双边协商-交易量价走势-实时数据, 接口调用结果: {}", priceTrendResult); + if(priceTrendResult == null || "".equals(priceTrendResult)) { + log.info("获取双边协商-交易量价走势-实时数据, 接口调用结果为空!"); + return new ArrayList<>(); + } + Map priceTrendObj = JSON.parseObject(priceTrendResult, Map.class); + List> priceTrendData = JSON.parseObject(JSON.toJSONString(priceTrendObj.get("data")), new TypeReference>>(){}); + if (priceTrendData == null || priceTrendData.size() == 0) { + log.info("获取双边协商-交易量价走势-实时数据, data值为NUll或者为空! data: {}", priceTrendData); + return new ArrayList<>(); + } + long entTime = System.currentTimeMillis(); + log.info("双边协商-交易量价走势-实时数据接口耗时:{}", (entTime-startTime)/1000); + return priceTrendData; + } catch (Exception e) { + log.info("交易量价走势(非多日成交) - 实时数据接口数据获取失败!, 方法名: {}, 接口路径: {} ", "getTrendsReplayByInterface", "/dataPush/tradeEnergyPriceLine/selectTradeEnergyPriceLineData"); + e.printStackTrace(); + return new ArrayList<>(); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/carbon/CarbonMonitorServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/carbon/CarbonMonitorServiceImpl.java new file mode 100644 index 0000000..b2fcdc6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/carbon/CarbonMonitorServiceImpl.java @@ -0,0 +1,144 @@ +package com.alonginfo.project.gansu.serviceimpl.carbon; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.CarbonMapTopContentDTO; +import com.alonginfo.project.gansu.domain.ClearInstallTrendDTO; +import com.alonginfo.project.gansu.domain.ClearReduceGainDTO; +import com.alonginfo.project.gansu.domain.IndustryEmissionDTO; +import com.alonginfo.project.gansu.mapper.CarbonMonitorMapper; +import com.alonginfo.project.gansu.service.carbon.ICarbonMonitorService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/19 10:20 + * @Description: 双碳检测 + */ +@Service +public class CarbonMonitorServiceImpl implements ICarbonMonitorService { + + @Autowired + private CarbonMonitorMapper carbonMonitorMapper; + + /** + * 发电企业碳排放情况 + * @return + */ + @Override + public EchartsCommonDTO getEnterpriseEmission() { + List> emissions = carbonMonitorMapper.queryEnterpriseEmission(); + if (StringUtils.isEmpty(emissions)) { + return new EchartsCommonDTO<>(); + } + List xAxis = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map emission : emissions) { + xAxis.add(emission.get("dataYear")); + seriesData.add(emission.get("emissionValue")); + } + + EchartsCommonDTO result = new EchartsCommonDTO<>(); + result.setXAxisData(xAxis); + result.setSeriesData(seriesData); + return result; + } + + /** + * 各行业电力用户碳排放情况 + * @return + */ + @Override + public IndustryEmissionDTO getIndustryEmission() { + Map industry = carbonMonitorMapper.queryIndustryEmission(); + if (StringUtils.isEmpty(industry)) { + return new IndustryEmissionDTO(); + } + return IndustryEmissionDTO.builder() + .sum(industry.get("summary")) + .nlmyy(industry.get("farming")) + .gy(industry.get("industry")) + .jzy(industry.get("building")) + .jtyscc(industry.get("traffic")) + .rjxxjs(industry.get("software")) + .pflsy(industry.get("retailWholesale")) + .zscyy(industry.get("stayFoot")) + .jry(industry.get("finance")) + .fdcy(industry.get("realEstate")) + .zlsfwy(industry.get("leaseService")) + .ggfwglzz(industry.get("commonManage")).build(); + } + + /** + * 清洁能源装机趋势 + * @return + */ + @Override + public ClearInstallTrendDTO getClearInstallTrend() { + List> clearInstallTrends = carbonMonitorMapper.queryClearInstallTrend(); + if (StringUtils.isEmpty(clearInstallTrends)) { + return new ClearInstallTrendDTO(); + } + List xAxis = new LinkedList<>(); + List installCapacityList = new LinkedList<>(); + List installRatioList = new LinkedList<>(); + for (Map clearInstallTrend : clearInstallTrends) { + xAxis.add(clearInstallTrend.get("dataYear")); + installCapacityList.add(clearInstallTrend.get("installCapacity")); + installRatioList.add(clearInstallTrend.get("installRatio")); + } + + ClearInstallTrendDTO result = new ClearInstallTrendDTO(); + result.setXData(xAxis); + result.setInstallCapacity(installCapacityList); + result.setInstallRatio(installRatioList); + return result; + } + + /** + * 清洁能源减排成果 + * @return + */ + @Override + public ClearReduceGainDTO getClearReduceGain() { + List> clearReduceGains = carbonMonitorMapper.queryClearReduceGain(); + if(StringUtils.isEmpty(clearReduceGains)) { + return new ClearReduceGainDTO(); + } + List xAxis = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map clearReduceGain : clearReduceGains) { + xAxis.add(clearReduceGain.get("dataYear")); + seriesData.add(clearReduceGain.get("clearReduceValue")); + } + + ClearReduceGainDTO result = new ClearReduceGainDTO(); + result.setXAxisData(xAxis); + result.setSeriesData(seriesData); + return result; + } + + /** + * 地图上方概览 + * @return + */ + @Override + public CarbonMapTopContentDTO getCarbonMapTopContent() { + Map carbonMapTopContent = carbonMonitorMapper.queryCarbonMapTopContent(); + if (StringUtils.isEmpty(carbonMapTopContent)) { + return new CarbonMapTopContentDTO(); + } + return CarbonMapTopContentDTO.builder() + .societyUsePower(carbonMapTopContent.get("societyUse")) + .societyUsePowerYoy(carbonMapTopContent.get("societyUserYoy")) + .clearReduce(carbonMapTopContent.get("clearReduce")) + .clearReduceYoy(carbonMapTopContent.get("clearReduceYoy")) + .clearEnergyRatio(carbonMapTopContent.get("clearEnergyRatio")) + .clearEnergyRatioYoy(carbonMapTopContent.get("clearEnergyYoy")).build(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/clearenergy/ClearEnergyAbsorptionServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/clearenergy/ClearEnergyAbsorptionServiceImpl.java new file mode 100644 index 0000000..9633cc5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/clearenergy/ClearEnergyAbsorptionServiceImpl.java @@ -0,0 +1,179 @@ +package com.alonginfo.project.gansu.serviceimpl.clearenergy; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.ClearAbsorptionAnalysisDTO; +import com.alonginfo.project.gansu.domain.ClearRationDTO; +import com.alonginfo.project.gansu.domain.MapTopContentDTO; +import com.alonginfo.project.gansu.mapper.ClearEnergyAbsorptionMapper; +import com.alonginfo.project.gansu.service.clearenergy.IClearEnergyAbsorptionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/6/16 15:35 + * @Description: 清洁能源消纳 + */ +@Service +public class ClearEnergyAbsorptionServiceImpl implements IClearEnergyAbsorptionService { + + @Autowired + private ClearEnergyAbsorptionMapper clearEnergyAbsorptionMapper; + + /** + * 当年清洁能源消纳趋势 + * @return + */ + @Override + public EchartsCommonDTO getAbsorptionTrendCurrentYear() { + List> currentYearTrends = clearEnergyAbsorptionMapper.queryAbsorptionTrendByNowYear(); + if (StringUtils.isEmpty(currentYearTrends)) { + return new EchartsCommonDTO<>(); + } + + List xData = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map currentYearTrend : currentYearTrends) { + xData.add(currentYearTrend.get("dataMonth")); + seriesData.add(currentYearTrend.get("absorptionValue")); + } + + EchartsCommonDTO result = new EchartsCommonDTO<>(); + result.setXAxisData(xData); + result.setSeriesData(seriesData); + return result; + } + + /** + * 历年清洁能源消纳情况 + * @return + */ + @Override + public ClearRationDTO getClearRatioByCalendarYear() { + List> clearRatioCalendarYears = clearEnergyAbsorptionMapper.queryClearRatioByCalendarYear(); + if (StringUtils.isEmpty(clearRatioCalendarYears)) { + return new ClearRationDTO(); + } + + List yData = new LinkedList<>(); + List gf = new LinkedList<>(); + List sd = new LinkedList<>(); + List fd = new LinkedList<>(); + for (Map clearRatioCalendarYear : clearRatioCalendarYears) { + String dataYear = clearRatioCalendarYear.get("dataYear"); + String dataYearRes = dataYear.contains("年") ? dataYear : dataYear + "年"; + yData.add(dataYearRes); + gf.add(clearRatioCalendarYear.get("lightRatio")); + sd.add(clearRatioCalendarYear.get("waterRatio")); + fd.add(clearRatioCalendarYear.get("windRatio")); + } + + ClearRationDTO result = new ClearRationDTO(); + result.setYData(yData); + result.setGf(gf); + result.setSd(sd); + result.setFd(fd); + return result; + } + + /** + * 清洁能源消纳分析 + * @return + */ + @Override + public ClearAbsorptionAnalysisDTO getClearAbsorptionAnalysis() { + List> clearAbsorptionAnalysisList = clearEnergyAbsorptionMapper.queryClearAbsorptionAnalysis(); + if (StringUtils.isEmpty(clearAbsorptionAnalysisList)) { + return new ClearAbsorptionAnalysisDTO(); + } + + List> echartDataList = new ArrayList<>(); + Map water = new HashMap<>(); + Map wind = new HashMap<>(); + Map light = new HashMap<>(); + for (Map map : clearAbsorptionAnalysisList) { + String energyType = map.get("energyType"); + String absorptionValue = map.get("absorptionValue"); + String absorptionRatio = map.get("absorptionRatio"); + String flag = map.get("yoyTrend"); + String yoyValue = map.get("yoyValue"); + + //饼图 + Map echartDataItem = new HashMap<>(); + echartDataItem.put("name", energyType); + echartDataItem.put("value", absorptionValue); + echartDataList.add(echartDataItem); + + //表格 + Map tableData = new HashMap<>(); + tableData.put("xn", absorptionValue); + tableData.put("xnl", absorptionRatio); + tableData.put("tb", yoyValue); + tableData.put("flag", flag); + if (energyType.contains("水")) { + water = tableData; + } else if (energyType.contains("风")) { + wind = tableData; + } else if (energyType.contains("光")) { + light = tableData; + } else { + + } + } + ClearAbsorptionAnalysisDTO result = new ClearAbsorptionAnalysisDTO(); + result.setEchartData(echartDataList); + result.setWater(water); + result.setLight(light); + result.setWind(wind); + return result; + } + + /** + * 清洁能源消纳趋势 + * @return + */ + @Override + public EchartsCommonDTO getClearAbsorptionTrend() { + List> trends = clearEnergyAbsorptionMapper.queryClearAbsorptionTrend(); + if (StringUtils.isEmpty(trends)) { + return new EchartsCommonDTO<>(); + } + List xData = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map trend : trends) { + xData.add(trend.get("dataYear")); + seriesData.add(trend.get("dataValue")); + } + + EchartsCommonDTO result = new EchartsCommonDTO<>(); + result.setXAxisData(xData); + result.setSeriesData(seriesData); + return result; + } + + /** + * 地图上方概览 + * @return + */ + @Override + public MapTopContentDTO getMapTopContent() { + Map mapTopContent = clearEnergyAbsorptionMapper.queryMapTopContent(); + if (StringUtils.isEmpty(mapTopContent)) { + return new MapTopContentDTO(); + } + MapTopContentDTO mapTopContentDTO = new MapTopContentDTO(); + mapTopContentDTO.setAbsorption(mapTopContent.get("absorption")); + mapTopContentDTO.setPower(mapTopContent.get("power")); + mapTopContentDTO.setSaveCoal(mapTopContent.get("saveCoal")); + mapTopContentDTO.setReductionCo2(mapTopContent.get("reductionCo2")); + mapTopContentDTO.setAbsorptionRateTb(mapTopContent.get("absorptionRateTb")); + mapTopContentDTO.setAbsorptionRateAllLow(mapTopContent.get("absorptionRateAllLow")); + mapTopContentDTO.setAbsorptionRateNoWaterLow(mapTopContent.get("absorptionRateNoWaterLow")); + mapTopContentDTO.setAbsorptionRateCompleteAll(mapTopContent.get("absorptionRateCompleteAll")); + mapTopContentDTO.setAbsorptionRateCompleteNoWater(mapTopContent.get("absorptionRateCompleteNoWater")); + return mapTopContentDTO; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeDataReturnImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeDataReturnImpl.java new file mode 100644 index 0000000..15232e1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeDataReturnImpl.java @@ -0,0 +1,91 @@ +package com.alonginfo.project.gansu.serviceimpl.dayaddthree; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.project.gansu.service.dayaddthree.DayAddThreeService; +import com.alonginfo.project.gansu.service.dayaddthree.DayAddThreeSyncGet; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@Service +@Slf4j +public class DayAddThreeDataReturnImpl implements DayAddThreeSyncGet { + + private static final Logger logger = LoggerFactory.getLogger(DayAddThreeSyncGet.class); + + @Autowired + private DayAddThreeService dayAddThreeService; + + /** + * D+3页面异步数据返回 + */ + @Override + public Map dayAddThreeDataReturn(String seqId) { + try { + long startTime = System.currentTimeMillis(); + //交易序列 + CompletableFuture> seq = dayAddThreeService.getDayAddTreeTradeSeq(); + //交易公告 + CompletableFuture> tradeNotice = dayAddThreeService.getDayAddThreeTradeNotice(); + + //交易情况-发电、用户申报电量、成交电量 + //买方、卖方发电申报电量+用户申报电量 (赋值给)= 申报明细-买卖方申报电量 + //买方发电成交电量+用户成交电量 = 卖方发电成交电量+用户成交电量(一直是0) = 实时成交成交电量 + CompletableFuture> yieldUserForStatus = dayAddThreeService.getYieldUserForStatus(); + + //交易情况(成交电量、成交均价、最高最低成交价展示在实时成交模块) + CompletableFuture> tradeStatus = dayAddThreeService.getDayAddThreeTradeStatus(); + //申报明细 + CompletableFuture>> reportDetails = dayAddThreeService.getDayAddThreeReportDetails(seqId); + //实时成交 + CompletableFuture>> realTimeDeal = dayAddThreeService.getDayAddThreeRealTimeDeal(); + //当日分时段 + CompletableFuture> everyTimeSlotDeal = dayAddThreeService.getDayAddThreeEveryTimeSlotDeal(); + //各日成交 + CompletableFuture> everyDayDeal = dayAddThreeService.getDayAddThreeEveryDayDeal(); + //累计申报、累计成交 + CompletableFuture> reportDealNum = dayAddThreeService.getReportDealNum(); + + //申报明细-买卖方申报电量、申报均价 + CompletableFuture>energyPriceForDetails = dayAddThreeService.getEnergyPriceForDetails(); + + //收集返回值 + CompletableFuture.allOf(seq, tradeNotice, yieldUserForStatus, tradeStatus, reportDetails, realTimeDeal, everyTimeSlotDeal, everyDayDeal, reportDealNum, energyPriceForDetails); + + log.info("交易序列: {}", JSON.toJSONString(seq.get())); + log.info("交易公告: {}", JSON.toJSONString(tradeNotice.get())); + log.info("交易情况-发电、用户申报电量、成交电量: {}", JSON.toJSONString(yieldUserForStatus.get())); + log.info("交易情况: {}", JSON.toJSONString(tradeStatus.get())); + log.info("申报明细: {}", JSON.toJSONString(reportDetails.get())); + log.info("实时成交: {}", JSON.toJSONString(realTimeDeal.get())); + log.info("当日分时段: {}", JSON.toJSONString(everyTimeSlotDeal.get())); + log.info("各日成交: {}", JSON.toJSONString(everyDayDeal.get())); + log.info("累计申报、累计成交: {}", JSON.toJSONString(reportDealNum.get())); + log.info("申报明细-买卖方申报电量、申报均价: {}", JSON.toJSONString(energyPriceForDetails.get())); + Map result = new HashMap<>(); + result.put("seqList", seq.get()); + result.put("tradeNotice", tradeNotice.get()); + result.put("tradeStatus", tradeStatus.get()); + result.put("reportDetails", reportDetails.get()); + result.put("realTimeDeal", realTimeDeal.get()); + result.put("timeSlotDeal", everyTimeSlotDeal.get()); + result.put("everyDayDeal", everyDayDeal.get()); + result.put("reportDealNum", reportDealNum.get()); + result.put("yieldUserForStatus", yieldUserForStatus.get()); + result.put("energyPriceForDetails", energyPriceForDetails.get()); + long endTime = System.currentTimeMillis(); + logger.info("-----D+3滚动交易页面总耗时: {}s", (endTime-startTime)/1000); + return result; + } catch (Exception e) { + e.printStackTrace(); + return new HashMap<>(); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl.java new file mode 100644 index 0000000..3416a40 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl.java @@ -0,0 +1,727 @@ +package com.alonginfo.project.gansu.serviceimpl.dayaddthree; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.DayAddThreeDao; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.dayaddthree.DayAddThreeService; +import com.alonginfo.utils.DataPushUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.stream.Collectors; + +/** + * D+3滚动交易 业务层实现 + * @author Administrator + * + */ +@Service +public class DayAddThreeServiceImpl implements DayAddThreeService { + + private static final Logger logger = LoggerFactory.getLogger(DayAddThreeServiceImpl.class); + + private final Map map = new HashMap<>(); + + private final List> list = new ArrayList<>(); + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String PUBLIC_KEY; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private DayAddThreeDao dayAddThreeDao; + + /** + * 实时成交 + */ + public ThreadLocal energyThreadLocal = new ThreadLocal<>(); + + /** + * 买方申报电量 = 买方发电申报电量+买方用户申报电量 + */ + public ThreadLocal buyReportThreadLocal = new ThreadLocal<>(); + + /** + * 卖方申报电量 = 卖方发电申报电量+卖方用户申报电量 + */ + public ThreadLocal saleReportThreadLocal = new ThreadLocal<>(); + + /** + * 获取D+3滚动交易 --- 交易序列 + * @throws Exception + */ + @Override + @Async + public CompletableFuture> getDayAddTreeTradeSeq() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectDayRolls"; + String tradeSeqResultString = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 交易序列数据结果:{}", tradeSeqResultString); + if (StringUtils.isEmpty(tradeSeqResultString)) { + logger.info("-D+3: 获取D+3滚动交易 - 交易序列数据结果为空, ip: {}, 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(map); + } + Map resultObj = JSON.parseObject(tradeSeqResultString, Map.class); + List tradeSeqList = JSON.parseArray(JSON.toJSONString(resultObj.get("data")), Map.class); + //遍历重组数据 + //交易序列数据 + List> seqResult = new ArrayList>(); + //交易序列id数据 + List tradeIds = new ArrayList<>(); + for(Map item : tradeSeqList) { + Map map = new HashMap(); + map.put("tradeSeqId", String.valueOf(item.get("tradeSeqId"))); + map.put("tradeSeqCaption", String.valueOf(item.get("tradeSeqCaption"))); + seqResult.add(map); + tradeIds.add(String.valueOf(item.get("tradeSeqId"))); + + } + //封装结果 + //交易序列id目的是昨日数据切换到今日数据时,下拉框绑定值改变 + Map result = new HashMap<>(); + result.put("list", seqResult); + result.put("arr", tradeIds); + long end = System.currentTimeMillis(); + logger.info("-D+3获取交易序列接口耗时: {}s", (end - start) / 1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 交易序列数据获取失败!, {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 获取D+3滚动交易 -- 交易公告 + * 异步获取接口返回数据, 同步封装返回 CompletableFuture + */ + @Override + @Async + public CompletableFuture> getDayAddThreeTradeNotice() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectDayRollsNotice"; + String tradeNoticeResultString = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 交易公告结果:{}", tradeNoticeResultString); + if (StringUtils.isEmpty(tradeNoticeResultString)) { + logger.info("-D+3: 获取D+3滚动交易 - 交易公告数据结果为空, ip: {}, 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(map); + } + Map resultObj = JSON.parseObject(tradeNoticeResultString, Map.class); + Map data = (Map) resultObj.get("data"); + + //结果数据 + Map result = new HashMap<>(); + result.put("tradeTypeMode", Optional.ofNullable(data.get("tradeType")).orElse("")); + result.put("resPubTime", Optional.ofNullable(data.get("ntime")).orElse("")); + result.put("beginDate", Optional.ofNullable(data.get("beginTime")).orElse("")); + result.put("endDate", Optional.ofNullable(data.get("endTime")).orElse("")); + result.put("saleNum", Optional.ofNullable(data.get("perCount")).orElse("")); + result.put("vendeeNum", Optional.ofNullable(data.get("vendeeCount")).orElse("")); + + //修改交易周期格式 xxxx年xx月xx日 -> xxxx-xx-xx + Date date = new SimpleDateFormat("yyyy年MM月dd日").parse(String.valueOf(Optional.ofNullable(data.get("tradeCyc")).orElse("")).split("-")[0]); + String format = new SimpleDateFormat("yyyy-MM-dd").format(date); + result.put("tradeSeqCycle", format); + result.put("resultIssue", String.valueOf(Optional.ofNullable(data.get("pubTime")).orElse("")).split(" ")[0]); + long end = System.currentTimeMillis(); + logger.info("-D+3获取交易公告接口耗时: {}s", (end - start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 交易公告数据获取失败!, {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 获取D+3滚动交易 -- 交易情况 + * @return + * @throws Exception + */ + @Override + @Async + public CompletableFuture> getDayAddThreeTradeStatus() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectDayRollsTradeReport"; + String tradeStatusResultString = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 交易情况数据结果, {}", tradeStatusResultString); + if (StringUtils.isEmpty(tradeStatusResultString)) { + logger.info("-D+3: 获取D+3滚动交易 - 交易情况数据结果为空, ip: {}, 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(map); + } + Map tradeStatusResultMap = JSON.parseObject(tradeStatusResultString, Map.class); + Map data = (Map) tradeStatusResultMap.get("data"); + + //结果封装 + Map result = new HashMap<>(); + result.put("saleSuoteNum", data.get("saleReportNum")); + result.put("saleEnergy", retainDigit(data.get("saleReportEnergy"))); + result.put("saleResultNum", data.get("saleDealNum")); + result.put("vendeeConfimNum", data.get("vendeeReportNum")); + result.put("vendeeEnergy", retainDigit(data.get("vendeeReportEnergy"))); + result.put("vendeeNum", data.get("vendeeDealNum")); + //展示到页面实时成交模块右侧 + result.put("energy", energyThreadLocal.get()); + result.put("avgPrice", retainDigit(data.get("avgPrice"))); + result.put("maxPrice", retainDigit(data.get("maxPrice"))); + result.put("minPrice", retainDigit(data.get("minPrice"))); + long end = System.currentTimeMillis(); + logger.info("-D+3获取交易情况接口耗时: {} s", (end -start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3-交易情况数据获取失败!: {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 获取D+3滚动交易 -- 申报明细数据 + * @return + * @throws Exception + */ + @Override + @Async + public CompletableFuture>> getDayAddThreeReportDetails(String seqId){ + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectReportDetailed"; + String reportDetailsResultString = HttpUtils.sendPost(mappingAddress, "seqId="+seqId, DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 申报明细数据结果:{}", reportDetailsResultString); + if (StringUtils.isEmpty(reportDetailsResultString)) { + logger.info("-D+3: 获取D+3滚动交易 - 申报明细数据结果为空, ip:{} 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(list); + } + Map reportDetailsMap = JSON.parseObject(reportDetailsResultString, Map.class); + //返回结果data数据 + List parseArray = JSON.parseArray(JSON.toJSONString(reportDetailsMap.get("data")), Map.class); + //按时间排序 + Collections.sort(parseArray, new Comparator() { + @Override + public int compare(Map o1, Map o2) { + Integer o1BeginTime = Integer.parseInt(String.valueOf(Optional.ofNullable(o1.get("beginTime")).orElse("00:00")).split(":")[0]); + Integer o2BeginTime = Integer.parseInt(String.valueOf(Optional.ofNullable(o2.get("beginTime")).orElse("00:00")).split(":")[0]); + return o1BeginTime.compareTo(o2BeginTime); + } + }); + //封装结果数据 + List> result = new ArrayList>(); + for (Map map : parseArray) { + //交易时段 + String tradeTimeSlot = map.get("beginTime").toString() + "-" + map.get("endTime").toString(); + + //买入卖出数据反了 修改后: 买入-saleEnergy 卖出-vendeeEnergy + //申报电量-买入 + String vendeeEnergy = Optional.ofNullable(map.get("saleEnergy")).orElse("").toString(); + //申报电量-卖出 + String saleEnergy = Optional.ofNullable(map.get("vendeeEnergy")).orElse("").toString(); + //申报电价 - 买家 + BigDecimal[] buyPriceArray = new BigDecimal[] { + retainDigit(map.get("reportPriceBuy1")), + retainDigit(map.get("reportPriceBuy2")), + retainDigit(map.get("reportPriceBuy3")), + }; + List buyPriceResult = arraySorted(buyPriceArray, 1); + + //申报电价 - 卖家 + BigDecimal[] salePriceArray = new BigDecimal[] { + retainDigit(map.get("reportPriceSale1")), + retainDigit(map.get("reportPriceSale2")), + retainDigit(map.get("reportPriceSale3")), + }; + List salePriceResult = arraySorted(salePriceArray, 2); + + List row = new LinkedList<>(); + row.add(tradeTimeSlot); + row.add(vendeeEnergy); + row.add(saleEnergy); + row.add(buyPriceResult.get(0).toString()); + row.add(buyPriceResult.get(1).toString()); + row.add(buyPriceResult.get(2).toString()); + row.add(salePriceResult.get(0).toString()); + row.add(salePriceResult.get(1).toString()); + row.add(salePriceResult.get(2).toString()); + result.add(row); + } + long end = System.currentTimeMillis(); + logger.info("-D+3获取申报明细数据接口耗时: {}s", (end - start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 申报明细数据获取失败!: {}", e); + return CompletableFuture.completedFuture(list); + } + } + + /** + * 获取D+3滚动交易 -- 各时段成交情况 + * @throws Exception + */ + @Override + @Async + public CompletableFuture> getDayAddThreeEveryTimeSlotDeal() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectTodayTradeDetailed"; + String everyTimeSlotdealResultStr = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 各时段成交情况结果:{}", everyTimeSlotdealResultStr); + if (StringUtils.isEmpty(everyTimeSlotdealResultStr)) { + logger.info("-D+3: 获取D+3滚动交易 - 各时段成交情况结果为空, ip:{}, 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(map); + } + Map timeSlotDealMap = JSON.parseObject(everyTimeSlotdealResultStr, Map.class); + //获取data + List timeSlotResultList = JSON.parseArray(JSON.toJSONString(timeSlotDealMap.get("data")), Map.class); + //发电侧数据 type=1 + List yieldEnergyData = timeSlotResultList.stream().filter(map -> "1".equals(String.valueOf(map.get("type")))).collect(Collectors.toList()); + //用户侧数据 type=2 + List userEnergyData = timeSlotResultList.stream().filter(map -> "2".equals(String.valueOf(map.get("type")))).collect(Collectors.toList()); + //均价数据 type=3 + List avgPriceData = timeSlotResultList.stream().filter(map -> "".equals(String.valueOf(map.get("type")))).collect(Collectors.toList()); + + //时间段集合 + String[] timeSlotArr = new String[] { + "01:00", "02:00", "03:00", "04:00", "05:00", "06:00", "07:00", "08:00", "09:00", "10:00", "11:00", "12:00", + "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00", "24:00" + }; + //获取结果数据 + //发电成交电量集合 + List yieldEnergyList = new LinkedList<>(); + //用户成交电量集合 + List userEnergyList = new LinkedList<>(); + //成交均价集合 + List dealAvgPriceList = new LinkedList<>(); + for(int i = 1; i <= 24; i++) { + String iStr = String.valueOf(i); + //发电成交电量 + BigDecimal yieldEnergy = retainDigit(yieldEnergyData.stream().filter(m -> iStr.equals(String.valueOf(m.get("tradeTimeSlot")))).findFirst().orElse(new HashMap<>()).get("dealEnergy")); + //用户成交电量 + BigDecimal userEnergy = retainDigit(userEnergyData.stream().filter(m -> iStr.equals(String.valueOf(m.get("tradeTimeSlot")))).findFirst().orElse(new HashMap<>()).get("dealEnergy")); + //成交均价 + BigDecimal avgPrice = retainDigit(avgPriceData.stream().filter(m -> iStr.equals(String.valueOf(m.get("tradeTimeSlot")))).findFirst().orElse(new HashMap<>()).get("dealAvgPrice")); + + yieldEnergyList.add(yieldEnergy); + userEnergyList.add(userEnergy); + dealAvgPriceList.add(avgPrice); + } + //y轴数据 + Map yieldEnergyMap = new HashMap<>(); + yieldEnergyMap.put("name", "发电成交电量"); + yieldEnergyMap.put("data", yieldEnergyList); + Map userEnergyMap = new HashMap<>(); + userEnergyMap.put("name", "用户成交电量"); + userEnergyMap.put("data", userEnergyList); + Map dealAvgPriceMap = new HashMap<>(); + dealAvgPriceMap.put("name", "成交均价"); + dealAvgPriceMap.put("data", dealAvgPriceList); + List> seriesData = new ArrayList>(); + seriesData.add(yieldEnergyMap); + seriesData.add(userEnergyMap); + seriesData.add(dealAvgPriceMap); + + Map result = new HashMap<>(); + result.put("xAxis", Arrays.asList(timeSlotArr)); + result.put("seriesData", seriesData); + long end = System.currentTimeMillis(); + logger.info("-D+3页面获取各时段成交情况接口耗时: {}s", (end - start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 各时段成交情况获取失败!, {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 获取D+3滚动交易 -- 实时成交数据 + * @return + * @throws Exception + */ + @Override + @Async + public CompletableFuture>> getDayAddThreeRealTimeDeal(){ + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectTradeDetailed"; + String realTimeDealResultString = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 实时成交数据结果: {}", realTimeDealResultString); + if (StringUtils.isEmpty(realTimeDealResultString)) { + logger.info("-D+3: 获取D+3滚动交易 - 实时成交数据结果为空, ip: {}, 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(list); + } + Map realTimeDealResultMap = JSON.parseObject(realTimeDealResultString, Map.class); + //data数据 + List realTimeDealData = JSON.parseArray(JSON.toJSONString(realTimeDealResultMap.get("data")), Map.class); + //根据成交时间排序 + Collections.sort(realTimeDealData, new Comparator() { + @Override + public int compare(Map o1, Map o2) { + String o1String = o1.get("dealTime").toString(); + String o2String = o2.get("dealTime").toString(); + return o2String.compareTo(o1String); + } + }); + + //数据量>300的话 限制展示300条 + List newList = realTimeDealData.size()>300 ? realTimeDealData.subList(0, 300) : realTimeDealData; + System.out.println("newList.Size: " + newList.size()); + + //封装结果 + List> result = new ArrayList<>(); + for (Map map : newList) { + //交易时段 + String tradeTimeSlot = map.get("tradeTimeSolt").toString(); + //成交电量 + String dealEnergy = retainDigit(map.get("dealEnergy")).toString(); + //成交均价 + String dealAvgPrice = retainDigit(map.get("dealAvgPrice")).toString(); + //成交时间 + String dealTime = map.get("dealTime").toString(); + + List row = new LinkedList<>(); + row.add(tradeTimeSlot); + row.add(dealEnergy); + row.add(dealAvgPrice); + row.add(dealTime); + result.add(row); + } + long end = System.currentTimeMillis(); + logger.info("-D+3页面获取实时成交数据接口: {}s", (end - start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 实时成交数据获取失败!, {}", e); + return CompletableFuture.completedFuture(list); + } + } + + /** + * 获取D+3滚动交易 -- 各日成交情况 + * @throws Exception + */ + @Override + @Async + public CompletableFuture> getDayAddThreeEveryDayDeal() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectSameMonthTradeDetailed"; + String everyDayDealResultString = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 各日成交情况数据结果: {}", everyDayDealResultString); + if (StringUtils.isEmpty(everyDayDealResultString)) { + logger.info("-D+3: 获取D+3滚动交易 - 各日成交情况数据结果为空, ip: {}, 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(map); + } + Map everyDayDealMap = JSON.parseObject(everyDayDealResultString, Map.class); + //data数据 + List everyDayDealData = JSON.parseArray(JSON.toJSONString(everyDayDealMap.get("data")), Map.class); + //发电成交量数据 + List yieldEnergyData = dateSorted(everyDayDealData.stream().filter(m -> "1".equals(String.valueOf(m.get("type")))).collect(Collectors.toList())); + //用户成交量数据 + List userEnergyData = dateSorted(everyDayDealData.stream().filter(m -> "2".equals(String.valueOf(m.get("type")))).collect(Collectors.toList())); + //均价数据 + List avgPriceData = dateSorted(everyDayDealData.stream().filter(m -> "".equals(String.valueOf(m.get("type")))).collect(Collectors.toList())); + + //封装结果 + List xAxis = new LinkedList<>(); + //发电成交电量 + List yieldDealEnergyList = new LinkedList<>(); + //用户成交电量 + List userDealEnergyList = new LinkedList<>(); + List dealAvgPriceList = new LinkedList<>(); + + //发电成交量 + for (Map map : yieldEnergyData) { + //yyyy-MM-dd 转为 MM/dd + String dealDate = map.get("dealDate").toString(); + String dealDateFormat = LocalDate.parse(dealDate, DateTimeFormatter.ofPattern("yyyyMMdd")).format(DateTimeFormatter.ofPattern("MM/dd")); + xAxis.add(dealDateFormat); + yieldDealEnergyList.add(retainDigit(map.get("dealEnergy"))); + } + + //用户成交量 + for (Map map : userEnergyData) { + userDealEnergyList.add(retainDigit(map.get("dealEnergy"))); + } + //成交均价 + for (Map map : avgPriceData) { + dealAvgPriceList.add(retainDigit(map.get("dealAvgPrice"))); + } + + //y轴数据 + Map yieldEnergyMap = new HashMap<>(); + yieldEnergyMap.put("name", "发电成交电量"); + yieldEnergyMap.put("data", yieldDealEnergyList); + Map userEnergyMap = new HashMap<>(); + userEnergyMap.put("name", "用户成交电量"); + userEnergyMap.put("data", userDealEnergyList); + Map dealAvgPriceMap = new HashMap<>(); + dealAvgPriceMap.put("name", "成交均价"); + dealAvgPriceMap.put("data", dealAvgPriceList); + List> seriesData = new ArrayList>(); + seriesData.add(yieldEnergyMap); + seriesData.add(userEnergyMap); + seriesData.add(dealAvgPriceMap); + + Map result = new HashMap<>(); + result.put("xAxis", xAxis); + result.put("seriesData", seriesData); + + long end = System.currentTimeMillis(); + logger.info("-D+3页面获取各日成交情况接口耗时: {}s", (end-start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 各日成交情况数据获取失败!, {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 获取申报、成交总笔数 + */ + @Override + @Async + public CompletableFuture> getReportDealNum() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectAuctoinNum"; + String everyDayDealResultString = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 申报、成交总笔数结果: {}", everyDayDealResultString); + if (StringUtils.isEmpty(everyDayDealResultString)) { + logger.info("-D+3: 获取D+3滚动交易 - 申报、成交总笔数结果, ip: {}, 接口地址: {}", sgccUrl, mappingAddress); + return CompletableFuture.completedFuture(map); + } + Map reportDealMap = JSONObject.parseObject(everyDayDealResultString, Map.class); + Map reportDealData = (Map)reportDealMap.get("data"); + //封装结果 + Map result = new HashMap<>(); + result.put("reportNum", Optional.ofNullable(reportDealData.get("reportNum")).orElse("")); + result.put("dealNum", Optional.ofNullable(reportDealData.get("dealNum")).orElse("")); + long end = System.currentTimeMillis(); + logger.info("-D+3页面获取申报、成交总笔数接口耗时: {} s", (end -start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 各日成交情况数据获取失败!, {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 交易情况-发电、用户申报电量、成交电量 + */ + @Override + @Async + public CompletableFuture> getYieldUserForStatus() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //发电、用户申报电量接口地址 + String reportAddress = sgccUrl + "/dataPush/dayRolls/selectTrListingEnergy"; + String reportEnergyResStr = HttpUtils.sendPost(reportAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + + //发电、用户成交电量接口地址 + String dealAddress = sgccUrl + "/dataPush/dayRolls/selectDealDetailEnergy"; + String dealEnergyResStr = HttpUtils.sendPost(dealAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + + logger.info("-D+3: 获取D+3滚动交易 - 交易情况:发电、用户申报电量数据结果: {}", reportEnergyResStr); + logger.info("-D+3: 获取D+3滚动交易 - 交易情况:发电、用户成交电量数据结果: {}", dealEnergyResStr); + if (StringUtils.isEmpty(reportEnergyResStr) || StringUtils.isEmpty(dealEnergyResStr)) { + logger.info("-D+3: D+3滚动交易 - 交易情况: 发电、用户申报电量、成交电量结果为空!"); + return CompletableFuture.completedFuture(map); + } + //申报电量-发电、用户数据 + Map reportEnergyResultMap = JSON.parseObject(reportEnergyResStr, Map.class); + Map reportRes = (Map) reportEnergyResultMap.get("data"); + //成交电量-发电、用户数据 + Map dealEnergyResultMap = JSON.parseObject(dealEnergyResStr, Map.class); + Map dealRes = (Map) dealEnergyResultMap.get("data"); + + Map result = new HashMap<>(); + result.put("buyYieldReport", retainDigit(reportRes.get("faVendeeEnergy"))); + result.put("buyUserReport", retainDigit(reportRes.get("userVendeeEnergy"))); + result.put("saleYieldReport", retainDigit(reportRes.get("faSellerEnergy"))); + result.put("saleUserReport", retainDigit(reportRes.get("userSellEnergy"))); + + //计算买方、卖方申报电量 + BigDecimal buyReport = toBigDecimal(reportRes.get("faVendeeEnergy")).add(toBigDecimal(reportRes.get("userVendeeEnergy"))); + BigDecimal saleReport = toBigDecimal(reportRes.get("faSellerEnergy")).add(toBigDecimal(reportRes.get("userSellEnergy"))); + buyReportThreadLocal.set(buyReport.setScale(2, BigDecimal.ROUND_HALF_UP)); + saleReportThreadLocal.set(saleReport.setScale(2, BigDecimal.ROUND_HALF_UP)); + + //计算买方成交电量 + BigDecimal dealEnergy = toBigDecimal(dealRes.get("faEnergy")).add(toBigDecimal(dealRes.get("userEnergy"))); + BigDecimal dealEnergyScale = dealEnergy.setScale(2, BigDecimal.ROUND_HALF_UP); + energyThreadLocal.set(dealEnergyScale); + + result.put("buyYieldDeal", retainDigit(dealRes.get("faEnergy"))); + result.put("buyUserDeal", retainDigit(dealRes.get("userEnergy"))); + result.put("saleYieldDeal", dealEnergyScale); + result.put("saleUserDeal", 0); + long end = System.currentTimeMillis(); + logger.info("D+3: 交易情况-发电、用户申报电量、成交电量接口耗时: {}s", (end-start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.error("D+3 - 交易情况:发电、用户申报电量、成交电量数据失败!, {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 申报明细-买卖方申报电量、申报均价 + */ + @Override + @Async + public CompletableFuture> getEnergyPriceForDetails() { + try { + //获取电力交易平台地址 + long start = System.currentTimeMillis(); + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); +// String sgccUrl = "http://39.96.27.4:17017"; +// String sgccUrl = "http://127.0.0.1:16016"; + //接口地址 + String mappingAddress = sgccUrl + "/dataPush/dayRolls/selectTrListing"; + String energyPriceForDetailsResStr = HttpUtils.sendPost(mappingAddress, "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("-D+3: 获取D+3滚动交易 - 申报明细:买卖方申报电量、申报均价数据结果: {}", energyPriceForDetailsResStr); + if (StringUtils.isEmpty(energyPriceForDetailsResStr)) { + logger.info("-D+3: D+3滚动交易 - 申报明细:买卖方申报电量、申报均价结果为空!"); + return CompletableFuture.completedFuture(map); + } + Map yieldUserForStatusResult = JSON.parseObject(energyPriceForDetailsResStr, Map.class); + Map data = (Map)yieldUserForStatusResult.get("data"); + Map result = new HashMap<>(); +// result.put("buyReportElectric", retainDigit(data.get("buyEnergy"))); + result.put("buyReportElectric", buyReportThreadLocal.get()); + result.put("buyReportAvgPrice", retainDigit(data.get("buyPrice"))); + +// result.put("saleReportElectric", retainDigit(data.get("sellEnergy"))); + result.put("saleReportElectric", saleReportThreadLocal.get()); + result.put("saleReportAvgPrice", retainDigit(data.get("sellPrice"))); + long end = System.currentTimeMillis(); + logger.info("D+3: 申报明细-买卖方申报电量、申报均价接口耗时: {}s", (end-start)/1000); + return CompletableFuture.completedFuture(result); + } catch (Exception e) { + logger.info("获取D+3滚动交易-申报明细:买卖方申报电量、申报均价失败!, {}", e); + return CompletableFuture.completedFuture(map); + } + } + + /** + * 电量、电价保留2位小数 + * @param number + * @return + */ + private BigDecimal retainDigit(Object number) { + if (number == null || "".equals(number)) { + return BigDecimal.ZERO; + } + String valueOf = String.valueOf(number); + return new BigDecimal(valueOf).setScale(2, BigDecimal.ROUND_HALF_UP); + } + + /* + * 电量、电价转Bigdecimal + */ + private BigDecimal toBigDecimal(Object number) { + if (number == null || "".equals(number)) { + return BigDecimal.ZERO; + } + return new BigDecimal(number.toString()); + } + + /** + * 电价集合排序 + * @param array + * @param flag 1-从大到小 2-从小到大 + * @return + */ + private List arraySorted(BigDecimal[] array, int flag) { + //转为list + List arrayList = Arrays.asList(array); + if (flag == 2) { + Collections.sort(arrayList, (o1, o2) -> {return o1.compareTo(o2);}); + } else { + Collections.sort(arrayList, (o1, o2) -> {return o2.compareTo(o1);}); + } + return arrayList; + } + + /** + * 日期排序 + * @return + */ + private List dateSorted(List params){ + Collections.sort(params, new Comparator() { + @Override + public int compare(Map o1, Map o2) { + Date o1Date = null; + Date o2Date = null; + try { + o1Date = new SimpleDateFormat("yyyyMMdd").parse(o1.get("dealDate").toString()); + o2Date = new SimpleDateFormat("yyyyMMdd").parse(o1.get("dealDate").toString()); + } catch (ParseException e) { + e.printStackTrace(); + } + return o1Date.compareTo(o2Date); + } + }); + return params; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl.java new file mode 100644 index 0000000..0feb0cb --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl.java @@ -0,0 +1,724 @@ +package com.alonginfo.project.gansu.serviceimpl.focuslisting; + +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.mapper.*; +import com.alonginfo.project.gansu.service.focuslisting.FocusBiddingListingDealCommonService; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.utils.DataPushUtils; +import com.alonginfo.utils.FocusBiddingUtil; +import lombok.extern.slf4j.Slf4j; +import org.apache.http.client.ClientProtocolException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.io.IOException; +import java.math.BigDecimal; +import java.text.ParseException; +import java.time.LocalDateTime; +import java.time.Year; +import java.time.format.DateTimeFormatter; +import java.util.*; + +/** + * 集中竞价、挂牌交易公共接口 + */ +@Service +@Slf4j +public class FocusBiddingListingDealCommonServiceImpl implements FocusBiddingListingDealCommonService { + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String PUBLIC_KEY; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private TradeSeqDao tradeSeqDao; + + @Autowired + private TradeNoticeDao tradeNoticeDao; + + @Autowired + private TradeStatusDao tradeStatusDao; + + @Autowired + private PriceTrendReplayDao priceTrendReplayDao; + + /** + * 获取集中竞价、挂牌交易页面数据 + * @return + */ + @Override + public Map getFocusBidding(String screenId, String seqId) { + //判断当前是连接电力交易平台测试环境 or 正式环境 + int environmentId = DataPushUtils.isFormal(sgccAddressService.getSgccAddress(ENV_KEY)); + + Map result = new HashMap<>(); + //判断测试环境、正式环境 + if (environmentId == 1) { + //获取该屏幕下的交易序列信息 - 正式环境 + Map seqList = DataPushUtils.handleSeqList(tradeSeqDao.getAll(screenId)); + //获取交易公告信息 - 正式环境 + Map tradeNotice = Optional.ofNullable(tradeNoticeDao.getNoticeBySeqId(seqId)).orElse(new HashMap<>()); + //判断当前交易序列是实时交易OR回演交易 + //默认是实时交易 + String type = "1"; + for(Map seq : (List>)seqList.get("list")) { + if (seqId.equals(seq.get("tradeSeqId"))) { + type = seq.get("type"); + } + } + //如果为实时交易 + if ("1".equals(type)) { + //购售方申报信息 及 购售方数量(实时交易: 从新增接口2.1获取) + Map focusAndListingBidBefore = getFocusAndListingBidBefore(screenId, seqId); + System.out.println("focusAndListingBidBefore = " + focusAndListingBidBefore); + //中间表格数据(挂/摘牌信息,购售方申报明细) + Map buySaleDetails = (Map) (Optional.ofNullable(focusAndListingBidBefore.get("result")).orElse(new HashMap<>())); + //处理集中、挂牌 实时状态 中间数据格式 + Map dealBuySaleDetails = dealBuySaleDetail(buySaleDetails,screenId); + + //交易情况数据(实时交易: 2.1接口获取购/售方数量) + Map focusTradeStatus = getFocusAndListingTradeStatus(screenId, seqId, (int)focusAndListingBidBefore.get("saleNum"), (int)focusAndListingBidBefore.get("buyNum")); + //交易流程监控 + String dealProcess = judgeDealProcess(tradeNotice.get("beginDate"), tradeNotice.get("endDate")); + //申报主体走势分析 + Map reportRejectTrend = reportSubjectTrend(tradeNotice.get("beginDate"), tradeNotice.get("endDate"), buySaleDetails); + result.put("seqList", seqList); + result.put("tradeNotice", tradeNotice); + result.put("tradeStatus", focusTradeStatus); + result.put("buySaleDetails", dealBuySaleDetails); + result.put("dealProcess", dealProcess); + result.put("reportRejectTrend", reportRejectTrend); + } else { + //交易情况数据(回演交易: 查询trade_seq_status表) + Map focusTradeStatus = DataPushUtils.mapIsEmpty(tradeStatusDao.getStatusBySeqId(seqId)); + //购售方申报信息(回演交易: 接口2.0中获取) + List> buySaleDetails = DataPushUtils.dealBuySaleDetail(FocusBiddingUtil.getReportAndHandPickReplay(seqId, sgccAddressService.getSgccAddress(ENV_KEY), DataPushUtils.createToken(PUBLIC_KEY))); + //交易量价走势分析 + Map dealTrends = DataPushUtils.dealTrendReplays(priceTrendReplayDao.getTrendReplayBySeqId(seqId)); + //开标后的数据 -- 用于计算集中竞价: 申报曲线;挂牌交易: 成交量价分布 + Map focusAndListingTradeReport = getFocusAndListingBidAfter(screenId, seqId); + System.out.println("focusAndListingTradeReport = " + focusAndListingTradeReport); + //集中竞价展示申报曲线、挂牌交易展示成交量价分布 + if ("1".equals(screenId)) { + Map saleCurve = reportCurve((List>) focusAndListingTradeReport.get("saleData")); + Map buyCurve = reportCurve((List>) focusAndListingTradeReport.get("buyData")); + Map reportCurve = new HashMap<>(); + reportCurve.put("saleCurve", saleCurve); + reportCurve.put("buyCurve", buyCurve); + result.put("reportCurve", reportCurve); + } else { + Map volumePriceSpread = volumePriceSpread((List>) focusAndListingTradeReport.get("saleData"), (List>) focusAndListingTradeReport.get("buyData")); + result.put("volumePriceSpread", volumePriceSpread); + } + result.put("seqList", seqList); + result.put("tradeNotice", tradeNotice); + result.put("tradeStatus", focusTradeStatus); + result.put("buySaleDetails", buySaleDetails); + result.put("dealTrends", dealTrends); + } + } else { + //获取该屏幕下的交易序列信息 - 测试环境 + Map seqList = DataPushUtils.handleSeqList(tradeSeqDao.getAllTest(screenId)); + //获取交易公告信息(测试环境) + Map tradeNotice = Optional.ofNullable(tradeNoticeDao.getNoticeBySeqId(seqId)).orElse(new HashMap<>()); + //判断当前交易序列是实时交易OR回演交易 + //默认是实时交易 + String type = "1"; + for(Map seq : (List>) seqList.get("list")) { + if (seqId.equals(seq.get("tradeSeqId"))) { + type = seq.get("type"); + } + } + //购售方申报信息(接口1.8) + //如果为实时交易 + if ("1".equals(type)) { + //购售方申报信息(实时交易: 从新增接口2.1获取) + Map focusAndListingBidBefore = getFocusAndListingBidBefore(screenId, seqId); + System.out.println("focusAndListingBidBefore = " + focusAndListingBidBefore); + Map buySaleDetails = (Map) focusAndListingBidBefore.get("result"); + //处理集中、挂牌 实时状态 中间数据格式 + Map dealBuySaleDetails = dealBuySaleDetail(buySaleDetails, screenId); + + //交易情况数据(实时交易: 2.1接口获取购/售方数量) + Map focusTradeStatus = getFocusAndListingTradeStatus(screenId, seqId, (int)focusAndListingBidBefore.get("saleNum"), (int)focusAndListingBidBefore.get("buyNum")); + //交易流程监控 + String dealProcess = judgeDealProcess(tradeNotice.get("beginDate"), tradeNotice.get("endDate")); + //申报主体走势分析 + Map reportRejectTrend = reportSubjectTrend(tradeNotice.get("beginDate"), tradeNotice.get("endDate"), buySaleDetails); + result.put("seqList", seqList); + result.put("tradeNotice", tradeNotice); + result.put("tradeStatus", focusTradeStatus); + result.put("buySaleDetails", dealBuySaleDetails); + result.put("dealProcess", dealProcess); + result.put("reportRejectTrend", reportRejectTrend); + } else { + //交易情况数据(回演交易: 查询trade_seq_status表) + Map focusTradeStatus = DataPushUtils.mapIsEmpty(tradeStatusDao.getTestStatusBySeqId(seqId)); + //购售方申报信息(回演交易: 原有接口2.0中获取) + List> buySaleDetails = DataPushUtils.dealBuySaleDetail(FocusBiddingUtil.getReportAndHandPickReplay(seqId, sgccAddressService.getSgccAddress(ENV_KEY), DataPushUtils.createToken(PUBLIC_KEY))); + //交易量价走势分析 + Map dealTrends = DataPushUtils.dealTrendReplays(priceTrendReplayDao.getTestTrendReplayBySeqId(seqId)); + //开标后的数据 -- 用于计算集中竞价: 申报曲线;挂牌交易: 成交量价分布 + Map focusAndListingTradeReport = getFocusAndListingBidAfter(screenId, seqId); + //集中竞价展示申报曲线、挂牌交易展示成交量价分布 + if ("1".equals(screenId)) { + Map saleCurve = reportCurve((List>) focusAndListingTradeReport.get("saleData")); + Map buyCurve = reportCurve((List>) focusAndListingTradeReport.get("buyData")); + Map reportCurve = new HashMap<>(); + reportCurve.put("saleCurve", saleCurve); + reportCurve.put("buyCurve", buyCurve); + result.put("reportCurve", reportCurve); + } else { + Map volumePriceSpread = volumePriceSpread((List>) focusAndListingTradeReport.get("saleData"), (List>) focusAndListingTradeReport.get("buyData")); + result.put("volumePriceSpread", volumePriceSpread); + } + result.put("seqList", seqList); + result.put("tradeNotice", tradeNotice); + result.put("tradeStatus", focusTradeStatus); + result.put("buySaleDetails", buySaleDetails); + result.put("dealTrends", dealTrends); + } + } + return result; + } + + /** + * 处理中间表格数据格式 + * @param screenId 1-集中竞价 2-挂牌交易 + */ + private Map dealBuySaleDetail(Map buySaleDetails, String screenId) { + if (CollectionUtils.isEmpty(buySaleDetails)) { + return new HashMap<>(); + } + Map result = new HashMap<>(); + for (Map.Entry entry : buySaleDetails.entrySet()) { + String key = entry.getKey().toString(); + List> value = (List>) entry.getValue(); + List> buySaleList = new ArrayList<>(); + for (Map v : value) { + List itemList = new LinkedList<>(); + itemList.add(v.get("reportName").toString()); + itemList.add(v.get("dealSlot").toString()); + itemList.add(v.get("energy").toString()); + //挂牌交易, 挂牌方遍历时 添加price字段 + if ("sale".equals(key) && "2".equals(screenId)) { + itemList.add(v.get("price").toString()); + } + itemList.add(v.get("confirmTime").toString()); + buySaleList.add(itemList); + } + result.put(key, buySaleList); + } + return result; + } + + /** + * 获取集中竞价、挂牌交易 实时交易--- 购售方申报信息 (接口2.1 -- 开标前数据) + * 实时交易: /dataPush/tradeDeclareDetail/selectTradeReportMain 回演交易: 从getDeclareDetailList()中获取数据 + * + * @param screenId 挂牌交易和集中竞价中 中间模块展示数据格式不同 + * @return + * @throws Exception + */ + private Map getFocusAndListingBidBefore(String screenId, String seqId){ + try { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String token = DataPushUtils.createToken(PUBLIC_KEY); + //获取售方数据/挂牌方 + List saleData = FocusBiddingUtil.getRportAndHangPickBidBefore(2, seqId, sgccAddress, token); + //获取购方数据/摘牌方 + List buyData = FocusBiddingUtil.getRportAndHangPickBidBefore(1, seqId, sgccAddress, token); + + //售方/挂牌方数量 + int saleNum = censusBuySaleNum(saleData); + //获取购方/摘牌方 + int buyNum = censusBuySaleNum(buyData); + //处理购(摘)/售(挂)方数据,判断当前seqId属于集中竞价还是挂牌交易(返回数据格式不同) + Map dealMiddleData = dealMiddleData(screenId, saleData, buyData); + //封装结果 + Map resultMap = new HashMap<>(); + resultMap.put("result", dealMiddleData); + resultMap.put("saleNum", saleNum); + resultMap.put("buyNum", buyNum); + return resultMap; + } catch (Exception e) { + e.printStackTrace(); + log.info("集中竞价/挂牌交易, 实时状态, 购售方申报明细获取失败!"); + return new HashMap<>(); + } + } + + /** + * 获取集中竞价、挂牌交易 实时交易时--- 交易情况数据 + * 当回演交易时 还是从tradesStatusDao中获取 + * @return + * @throws Exception + * @throws IOException + * @throws ClientProtocolException + */ + private Map getFocusAndListingTradeStatus(String screenId, String seqId, int saleNum, int buyNum){ + try { + //结果封装 + Map result = new HashMap<>(); + //售方申报家数 + result.put("saleSuoteNum", String.valueOf(saleNum)); + //售方申报电量 集中、挂牌都不展示 + result.put("saleEnergy", "待结果发布后公示"); + //购方申报家数 + result.put("vendeeConfimNum", String.valueOf(buyNum)); + //购方申报电量 + result.put("vendeeEnergy", "待结果发布后公示"); + //直接交易用户 + result.put("directResultNum", "1"); + //售电公司 + result.put("retailResultNum", "1"); + //其余字段均不展示 + //售方成交家数 + result.put("saleResultNum", "待结果发布后公示"); + //购方成交家数 + result.put("vendeeNum", "待结果发布后公示"); + //成交电量 + result.put("energy", "待结果发布后公示"); + //成交均价 + result.put("avgPrice", "待结果发布后公示"); + //最高成交价 + result.put("maxPrice", "待结果发布后公示"); + //最低成交价 + result.put("minPrice", "待结果发布后公示"); + return result; + } catch (Exception e) { + e.printStackTrace(); + log.info("集中竞价、挂牌交易, 实时状态, 交易情况获取失败!"); + return new HashMap<>(); + } + } + + /** + * 获取集中竞价、挂牌交易 实时交易--- 购售方申报信息 (接口1.8 -- 开标后数据, 用于计算挂牌回演-成交量价分布、 集中回演-申报曲线) + * 实时交易: /dataPush/tradeDeclareDetail/selectTradeReportMain 回演交易: 从getDeclareDetailList()中获取数据 + * + * @param screenId 挂牌交易和集中竞价中 中间模块展示数据格式不同 + * @param seqId + * @return + * @throws Exception + */ + private Map getFocusAndListingBidAfter(String screenId, String seqId){ + try { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String token = DataPushUtils.createToken(PUBLIC_KEY); + //调用接口1.8 /dataPush/tradeDeclareDetail/selectTradeReport + //获取售方数据/挂牌方 + List saleData = FocusBiddingUtil.getRportAndHangPickBidAfter(2, seqId, sgccAddress, token); + //获取购方数据/摘牌方 + List buyData = FocusBiddingUtil.getRportAndHangPickBidAfter(1, seqId, sgccAddress, token); + //处理购(摘)/售(挂)方数据,判断当前seqId属于集中竞价还是挂牌交易(返回数据格式不同) + //Map dealMiddleData = FocusBidding.dealMiddleData(screenId, saleData, buyData); + Map resultMap = new HashMap<>(); + //resultMap.put("result", dealMiddleData); + resultMap.put("saleData", saleData); + resultMap.put("buyData", buyData); + return resultMap; + } catch (Exception e) { + e.printStackTrace(); + return new HashMap<>(); + } + } + + + /** + * 处理封装集中竞价/挂牌交易 实时交易 -- 中间表格的数据(返回数据格式不同) + * @param screenId 判断集中竞价 OR 挂牌交易 + * @param saleData 售方数据 + * @param buyData 购方数据 + * @return + * @throws ParseException + */ + public static Map dealMiddleData(String screenId, List saleData, List buyData) throws ParseException { + Map result = new HashMap<>(); + //集中竞价 + if ("1".equals(screenId)) { + //售方 + List> saleResult = new ArrayList<>(); + //购方 + List> buyResult = new ArrayList<>(); + //处理售方数据 + for(Map sale : saleData) { + //处理交易时段 + String reportName = String.valueOf(sale.get("reportName")); + String dealSlot = (reportName.split("至")[0]).substring(2) + '-' +reportName.split("至")[1]; + Map saleItem = new HashMap<>(); + saleItem.put("reportName", sale.get("jydyParticipantName")); + saleItem.put("dealSlot", dealSlot); + saleItem.put("energy", "*****"); + saleItem.put("confirmTime", DateUtils.dateTimeFormat(String.valueOf(sale.get("decDate")))); + saleResult.add(saleItem); + } + //处理购方数据 + for(Map buy : buyData) { + //处理交易时段 + String reportName = String.valueOf(buy.get("reportName")); + String dealSlot = (reportName.split("至")[0]).substring(2) + '-' +reportName.split("至")[1]; + Map buyItem = new HashMap<>(); + buyItem.put("reportName", buy.get("jydyParticipantName")); + buyItem.put("dealSlot", dealSlot); + //集中竞价 实时交易 不展示电量展示为**** + buyItem.put("energy", "*****"); + buyItem.put("confirmTime", DateUtils.dateTimeFormat(String.valueOf(buy.get("decDate")))); + buyResult.add(buyItem); + } + result.put("sale", saleResult); + result.put("buy", buyResult); + } else { + //挂牌方(售方) + List> hangResult = new ArrayList<>(); + //摘牌方 (购方) + List> pickResult = new ArrayList<>(); + //处理售方数据 + for(Map hang : saleData) { + //处理交易时段 + String reportName = String.valueOf(hang.get("reportName")); + String dealSlot = (reportName.split("至")[0]).substring(2) + '-' +reportName.split("至")[1]; + Map hangItem = new HashMap<>(); + hangItem.put("reportName", hang.get("jydyParticipantName")); + hangItem.put("dealSlot", dealSlot); + hangItem.put("energy", "*****"); + hangItem.put("price", "*****"); + //TODO 日期还没转换, 没排序 + hangItem.put("confirmTime", DateUtils.dateTimeFormat(String.valueOf(hang.get("decDate")))); + hangResult.add(hangItem); + } + //处理购方数据 + for(Map pick : buyData) { + //处理交易时段 + String reportName = String.valueOf(pick.get("reportName")); + String dealSlot = (reportName.split("至")[0]).substring(2) + '-' +reportName.split("至")[1]; + Map pickItem = new HashMap<>(); + pickItem.put("reportName", pick.get("jydyParticipantName")); + pickItem.put("dealSlot", dealSlot); + pickItem.put("energy", "*****"); + pickItem.put("confirmTime", DateUtils.dateTimeFormat(String.valueOf(pick.get("decDate")))); + pickResult.add(pickItem); + } + result.put("sale", hangResult); + result.put("buy", pickResult); + } + return result; + } + + /** + * 集中/挂牌交易 实时交易 -- 交易监控流程 + * + * 交易流程监控: 1-公告发布变亮 2-交易申报变亮 3-交易开标和交易计算都变亮, 4-交易出清变亮, 5-结果发布变亮 + * + * 交易公告的开始时间之前: 交易发布 + * 交易公告的开始跟结束时间内: 交易申报 + * 申报结束12小时内完成计算状态为:交易开标与交易计算 + * 申报结束后12小时-24小时内为交易出清 + * 申报结束后26小时- 24小时内为结果发布 + * @param beginDate + * @param endDate + * @return + */ + public static String judgeDealProcess(String beginDate, String endDate) { + try { + if (StringUtils.isEmpty(beginDate) || StringUtils.isEmpty(endDate)) { + log.info("交易公告开始时间beginDate, 结束时间endDate为空!"); + return "5"; + } + //获取当前时间点 + LocalDateTime nowDateTime = LocalDateTime.now(); + //申报开始时间 + LocalDateTime beginDateTime = LocalDateTime.parse(beginDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + //申报结束时间 + LocalDateTime endDateTime = LocalDateTime.parse(endDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + if (nowDateTime.isBefore(beginDateTime)) { + return "1"; + } else if (nowDateTime.isAfter(beginDateTime) && nowDateTime.isBefore(endDateTime)) { + return "2"; + } else if (nowDateTime.isAfter(endDateTime) && nowDateTime.isBefore(endDateTime.plusHours(12))) { + return "3"; + } else if (nowDateTime.isAfter(endDateTime.plusHours(12)) && nowDateTime.isBefore(endDateTime.plusHours(24))) { + return "4"; + } else { + return "5"; + } + } catch (Exception e) { + e.printStackTrace(); + log.info("集中竞价、挂牌交易, 实时状态, 交易监控流程获取失败!"); + return "5"; + } + + } + + /** + * 集中/挂牌交易 实时交易 -- 申报主体走势分析 + * @param buySaleDetails + * @throws ParseException + */ + public static Map reportSubjectTrend(String beginDate, String endDate, Map buySaleDetails){ + try { + //x轴时间按开始时间每隔1小时至结束时间 + LocalDateTime beginDateTime = LocalDateTime.parse(beginDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + LocalDateTime endDateTime = LocalDateTime.parse(endDate, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + //x轴时间数据 + List xAxisData = new LinkedList(); + //y轴数据 + List> seriesData = new ArrayList<>(); + //售方数据 + List saleData = new LinkedList<>(); + //购方数据 + List buyData = new LinkedList<>(); + while (beginDateTime.isBefore(endDateTime) || beginDateTime.equals(endDateTime)) { + String xAxisTime = beginDateTime.format(DateTimeFormatter.ofPattern("MM-dd HH:mm")); + xAxisData.add(xAxisTime); + //y轴 购售方数据 + List> buyList = (List>) buySaleDetails.get("buy"); + List> saleList = (List>) buySaleDetails.get("sale"); + //统计购方时间段内的家数(一个企业10个时段) + Map buyNumMap = new HashMap(); + for (Map buyItem : buyList) { + //MM-dd HH:mm 变为 yyyy-MM-dd HH:mm:ss + String confirmTime = Year.now() + "-" + String.valueOf(buyItem.get("confirmTime")) + ":00"; + LocalDateTime confirmDateTime = LocalDateTime.parse(confirmTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + if ((confirmDateTime.equals(beginDateTime) || confirmDateTime.isAfter(beginDateTime)) && confirmDateTime.isBefore(beginDateTime.plusHours(1))) { + String key = String.valueOf(buyItem.get("reportName")) + ":" + String.valueOf(buyItem.get("confirmTime")); + //企业名相同且时间也相同 算一个购方, 企业名相同但时间不同 算俩个 + buyNumMap.put(key, 1); + } + } + //统计售方时间段内的家数 + Map saleNumMap = new HashMap(); + for (Map saleItem : saleList) { + //MM-dd HH:mm 变为 yyyy-MM-dd HH:mm:ss + String confirmTime = Year.now() + "-" + String.valueOf(saleItem.get("confirmTime")) + ":00"; + LocalDateTime confirmDateTime = LocalDateTime.parse(confirmTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + if ((confirmDateTime.equals(beginDateTime) || confirmDateTime.isAfter(beginDateTime)) && confirmDateTime.isBefore(beginDateTime.plusHours(1))) { + String key = String.valueOf(saleItem.get("reportName")) + ":" + String.valueOf(saleItem.get("confirmTime")); + //企业名相同且时间也相同 算一个购方, 企业名相同但时间不同 算俩个 + saleNumMap.put(key, 1); + } + } + saleData.add(saleNumMap.size()); + buyData.add(buyNumMap.size()); + + beginDateTime = beginDateTime.plusHours(1); + } + //封装y轴数据 + Map saleMap = new HashMap(); + saleMap.put("name", "售方"); + saleMap.put("data", saleData); + Map buyMap = new HashMap(); + buyMap.put("name", "购方"); + buyMap.put("data", buyData); + seriesData.add(saleMap); + seriesData.add(buyMap); + Map result = new HashMap<>(); + result.put("xAxisData", xAxisData); + result.put("seriesData", seriesData); + return result; + } catch (Exception e) { + e.printStackTrace(); + log.info("集中竞价、挂牌交易, 实时状态, 申报主体走势分析数据获取失败!"); + return new HashMap<>(); + } + } + + /** + * 申报曲线 + * @param saleData + * @return + * @throws ParseException + */ + public static Map reportCurve(List> saleData){ + if (saleData == null || saleData.size() == 0) { + log.info("计算申报曲线FocusBidding.reportCurve参数为空!"); + return new HashMap<>(); + } + try { + //售方 + //将数据通过申报主体名称、交易时间进行分组 + Map>> groupData = new HashMap<>(); + for (Map sale : saleData) { + //存储Key 格式:主体名称:时间 + String key = String.valueOf(sale.get("jydyParticipantName")) + ":" + DateUtils.dateTimeFormat(String.valueOf(sale.get("decDate"))); + List> groupItem = groupData.get(key); + if (groupItem != null) { + groupItem.add(sale); + } else { + groupData.put(key, new ArrayList>()); + } + } + //遍历分组后的数据,根据时间排序 + List>>> groupDataList = new ArrayList>>>(groupData.entrySet()); + Collections.sort(groupDataList, new Comparator>>>() { + @Override + public int compare(Map.Entry>> o1, + Map.Entry>> o2) { + return o1.getKey().split(":")[1].compareTo(o2.getKey().split(":")[1]); + } + }); + + List xAxis = new LinkedList<>(); + //峰 + List peakValue = new LinkedList<>(); + //平 + List flatValue = new LinkedList<>(); + //谷 + List valleyValue = new LinkedList<>(); + //遍历排序后的集合 + int index = 0; + for (Map.Entry>> entry : groupDataList) { + List> values = entry.getValue(); + String peakPrice = "0"; + String flatPrice = "0"; + String valleyPrice = "0"; + for (Map value : values) { + String typeName = String.valueOf(String.valueOf(value.get("reportName")).charAt(0)); + if(typeName.equals("峰")) { + peakPrice = String.valueOf(value.get("price")); + }else if (typeName.equals("平")) { + flatPrice = String.valueOf(value.get("price")); + }else { + valleyPrice = String.valueOf(value.get("price")); + } + } + xAxis.add(index); + peakValue.add(peakPrice); + flatValue.add(flatPrice); + valleyValue.add(valleyPrice); + index ++; + } + //封装seriesData + Map peakMap = new HashMap<>(); + peakMap.put("name", "峰段价格"); + peakMap.put("data", peakValue); + Map flatMap = new HashMap<>(); + flatMap.put("name", "平段价格"); + flatMap.put("data", flatValue); + Map valleyMap = new HashMap<>(); + valleyMap.put("name", "谷段价格"); + valleyMap.put("data", valleyValue); + List> seriesData = new ArrayList<>(); + seriesData.add(peakMap); + seriesData.add(flatMap); + seriesData.add(valleyMap); + + Map result = new HashMap<>(); + result.put("xAxisData", xAxis); + result.put("seriesData", seriesData); + return result; + }catch (Exception e) { + e.printStackTrace(); + log.info("-获取集中竞价/挂牌交易, 申报曲线数据异常"); + return new HashMap<>(); + } + } + + /** + * 成交电量量价分布 + * @param saleData + * @param buyData + * @return + * @throws ParseException + */ + public static Map volumePriceSpread(List> saleData, List> buyData){ + if (saleData == null || buyData == null) { + log.info("处理成交电量量价分布FocusBidding.volumePriceSpread()参数为null!"); + return new HashMap<>(); + } + try { + //摘牌方分组 + Map>> groupData = new HashMap<>(); + for (Map buy : buyData) { + //存储Key 格式:主体名称:时间 + String key = String.valueOf(buy.get("jydyParticipantName")) + ":" + DateUtils.dateTimeFormat(String.valueOf(buy.get("decDate"))); + List> groupItem = groupData.get(key); + if (groupItem != null) { + groupItem.add(buy); + } else { + ArrayList> newList = new ArrayList>(); + newList.add(buy); + groupData.put(key, newList); + } + } + //统计每组数据电量 + //遍历分组后的数据,根据时间排序 + List>>> groupDataList = new ArrayList>>>(groupData.entrySet()); + Collections.sort(groupDataList, new Comparator>>>() { + @Override + public int compare(Map.Entry>> o1, + Map.Entry>> o2) { + return o1.getKey().split(":")[1].compareTo(o2.getKey().split(":")[1]); + } + }); + //量价和 + BigDecimal volumePriceCount = BigDecimal.ZERO; + //总量 + BigDecimal energyCount = BigDecimal.ZERO; + //获取电价 + for (Map sale : saleData) { + BigDecimal energy = new BigDecimal(String.valueOf(sale.get("checkEnergy"))); + BigDecimal price = new BigDecimal(String.valueOf(sale.get("price"))); + BigDecimal sum = energy.multiply(price); + volumePriceCount = volumePriceCount.add(sum); + energyCount = energyCount.add(energy); + } + //计算加权平均价(量*价的和除以总量) + BigDecimal weightedAvgPrice = volumePriceCount.divide(energyCount, 2, BigDecimal.ROUND_HALF_UP).setScale(2, BigDecimal.ROUND_HALF_UP); + + //y轴数据 + List yAxis = new LinkedList(); + //x轴数据 + List data = new LinkedList(); + int index = 01; + //遍历排序后的数据 + System.out.println("===========" + groupDataList); + for (Map.Entry>> entry : groupDataList) { + //获取每个摘牌主体电量和 + List> values = entry.getValue(); + BigDecimal energySum = BigDecimal.ZERO; + for (Map value : values) { + BigDecimal energy = new BigDecimal(String.valueOf(value.get("checkEnergy"))); + energySum = energySum.add(energy); + } + System.out.println("-===============" + energySum); + //组装y轴数据 + String yData = "价" + index + ":" + weightedAvgPrice; + yAxis.add(yData); + data.add(energySum); + index ++; + } + Map result = new HashMap<>(); + result.put("xAxisData", yAxis); + result.put("seriesData", data); + return result; + }catch (Exception e) { + e.printStackTrace(); + log.info("-获取集中竞价/挂牌交易, 成交电量量价分布数据异常!"); + return new HashMap<>(); + } + } + + /** + * 统计开标前购售方个数 + * @param data + * @throws ParseException + */ + public static int censusBuySaleNum(List data) throws ParseException { + Set set = new HashSet<>(); + for (Map map : data) { + String Key = map.get("jydyParticipantName") + ":" + DateUtils.dateTimeFormat(String.valueOf(map.get("decDate"))); + set.add(Key); + } + return set.size(); + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl.java new file mode 100644 index 0000000..ab7d4fc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl.java @@ -0,0 +1,424 @@ +package com.alonginfo.project.gansu.serviceimpl.forward; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.forward.IDeliveryService; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/7/7 17:36 + * @Description: + */ +@Service +@Slf4j +public class DeliveryServiceImpl implements IDeliveryService { + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + public String PUBLIC_KEY; + + @Autowired + private SgccAddressService sgccAddressService; + + @Override + public List> trackingPower() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String trackingPowerRes = HttpUtils.sendPost(sgccAddress + "/delivery/trackingPower", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/trackingPower, 调用结果: {}", trackingPowerRes); + if (StringUtils.isEmpty(trackingPowerRes)) { + log.error("-接口: /delivery/trackingPower, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(trackingPowerRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/trackingPower, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() { + }); + } + + @Override + public List> getShortSendAllData() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String shortSendDataRes = HttpUtils.sendPost(sgccAddress + "/delivery/getShortSendAllData", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/getShortSendAllData, 调用结果: {}", shortSendDataRes); + if (StringUtils.isEmpty(shortSendDataRes)) { + log.error("-接口: /delivery/getShortSendAllData, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(shortSendDataRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/getShortSendAllData, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() { + }); + } + + @Override + public List> getSendByAllChannel() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String sendByAllChannelRes = HttpUtils.sendPost(sgccAddress + "/delivery/getSendByAllChannel", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/getSendByAllChannel, 调用结果: {}", sendByAllChannelRes); + if (StringUtils.isEmpty(sendByAllChannelRes)) { + log.error("-接口: /delivery/getSendByAllChannel, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(sendByAllChannelRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/getSendByAllChannel, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() { + }); + } + + @Override + public List> selectMachineLoadList() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String selectMachineLoadListRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectMachineLoadList", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectMachineLoadList, 调用结果: {}", selectMachineLoadListRes); + if (StringUtils.isEmpty(selectMachineLoadListRes)) { + log.error("-接口: /delivery/selectMachineLoadList, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(selectMachineLoadListRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectMachineLoadList, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() { + }); + } + + @Override + public List> selectGroupCap() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String selectGroupCapRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectGroupCap", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectGroupCap, 调用结果: {}", selectGroupCapRes); + if (StringUtils.isEmpty(selectGroupCapRes)) { + log.error("-接口: /delivery/selectGroupCap, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(selectGroupCapRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectGroupCap, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() { + }); + } + + @Override + public List> selectContractInfo() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String contractInfoRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectContractInfo", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectContractInfo, 调用结果: {}", contractInfoRes); + if (StringUtils.isEmpty(contractInfoRes)) { + log.error("-接口: /delivery/selectContractInfo, 返回结果为空!"); + return new ArrayList<>(); + } + JSONObject jsonObject = JSONObject.parseObject(contractInfoRes); + Object data = jsonObject.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectContractInfo, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectEmossContractList() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String emossRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectEmossContractList", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectEmossContractList, 调用结果: {}", emossRes); + if(StringUtils.isEmpty(emossRes)) { + log.error("-接口: /delivery/selectEmossContractList, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(emossRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectEmossContractList, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectEmossContractListByMonth() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String emossByMonthRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectEmossContractListByMonth", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectEmossContractListByMonth, 调用结果: {}", emossByMonthRes); + if(StringUtils.isEmpty(emossByMonthRes)) { + log.error("-接口: /delivery/selectEmossContractListByMonth, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(emossByMonthRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectEmossContractListByMonth, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + + @Override + public List> selectInnerTradeByType() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String innerTradeRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectInnerTradeByType", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectInnerTradeByType, 调用结果: {}", innerTradeRes); + if(StringUtils.isEmpty(innerTradeRes)) { + log.error("-接口: /delivery/selectInnerTradeByType, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(innerTradeRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectInnerTradeByType, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectDirTradeInfo() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String dirTradeInfoRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectDirTradeInfo", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectDirTradeInfo, 调用结果: {}", dirTradeInfoRes); + if(StringUtils.isEmpty(dirTradeInfoRes)) { + log.error("-接口: /delivery/selectDirTradeInfo, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(dirTradeInfoRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectDirTradeInfo, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectPowerContractListByMonth() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String powerContractByMonthRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectPowerContractListByMonth", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectPowerContractListByMonth, 调用结果: {}", powerContractByMonthRes); + if(StringUtils.isEmpty(powerContractByMonthRes)) { + log.error("-接口: /delivery/selectPowerContractListByMonth, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(powerContractByMonthRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectPowerContractListByMonth, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> newQueryProviceProviderEle() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String provinceProviderEleResStr = HttpUtils.sendPost(sgccAddress + "/delivery/newQueryProviceProviderEle", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/newQueryProviceProviderEle, 调用结果: {}", provinceProviderEleResStr); + if(StringUtils.isEmpty(provinceProviderEleResStr)) { + log.error("-接口: /delivery/newQueryProviceProviderEle, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(provinceProviderEleResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/newQueryProviceProviderEle, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectGeneratorCount() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String generatorCountResStr = HttpUtils.sendPost(sgccAddress + "/delivery/selectGeneratorCount", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectGeneratorCount, 调用结果: {}", generatorCountResStr); + if(StringUtils.isEmpty(generatorCountResStr)) { + log.error("-接口: /delivery/selectGeneratorCount, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(generatorCountResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectGeneratorCount, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectParticipantByMonth() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String participantByMonthResStr = HttpUtils.sendPost(sgccAddress + "/delivery/selectParticipantByMonth", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectParticipantByMonth, 调用结果: {}", participantByMonthResStr); + if(StringUtils.isEmpty(participantByMonthResStr)) { + log.error("-接口: /delivery/selectParticipantByMonth, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(participantByMonthResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectParticipantByMonth, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + + } + + @Override + public List> selectTradeCountByMonth(String year) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("year", year); + String tradeCountResStr = HttpUtils.sendPostDataByJson(sgccAddress + "/delivery/selectTradeCountByMonth", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectTradeCountByMonth, 调用结果: {}", tradeCountResStr); + if(StringUtils.isEmpty(tradeCountResStr)) { + log.error("-接口: /delivery/selectTradeCountByMonth, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(tradeCountResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectTradeCountByMonth, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectGreenPower() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String greenPowerRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectGreenPower", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectGreenPower, 调用结果: {}", greenPowerRes); + if(StringUtils.isEmpty(greenPowerRes)) { + log.error("-接口: /delivery/selectGreenPower, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(greenPowerRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectGreenPower, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectInnerGreenPower() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String innerGreenPowerRes = HttpUtils.sendPost(sgccAddress + "/delivery/selectInnerGreenPower", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectInnerGreenPower, 调用结果: {}", innerGreenPowerRes); + if(StringUtils.isEmpty(innerGreenPowerRes)) { + log.error("-接口: /delivery/selectInnerGreenPower, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(innerGreenPowerRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /delivery/selectInnerGreenPower, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectParticipantReg() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String participantRegResStr = HttpUtils.sendPost(sgccAddress + "/delivery/selectParticipantReg", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectParticipantReg, 调用结果: {}", participantRegResStr); + if(StringUtils.isEmpty(participantRegResStr)) { + log.error("-接口: /delivery/selectParticipantReg, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(participantRegResStr, Map.class); + Object data = map.get("data"); + if (Objects.isNull(data)) { + log.error("-接口: /delivery/selectParticipantReg, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectParticipantTrade() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String participantTradeResStr = HttpUtils.sendPost(sgccAddress + "/delivery/selectParticipantTrade", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectParticipantTrade, 调用结果: {}", participantTradeResStr); + if(StringUtils.isEmpty(participantTradeResStr)) { + log.error("-接口: /delivery/selectParticipantTrade, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(participantTradeResStr, Map.class); + Object data = map.get("data"); + if (Objects.isNull(data)) { + log.error("-接口: /delivery/selectParticipantTrade, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectParticipantTradeByYear() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String participantTradeByYearResStr = HttpUtils.sendPost(sgccAddress + "/delivery/selectParticipantTradeByYear", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/selectParticipantTradeByYear, 调用结果: {}", participantTradeByYearResStr); + if(StringUtils.isEmpty(participantTradeByYearResStr)) { + log.error("-接口: /delivery/selectParticipantTradeByYear, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(participantTradeByYearResStr, Map.class); + Object data = map.get("data"); + if (Objects.isNull(data)) { + log.error("-接口: /delivery/selectParticipantTradeByYear, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectYearDirEnergy() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String yearDirEnergyResStr = HttpUtils.sendPost(sgccAddress + "/delivery/selectYearDirEnergy", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /delivery/yearDirEnergyResStr, 调用结果: {}", yearDirEnergyResStr); + if(StringUtils.isEmpty(yearDirEnergyResStr)) { + log.error("-接口: /delivery/yearDirEnergyResStr, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(yearDirEnergyResStr, Map.class); + Object data = map.get("data"); + if (Objects.isNull(data)) { + log.error("-接口: /delivery/yearDirEnergyResStr, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl.java new file mode 100644 index 0000000..29f1b3b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl.java @@ -0,0 +1,158 @@ +package com.alonginfo.project.gansu.serviceimpl.forward; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.forward.IGreenConsumer; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/7 17:14 + * @Description: + */ +@Service +@Slf4j +public class GreenConsumerImpl implements IGreenConsumer { + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + public String PUBLIC_KEY; + + @Autowired + private SgccAddressService sgccAddressService; + + /** + * 历年外送电规模 + * @return + */ + @Override + public List> getYearHitorySend() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + //传空json对象 + Map param = new HashMap<>(); + String yearHitorySendRes = HttpUtils.sendPostDataByJson(sgccAddress + "/greenConsumer/getYearHitorySend", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /greenConsumer/getYearHitorySend, 调用结果: {}", yearHitorySendRes); + if (StringUtils.isEmpty(yearHitorySendRes)) { + log.error("-接口: /greenConsumer/getYearHitorySend, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(yearHitorySendRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /greenConsumer/getYearHitorySend, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + } + + /** + * 装机总量/新能源变化趋势 + * @return + */ + @Override + public List> getMachineHistory() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + //传空json对象 + Map param = new HashMap<>(); + String machineHistoryRes = HttpUtils.sendPostDataByJson(sgccAddress + "/greenConsumer/getMachineHistory", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /greenConsumer/getMachineHistory, 调用结果: {}", machineHistoryRes); + if (StringUtils.isEmpty(machineHistoryRes)) { + log.error("-接口: /greenConsumer/getMachineHistory, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(machineHistoryRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /greenConsumer/getMachineHistory, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + } + + /** + * 新能源装机结构 + * @return + */ + @Override + public Map getGreenProportion() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + //传空json对象 + Map param = new HashMap<>(); + String greenProportionResStr = HttpUtils.sendPostDataByJson(sgccAddress + "/greenConsumer/getGreenProportion", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /greenConsumer/getGreenProportion, 调用结果: {}", greenProportionResStr); + if (StringUtils.isEmpty(greenProportionResStr)) { + log.error("-接口: /greenConsumer/getGreenProportion, 返回结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(greenProportionResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /greenConsumer/getGreenProportion, data值为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } + + /** + * 新能源发电趋势 + * @return + */ + @Override + public List> getHistoryGreenPower() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + //传空json对象 + Map param = new HashMap<>(); + String historyGreenPowerResStr = HttpUtils.sendPostDataByJson(sgccAddress + "/greenConsumer/getHistoryGreenPower", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /greenConsumer/getHistoryGreenPower, 调用结果: {}", historyGreenPowerResStr); + if (StringUtils.isEmpty(historyGreenPowerResStr)) { + log.error("-接口: /greenConsumer/getHistoryGreenPower, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(historyGreenPowerResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /greenConsumer/getHistoryGreenPower, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + } + + /** + * 新能源参与交易情况 + * @return + */ + @Override + public Map getGreenTrade() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + //传空json对象 + Map param = new HashMap<>(); + String greenTradeResStr = HttpUtils.sendPostDataByJson(sgccAddress + "/greenConsumer/getGreenTrade", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /greenConsumer/getGreenTrade, 调用结果: {}", greenTradeResStr); + if (StringUtils.isEmpty(greenTradeResStr)) { + log.error("-接口: /greenConsumer/getGreenTrade, 返回结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(greenTradeResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /greenConsumer/getGreenTrade, data值为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl.java new file mode 100644 index 0000000..8be1f30 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl.java @@ -0,0 +1,121 @@ +package com.alonginfo.project.gansu.serviceimpl.forward; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.gansu.service.forward.IInfoDisclosureService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/6 14:35 + * @Description: + */ +@Service +@Slf4j +public class InfoDisclosureServiceImpl implements IInfoDisclosureService { + + @Value("${sgcc.informationAddress}") + private String INFORMATION_ADDRESS; + + /** + * 月度披露数据 + * @return + */ + @Override + public List getMonthInfpubData() { + //调用交易公告详细信息接口 + String monthResult = HttpUtils.sendPost(INFORMATION_ADDRESS + "/menuStatist/getMonthInfpubData", "", ""); + log.error("获取信息披露-月度披露数据, 接口调用结果 : {}", monthResult); + if (monthResult == null || "".equals(monthResult)) { + log.error("获取信息披露-月度披露数据, 接口调用结果为空!"); + return new ArrayList<>(); + } + Map resultMap = JSON.parseObject(monthResult, Map.class); + Object data = resultMap.get("data"); + if (null == data) { + log.error("获取信息披露-月度披露数据, data值为NULL!"); + return new ArrayList<>(); + } + List result = JSON.parseObject(JSON.toJSONString(resultMap.get("data")), new TypeReference>() {}); + return result; + } + + /** + * 获取累计披露数据 + * @return + */ + @Override + public Map getTotalCount() { + String totalCountRes = HttpUtils.sendPost(INFORMATION_ADDRESS + "/menuStatist/getTotalCount", "", ""); + log.info("获取信息披露-累计披露数据, 接口调用结果: {}", totalCountRes); + if (StringUtils.isEmpty(totalCountRes)) { + log.error("获取信息披露-累计披露数据, 接口调用结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(totalCountRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("获取信息披露-累计披露数据, data值为NULL"); + return new HashMap<>(); + } + Map result = JSON.parseObject(JSON.toJSONString(data), new TypeReference>() { + }); + return result; + } + + /** + * 年度披露数据 + * @return + */ + @Override + public Map getYearInfpubData() { + String yearInfpubRes = HttpUtils.sendPost(INFORMATION_ADDRESS + "/menuStatist/getYearInfpubData", "", ""); + log.info("获取信息披露-年度披露数据, 接口调用结果: {}", yearInfpubRes); + if (StringUtils.isEmpty(yearInfpubRes)) { + log.error("获取信息披露-年度披露数据, 接口调用结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(yearInfpubRes, Map.class); + String data = (String) map.get("data"); + if (null == data) { + log.error("获取信息披露-年度披露数据, data值为NULL"); + return new HashMap<>(); + } + Map result = JSON.parseObject(data, new TypeReference>() { + }); + return result; + } + + /** + * 累计披露数据条数及占比 + * @return + */ + @Override + public List> getToalInfpubData() { + String totalInfpubRes = HttpUtils.sendPost(INFORMATION_ADDRESS + "/menuStatist/getToalInfpubData", "", ""); + log.info("获取信息披露-累计披露数据条数及占比, 接口调用结果:{}", totalInfpubRes); + if (StringUtils.isEmpty(totalInfpubRes)) { + log.error("获取信息披露-累计披露数据条数及占比, 接口调用结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(totalInfpubRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("获取信息披露-累计披露数据条数及占比, data值为NULL"); + return new ArrayList<>(); + } + List> result = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() { + }); + return result; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl.java new file mode 100644 index 0000000..73ea749 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl.java @@ -0,0 +1,229 @@ +package com.alonginfo.project.gansu.serviceimpl.forward; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.forward.ITradeInfoService; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/13 16:21 + * @Description: + */ +@Service +@Slf4j +public class TradeInfoServiceImpl implements ITradeInfoService { + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + public String PUBLIC_KEY; + + @Autowired + private SgccAddressService sgccAddressService; + + /** + * 交易情况总览统计 + * @param yearCode + * @return + */ + @Override + public Map selectTotalTradeInfoByYear(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + String tradeInfoByYearRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeInfo/selectTotalTradeInfoByYear", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectTotalTradeInfoByYear, 调用结果: {}", tradeInfoByYearRes); + if (StringUtils.isEmpty(tradeInfoByYearRes)) { + log.error("-接口: /tradeInfo/selectTotalTradeInfoByYear, 返回结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(tradeInfoByYearRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectTotalTradeInfoByYear, data值为NULL!"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>(){}); + } + + /** + * 各类型交易组织情况 + * @param yearCode + * @return + */ + @Override + public List> selectTradeDetailByType(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + String tradeDetailRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeInfo/selectTradeDetailByType", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectTradeDetailByType, 调用结果: {}", tradeDetailRes); + if (StringUtils.isEmpty(tradeDetailRes)) { + log.error("-接口: /tradeInfo/selectTradeDetailByType, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(tradeDetailRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectTradeDetailByType, data值为NULL!"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + /** + * 各类市场主体参与市场情况 + * @param yearCode + * @return + */ + @Override + public Map selectMarketMemberNumByType(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + String marketMemberNumRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeInfo/selectMarketMemberNumByType", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectMarketMemberNumByType, 调用结果: {}", marketMemberNumRes); + if (StringUtils.isEmpty(marketMemberNumRes)) { + log.error("-接口: /tradeInfo/selectMarketMemberNumByType, 返回结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(marketMemberNumRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectMarketMemberNumByType, data值为NULL!"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>(){}); + } + + /** + * 历年直接交易规模 + * @param + * @return + */ + @Override + public List> selectDirectTradeByType() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String directTradeResStr = HttpUtils.sendPost(sgccAddress + "/tradeInfo/selectDirectTradeByType", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectDirectTradeByType, 调用结果: {}", directTradeResStr); + if (StringUtils.isEmpty(directTradeResStr)) { + log.error("-接口: /tradeInfo/selectDirectTradeByType, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(directTradeResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectDirectTradeByType, data值为NULL!"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + /** + * 各地市市场主体情况 + * @return + */ + @Override + public List> selectTradeCityMemberResult(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + String cityMemberResStr = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeInfo/selectTradeCityMemberResult", JSON.toJSONString(param), DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectTradeCityMemberResult, 调用结果: {}", cityMemberResStr); + if (StringUtils.isEmpty(cityMemberResStr)) { + log.error("-接口: /tradeInfo/selectTradeCityMemberResult, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(cityMemberResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectTradeCityMemberResult, data值为NULL!"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + /** + * 历年省内交易均价交易电量 + * @return + */ + @Override + public List> selectAvgPriceEnergyByYearResult() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String avgPriceEnergyByYearResStr = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeInfo/selectAvgPriceEnergyByYearResult", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectAvgPriceEnergyByYearResult, 调用结果: {}", avgPriceEnergyByYearResStr); + if (StringUtils.isEmpty(avgPriceEnergyByYearResStr)) { + log.error("-接口: /tradeInfo/selectAvgPriceEnergyByYearResult, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(avgPriceEnergyByYearResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectAvgPriceEnergyByYearResult, data值为NULL!"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + /** + * 历年省间外送交易均价交易电量 + * @return + */ + @Override + public List> selectOutSendAvgPriceEnergyByYearResult() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String outSendAvgPriceResStr = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeInfo/selectOutSendAvgPriceEnergyByYearResult", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectOutSendAvgPriceEnergyByYearResult, 调用结果: {}", outSendAvgPriceResStr); + if (StringUtils.isEmpty(outSendAvgPriceResStr)) { + log.error("-接口: /tradeInfo/selectOutSendAvgPriceEnergyByYearResult, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(outSendAvgPriceResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectOutSendAvgPriceEnergyByYearResult, data值为NULL!"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + /** + * 省间外送历年水火风光电量 + * @return + */ + @Override + public List> selectTradeEnergyPowerTypeResult() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String energyPowerTypeRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeInfo/selectTradeEnergyPowerTypeResult", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /tradeInfo/selectTradeEnergyPowerTypeResult, 调用结果: {}", energyPowerTypeRes); + if (StringUtils.isEmpty(energyPowerTypeRes)) { + log.error("-接口: /tradeInfo/selectTradeEnergyPowerTypeResult, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(energyPowerTypeRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /tradeInfo/selectTradeEnergyPowerTypeResult, data值为NULL!"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl.java new file mode 100644 index 0000000..a751231 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl.java @@ -0,0 +1,233 @@ +package com.alonginfo.project.gansu.serviceimpl.forward; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.forward.ITradeMarketInfoService; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/7/7 16:52 + * @Description: + */ +@Service +@Slf4j +public class TradeMarketInfoServiceImpl implements ITradeMarketInfoService { + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String publicKey; + + @Autowired + private SgccAddressService sgccAddressService; + + /** + * (接口调用)当年市场化电量累计执行情况 + * @return + */ + @Override + public Map selectTradeEnergyRatio(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + String tradeEnergyRatioRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeMarketInfo/selectTradeEnergyRatio", JSON.toJSONString(param), DataPushUtils.createToken(publicKey)); + log.info("-市场概览-当年市场化电量累计执行情况, 接口调用结果: {}", tradeEnergyRatioRes); + if (StringUtils.isEmpty(tradeEnergyRatioRes)) { + log.error("-市场概览-当年市场化电量累计执行情况, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(tradeEnergyRatioRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场概览-当年市场化电量累计执行情况, data为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } + + /** + * (接口调用)市场概览-顶部发电数据 + * @param yearCode + * @return + */ + @Override + public Map selectGeneratePowerDataByYear(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("caliber", "0"); + param.put("yearCode", yearCode); + String generatePowerRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeMarketInfo/selectGeneratePowerDataByYear", JSON.toJSONString(param), DataPushUtils.createToken(publicKey)); + log.info("-市场概览-发电数据, 接口调用结果: {}", generatePowerRes); + if (StringUtils.isEmpty(generatePowerRes)) { + log.error("-市场概览-发电数据, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(generatePowerRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场概览-发电数据, data为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } + + /** + * (接口调用)当年交易量价走势 + * @param yearCode + * @return + */ + @Override + public Map selectTradePowerAvgPriceResult(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + param.put("tradeType", "1"); + String powerPriceRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeMarketInfo/selectTradePowerAvgPriceResult", JSON.toJSONString(param), DataPushUtils.createToken(publicKey)); + log.info("-市场概览-当年交易量价走势, 接口调用结果: {}", powerPriceRes); + if (StringUtils.isEmpty(powerPriceRes)) { + log.error("-市场概览-当年交易量价走势, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(powerPriceRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场概览-当年交易量价走势, data为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } + + /** + * (接口调用)发电装机情况与利用小时数 + * @return + */ + @Override + public Map selectGeneratorCapacity(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + param.put("caliber", "1"); + String generatorCapacityRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeMarketInfo/selectGeneratorCapacity", JSON.toJSONString(param), DataPushUtils.createToken(publicKey)); + log.info("-市场概览-发电装机情况与利用小时数, 接口调用结果: {}", generatorCapacityRes); + if (StringUtils.isEmpty(generatorCapacityRes)) { + log.error("-市场概览-发电装机情况与利用小时数, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(generatorCapacityRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场概览-发电装机情况与利用小时数, data为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } + + /** + * (接口调用)各类型资源装机容量与发电量 + * @param yearCode + * @return + */ + @Override + public Map selectResourceCapacity(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + String resourceCapacityRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeMarketInfo/selectResourceCapacity", JSON.toJSONString(param), DataPushUtils.createToken(publicKey)); + log.info("-市场概览-各类型资源装机容量与发电量, 接口调用结果: {}", resourceCapacityRes); + if (StringUtils.isEmpty(resourceCapacityRes)) { + log.error("-市场概览-各类型资源装机容量与发电量, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(resourceCapacityRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场概览-各类型资源装机容量与发电量, data为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } + + /** + * (接口调用)当年发电情况统计 + * @param yearCode + * @return + */ + @Override + public Map selectResourceDevDataList(String yearCode) throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map param = new HashMap<>(); + param.put("yearCode", yearCode); + param.put("resourceType", "1"); + String resourceDevDataRes = HttpUtils.sendPostDataByJson(sgccAddress + "/tradeMarketInfo/selectResourceDevDataList", JSON.toJSONString(param), DataPushUtils.createToken(publicKey)); + log.info("-市场概览-当年发电情况统计, 接口调用结果: {}", resourceDevDataRes); + if (StringUtils.isEmpty(resourceDevDataRes)) { + log.error("-市场概览-当年发电情况统计, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(resourceDevDataRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场概览-当年发电情况统计, data为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + } + + /** + * 查询当年电力用户交易量价情况 + * @return + */ + @Override + public Map selectUserSumEnergyAvgPrice() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String userSumEnergyAvgPriceResStr = HttpUtils.sendPost(sgccAddress + "/tradeMarketInfo/selectUserSumEnergyAvgPrice", "", DataPushUtils.createToken(publicKey)); + log.info("-当年电力用户交易量价情况, 接口调用结果: {}", userSumEnergyAvgPriceResStr); + if (StringUtils.isEmpty(userSumEnergyAvgPriceResStr)) { + log.error("-当年电力用户交易量价情况, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSONObject.parseObject(userSumEnergyAvgPriceResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-当年电力用户交易量价情况, data为NULL!"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>(){}); + } + + /** + * 当年发电企业交易量价情况数据 + * @return + */ + @Override + public Map selectEnterpriseSumEnergyAvgPrice() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String enterpriseSumResStr = HttpUtils.sendPost(sgccAddress + "/tradeMarketInfo/selectEnterpriseSumEnergyAvgPrice", "", DataPushUtils.createToken(publicKey)); + log.info("-当年发电企业交易量价情况数据, 接口调用结果: {}", enterpriseSumResStr); + if (StringUtils.isEmpty(enterpriseSumResStr)) { + log.error("-当年发电企业交易量价情况数据, 接口返回为空!"); + return new HashMap<>(); + } + Map map = JSONObject.parseObject(enterpriseSumResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-当年发电企业交易量价情况数据, data为NULL!"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>(){}); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl.java new file mode 100644 index 0000000..b60ae67 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl.java @@ -0,0 +1,128 @@ +package com.alonginfo.project.gansu.serviceimpl.forward; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.forward.TransactionPowerService; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * TransactionPowerServiceImpl + * + * @package_name: com.alonginfo.project.gansu.serviceimpl.forward + * @author: 樊群靖 + * @date: 2023/8/9 + * @description: + **/ +@Service +@Slf4j + +public class TransactionPowerServiceImpl implements TransactionPowerService { + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + public String PUBLIC_KEY; + + @Autowired + private SgccAddressService sgccAddressService; + + @Override + public List> selectDirectPowerList() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String directPowerListRes = HttpUtils.sendPost(sgccAddress + "/transactionPowerController/selectDirectPowerList", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /transactionPowerController/selectDirectPowerList, 调用结果: {}", directPowerListRes); + if(StringUtils.isEmpty(directPowerListRes)) { + log.error("-接口: /transactionPowerController/selectDirectPowerList, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(directPowerListRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /transactionPowerController/selectDirectPowerList, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectGenerationRightPowerList() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String generationRightPowerListRes = HttpUtils.sendPost(sgccAddress + "/transactionPowerController/selectGenerationRightPowerList", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /transactionPowerController/selectGenerationRightPowerList, 调用结果: {}", generationRightPowerListRes); + if(StringUtils.isEmpty(generationRightPowerListRes)) { + log.error("-接口: /transactionPowerController/selectGenerationRightPowerList, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(generationRightPowerListRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /transactionPowerController/selectGenerationRightPowerList, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public List> selectPowerList() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String powerListRes = HttpUtils.sendPost(sgccAddress + "/transactionPowerController/selectPowerList", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /transactionPowerController/selectPowerList, 调用结果: {}", powerListRes); + if(StringUtils.isEmpty(powerListRes)) { + log.error("-接口: /transactionPowerController/selectPowerList, 返回结果为空!"); + return new ArrayList<>(); + } + Map map = JSON.parseObject(powerListRes, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-接口: /transactionPowerController/selectPowerList, data值为NULL"); + return new ArrayList<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + } + + @Override + public Map transactionInTheProvince() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String transactionInTheProvinceResStr = HttpUtils.sendPost(sgccAddress + "/transactionPowerController/transactionInTheProvince", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /transactionPowerController/transactionInTheProvince, 调用结果: {}", transactionInTheProvinceResStr); + if(StringUtils.isEmpty(transactionInTheProvinceResStr)) { + log.error("-接口: /transactionPowerController/transactionInTheProvince, 返回结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(transactionInTheProvinceResStr, Map.class); + Object data = map.get("data"); + if (Objects.isNull(data)) { + log.error("-接口: /transactionPowerController/transactionInTheProvince, data值为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>(){}); + } + + @Override + public Map abschluss() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String abschlussResStr = HttpUtils.sendPost(sgccAddress + "/transactionPowerController/abschluss", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("-接口: /transactionPowerController/abschluss, 调用结果: {}", abschlussResStr); + if(StringUtils.isEmpty(abschlussResStr)) { + log.error("-接口: /transactionPowerController/abschluss, 返回结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(abschlussResStr, Map.class); + Object data = map.get("data"); + if (Objects.isNull(data)) { + log.error("-接口: /transactionPowerController/abschluss, data值为NULL"); + return new HashMap<>(); + } + return JSON.parseObject(JSON.toJSONString(data), new TypeReference>(){}); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl.java new file mode 100644 index 0000000..7989d5c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl.java @@ -0,0 +1,153 @@ +package com.alonginfo.project.gansu.serviceimpl.generation; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.mapper.GenerationRightMapper; +import com.alonginfo.project.gansu.service.generation.IGenerationRightService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/5/17 15:13 + * @Description: 发电权交易情况 业务层实现 + */ +@Service +public class GenerationRightServiceImpl implements IGenerationRightService { + + @Autowired + private GenerationRightMapper generationRightMapper; + + /** + * (同步数据)当年发电权交易组织情况 + * @return + */ + @Override + public DealOrganizeDTO getDealOrganize() { + Map dealOrganize = generationRightMapper.getDealOrganize(); + DealOrganizeDTO dealOrganizeDTO = new DealOrganizeDTO(); + if (StringUtils.isNotEmpty(dealOrganize)) { + dealOrganizeDTO.setDealNum(dealOrganize.get("dealNum")); + dealOrganizeDTO.setDealNumPer(dealOrganize.get("dealNumPer")); + dealOrganizeDTO.setDealEnergy(dealOrganize.get("dealEnergy")); + dealOrganizeDTO.setDealEnergyPer(dealOrganize.get("dealEnergyPer")); + dealOrganizeDTO.setPowerCount(dealOrganize.get("powerCount")); + dealOrganizeDTO.setPowerCountPer(dealOrganize.get("powerCountPer")); + } + return dealOrganizeDTO; + } + + /** + * (同步数据)当年发电权交易市场主体参与情况 + * @return + */ + @Override + public SubjectJoinDTO getSubjectJoin() { + Map subjectJoin = generationRightMapper.getSubjectJoin(); + + SubjectJoinDTO subjectJoinDTO = new SubjectJoinDTO(); + if (StringUtils.isNotEmpty(subjectJoin)) { + subjectJoinDTO.setParticipantCount(subjectJoin.get("participantCount")); + subjectJoinDTO.setVendeeParticipantCount(subjectJoin.get("vendeeParticipantCount")); + subjectJoinDTO.setSaleParticipantCount(subjectJoin.get("saleParticipantCount")); + } + return subjectJoinDTO; + } + + /** + * (同步数据)买入、卖出电量企业排名 + * @return + */ + @Override + public List getSaleBuyOrder(String type) { + List> saleBuyOrder = generationRightMapper.getSaleBuyOrder(type); + + List result = new ArrayList<>(); + if (StringUtils.isNotEmpty(saleBuyOrder)) { + saleBuyOrder.forEach(order -> { + SaleBuyEnterpriseOrderDTO saleBuyEnterpriseOrderDTO = new SaleBuyEnterpriseOrderDTO(); + saleBuyEnterpriseOrderDTO.setEnergy(order.get("energy")); + saleBuyEnterpriseOrderDTO.setParticipantName(order.get("participantName")); + result.add(saleBuyEnterpriseOrderDTO); + }); + } + return result; + } + + /** + * (同步数据)历年发电权交易电量趋势 + * @return + */ + @Override + public PowerByYearDTO getPowerByYear() { + List> powerByYear = generationRightMapper.getPowerByYear(); + + List xAxis = new LinkedList<>(); + //交易电量 + List tradePower = new LinkedList<>(); + //结算电量 + //TODO 目前还没该字段 预留 + List settlementPower = new LinkedList<>(); + if (StringUtils.isNotEmpty(powerByYear)) { + for (Map power : powerByYear) { + xAxis.add(power.get("year")); + tradePower.add(power.get("energy")); + settlementPower.add(power.get("settlement")); + } + } + + PowerByYearDTO powerByYearDTO = new PowerByYearDTO(); + powerByYearDTO.setXAxisData(xAxis); + powerByYearDTO.setSeriesData(new ArrayList>(){{ + add(new HashMap(){{ + put("name", "交易电量"); + put("data", tradePower); + }}); + add(new HashMap(){{ + put("name", "结算电量"); + put("data", settlementPower); + }}); + }}); + return powerByYearDTO; + } + + /** + * (同步数据)当年分月 发电权交易电量趋势 + * @return + */ + @Override + public PowerByYearMonthDTO getPowerByYearMonth() { + List> powerByYearMonth = generationRightMapper.getPowerByYearMonth(); + + List xAxis = new LinkedList<>(); + //交易电量 + List tradePower = new LinkedList<>(); + //结算电量 + //TODO 目前还没该字段 预留 + List settlementPower = new LinkedList<>(); + if (StringUtils.isNotEmpty(powerByYearMonth)) { + for (Map power : powerByYearMonth) { + //01 -> 1月 + xAxis.add(Integer.parseInt(power.get("yearMonth")) < 10 ? power.get("yearMonth").charAt(1)+"月" : power.get("yearMonth")+"月"); + tradePower.add(power.get("energy")); + settlementPower.add(power.get("settlement")); + } + } + + PowerByYearMonthDTO powerByYearMonthDTO = new PowerByYearMonthDTO(); + powerByYearMonthDTO.setXAxisData(xAxis); + powerByYearMonthDTO.setSeriesData(new ArrayList>(){{ + add(new HashMap(){{ + put("name", "交易电量"); + put("data", tradePower); + }}); + add(new HashMap(){{ + put("name", "结算电量"); + put("data", settlementPower); + }}); + }}); + return powerByYearMonthDTO; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/green/GreenTradeServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/green/GreenTradeServiceImpl.java new file mode 100644 index 0000000..16c33ac --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/green/GreenTradeServiceImpl.java @@ -0,0 +1,73 @@ +package com.alonginfo.project.gansu.serviceimpl.green; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.GreenSyndromeTradeByYearDTO; +import com.alonginfo.project.gansu.domain.GreenTradeInfoDTO; +import com.alonginfo.project.gansu.mapper.GreenTradeMapper; +import com.alonginfo.project.gansu.service.green.IGreenTradeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/6/19 16:48 + * @Description: 绿证绿电交易情况 + */ +@Service +public class GreenTradeServiceImpl implements IGreenTradeService { + + @Autowired + private GreenTradeMapper greenTradeMapper; + + /** + * 绿证绿电交易电量、均价 + * @return + */ + @Override + public GreenTradeInfoDTO getGreenTradeInfo() { + Map tradeInfo = greenTradeMapper.queryGreenTradeInfo(); + if (StringUtils.isEmpty(tradeInfo)) { + return new GreenTradeInfoDTO(); + } + return GreenTradeInfoDTO.builder() + .snlddl(tradeInfo.get("innerTradeValue")) + .snldjj(tradeInfo.get("innerTradePrice")) + .kqlvdl(tradeInfo.get("spannedTradeValue")) + .kqlvjj(tradeInfo.get("spannedTradePrice")) + .lzjydl(tradeInfo.get("syndromeTrdaeValueTop")) + .lzjyjj(tradeInfo.get("syndromeTradePriceTop")) + .lzjydl1(tradeInfo.get("syndromeTradeValueDown")) + .lzjyjj1(tradeInfo.get("syndromeTradePriceDown")).build(); + } + + /** + * 历年绿证市场交易情况 + * @return + */ + @Override + public GreenSyndromeTradeByYearDTO greenSyndromeTradeByYear() { + List> greenSyndromeTrades = greenTradeMapper.queryGreenSyndromeTradeByYear(); + if (CollectionUtils.isEmpty(greenSyndromeTrades)){ + return new GreenSyndromeTradeByYearDTO(); + } + List xAxis = new LinkedList<>(); + List tradeNumList = new LinkedList<>(); + List tradePriceList = new LinkedList<>(); + for (Map greenSyndromeTrade : greenSyndromeTrades) { + String dataYear = Optional.ofNullable(greenSyndromeTrade.get("dataYear")).orElse(""); + String tradeNum = Optional.ofNullable(greenSyndromeTrade.get("tradeNum")).orElse("0"); + String tradePrice = Optional.ofNullable(greenSyndromeTrade.get("tradePrice")).orElse("0"); + xAxis.add(dataYear); + tradeNumList.add(tradeNum); + tradePriceList.add(tradePrice); + } + GreenSyndromeTradeByYearDTO greenSyndrome = new GreenSyndromeTradeByYearDTO(); + greenSyndrome.setXAxis(xAxis); + greenSyndrome.setGreenTradeNum(tradeNumList); + greenSyndrome.setGreenTradePrice(tradePriceList); + return greenSyndrome; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/grid/GridServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/grid/GridServiceImpl.java new file mode 100644 index 0000000..35c4720 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/grid/GridServiceImpl.java @@ -0,0 +1,98 @@ +package com.alonginfo.project.gansu.serviceimpl.grid; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.LineCapacityDTO; +import com.alonginfo.project.gansu.domain.LineTransportDTO; +import com.alonginfo.project.gansu.domain.TextBoxVO; +import com.alonginfo.project.gansu.domain.TransformerInfoVO; +import com.alonginfo.project.gansu.mapper.GridMapper; +import com.alonginfo.project.gansu.service.grid.IGridService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/13 10:19 + * @Description: 甘肃网架图 + */ +@Service +public class GridServiceImpl implements IGridService { + + @Autowired + private GridMapper gridMapper; + + /** + * 左下角文本框数据 + * @return + */ + @Override + public TextBoxVO getTextBoxData() { + return gridMapper.getTextBoxData(); + } + + /** + * 变电站信息 + * @return + */ + @Override + public List getTransformerInfo() { + List transformerInfoList = gridMapper.queryTransformerInfo(); + if(StringUtils.isEmpty(transformerInfoList)) { + return new ArrayList<>(); + } + return transformerInfoList; + } + + /** + * 各线路输送电量分析 + * @return + */ + @Override + public LineTransportDTO getLineTransport() { + List> lineTransportList = gridMapper.queryLineTransport(); + if (StringUtils.isEmpty(lineTransportList)) { + return new LineTransportDTO(); + } + List lines = new ArrayList<>(); + List clearEnergyList = new ArrayList<>(); + List fireEnergyList = new ArrayList<>(); + for (Map line : lineTransportList) { + lines.add(line.get("lineName")); + clearEnergyList.add(line.get("clearEnergy")); + fireEnergyList.add(line.get("fireEnergy")); + } + + LineTransportDTO result = new LineTransportDTO(); + result.setXData(lines); + result.setQjny(clearEnergyList); + result.setHd(fireEnergyList); + return result; + } + + /** + * 各线路整体容量情况 + * @return + */ + @Override + public LineCapacityDTO getLineCapacity() { + List> lineCapacityList = gridMapper.queryLineCapacity(); + if (StringUtils.isEmpty(lineCapacityList)) { + return new LineCapacityDTO(); + } + List lines = new ArrayList<>(); + List capacityList = new ArrayList<>(); + for (Map line : lineCapacityList) { + lines.add(line.get("lineName")); + capacityList.add(line.get("capacity")); + } + + LineCapacityDTO result = new LineCapacityDTO(); + result.setXAxisData(lines); + result.setSeriesData(capacityList); + return result; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl.java new file mode 100644 index 0000000..6b3cd4b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl.java @@ -0,0 +1,345 @@ +package com.alonginfo.project.gansu.serviceimpl.marketbuild; + +import com.alonginfo.project.gansu.domain.DirectDealDTO; +import com.alonginfo.project.gansu.domain.DirectDealPo; +import com.alonginfo.project.gansu.domain.EveryTypeSubjectDTO; +import com.alonginfo.project.gansu.domain.EveryTypeSubjectPo; +import com.alonginfo.project.gansu.mapper.MarketBuildMapper; +import com.alonginfo.project.gansu.service.marketbuild.IMarketBuildService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/2/8 16:30 + * @Description: 市场建设情况 + */ +@Service +public class MarketBuildServiceImpl implements IMarketBuildService { + + private static final List MONTH_YEAR = Arrays.asList("1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"); + + @Autowired + private MarketBuildMapper marketBuildMapper; + +// /** +// * 市场主体注册发展趋势 +// * @return +// */ +// @Override +// public RegisterTrendVo getRegisterTrend() { +// List> registerTrends = marketBuildMapper.getRegisterTrend(); +// if (CollectionUtils.isEmpty(registerTrends)) { +// return new RegisterTrendVo(); +// } +// RegisterTrendVo registerTrendVo = new RegisterTrendVo(); +// //x轴 +// List xAxis = registerTrendVo.getXAxis(); +// //y轴 +// List> seriesData = registerTrendVo.getSeriesData(); +// +// //年份数据集 +// List dataYear = registerTrends.stream().map(i -> i.get("dataYear").toString()).collect(Collectors.toList()); +// //电力用户数据集 +// List electricUser = registerTrends.stream().map(i -> i.get("electricUser").toString()).collect(Collectors.toList()); +// //售电公司数据集 +// List saleCompany = registerTrends.stream().map(i -> i.get("saleCompany").toString()).collect(Collectors.toList()); +// //发电企业数据集 +// List yieldEnterprise = registerTrends.stream().map(i -> i.get("yieldEnterprise").toString()).collect(Collectors.toList()); +// seriesData.add(new HashMap() {{ +// put("data", electricUser); +// put("name", "电力用户"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", saleCompany); +// put("name", "售电公司"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", yieldEnterprise); +// put("name", "发电企业"); +// }}); +// xAxis.addAll(dataYear); +// return registerTrendVo; +// } + + /** + * 各类型发电企业数量变化情况 + * @return + */ +// @Override +// public EnterpriseChangesVo getEnterpriseChanges() { +// List> enterpriseChanges = marketBuildMapper.getEnterpriseChanges(); +// if (CollectionUtils.isEmpty(enterpriseChanges)) { +// return new EnterpriseChangesVo(); +// } +// +// EnterpriseChangesVo enterpriseChangesVo = new EnterpriseChangesVo(); +// //企业数量集合 +// List> seriesData = enterpriseChangesVo.getSeriesData(); +// //年份集合 +// List xAxis = enterpriseChangesVo.getXAxis(); +// +// List dataYear = enterpriseChanges.stream().map(i -> i.get("dataYear").toString()).collect(Collectors.toList()); +// List fireEnterprise = enterpriseChanges.stream().map(i -> i.get("fireEnterprise").toString()).collect(Collectors.toList()); +// List waterEnterprise = enterpriseChanges.stream().map(i -> i.get("waterEnterprise").toString()).collect(Collectors.toList()); +// List windEnterprise = enterpriseChanges.stream().map(i -> i.get("windEnterprise").toString()).collect(Collectors.toList()); +// List lightEnterprise = enterpriseChanges.stream().map(i -> i.get("lightEnterprise").toString()).collect(Collectors.toList()); +// seriesData.add(new HashMap() {{ +// put("data", fireEnterprise); +// put("name", "火电企业"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", waterEnterprise); +// put("name", "水电企业"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", windEnterprise); +// put("name", "风电企业"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", lightEnterprise); +// put("name", "光伏企业"); +// }}); +// xAxis.addAll(dataYear); +// return enterpriseChangesVo; +// } + + /** + * 市场主体参与市场情况 + * @return + */ +// @Override +// public RegisterTrendVo getSubjectJoin() { +// List> subjectJoin = marketBuildMapper.getSubjectJoin(); +// if (CollectionUtils.isEmpty(subjectJoin)) { +// return new RegisterTrendVo(); +// } +// +// RegisterTrendVo registerTrendVo = new RegisterTrendVo(); +// List> seriesData = registerTrendVo.getSeriesData(); +// List xAxis = registerTrendVo.getXAxis(); +// +// List dataYear = subjectJoin.stream().map(i -> i.get("dataYear").toString()).collect(Collectors.toList()); +// List yieldEnterprise = subjectJoin.stream().map(i -> i.get("yieldEnterprise").toString()).collect(Collectors.toList()); +// List saleEnterprise = subjectJoin.stream().map(i -> i.get("saleEnterprise").toString()).collect(Collectors.toList()); +// List electricUser = subjectJoin.stream().map(i -> i.get("electricUser").toString()).collect(Collectors.toList()); +// List subjectCoverage = subjectJoin.stream().map(i -> i.get("subjectCoverage").toString()).collect(Collectors.toList()); +// seriesData.add(new HashMap() {{ +// put("data", yieldEnterprise); +// put("name", "发电企业"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", saleEnterprise); +// put("name", "售电企业"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", electricUser); +// put("name", "电力用户"); +// }}); +// seriesData.add(new HashMap() {{ +// put("data", subjectCoverage); +// put("name", "市场主体覆盖率"); +// }}); +// xAxis.addAll(dataYear); +// return registerTrendVo; +// } + + /** + * 历年交易组织规模发展趋势 + * @return + */ +// @Override +// public DealOrganizeVo getDealOrganize() { +// List> dealOrganize = marketBuildMapper.getDealOrganize(); +// if (CollectionUtils.isEmpty(dealOrganize)) { +// return new DealOrganizeVo(); +// } +// DealOrganizeVo dealOrganizeVo = new DealOrganizeVo(); +// List> seriesData = dealOrganizeVo.getCurveData(); +// List xAxis = dealOrganizeVo.getXAxis(); +// +// List dataYear = dealOrganize.stream().map(i -> i.get("dataYear").toString()).collect(Collectors.toList()); +// List organizeNum = dealOrganize.stream().map(i -> i.get("organizeNum").toString()).collect(Collectors.toList()); +// List dealValue = dealOrganize.stream().map(i -> i.get("dealValue").toString()).collect(Collectors.toList()); +// seriesData.add(organizeNum); +// seriesData.add(dealValue); +// xAxis.addAll(dataYear); +// return dealOrganizeVo; +// } + + /** + * 当年现货市场交易情况 + * @return + */ +// @Override +// public RegisterTrendVo getStockMarketDeal() { +// List> stockMarketDeal = marketBuildMapper.getStockMarketDeal(); +// if (CollectionUtils.isEmpty(stockMarketDeal)) { +// return new RegisterTrendVo(); +// } +// +// List> series = new ArrayList<>(); +// for (Map stock : stockMarketDeal) { +// String name = ""; +// List data = new LinkedList<>(); +// for (Map.Entry entry : stock.entrySet()) { +// String key = entry.getKey().toString(); +// String value = entry.getValue().toString(); +// if ("dataType".equals(key)) { +// name = value; +// continue; +// } +// data.add(value); +// } +// Map item = new HashMap<>(); +// item.put("data", data); +// item.put("name", name); +// series.add(item); +// } +// +// RegisterTrendVo registerTrendVo = new RegisterTrendVo(); +// registerTrendVo.setSeriesData(series); +// registerTrendVo.setXAxis(MONTH_YEAR); +// return registerTrendVo; +// } + + /** + * 当年绿电市场交易情况 + * @return + */ +// @Override +// public GreenElectricDealVo getGreenElectricDeal() { +// List> greenElectricDeals = marketBuildMapper.getGreenElectricDeal(); +// if (CollectionUtils.isEmpty(greenElectricDeals)) { +// return new GreenElectricDealVo(); +// } +// //省间外送 +// Map outerMap = greenElectricDeals.stream().filter(i -> "省间外送".equals(String.valueOf(i.get("dataType")))) +// .findFirst().orElse(new HashMap<>()); +// //省内交易 +// Map innerMap = greenElectricDeals.stream().filter(i -> "省内交易".equals(String.valueOf(i.get("dataType")))) +// .findFirst().orElse(new HashMap<>()); +// +// GreenElectricDealVo greenElectricDeal = new GreenElectricDealVo(); +// List outerRes = greenElectricDeal.getOuter(); +// List innerRes = greenElectricDeal.getInner(); +// //Map转List +// outerMap.entrySet().stream().forEach(m -> { +// String key = m.getKey(); +// String value = m.getValue().toString(); +// if (!"dataType".equals(key)) { +// outerRes.add(value); +// } +// }); +// innerMap.entrySet().stream().forEach(m -> { +// String key = m.getKey(); +// String value = m.getValue().toString(); +// if (!"dataType".equals(key)) { +// innerRes.add(value); +// } +// }); +// +// return greenElectricDeal; +// } + + /** + * 交易类别/组织方式及当年成交电量 + * @param type 0-交易类别 1-组织方式 + * @return + */ +// @Override +// public TransactionPowerVo getTransactionPower(String type) { +// List types = "0".equals(type) ? Arrays.asList("省内直接交易", "自备电厂替代", "跨区跨省外送") +// : Arrays.asList("双边协商交易", "集中竞价交易", "挂牌交易", "D+3日滚动交易"); +// List> transactionPower = marketBuildMapper.getTransactionPower(types); +// +// if (CollectionUtils.isEmpty(transactionPower)) { +// return new TransactionPowerVo(); +// } +// //电量和 +// BigDecimal dealElectricSum = transactionPower.stream().map(i -> new BigDecimal(i.get("dealElectric"))).reduce(BigDecimal::add).orElse(BigDecimal.ZERO); +// +// TransactionPowerVo transactionPowerVo = new TransactionPowerVo(); +// List> tableData = transactionPowerVo.getTableData(); +// List> graphData = transactionPowerVo.getGraphData(); +// for (Map item : transactionPower) { +// String dataType = item.get("dataType"); +// BigDecimal dealElectric = new BigDecimal(item.get("dealElectric")); +// BigDecimal ratio = dealElectric.divide(dealElectricSum, 1, BigDecimal.ROUND_HALF_UP); +// tableData.add(new HashMap(){{ +// put("name", dataType); +// put("dealElectric", dealElectric); +// put("ratio", ratio); +// }}); +// graphData.add(new HashMap(){{ +// put("name", dataType); +// put("ratio", ratio); +// }}); +// } +// return transactionPowerVo; +// } + + /** + * 年度电力直接交易情况 + * @return + */ + @Override + public DirectDealDTO getDirectDeal() { + List directDeal = marketBuildMapper.getDirectDeal(); + + List xAxisData = new LinkedList<>(); + List seriesData = new LinkedList<>(); + if (!CollectionUtils.isEmpty(directDeal)) { + directDeal.forEach(directDealPo -> { + xAxisData.add(directDealPo.getTradeYear()); + seriesData.add(directDealPo.getSumVendeeEnergy()); + }); + } + DirectDealDTO directDealDTO = new DirectDealDTO(); + directDealDTO.setXAxisData(xAxisData); + directDealDTO.setSeriesData(seriesData); + return directDealDTO; + } + + /** + * 各类市场主体数量 + * @return + */ + @Override + public EveryTypeSubjectDTO getEveryTypeSubject() { + List everyTypeSubject = marketBuildMapper.getEveryTypeSubject(); + + List xAxis = new ArrayList<>(); + List> seriesData = new ArrayList<>(); + if (!CollectionUtils.isEmpty(everyTypeSubject)) { + List saleList = new LinkedList<>(); + List powerList = new LinkedList<>(); + List userList = new LinkedList<>(); + everyTypeSubject.forEach(everyTypeSubjectPo -> { + xAxis.add(everyTypeSubjectPo.getYear()); + saleList.add(everyTypeSubjectPo.getSale()); + powerList.add(everyTypeSubjectPo.getPower()); + userList.add(everyTypeSubjectPo.getUser()); + }); + seriesData.add(new HashMap(){{ + put("name", "电力用户"); + put("data", userList); + }}); + seriesData.add(new HashMap(){{ + put("name", "发电企业"); + put("data", powerList); + }}); + seriesData.add(new HashMap(){{ + put("name", "售电公司"); + put("data", saleList); + }}); + } + EveryTypeSubjectDTO everyTypeSubjectDTO = new EveryTypeSubjectDTO(); + everyTypeSubjectDTO.setXAxisData(xAxis); + everyTypeSubjectDTO.setSeriesData(seriesData); + return everyTypeSubjectDTO; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketsurvey/MarketSurveyServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketsurvey/MarketSurveyServiceImpl.java new file mode 100644 index 0000000..513c9ca --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketsurvey/MarketSurveyServiceImpl.java @@ -0,0 +1,245 @@ +package com.alonginfo.project.gansu.serviceimpl.marketsurvey; + +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.mapper.MarketSurveyMapper; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.marketsurvey.IMarketSurveyService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; + +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/2/7 15:08 + * @Description: 市场概况业务层 + */ +@Service +@Slf4j +public class MarketSurveyServiceImpl implements IMarketSurveyService { + + @Autowired + private MarketSurveyMapper marketSurveyMapper; + + /** + * (同步数据)当前市场主体情况 + * + * @return + */ + @Override + public SubjectInfoDTO getMarketSubjectInfo() { + //市场主体占比 + SubjectRatioPo subjectRatioPo = marketSurveyMapper.getSubjectInfo(); + EnterprisePo enterprisePo = marketSurveyMapper.getEnterpriseInfo(); + SubjectRatioPo subjectInfo = ObjectUtils.isEmpty(subjectRatioPo) ? new SubjectRatioPo() : subjectRatioPo; + EnterprisePo enterpriseInfo = ObjectUtils.isEmpty(enterprisePo) ? new EnterprisePo() : enterprisePo; + + SubjectInfoDTO subjectInfoDTO = new SubjectInfoDTO(); + BeanUtils.copyProperties(subjectInfo, subjectInfoDTO); + BeanUtils.copyProperties(enterpriseInfo, subjectInfoDTO); + return subjectInfoDTO; + } + + /** + * (导入数据)发电、用电 + * + * @param flag 0-用电 1-发电 + * @return + */ + @Override + public List getUseGeneration(String flag) { + if (StringUtils.isEmpty(flag)) { + return new ArrayList<>(); + } + + List result = new ArrayList<>(); + if ("0".equals(flag)) { + result = marketSurveyMapper.queryUseInfo(); + } else if ("1".equals(flag)) { + result = marketSurveyMapper.queryGenerationInfo(); + } else { + + } + return result; + } + + /** + * (导入数据)发电情况-各类型电量累计发用电 + * + * @return + */ + @Override + public CountPowerByTypeDTO getCountPowerByType() { + List> countPowers = marketSurveyMapper.queryCountPowerByType(); + if (StringUtils.isEmpty(countPowers)) { + return new CountPowerByTypeDTO(); + } + + List use = new LinkedList<>(); + List generation = new LinkedList<>(); + for (Map countPower : countPowers) { + //发电/用电 + String dataType = Optional.ofNullable(countPower.get("dataType")).orElse(""); + String fire = countPower.get("fireElectric"); + String water = countPower.get("waterElectric"); + String wind = countPower.get("windElectric"); + String light = countPower.get("lightElectric"); + String other = countPower.get("other"); + + if (dataType.contains("用电")) { + use = Arrays.asList(fire, other, light, wind, water); + } else if (dataType.contains("发电")) { + generation = Arrays.asList(fire, other, light, wind, water); + } else { + + } + } + return CountPowerByTypeDTO.builder() + .electricityConsumption(use) + .powerGeneration(generation) + .build(); + } + + /** + * (导入数据)发电情况-当年用电趋势 + * + * @return + */ + @Override + public UseTrendCurrentYearDTO getUseTrendCurrentYear() { + List> useTrends = marketSurveyMapper.queryUseTrendCurrentYear(); + if (StringUtils.isEmpty(useTrends)) { + return new UseTrendCurrentYearDTO(); + } + + List use = new LinkedList<>(); + List generation = new LinkedList<>(); + for (int i = 1; i <= 12; i++) { + Map map = new HashMap<>(); + for (Map useTrend : useTrends) { + String dataMonth = useTrend.get("dataMonth"); + if (String.valueOf(i).equals(dataMonth)) { + map = useTrend; + } + } + use.add(map.get("useElectric")); + generation.add(map.get("generationElectric")); + } + return UseTrendCurrentYearDTO.builder() + .electricityConsumption(use) + .powerGeneration(generation) + .build(); + } + + /** + * (导入数据)当年交易量趋势 + * @return + */ + @Override + public TradeVolumeCurrentDTO getTradeVolumeTrendCurrent() { + List> tradeVolumes = marketSurveyMapper.queryTradeVolumeTrendCurrent(); + if (StringUtils.isEmpty(tradeVolumes)) { + return new TradeVolumeCurrentDTO(); + } + + List innerPower = new LinkedList<>(); + List outDeliveryPower = new LinkedList<>(); + List outBuyPower = new LinkedList<>(); + List innerPrice = new LinkedList<>(); + List outDeliveryPrice = new LinkedList<>(); + List outBuyPrice = new LinkedList<>(); + for (int i = 1; i <= 12; i++) { + Map item = new HashMap<>(); + for (Map tradeVolume : tradeVolumes) { + String dataMonth = tradeVolume.get("dataMonth"); + if (String.valueOf(i).equals(dataMonth)) { + item = tradeVolume; + } + } + innerPower.add(item.get("provinceInnerPower")); + outDeliveryPower.add(item.get("outDeliveryPower")); + outBuyPower.add(item.get("outBuyPower")); + innerPrice.add(item.get("provinceInnerPrice")); + outDeliveryPrice.add(item.get("outDeliveryPrice")); + outBuyPrice.add(item.get("outBuyPrice")); + } + return TradeVolumeCurrentDTO.builder() + .electricityInProvince(innerPower) + .powerToBeDeliveredToOutside(outDeliveryPower) + .purchasedElectricity(outBuyPower) + .inProvinceTheAverage(innerPrice) + .averagePriceToBeDeliveredToOutside(outDeliveryPrice) + .outsourcingAverage(outBuyPrice).build(); + } + + /** + * (导入数据)当年市场化电量累计执行情况 + * + * @return + */ + @Override + public MarketCountExecuteDTO getMarketCountExecute() { + List> executes = marketSurveyMapper.queryMarketCountExecute(); + if (StringUtils.isEmpty(executes)) { + return new MarketCountExecuteDTO(); + } + //外送电量 + Map outDelivery = executes.stream().filter(item -> "外送电量".equals(item.get("dataType"))).findFirst().orElse(new HashMap<>()); + //外购电量 + Map outBuy = executes.stream().filter(item -> "外购电量".equals(item.get("dataType"))).findFirst().orElse(new HashMap<>()); + //省内直接交易 + Map provinceDirect = executes.stream().filter(item -> "省内直接交易".equals(item.get("dataType"))).findFirst().orElse(new HashMap<>()); + //发电权交易 + Map generation = executes.stream().filter(item -> "发电权交易".equals(item.get("dataType"))).findFirst().orElse(new HashMap<>()); + //现货交易 + Map spots = executes.stream().filter(item -> "现货交易".equals(item.get("dataType"))).findFirst().orElse(new HashMap<>()); + + return MarketCountExecuteDTO.builder() + .powerToBeDeliveredToOutside(outDelivery) + .purchasedElectricity(outBuy) + .inProvinceTheOtc(provinceDirect) + .powerGenerationRightTrad(generation) + .spotTrad(spots).build(); + } + + /** + * (导入数据)发电装机情况与利用小时数 + * @return + */ + @Override + public InstallAndHoursDTO getInstallAndHours() { + Map installAndHours = marketSurveyMapper.queryInstallAndHours(); + if (StringUtils.isEmpty(installAndHours)) { + return new InstallAndHoursDTO(); + } + //装机容量 【总装机容量,火,水,风,光】 + List installedCapacityList = Arrays.asList(installAndHours.get("countInstallCapacity"), installAndHours.get("fireInstallCapacity"), + installAndHours.get("waterInstallCapacity"), installAndHours.get("windInstallCapacity"), + installAndHours.get("lightInstallCapacity")); + //装机容量同比【总同比,火,水,风,光】 + List installedCapacityComparedToSameList = Arrays.asList(installAndHours.get("countInstallYoy"), installAndHours.get("fireInstallYoy"), + installAndHours.get("waterInstallYoy"), installAndHours.get("windInstallYoy"), + installAndHours.get("lightInstallYoy")); + //利用小时 【总利用小时,火,水,风,光】 + List usingHourList = Arrays.asList(installAndHours.get("countUseHour"), installAndHours.get("fireUseHour"), + installAndHours.get("waterUseHour"), installAndHours.get("windUseHour"), + installAndHours.get("lightUseHour")); + + //利用小时同比 【总同比,火,水,风,光】 + List usingHourComparedToSameList = Arrays.asList(installAndHours.get("countHourYoy"), installAndHours.get("fireHourYoy"), + installAndHours.get("waterHourYoy"), installAndHours.get("windHourYoy"), + installAndHours.get("lightHourYoy")); + return InstallAndHoursDTO.builder() + .installedCapacity(installedCapacityList) + .installedCapacityComparedToSame(installedCapacityComparedToSameList) + .usingHour(usingHourList) + .usingHourComparedToSame(usingHourComparedToSameList).build(); + } + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/mltermcontract/MediumLongTermContractServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/mltermcontract/MediumLongTermContractServiceImpl.java new file mode 100644 index 0000000..1a36a78 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/mltermcontract/MediumLongTermContractServiceImpl.java @@ -0,0 +1,125 @@ +package com.alonginfo.project.gansu.serviceimpl.mltermcontract; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.common.EchartsCommonDTO; +import com.alonginfo.project.gansu.domain.SupplyTypeDTO; +import com.alonginfo.project.gansu.domain.TypePowerDTO; +import com.alonginfo.project.gansu.domain.TypePowerVo; +import com.alonginfo.project.gansu.domain.OutsideDeliverDTO; +import com.alonginfo.project.gansu.mapper.MediumLongTermContractMapper; +import com.alonginfo.project.gansu.service.mltermcontract.IMediumLongTermContractService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/19 11:50 + * @Description: 中长期合同签订情况 业务层实现 + */ +@Service +public class MediumLongTermContractServiceImpl implements IMediumLongTermContractService { + + @Autowired + private MediumLongTermContractMapper mediumLongTermContractMapper; + + /** + * (同步数据)中长期省内交易品种及电量 + * @return + */ + @Override + public TypePowerDTO getTypePower() { + List typePowerList = mediumLongTermContractMapper.getTypePower(); + String directElectric = null; + String proxyElectric = null; + String greenElectric = null; + String countElectric = null; + if (StringUtils.isNotEmpty(typePowerList)) { + directElectric = typePowerList.stream().filter(item -> "省内直购电".equals(item.getEnergyType())).findAny().map(TypePowerVo::getSumEnergy).orElse("0"); + proxyElectric = typePowerList.stream().filter(item -> "电网代理购电".equals(item.getEnergyType())).findAny().map(TypePowerVo::getSumEnergy).orElse("0"); + greenElectric = typePowerList.stream().filter(item -> "省内绿电".equals(item.getEnergyType())).findAny().map(TypePowerVo::getSumEnergy).orElse("0"); + //总成交量: 省内直购量+电网代理购电+省内绿电 + countElectric = new BigDecimal(directElectric).add(new BigDecimal(proxyElectric)).add(new BigDecimal(greenElectric)).toPlainString(); + } + TypePowerDTO typePowerDTO = new TypePowerDTO(); + typePowerDTO.setDirectElectric(directElectric); + typePowerDTO.setProxyElectric(proxyElectric); + typePowerDTO.setGreenElectric(greenElectric); + typePowerDTO.setCountElectric(countElectric); + return typePowerDTO; + } + + /** + * (同步数据)电源类型及成交电量 + * @return + */ + @Override + public SupplyTypeDTO getSupplyType() { + Map supplyType = mediumLongTermContractMapper.getSupplyType(); + + SupplyTypeDTO supplyTypeDTO = new SupplyTypeDTO(); + if (StringUtils.isNotEmpty(supplyType)) { + supplyTypeDTO.setCountEnergy(String.valueOf(supplyType.get("countEnergy"))); + supplyTypeDTO.setFireEnergy(String.valueOf(supplyType.get("fireEnergy"))); + supplyTypeDTO.setFireRatio(new BigDecimal(String.valueOf(supplyType.get("fireRatio"))).multiply(new BigDecimal("100")).stripTrailingZeros().toPlainString() + "%"); + supplyTypeDTO.setWaterEnergy(String.valueOf(supplyType.get("waterEnergy"))); + supplyTypeDTO.setWaterRatio(new BigDecimal(String.valueOf(supplyType.get("waterRatio"))).multiply(new BigDecimal("100")).stripTrailingZeros().toPlainString() + "%"); + supplyTypeDTO.setNewEnergy(String.valueOf(supplyType.get("newEnergy"))); + supplyTypeDTO.setNewRatio(new BigDecimal(String.valueOf(supplyType.get("newRatio"))).multiply(new BigDecimal("100")).stripTrailingZeros().toPlainString() + "%"); + } + return supplyTypeDTO; + } + + /** + * 外送交易 + * @return + */ + @Override + public OutsideDeliverDTO getOutsideDeliver() { + List> outsideDeliverList = mediumLongTermContractMapper.queryOutsideDeliver(); + if (StringUtils.isEmpty(outsideDeliverList)) { + return new OutsideDeliverDTO(); + } + List xData = new LinkedList<>(); + List green = new LinkedList<>(); + List outside = new LinkedList<>(); + for (Map outsideDeliver : outsideDeliverList) { + xData.add(outsideDeliver.get("outsideProvince")); + green.add(outsideDeliver.get("greenElectric")); + outside.add(outsideDeliver.get("outsideElectric")); + } + + OutsideDeliverDTO result = new OutsideDeliverDTO(); + result.setXData(xData); + result.setGreenElectric(green); + result.setOutside(outside); + return result; + } + + /** + * 外购交易 + * @return + */ + @Override + public EchartsCommonDTO getOutsideBuy() { + List> outsideBuys = mediumLongTermContractMapper.queryOutsideBuy(); + if (StringUtils.isEmpty(outsideBuys)) { + return new EchartsCommonDTO<>(); + } + List xData = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map outsideBuy : outsideBuys) { + xData.add(outsideBuy.get("buyProvince")); + seriesData.add(outsideBuy.get("tradeElectric")); + } + + EchartsCommonDTO result = new EchartsCommonDTO<>(); + result.setXAxisData(xData); + result.setSeriesData(seriesData); + return result; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl.java new file mode 100644 index 0000000..14a647a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl.java @@ -0,0 +1,262 @@ +package com.alonginfo.project.gansu.serviceimpl.newenergy; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.domain.JoinEnergyTrendDTO; +import com.alonginfo.project.gansu.mapper.NewEnergySurveyMapper; +import com.alonginfo.project.gansu.service.newEnergy.INewEnergySurveyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author: HaoXs + * @Date: 2023/5/17 14:37 + * @Description: 新能源概览 业务层实现 + */ +@Service +public class NewEnergySurveyServiceImpl implements INewEnergySurveyService { + + @Autowired + private NewEnergySurveyMapper newEnergySurveyMapper; + + /** + * (同步数据)新能源参与交易电量趋势 + * @return + */ + @Override + public JoinEnergyTrendDTO getJoinEnergyTrend() { + List> joinEnergyTrend = newEnergySurveyMapper.getJoinEnergyTrend(); + + List xAxis = new LinkedList<>(); + List seriesData = new LinkedList<>(); + joinEnergyTrend.forEach(map -> { + xAxis.add(map.get("tradeYear")); + seriesData.add(map.get("vendeeEnergy")); + }); + + JoinEnergyTrendDTO joinEnergyTrendDTO = new JoinEnergyTrendDTO(); + joinEnergyTrendDTO.setXAxisData(xAxis); + joinEnergyTrendDTO.setSeriesData(seriesData); + return joinEnergyTrendDTO; + } + + /** + * (导入数据)新能源装机结构 + * + * @return + */ + @Override + public InstallStructureDTO getInstallStructure() { + List> installStructureInfo = newEnergySurveyMapper.getInstallStructureInfo(); + if (StringUtils.isEmpty(installStructureInfo)) { + return new InstallStructureDTO(); + } + //新能源装机总容量 + Map newEnergyInstallCount = installStructureInfo.stream().filter(item -> "新能源总装机容量".contains(item.get("structureName"))).findFirst().orElse(new HashMap<>()); + //表格数据 + List> tableList = installStructureInfo.stream().filter(item -> !"新能源总装机容量".contains(item.get("structureName"))).collect(Collectors.toList()); + + //处理新能源装机总容量数据 + InstallStructureCount installStructureCount + = new InstallStructureCount(newEnergyInstallCount.get("structureValue"), newEnergyInstallCount.get("yoyValue"), newEnergyInstallCount.get("flag")); + //处理表格数据 + List installStructureTableList = new ArrayList<>(); + for (Map map : tableList) { + InstallStructureTable installStructureTable = new InstallStructureTable(); + installStructureTable.setName(map.get("structureName")); + installStructureTable.setPrice(map.get("structureValue")); + installStructureTable.setUnits(map.get("yoyValue")); + installStructureTable.setFlag(map.get("flag")); + installStructureTableList.add(installStructureTable); + } + + //返回结果 + InstallStructureDTO installStructureDTO = new InstallStructureDTO(); + installStructureDTO.setCount(installStructureCount); + installStructureDTO.setTable(installStructureTableList); + return installStructureDTO; + } + + /** + * (导入数据)新能源装机情况 + * + * @return + */ + @Override + public InstallSituationDTO getInstallSituation() { + List> installSituationList = newEnergySurveyMapper.queryInstallSituation(); + if (StringUtils.isEmpty(installSituationList)) { + return new InstallSituationDTO(); + } + List xData = new LinkedList<>(); + List windElectricList = new LinkedList<>(); + List lightElectricList = new LinkedList<>(); + for (Map map : installSituationList) { + xData.add(map.get("dataYear")); + windElectricList.add(map.get("windElectric")); + lightElectricList.add(map.get("lightElectric")); + } + + InstallSituationDTO installSituationDTO = new InstallSituationDTO(); + installSituationDTO.setXData(xData); + installSituationDTO.setWindElectric(windElectricList); + installSituationDTO.setLightElectric(lightElectricList); + return installSituationDTO; + } + + /** + * (导入数据)新能源发电趋势 + * + * @return + */ + @Override + public ElectricTrendDTO getElectricTrend() { + List> trends = newEnergySurveyMapper.queryElectricTrend(); + if (StringUtils.isEmpty(trends)) { + return new ElectricTrendDTO(); + } + List xData = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map trend : trends) { + xData.add(trend.get("dataYear")); + seriesData.add(trend.get("electricValue")); + } + + ElectricTrendDTO electricTrendDTO = new ElectricTrendDTO(); + electricTrendDTO.setXAxisData(xData); + electricTrendDTO.setSeriesData(seriesData); + return electricTrendDTO; + } + + /** + * (导入数据)新能源发电与消纳情况 + * + * @return + */ + @Override + public ElectricAbsorptionDTO getElectricAbsorption() { + List> absorptionList = newEnergySurveyMapper.queryElectricAbsorption(); + if (StringUtils.isEmpty(absorptionList)) { + return new ElectricAbsorptionDTO(); + } + //发电量 各类型名称和值 + Map fdMap = new HashMap<>(); + //消纳量 各类型名称和值 + Map xnMap = new HashMap<>(); + List> table = new ArrayList<>(); + for (Map absorptionMap : absorptionList) { + String energyName = absorptionMap.get("energyName"); + String electric = absorptionMap.get("electric"); + String absorption = absorptionMap.get("absorption"); + String absorptionRatio = absorptionMap.get("absorptionRatio"); + + Map tableItem = new HashMap<>(); + tableItem.put("name", energyName); + tableItem.put("fd", electric); + tableItem.put("xn", absorption); + tableItem.put("units", absorptionRatio); + table.add(tableItem); + + fdMap.put(energyName, electric); + xnMap.put(energyName, absorption); + } + + //处理发电量、消纳量雷达图数据 + List> fdList = new ArrayList>() {{ + add( + Arrays.asList( + Optional.ofNullable(fdMap.get("风电")).orElse("0"), + Optional.ofNullable(fdMap.get("其他")).orElse("0"), + Optional.ofNullable(fdMap.get("生物质")).orElse("0"), + Optional.ofNullable(fdMap.get("光伏")).orElse("0")) + ); + }}; + List> xnList = new ArrayList>() {{ + add( + Arrays.asList( + Optional.ofNullable(xnMap.get("风电")).orElse("0"), + Optional.ofNullable(xnMap.get("其他")).orElse("0"), + Optional.ofNullable(xnMap.get("生物质")).orElse("0"), + Optional.ofNullable(xnMap.get("光伏")).orElse("0")) + ); + }}; + + ElectricAbsorptionDTO result = new ElectricAbsorptionDTO(); + result.setEchartXN(xnList); + result.setEchartFD(fdList); + result.setTable(table); + return result; + } + + /** + * (导入数据)新能源参与交易情况 + * @return + */ + @Override + public JoinTradeDTO getJoinTrade() { + List> joinTrades = newEnergySurveyMapper.queryJoinTrade(); + if (StringUtils.isEmpty(joinTrades)) { + return new JoinTradeDTO(); + } + //交易电量总量 + Map tradeCount = joinTrades.stream() + .filter(item -> "交易电量总量".contains(item.get("structureName"))).findFirst() + .map(map -> { + Map resultMap = new HashMap<>(); + resultMap.put("jydlzl", map.get("tradeValue")); + resultMap.put("tb", map.get("yoyValue")); + resultMap.put("flag", map.get("flag")); + return resultMap; + }).orElse(new HashMap<>()); + + //过滤除交易电量总量以外其他数据 + List> joinTradesFilter = joinTrades.stream().filter(item -> !"交易电量总量".contains(item.get("structureName"))).collect(Collectors.toList()); + //环形图及表格数据 + List> echartData = new ArrayList<>(); + List> table = new ArrayList<>(); + for (Map joinTrade : joinTradesFilter) { + String structureName = joinTrade.get("structureName"); + String tradeValue = joinTrade.get("tradeValue"); + String flag = joinTrade.get("flag"); + String yoyValue = joinTrade.get("yoyValue"); + //环形图 + Map echartDataItem = new HashMap<>(); + echartDataItem.put("name", structureName); + echartDataItem.put("value", tradeValue); + //表格 + Map tableItem = new HashMap<>(); + tableItem.put("name", structureName); + tableItem.put("price", tradeValue); + tableItem.put("units", yoyValue); + tableItem.put("flag", flag); + echartData.add(echartDataItem); + table.add(tableItem); + } + + JoinTradeDTO result = new JoinTradeDTO(); + result.setEchartData(echartData); + result.setTitle(tradeCount); + result.setTable(table); + return result; + } + + /** + * (导入数据)地图上方概览 + * @return + */ + @Override + public MapTopOverviewDTO getMapTopOverview() { + Map overview = newEnergySurveyMapper.queryMapTopOverview(); + if (StringUtils.isEmpty(overview)) { + return new MapTopOverviewDTO(); + } + MapTopOverviewDTO result = new MapTopOverviewDTO(); + result.setXnyzfdy(overview.get("electricCount")); + result.setXnyxn(overview.get("absorption")); + result.setXnl(overview.get("absorptionRatio")); + return result; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl.java new file mode 100644 index 0000000..6fde121 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl.java @@ -0,0 +1,245 @@ +package com.alonginfo.project.gansu.serviceimpl.provinceInner; + +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.mapper.ProvinceInnerMapper; +import com.alonginfo.project.gansu.service.provinceinner.IProvinceInnerService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; + +import java.math.BigDecimal; +import java.time.Year; +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/5/18 16:14 + * @Description: 省内交易情况 业务层 + */ +@Service +@Slf4j +public class ProvinceInnerServiceImpl implements IProvinceInnerService { + + @Autowired + private ProvinceInnerMapper provinceInnerMapper; + + /** + * 当年交易组织情况 + * + * @return + */ + @Override + public PiDealOrganizeVo getDealOrganize() { + //查询当年的数据 + PiDealOrganizeVo dealOrganize = provinceInnerMapper.getDealOrganize(); + return ObjectUtils.isEmpty(dealOrganize) ? new PiDealOrganizeVo() : dealOrganize; + } + + /** + * 当年市场主体参与情况 + * + * @return + */ + @Override + public PiSubjectJoinVo getSubjectJoinInfo() { + PiSubjectJoinVo subjectJoinInfo = provinceInnerMapper.getSubjectJoinInfo(); + return ObjectUtils.isEmpty(subjectJoinInfo) ? new PiSubjectJoinVo() : subjectJoinInfo; + } + + /** + * 各类清洁能源成交电量 + * + * @return + */ + @Override + public List getCleanEnergy() { + List cleanEnergy = provinceInnerMapper.getCleanEnergy(); + return CollectionUtils.isEmpty(cleanEnergy) ? new ArrayList<>() : cleanEnergy; + } + + /** + * 交易概览 + * + * @return + */ + @Override + public PiDealSurveyDTO getDealSurvey() { + //市场准入家数及同比 查询job_pi_subject_join 计算同比 + //当年市场准入家数 + String accessCurrentYear = provinceInnerMapper.getMarketAccessByYear(String.valueOf(Year.now().getValue())); + //去年市场准入家数 + String accessLastYear = provinceInnerMapper.getMarketAccessByYear(String.valueOf(Year.now().getValue() - 1)); + //市场准入同比 + String accessRatio = ""; + if (StringUtils.isEmpty(accessLastYear)) { + accessRatio = "100%"; + log.error("去年市场准入家数为0或NULL!"); + } else { + accessRatio = new BigDecimal(accessCurrentYear).divide(new BigDecimal(accessLastYear), 2, BigDecimal.ROUND_HALF_DOWN) + "%"; + } + //交易组织次数及同比、成交电量及同比 + List> surveyInfoLists = provinceInnerMapper.getSurveyInfo(); + //当年 + Map currentMap = surveyInfoLists.stream().filter(f -> String.valueOf(Year.now().getValue()).equals(f.get("tradeYear"))).findFirst().orElse(new HashMap<>()); + //去年 + Map lastMap = surveyInfoLists.stream().filter(f -> String.valueOf(Year.now().minusYears(1).getValue()).equals(f.get("tradeYear"))).findFirst().orElse(new HashMap<>()); + + //交易组织次数、同比 + BigDecimal currentTradeNum = new BigDecimal(Optional.ofNullable(currentMap.get("tradeNum")).orElse("0")); + BigDecimal lastTradeNum = new BigDecimal(Optional.ofNullable(lastMap.get("tradeNum")).orElse("0")); + BigDecimal tradeYoy = lastTradeNum.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : currentTradeNum.divide(lastTradeNum, 2, BigDecimal.ROUND_HALF_UP); + //成交电量、同比 + BigDecimal currentVendeeEnergyNum = new BigDecimal(Optional.ofNullable(currentMap.get("vendeeEnergyNum")).orElse("0")); + BigDecimal lastVendeeEnergyNum = new BigDecimal(Optional.ofNullable(lastMap.get("vendeeEnergyNum")).orElse("0")); + BigDecimal vendeeEnergyYoy = lastVendeeEnergyNum.compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : currentVendeeEnergyNum.divide(lastVendeeEnergyNum, 2, BigDecimal.ROUND_HALF_UP); + + PiDealSurveyDTO piDealSurveyDTO = new PiDealSurveyDTO(); + piDealSurveyDTO.setAccessNum(accessCurrentYear); + piDealSurveyDTO.setAccessYoy(accessRatio); + piDealSurveyDTO.setTradeNum(currentTradeNum); + piDealSurveyDTO.setTradeYoy(tradeYoy); + piDealSurveyDTO.setVendeeEnergyNum(currentVendeeEnergyNum); + piDealSurveyDTO.setVendeeEnergyYoy(vendeeEnergyYoy); + return piDealSurveyDTO; + } + + /** + * 当年交易量价走势 + * + * @return + */ + @Override + public PiPowerPriceTrendDTO getPowerPriceTrend() { + List powerPriceTrendList = provinceInnerMapper.getPowerPriceTrend(); + + List xAxis = new LinkedList<>(); + List energy = new LinkedList<>(); + List price = new LinkedList<>(); + powerPriceTrendList.forEach(piPowerPriceTrendVo -> { + xAxis.add(piPowerPriceTrendVo.getTradeMonth()); + energy.add(piPowerPriceTrendVo.getVendeeEnergy()); + price.add(piPowerPriceTrendVo.getVendeePrice()); + }); + + List> seriesData = new ArrayList>() {{ + add(new HashMap() {{ + put("name", "电量"); + put("data", energy); + }}); + add(new HashMap() {{ + put("name", "电价"); + put("data", price); + }}); + }}; + + PiPowerPriceTrendDTO piPowerPriceTrendDTO = new PiPowerPriceTrendDTO(); + piPowerPriceTrendDTO.setXAxisData(xAxis); + piPowerPriceTrendDTO.setSeriesData(seriesData); + return piPowerPriceTrendDTO; + } + + /** + * (导入数据)地图弹框数据 + * + * @return + */ + @Override + public MapTextDTO getMapText() { + List mapTexts = provinceInnerMapper.queryMapText(); + if (com.alonginfo.common.utils.StringUtils.isEmpty(mapTexts)) { + return new MapTextDTO(); + } + MapTextDTO mapTextDTO = new MapTextDTO(); + for (MapTextVO mapText : mapTexts) { + String cityName = mapText.getCityName(); + List data = Arrays.asList(mapText.getTradeElectric()); + if ("酒泉市".contains(cityName)) { + mapTextDTO.setJqs(data); + } else if ("嘉峪关市".contains(cityName)) { + mapTextDTO.setJygs(data); + } else if ("张掖市".contains(cityName)) { + mapTextDTO.setZys(data); + } else if ("金昌市".contains(cityName)) { + mapTextDTO.setJcs(data); + } else if ("武威市".contains(cityName)) { + mapTextDTO.setWws(data); + } else if ("兰州市".contains(cityName)) { + mapTextDTO.setLzs(data); + } else if ("临夏回族自治州".contains(cityName)) { + mapTextDTO.setLxhzzzq(data); + } else if ("白银市".contains(cityName)) { + mapTextDTO.setBys(data); + } else if ("甘南藏族自治州".contains(cityName)) { + mapTextDTO.setGnzzzzq(data); + } else if ("定西市".contains(cityName)) { + mapTextDTO.setDxs(data); + } else if ("陇南市".contains(cityName)) { + mapTextDTO.setLns(data); + } else if ("天水市".contains(cityName)) { + mapTextDTO.setTss(data); + } else if ("平凉市".contains(cityName)) { + mapTextDTO.setPls(data); + } else if ("庆阳市".contains(cityName)) { + mapTextDTO.setQys(data); + } else { + + } + } + return mapTextDTO; + } + + /** + * (导入数据)历年降低购电成本与交易均价 + * + * @return + */ + @Override + public CostAndAvgDTO getCostAndAvgByYear() { + List> maps = provinceInnerMapper.queryCostAndAvgByYear(); + if (com.alonginfo.common.utils.StringUtils.isEmpty(maps)) { + return new CostAndAvgDTO(); + } + + List xData = new LinkedList<>(); + List costData = new LinkedList<>(); + List avgPriceData = new LinkedList<>(); + for (Map map : maps) { + xData.add(map.get("dataYear")); + costData.add(map.get("costDown")); + avgPriceData.add(map.get("avgPrice")); + } + CostAndAvgDTO costAndAvgDTO = new CostAndAvgDTO(); + costAndAvgDTO.setXData(xData); + costAndAvgDTO.setCostDown(costData); + costAndAvgDTO.setAvgPrice(avgPriceData); + return costAndAvgDTO; + } + + /** + * (导入数据)历年交易规模趋势 + * + * @return + */ + @Override + public TradeSizeDTO getTradeSizeByYear() { + List> tradeSizeList = provinceInnerMapper.queryTradeSizeByYear(); + if (com.alonginfo.common.utils.StringUtils.isEmpty(tradeSizeList)) { + return new TradeSizeDTO(); + } + List xData = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map map : tradeSizeList) { + xData.add(map.get("dataYear")); + seriesData.add(map.get("tradeValue")); + } + + TradeSizeDTO tradeSizeDTO = new TradeSizeDTO(); + tradeSizeDTO.setXAxisData(xData); + tradeSizeDTO.setSeriesData(seriesData); + return tradeSizeDTO; + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provincemiddle/ProvinceMiddleServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provincemiddle/ProvinceMiddleServiceImpl.java new file mode 100644 index 0000000..102c388 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provincemiddle/ProvinceMiddleServiceImpl.java @@ -0,0 +1,141 @@ +package com.alonginfo.project.gansu.serviceimpl.provincemiddle; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.mapper.ProvinceMiddleMapper; +import com.alonginfo.project.gansu.service.provincemiddle.IProvinceMiddleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/6/14 16:27 + * @Description: 省间交易情况(导入数据) + */ +@Service +public class ProvinceMiddleServiceImpl implements IProvinceMiddleService { + + @Autowired + private ProvinceMiddleMapper provinceMiddleMapper; + + /** + * 交易组织情况 + * @return + */ + @Override + public List getOrganize() { + List organizeList = provinceMiddleMapper.queryOrganizeData(); + if (StringUtils.isEmpty(organizeList)) { + return new ArrayList<>(); + } + return organizeList; + } + + /** + * 各类型电量交易情况 + * @return + */ + @Override + public TradeElectricTypeDTO getTradeElectricType() { + Map tradeElectricTypeList = provinceMiddleMapper.queryTradeElectricType(); + if (StringUtils.isEmpty(tradeElectricTypeList)) { + return new TradeElectricTypeDTO(); + } + List xData = new LinkedList<>(); + List yData = new LinkedList<>(); + xData = Arrays.asList("火电","水电","风电", "光伏"); + yData = Arrays.asList(tradeElectricTypeList.get("fire"), + tradeElectricTypeList.get("water"), + tradeElectricTypeList.get("wind"), + tradeElectricTypeList.get("light")); + + TradeElectricTypeDTO tradeElectricTypeDTO = new TradeElectricTypeDTO(); + tradeElectricTypeDTO.setXData(xData); + tradeElectricTypeDTO.setYData(yData); + return tradeElectricTypeDTO; + } + + /** + * 本年省间交易电量情况 + * @return + */ + @Override + public TradeElectricCurrentYearDTO getTradeElectricCurrentYear() { + List> currentYearList = provinceMiddleMapper.queryTradeElectricCurrentYear(); + if (StringUtils.isEmpty(currentYearList)) { + return new TradeElectricCurrentYearDTO(); + } + List xData = new LinkedList<>(); + List electric = new LinkedList<>(); + List outerPrice = new LinkedList<>(); + for (Map map : currentYearList) { + xData.add(map.get("dataMonth")); + electric.add(map.get("electric")); + outerPrice.add(map.get("outerPrice")); + } + + TradeElectricCurrentYearDTO tradeElectricCurrentYear = new TradeElectricCurrentYearDTO(); + tradeElectricCurrentYear.setXData(xData); + tradeElectricCurrentYear.setElectric(electric); + tradeElectricCurrentYear.setOuterPrice(outerPrice); + return tradeElectricCurrentYear; + } + + /** + * 历年省间交易电量情况 + * @return + */ + @Override + public TradeELectricCalendarYearDTO getTradeElectricCalendarYear() { + List> calendarYearList = provinceMiddleMapper.queryTradeElectricCalendarYear(); + if (StringUtils.isEmpty(calendarYearList)) { + return new TradeELectricCalendarYearDTO(); + } + List xData = new LinkedList<>(); + List electric = new LinkedList<>(); + List outerPrice = new LinkedList<>(); + for (Map map : calendarYearList) { + xData.add(map.get("dataYear")); + electric.add(map.get("electric")); + outerPrice.add(map.get("outerPrice")); + } + + TradeELectricCalendarYearDTO tradeELectricCalendarYearDTO = new TradeELectricCalendarYearDTO(); + tradeELectricCalendarYearDTO.setXData(xData); + tradeELectricCalendarYearDTO.setElectric(electric); + tradeELectricCalendarYearDTO.setOuterPrice(outerPrice); + return tradeELectricCalendarYearDTO; + } + + /** + * 概览数据 + * @return + */ + @Override + public OverviewDTO getOverview() { + Map overview = provinceMiddleMapper.queryOverview(); + if (StringUtils.isEmpty(overview)) { + return new OverviewDTO(); + } + OverviewDTO overviewDTO = new OverviewDTO(); + overviewDTO.setOrganizationElectric(overview.get("organizationElectric")); + overviewDTO.setOuterElectric(overview.get("outerElectric")); + overviewDTO.setQSDcElectric(overview.get("QSDcElectric")); + overviewDTO.setPowerElectric(overview.get("powerElectric")); + overviewDTO.setMarkerElectric(overview.get("markerElectric")); + overviewDTO.setOuterGreenElectric(overview.get("outerGreenElectric")); + return overviewDTO; + } + + /** + * 外送省份及外送电量 + * @return + */ + @Override + public List getOutProvince() { + + return provinceMiddleMapper.getOutProvince(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl.java new file mode 100644 index 0000000..f941007 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl.java @@ -0,0 +1,225 @@ +package com.alonginfo.project.gansu.serviceimpl.resources; + +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.mapper.ResourcesMapper; +import com.alonginfo.project.gansu.service.resources.IResourcesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; +import org.springframework.util.StringUtils; + +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/6/12 10:28 + * @Description: 资源概览 业务层实现 + */ +@Service +public class ResourcesServiceImpl implements IResourcesService { + + @Autowired + private ResourcesMapper resourcesMapper; + + /** + * 地图分布数据 + * @return + */ + @Override + public MapInfoDTO getMapInfo() { + List mapInfoData = resourcesMapper.getMapInfoData(); + MapInfoVO gf = mapInfoData.stream().filter(map -> "光伏".equals(map.getResourcesType())).findFirst().orElse(null); + MapInfoVO sd = mapInfoData.stream().filter(map -> "水电".equals(map.getResourcesType())).findFirst().orElse(null); + MapInfoVO fd = mapInfoData.stream().filter(map -> "风电".equals(map.getResourcesType())).findFirst().orElse(null); + MapInfoVO cn = mapInfoData.stream().filter(map -> "储能".equals(map.getResourcesType())).findFirst().orElse(null); + MapInfoVO hd = mapInfoData.stream().filter(map -> "火电".equals(map.getResourcesType())).findFirst().orElse(null); + + Map gfResult = dealMapInfo(gf, "1"); + Map sdResult = dealMapInfo(sd, "2"); + Map fdResult = dealMapInfo(fd, "3"); + Map cnResult = dealMapInfo(cn, "4"); + Map hdResult = dealMapInfo(hd, "5"); + + MapInfoDTO mapInfoDTO = new MapInfoDTO(); + mapInfoDTO.setGf(gfResult); + mapInfoDTO.setSd(sdResult); + mapInfoDTO.setFd(fdResult); + mapInfoDTO.setCn(cnResult); + mapInfoDTO.setHd(hdResult); + return mapInfoDTO; + } + + /** + * 处理地图分布数据 + * @param mapInfoVO 各资源数据 + * @param flag 1-光伏 2-水电 3-风电 4-储能 5-火电 + * @return + */ + private Map dealMapInfo(MapInfoVO mapInfoVO, String flag) { + if (ObjectUtils.isEmpty(mapInfoVO)) { + return new HashMap<>(); + } + Map result = new HashMap<>(); + //地图下方图例数据 + String[] modelText; + //地图上图标数据 + Map mapText; + switch (flag) { + //光伏 + case "1": + modelText = new String[]{mapInfoVO.getPowerStation(), mapInfoVO.getInstallCapacity()}; + String[] gfOne = new String[]{mapInfoVO.getStationOneNum(), mapInfoVO.getStationOnePower()}; + String[] gfTwo = new String[]{mapInfoVO.getStationTwoNum(), mapInfoVO.getStationTwoPower()}; + String[] gfThree = new String[]{mapInfoVO.getStationThreeNum(), mapInfoVO.getStationThreePower()}; + String[] gfFour = new String[]{mapInfoVO.getStationFourNum(), mapInfoVO.getStationFourPower()}; + mapText = new HashMap(){{ + put("one", gfOne); + put("two", gfTwo); + put("three", gfThree); + put("four", gfFour); + }}; + result.put("modelText", modelText); + result.put("mapText", mapText); + return result; + //水电 + case "2": + modelText = new String[]{mapInfoVO.getPowerStation(), mapInfoVO.getInstallCapacity()}; + result.put("modelText", modelText); + return result; + //风电 + case "3": + modelText = new String[]{mapInfoVO.getPowerStation(), mapInfoVO.getInstallCapacity()}; + String[] fdOne = new String[]{mapInfoVO.getStationOneNum()}; + String[] fdTwo = new String[]{mapInfoVO.getStationTwoNum()}; + String[] fdThree = new String[]{mapInfoVO.getStationThreeNum()}; + String[] fdFour = new String[]{mapInfoVO.getStationFourNum()}; + mapText = new HashMap(){{ + put("one", fdOne); + put("two", fdTwo); + put("three", fdThree); + put("four", fdFour); + }}; + result.put("modelText", modelText); + result.put("mapText", mapText); + return result; + //储能 + case "4": + modelText = new String[]{mapInfoVO.getPowerStation(), mapInfoVO.getInstallCapacity()}; + String[] cnOne = new String[]{mapInfoVO.getStationOnePower()}; + String[] cnTwo = new String[]{mapInfoVO.getStationTwoPower()}; + String[] cnThree = new String[]{mapInfoVO.getStationThreePower()}; + String[] cnFour = new String[]{mapInfoVO.getStationFourPower()}; + mapText = new HashMap(){{ + put("one", cnOne); + put("two", cnTwo); + put("three", cnThree); + put("four", cnFour); + }}; + result.put("modelText", modelText); + result.put("mapText", mapText); + return result; + //火电 + case "5": + modelText = new String[]{mapInfoVO.getPowerStation(), mapInfoVO.getInstallCapacity()}; + String[] hdOne = new String[]{mapInfoVO.getStationOneNum()}; + String[] hdTwo = new String[]{mapInfoVO.getStationTwoNum()}; + String[] hdThree = new String[]{mapInfoVO.getStationThreeNum()}; + String[] hdFour = new String[]{mapInfoVO.getStationFourNum()}; + mapText = new HashMap(){{ + put("one", hdOne); + put("two", hdTwo); + put("three", hdThree); + put("four", hdFour); + }}; + result.put("modelText", modelText); + result.put("mapText", mapText); + return result; + default: + return result; + } + } + + /** + * 地图右上角数据 + * @return + */ + @Override + public MapTopCanvasDTO getMapTopCanvas() { + List> mapTopCanvas = resourcesMapper.getMapTopCanvas(); + if (StringUtils.isEmpty(mapTopCanvas)) { + return new MapTopCanvasDTO(); + } + List yData = new LinkedList<>(); + List seriesData = new LinkedList<>(); + for (Map canvasData : mapTopCanvas) { + yData.add(canvasData.get("cityName")); + seriesData.add(canvasData.get("cityRatio")); + } + + MapTopCanvasDTO mapTopCanvasDTO = new MapTopCanvasDTO(); + mapTopCanvasDTO.setYData(yData); + mapTopCanvasDTO.setSeriesData(seriesData); + return mapTopCanvasDTO; + } + + /** + * 各类资源装机容量发电量对比 + * @return + */ + @Override + public InstallCapicatyPowerDTO getInstallAndPower() { + List> installAndPowerList = resourcesMapper.getInstallAndPower(); + if (StringUtils.isEmpty(installAndPowerList)) { + return new InstallCapicatyPowerDTO(); + } + List xData = new LinkedList<>(); + List installCapacity = new LinkedList<>(); + List power = new LinkedList<>(); + for (Map map : installAndPowerList) { + xData.add(map.get("resourcesName")); + installCapacity.add(map.get("installCapacity")); + power.add(map.get("power")); + } + + InstallCapicatyPowerDTO installCapicatyPowerDTO = new InstallCapicatyPowerDTO(); + installCapicatyPowerDTO.setXData(xData); + installCapicatyPowerDTO.setZjry(installCapacity); + installCapicatyPowerDTO.setFdy(power); + return installCapicatyPowerDTO; + } + + /** + * 资源开发情况 + * @return + */ + @Override + public ResourcesDevelopDTO getResourcesDevelop() { + List> resourcesDevelop = resourcesMapper.getResourcesDevelop(); + if (StringUtils.isEmpty(resourcesDevelop)) { + return new ResourcesDevelopDTO(); + } + List xData = new LinkedList<>(); + List developList = new LinkedList<>(); + List noDevelopList = new LinkedList<>(); + for (Map map : resourcesDevelop) { + xData.add(map.get("resourcesName")); + developList.add(map.get("develop")); + noDevelopList.add(map.get("noDevelop")); + } + + ResourcesDevelopDTO resourcesDevelopDTO = new ResourcesDevelopDTO(); + resourcesDevelopDTO.setXData(xData); + resourcesDevelopDTO.setYkf(developList); + resourcesDevelopDTO.setWkf(noDevelopList); + return resourcesDevelopDTO; + } + + @Override + public List getPrefectureInstall() { + List prefectureInstallDTOList = resourcesMapper.getPrefectureInstall(); + return prefectureInstallDTOList; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl.java new file mode 100644 index 0000000..7322067 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl.java @@ -0,0 +1,137 @@ +package com.alonginfo.project.gansu.serviceimpl.tradeSettle; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.mapper.TradeSettleDao; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.service.tradeSettle.TradeSettleService; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * TradeSettleServiceImpl + * + * @package_name: com.alonginfo.project.gansu.serviceimpl.tradeSettle + * @author: 樊群靖 + * @date: 2023/8/18 + * @description: + **/ +@Service +@Slf4j +public class TradeSettleServiceImpl implements TradeSettleService { + + @Autowired + private TradeSettleDao tradeSettleDao; + + @Autowired + private SgccAddressService sgccAddressService; + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String PUBLIC_KEY; + + @Override + public TradeSettleDTO getProvinceTradeSettle() { + List> currentYearList = tradeSettleDao.getProvinceTradeSettle(); + if (StringUtils.isEmpty(currentYearList)) { + return new TradeSettleDTO(); + } + List xData = new LinkedList<>(); + List zcqTradeElectric = new LinkedList<>(); + List dqTradeElectric = new LinkedList<>(); + for (Map map : currentYearList) { + xData.add(map.get("dataMonth")); + zcqTradeElectric.add(map.get("zcqElectric")); + dqTradeElectric.add(map.get("dqElectric")); + } + + TradeSettleDTO tradeSettleDTO = new TradeSettleDTO(); + tradeSettleDTO.setXData(xData); + tradeSettleDTO.setZcqTradeElectric(zcqTradeElectric); + tradeSettleDTO.setDqTradeElectric(dqTradeElectric); + return tradeSettleDTO; + } + + /** + * 中间顶部-年度结算电量、年度结算笔数、年度结算均价 + * @return + */ + @Override + public Map getEmossInfo() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String emossInfoResStr = HttpUtils.sendPost(sgccAddress + "/emossData/emossInfo", "", DataPushUtils.createToken(PUBLIC_KEY)); + log.info("年度结算电量、年度结算笔数、年度结算均价, 接口返回结果: {}", emossInfoResStr); + if (StringUtils.isEmpty(emossInfoResStr)) { + log.error("年度结算电量、年度结算笔数、年度结算均价, 接口返回结果为空!"); + return new HashMap<>(); + } + Map map = JSON.parseObject(emossInfoResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("年度结算电量、年度结算笔数、年度结算均价, data值为null"); + return new HashMap<>(); + } + Map result = JSON.parseObject(JSON.toJSONString(data), new TypeReference>() { + }); + return result; + } + + /** + * (导入数据)中间地图数据 + * @return + */ + @Override + public MapTextDTO getMapInfo() { + List tradeSettleMapInfoVoList = tradeSettleDao.queryMapInfo(); + if (StringUtils.isEmpty(tradeSettleMapInfoVoList)) { + return new MapTextDTO(); + } + MapTextDTO mapTextDTO = new MapTextDTO(); + for (TradeSettleMapInfoVo tradeSettleMap : tradeSettleMapInfoVoList) { + String cityName = tradeSettleMap.getCityName(); + List data = Arrays.asList(tradeSettleMap.getPowerSupply(), tradeSettleMap.getPowerSupplyYoy()); + if ("酒泉市".contains(cityName)) { + mapTextDTO.setJqs(data); + } else if ("嘉峪关市".contains(cityName)) { + mapTextDTO.setJygs(data); + } else if ("张掖市".contains(cityName)) { + mapTextDTO.setZys(data); + } else if ("金昌市".contains(cityName)) { + mapTextDTO.setJcs(data); + } else if ("武威市".contains(cityName)) { + mapTextDTO.setWws(data); + } else if ("兰州市".contains(cityName)) { + mapTextDTO.setLzs(data); + } else if ("临夏回族自治州".contains(cityName)) { + mapTextDTO.setLxhzzzq(data); + } else if ("白银市".contains(cityName)) { + mapTextDTO.setBys(data); + } else if ("甘南藏族自治州".contains(cityName)) { + mapTextDTO.setGnzzzzq(data); + } else if ("定西市".contains(cityName)) { + mapTextDTO.setDxs(data); + } else if ("陇南市".contains(cityName)) { + mapTextDTO.setLns(data); + } else if ("天水市".contains(cityName)) { + mapTextDTO.setTss(data); + } else if ("平凉市".contains(cityName)) { + mapTextDTO.setPls(data); + } else if ("庆阳市".contains(cityName)) { + mapTextDTO.setQys(data); + } else { + + } + } + return mapTextDTO; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradecenter/TradingCenterServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradecenter/TradingCenterServiceImpl.java new file mode 100644 index 0000000..cfff6ec --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradecenter/TradingCenterServiceImpl.java @@ -0,0 +1,68 @@ +package com.alonginfo.project.gansu.serviceimpl.tradecenter; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.domain.LegalPersonDTO; +import com.alonginfo.project.gansu.domain.ShareHoldingDTO; +import com.alonginfo.project.gansu.domain.StaffTeamDTO; +import com.alonginfo.project.gansu.mapper.TradingCenterMapper; +import com.alonginfo.project.gansu.service.tradecenter.ITradingCenterService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author: HaoXs + * @Date: 2023/6/8 16:16 + * @Description: 甘肃电力交易中心 业务层实现 + */ +@Service +public class TradingCenterServiceImpl implements ITradingCenterService { + + @Autowired + private TradingCenterMapper tradingCenterMapper; + + /** + * 法人治理 + * @return + */ + @Override + public LegalPersonDTO getLegalPerson() { + LegalPersonDTO legalPerson = tradingCenterMapper.getLegalPerson(); + LegalPersonDTO result = new LegalPersonDTO(); + if (StringUtils.isNotNull(legalPerson)) { + BeanUtils.copyProperties(legalPerson, result); + } + return result; + } + + /** + * 内设机构及员工队伍 + * @return + */ + @Override + public StaffTeamDTO getStaffTeam() { + StaffTeamDTO staffTeam = tradingCenterMapper.getStaffTeam(); + StaffTeamDTO result = new StaffTeamDTO(); + if (StringUtils.isNotNull(staffTeam)) { + BeanUtils.copyProperties(staffTeam, result); + } + return result; + } + + /** + * 公司股权结构 + * @return + */ + @Override + public List getShareHolding() { + List shareHolding = tradingCenterMapper.getShareHolding(); + if (CollectionUtils.isEmpty(shareHolding)) { + shareHolding = new ArrayList<>(); + } + return shareHolding; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/uploadnotice/UploadNoticeServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/uploadnotice/UploadNoticeServiceImpl.java new file mode 100644 index 0000000..072738b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/uploadnotice/UploadNoticeServiceImpl.java @@ -0,0 +1,297 @@ +package com.alonginfo.project.gansu.serviceimpl.uploadnotice; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.utils.IdUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.file.MimeTypeUtils; +import com.alonginfo.project.gansu.domain.MarketBuildUploadVo; +import com.alonginfo.project.gansu.domain.UploadNoticeVo; +import com.alonginfo.project.gansu.mapper.UploadNoticeMapper; +import com.alonginfo.project.gansu.service.uploadnotice.IUploadNoticeService; +import com.github.pagehelper.PageHelper; +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.util.*; + +/** + * 交易公告上传 + * + * @author Administrator + */ +@Service +public class UploadNoticeServiceImpl implements IUploadNoticeService { + + @Autowired + private UploadNoticeMapper uploadNoticeMapper; + + @Value("${notice.filePath}") + private String NOTICE_FILE_PATH; + + @Value("${market.filePath}") + private String MARKET_FILE_PATH; + + /** + * 查询交易序列列表 + * + * @param searchParam + * @return + */ + @Override + public Map getSeqList(Map searchParam) { + int pageNum = Integer.parseInt(searchParam.get("pageNum")); + int pageSize = Integer.parseInt(searchParam.get("pageSize")); + + int pageStart = (pageNum - 1) * pageSize; + PageHelper.startPage(pageStart, pageSize); + List> seqList = uploadNoticeMapper.getSeqList(searchParam); + + Map res = new HashMap<>(); + res.put("rows", seqList); + res.put("total", seqList.size()); + return res; + } + + /** + * 上传交易公告 + * + * @param uploadNoticeVo + */ + @Override + public void uploadNotice(UploadNoticeVo uploadNoticeVo) throws Exception { + //判断该交易序列下是否已经上传过文件 + Map map = uploadNoticeMapper.checkUpload(uploadNoticeVo.getSeqId()); + if (StringUtils.isNotEmpty(map)) { + throw new Exception("该交易序列下已上传交易公告!"); + } + + MultipartFile noticeFile = uploadNoticeVo.getNoticeFile(); + if (noticeFile == null) { + throw new Exception("上传文件为空!"); + } + String originalFilename = noticeFile.getOriginalFilename(); + //文件上传实际路径 + String visitPath = ""; + long size = noticeFile.getSize(); + String extension = FilenameUtils.getExtension(originalFilename); + if (extension == null) { + extension = MimeTypeUtils.getExtension(noticeFile.getContentType()); + } + //判断文件大小 + checkFileSize(size); + //判断文件后缀 + checkFileType(extension); + + //文件上传 + //文件名+uuid 避免重复 + String encodeName = IdUtils.fastSimpleUUID().toString() + "." + extension; + // 实际上传路径 + String absolutPath = NOTICE_FILE_PATH + encodeName; + File desc = new File(absolutPath); + if (!desc.getParentFile().exists()) { + desc.getParentFile().mkdirs(); + } + noticeFile.transferTo(desc); + //访问路径 + visitPath = Constants.NOTICE_RESOURCE_PREFIX + "/" + encodeName; + + //存储到数据库 + String uuid = UUID.randomUUID().toString().replace("-", ""); + String seqId = uploadNoticeVo.getSeqId(); + String seqName = uploadNoticeVo.getSeqName(); + uploadNoticeMapper.upload(uuid, seqId, seqName, originalFilename, encodeName, visitPath); + } + + /** + * 删除交易公告 + * + * @param seqId + */ + @Override + public void delNotice(String seqId, String filePath) { + //删除交易公告 + int row = uploadNoticeMapper.delNoticeNotes(seqId); + if (row > 0) { + //删除文件 + String realPath = filePath.replace("/notice/", NOTICE_FILE_PATH); + File file = new File(realPath); + if (file.exists()) { + file.delete(); + } + } + } + + /** + * 市场建设情况-上传封面图片、公告 + * + * @param marketBuildUpload + */ + @Override + public void marketBuildUpload(MarketBuildUploadVo marketBuildUpload) throws Exception { + Map map = uploadNoticeMapper.checkMarketBuildHave(marketBuildUpload.getFileTitle()); + if (StringUtils.isNotEmpty(map)) { + throw new Exception("改公告标题:封面图片、文件已上传!"); + } + MultipartFile coverImage = marketBuildUpload.getCoverImage(); + if (coverImage == null) { + throw new Exception("封面图片文件为空!"); + } + MultipartFile noticeFile = marketBuildUpload.getNoticeFile(); + if (noticeFile == null) { + throw new Exception("上传文件为空!"); + } + String imageName = coverImage.getOriginalFilename(); + String noticeFileName = noticeFile.getOriginalFilename(); + + //文件校验 + long fileSize = noticeFile.getSize(); + String fileExtension = FilenameUtils.getExtension(noticeFileName); + if (fileExtension == null) { + fileExtension = MimeTypeUtils.getExtension(noticeFile.getContentType()); + } + //判断文件大小 + checkFileSize(fileSize); + //判断文件后缀 + checkFileType(fileExtension); + + long imageSize = coverImage.getSize(); + String imageExtension = FilenameUtils.getExtension(imageName); + if (imageExtension == null) { + imageExtension = MimeTypeUtils.getExtension(noticeFile.getContentType()); + } + //判断图片大小 + checkImageSize(imageSize); + //判断图片后缀 + checkImageType(imageExtension); + + //文件上传实际路径 + String visitPath = ""; + + //图片上传 + //文件名+uuid 避免重复 + String imageEncodeName = imageName.substring(0, imageName.lastIndexOf(".")) + IdUtils.fastSimpleUUID().toString() + "." + imageExtension; + //实际上传路径 + String imageAbsolutPath = MARKET_FILE_PATH + imageEncodeName; + File imageDesc = new File(imageAbsolutPath); + if (!imageDesc.getParentFile().exists()) { + imageDesc.getParentFile().mkdirs(); + } + coverImage.transferTo(imageDesc); + + //文件上传 + String fileEncodeName = noticeFileName.substring(0, noticeFileName.lastIndexOf(".")) + IdUtils.fastSimpleUUID().toString() + "." + fileExtension; + String fileAbsolutPath = MARKET_FILE_PATH + fileEncodeName; + File fileDesc = new File(fileAbsolutPath); + if (!fileDesc.getParentFile().exists()) { + fileDesc.getParentFile().mkdirs(); + } + noticeFile.transferTo(fileDesc); + + //访问路径 + String imageVisitPath = Constants.MARKET_RESOURCE_PREFIX + "/" + imageEncodeName; + String fileVisitPath = Constants.MARKET_RESOURCE_PREFIX + "/" + fileEncodeName; + + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String fileTitle = marketBuildUpload.getFileTitle(); + uploadNoticeMapper.uploadMarketBuild(uuid, fileTitle, imageName, imageEncodeName, imageVisitPath, + noticeFileName, fileEncodeName, fileVisitPath); + } + + /** + * 获取市场建设情况公告列表 + * + * @param searchParam + * @return + */ + @Override + public Map getMarketList(Map searchParam) { + int pageNum = Integer.parseInt(searchParam.get("pageNum")); + int pageSize = Integer.parseInt(searchParam.get("pageSize")); + + int pageStart = (pageNum - 1) * pageSize; + PageHelper.startPage(pageStart, pageSize); + List> seqList = uploadNoticeMapper.getMarketList(searchParam); + + Map res = new HashMap<>(); + res.put("rows", seqList); + res.put("total", seqList.size()); + return res; + } + + /** + * 市场建设情况-删除交易公告 + * + * @return + */ + @Override + public void delMarketImageAndFile(String fileTitle, String fileUploadPath, String imageUploadPath) { + //删除交易公告 + int row = uploadNoticeMapper.delMarketImageAndFile(fileTitle); + if (row > 0) { + //删除文件 + String fileRealPath = fileUploadPath.replace("/marketUpload/", MARKET_FILE_PATH); + File file = new File(fileRealPath); + if (file.exists()) { + file.delete(); + } + String imageRealPath = imageUploadPath.replace("/marketUpload/", MARKET_FILE_PATH); + File image = new File(imageRealPath); + if (image.exists()) { + image.delete(); + } + } + } + + /** + * 检查文件大小 + */ + public void checkFileSize(long size) throws Exception { + //默认上传大小 + long defaultSize = 2 * 1024 * 1024; + if (size > defaultSize) { + throw new Exception("文件超出最大上传大小: 2M"); + } + } + + /** + * 检查文件类型 + * + * @param extension + * @throws Exception + */ + public void checkFileType(String extension) throws Exception { + //默认上传文件.pdf + String defaultExtension = "pdf"; + if (!extension.equals(defaultExtension)) { + throw new Exception("文件类型不符合! 需上传pdf文件"); + } + } + + /** + * 检测图片大小 + */ + private void checkImageSize(long size) throws Exception { + //默认上传大小 + long defaultSize = 1024 * 1024; + if (size > defaultSize) { + throw new Exception("图片超出最大上传大小: 1M"); + } + } + + /** + * 检测图片类型 + * + * @param imageExtension + */ + private void checkImageType(String imageExtension) throws Exception { + //默认上传文件.pdf + String[] defaultExtensions = {"img", "jpg", "png"}; + if (!Arrays.asList(defaultExtensions).contains(imageExtension)) { + throw new Exception("文件类型不符合! 请上传jpg、png、img格式文件!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/BilateralConsultDataSync.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/BilateralConsultDataSync.java new file mode 100644 index 0000000..b717ef2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/BilateralConsultDataSync.java @@ -0,0 +1,85 @@ +package com.alonginfo.project.gansu.sync; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * 甘肃二期-双边协商 动态数据获取 + * @since 2022-03-14 11:49 + * @author HaoXs + * + */ +public interface BilateralConsultDataSync { + + /** + * 交互电力交易平台 == 获取最新交易序列信息 + * @throws Exception + */ + void getTradeSeqInfoList(); + + /** + * 交互电力交易平台 == 具体的交易公告详细信息 + * @throws Exception + */ + void getTradeNotice(); + + /** + * 交互电力交易平台 == 获取交易序列下购售方双边申报明细数据 + * @throws Exception + */ + List> getDeclareDetailList(String seqId); + + /** + * 交互电力交易平台 == 获取售方申报信息和购方确认信息 - 交易情况 + * @throws Exception + */ + void getTradeDetailList(); + + /** + * 交互电力交易平台 == 获取售方申报的电量信息统计 - 发电类型统计 + * @throws Exception + */ + void getTradeSaleEnergyList(); + + /** + * 交互电力交易平台 == 获取交易量价走势 -实时数据 + * @throws Exception + */ + void getPriceTrend(); + + /** + * 交互电力交易平台 == 获取交易量价走势 - 回演数据 + * @throws Exception + */ + void getPriceTrendReplay(); + + /** + * 交互电力交易平台 == 获取多日交易 - 实时状态 交易量价走势数据 + */ + void getRealTimeManyDay(); + + /** + * 获取全部的交易序列 + * @return + */ + Map selectTradeSeqs(String message); + + /** + * 获取电力交易平台Token + * @return + */ + String getToken(); + + /** + * 预览交易公告pdf + * @return + */ + Map getViewNotice(String tradeSeqId) throws IOException; + + /** + * 获取市场建设情况-图片、文件列表信息 + * @return + */ + List> getMarketBuildFiles() throws IOException; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/GenerationRightDataSync.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/GenerationRightDataSync.java new file mode 100644 index 0000000..f4ecbb3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/GenerationRightDataSync.java @@ -0,0 +1,36 @@ +package com.alonginfo.project.gansu.sync; + +import java.io.IOException; + +/** + * @author: HaoXs + * @Date: 2023/5/17 15:11 + * @Description: 发电权交易情况 数据同步 + */ +public interface GenerationRightDataSync { + + /** + * 发电权交易组织情况 + */ + void dealOrganize(); + + /** + * 发电权交易市场主体参与情况 + */ + void subjectJoin(); + + /** + * 当年买入卖出企业电量排名 + */ + void buySaleEnterpriseOrder(); + + /** + * 发电权交易与结算电量 历年数据 + */ + void tradeSettlementByYear() throws IOException; + + /** + * 发电权交易与结算电量 当年各月数据 + */ + void tradeSettlementByCurrentYearMonth(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketBuildDataSync.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketBuildDataSync.java new file mode 100644 index 0000000..0f19fb7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketBuildDataSync.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.sync; + +import java.io.IOException; + +/** + * @author: HaoXs + * @Date: 2023/1/5 09:20 + * @Description: 市场建设 远程接口调用 + */ +public interface MarketBuildDataSync { + + /** + * 年度电力直接交易规模 + */ + void powerDirectDeal(); + + /** + * 各类市场主体数量接口 + */ + void everyTypeSubjectNum() throws IOException; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketSurveyDataSync.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketSurveyDataSync.java new file mode 100644 index 0000000..ef9c183 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketSurveyDataSync.java @@ -0,0 +1,32 @@ +package com.alonginfo.project.gansu.sync; + +import java.io.IOException; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/1/4 14:53 + * @Description: 市场概况 远程接口调用 + */ +public interface MarketSurveyDataSync { + + /** + * 当前市场主体情况-市场主体类型、数量、占比接口-入库 + * @return + */ + void getMarketSubjectData() throws IOException; + + /** + * 当前市场主体情况-发电企业类型、数量、占比接口-入库 + * @return + */ + void getYieldEnterpriseData(); + +// /** +// * 市场主体参与市场情况 +// * @return +// */ +// String getMarketSubjectJoin(); + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MediumLongTermContractDataSync.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MediumLongTermContractDataSync.java new file mode 100644 index 0000000..d2408fa --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MediumLongTermContractDataSync.java @@ -0,0 +1,21 @@ +package com.alonginfo.project.gansu.sync; + +/** + * @author: HaoXs + * @Date: 2023/5/15 11:29 + * @Description: 中长期合同签订情况 数据同步 + */ +public interface MediumLongTermContractDataSync { + + /** + * 省内交易品种及交易电量 + * @throws Exception + */ + void tradeTypeAndPowerByProvinceInner() throws Exception; + + /** + * 省内电源类型及交易电量 + * @throws Exception + */ + void powerSupplyByProvinceInner() throws Exception; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/NewEnergySurveyDataSync.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/NewEnergySurveyDataSync.java new file mode 100644 index 0000000..4f2112e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/NewEnergySurveyDataSync.java @@ -0,0 +1,14 @@ +package com.alonginfo.project.gansu.sync; + +/** + * @author: HaoXs + * @Date: 2023/5/17 14:34 + * @Description: 新能源概览 数据同步接口 + */ +public interface NewEnergySurveyDataSync{ + + /** + * 新能源参与交易电量趋势 + */ + void joinDealElectricTrend(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/ProvinceInnerDataSync.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/ProvinceInnerDataSync.java new file mode 100644 index 0000000..c461e71 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/ProvinceInnerDataSync.java @@ -0,0 +1,38 @@ +package com.alonginfo.project.gansu.sync; + +import java.io.IOException; + +/** + * @author: HaoXs + * @Date: 2023/5/12 09:59 + * @Description: 省内交易情况 数据同步 + */ +public interface ProvinceInnerDataSync { + + /** + * 交易组织情况接口 + */ + void dealOrganize(); + + /** + * 当年市场主体参与情况 + * @throws IOException + */ + void provinceInnerSubjectJoin() throws IOException; + + /** + * 各电源类型交易电量占比 + * @throws IOException + */ + void cleanEnergyDealPower() throws IOException; + + /** + * 当年交易电量电价趋势 + */ + void powerPriceTrend() throws IOException; + + /** + * 省内交易概况 + */ + void dealSurveyProvinceInner() throws IOException; +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl.java new file mode 100644 index 0000000..cc70928 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl.java @@ -0,0 +1,986 @@ +package com.alonginfo.project.gansu.sync.impl; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.domain.*; +import com.alonginfo.project.gansu.mapper.*; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.BilateralConsultDataSync; +import com.alonginfo.utils.DataPushUtils; +import com.lowagie.text.pdf.PdfReader; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; + +import static com.alonginfo.utils.DataPushUtils.handleSeqList; + + +/** + * 甘肃二期-双边协商 动态数据获取 + * + * @author HaoXs + * @since 2022-03-14 11:49 + */ +@Service +public class BilateralConsultDataSyncImpl implements BilateralConsultDataSync { + + private static final Logger logger = LoggerFactory.getLogger(BilateralConsultDataSyncImpl.class); + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String PUBLIC_KEY; + + @Value("${notice.filePath}") + private String NOTICE_FILE_PATH; + + @Value("${market.filePath}") + private String MARKET_FILE_PATH; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private TradeSeqDao tradeSeqDao; + + @Autowired + private TradeNoticeDao tradeNoticeDao; + + @Autowired + private TradeStatusDao tradeStatusDao; + + @Autowired + private PriceTrendDao priceTrendDao; + + @Autowired + private EnergyCensusDao energyCensusDao; + + @Autowired + private PriceTrendReplayDao priceTrendReplayDao; + + @Autowired + private RealTimeManyDayDao realTimeManyDayDao; + + @Autowired + private UploadNoticeMapper uploadNoticeMapper; + + /** + * 交互电力交易平台 == 获取最新交易序列信息 + * + * @throws Exception + */ + @Override + @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) + public void getTradeSeqInfoList() { + try { + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + //调用最新交易序列信息接口 + String seqInfoResult = HttpUtils.sendPost(sgccUrl + "/dataPush/tradeSeq/selectTradeSeqInfoList", "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("获取双边协商-最新交易序列信息, 接口调用结果: {}", seqInfoResult); + if (seqInfoResult == null || "".equals(seqInfoResult)) { + logger.info("获取双边协商-最新交易序列信息, 接口调用结果为空!"); + return; + } + Map seqInfoResultObj = JSON.parseObject(seqInfoResult, Map.class); + List data = JSON.parseArray(JSON.toJSONString(seqInfoResultObj.get("data")), TradeSeq.class); + if (data == null || data.size() == 0) { + logger.info("获取双边协商-最新交易序列信息, data值为NULL或为空! data:{}", data); + return; + } + //添加入库时间 + String dataTimeStr = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + for (TradeSeq tradeSeq : data) { + tradeSeq.setDataTime(dataTimeStr); + } + if (1 == DataPushUtils.isFormal(sgccUrl)) { + //入正式环境数据对应数据表 + //删除旧数据 + tradeSeqDao.delTradeSeq(); + tradeSeqDao.pushTradeSeq(data); + logger.info("获取双边协商-**正式环境**最新交易序列信息并入库成功!"); + } else { + //入测试环境数据对应数据表 + tradeSeqDao.delTestTradeSeq(); + tradeSeqDao.pushTestTradeSeq(data); + logger.info("获取双边协商-**测试环境**最新交易序列信息并入库成功!"); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("-调用双边协商-交易序列数据异常, 数据获取失败!"); + } + } + + /** + * 交互电力交易平台 == 具体的交易公告详细信息 + * + * @throws Exception + */ + @Override + @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) + public void getTradeNotice() { + try { + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + //调用交易公告详细信息接口 + String noticeResult = HttpUtils.sendPost(sgccUrl + "/dataPush/tradeNotice/selectTradeNotice", "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("获取双边协商-具体交易公告详细信息, 接口调用结果 : {}", noticeResult); + if (noticeResult == null || "".equals(noticeResult)) { + logger.info("获取双边协商-具体交易公告详细信息, 接口调用结果为空!"); + return; + } + Map noticeResultObj = JSON.parseObject(noticeResult, Map.class); + List noticeData = JSON.parseArray(JSON.toJSONString(noticeResultObj.get("data")), TradeNotice.class); + if (noticeData == null || noticeData.size() == 0) { + logger.info("获取双边协商-具体交易公告详细信息, data值为NULL或者为空! data: {}", noticeData); + return; + } + //添加入库时间 + String localDateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + for (TradeNotice tradeNotice : noticeData) { + tradeNotice.setDataTime(localDateTime); + } + if (1 == DataPushUtils.isFormal(sgccUrl)) { + //删除旧数据 + tradeNoticeDao.delNotice(); + tradeNoticeDao.pushTradeNotice(noticeData); + logger.info("**双边协商-正式环境**交易公告详情数据入库成功!"); + } else { + tradeNoticeDao.delTestNotice(); + tradeNoticeDao.pushTestTradeNotice(noticeData); + logger.info("**双边协商-测试环境**交易公告详情数据入库成功!"); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("-调用双边协商-交易公告详细数据异常, 数据获取失败!"); + } + } + + /** + * 交互电力交易平台 == 获取交易序列下购售方双边申报明细数据 === 表格数据 + * + * @throws Exception + */ + @Override + public List> getDeclareDetailList(String seqId) { + try { + //调用购售方双边申报明细数据接口 + String declareDetailResult = HttpUtils.sendPost(sgccAddressService.getSgccAddress(ENV_KEY) + "/dataPush/tradeDeclareDetail/selectTradeDeclareDetailList", "seqId=" + seqId, DataPushUtils.createToken(PUBLIC_KEY)); + //String declareDetailResult = HttpUtils.sendPost("http://localhost:16002/getSource/getData", "seqId="+seqId, ""); +// String declareDetailResult = "{\r\n" + +// " \"code\": 1000,\r\n" + +// " \"msg\": \"操作成功!\",\r\n" + +// " \"data\": [\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 133.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"19:00-23:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"00:00-01:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 60.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"01:00-05:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"11:00-17:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 1500.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"23:00-24:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-03 10:00:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"19:00-23:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"00:00-01:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 60.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"01:00-05:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"11:00-17:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 1500.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"23:00-24:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-02 11:22:00\",\r\n" + +// " \"vendeeParticipantName\": \"景泰新能寺滩风电有限公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃华电瓜州风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 133.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"19:00-23:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"00:00-01:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 60.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"01:00-05:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"11:00-17:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 1500.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"23:00-24:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2022-01-01 10:02:00\",\r\n" + +// " \"vendeeParticipantName\": \"甘肃大唐新能源有限公司\",\r\n" + +// " \"saleParticipantName\": \"华能通渭风电有限责任公司\",\r\n" + +// " \"confirmEnergy\": 133.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"19:00-23:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"00:00-01:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 60.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"01:00-05:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"11:00-17:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 1500.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"23:00-24:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"金塔万晟光电有限公司金塔万晟100MW光伏\",\r\n" + +// " \"saleParticipantName\": \"中国铝业股份有限公司兰州分公司兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 133.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"19:00-23:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"00:00-01:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 60.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"01:00-05:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"11:00-17:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 1500.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"23:00-24:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-31 17:38:16\",\r\n" + +// " \"vendeeParticipantName\": \"恒远(金太阳)电力有限公司\",\r\n" + +// " \"saleParticipantName\": \"兰铝电厂\",\r\n" + +// " \"confirmEnergy\": 133.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"19:00-23:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"00:00-01:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 60.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"01:00-05:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"11:00-17:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 1500.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"17:00-18:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"23:00-24:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 0.00\r\n" + +// " },\r\n" + +// " {\r\n" + +// " \"tradeTimeRange\": \"09:00-11:00\",\r\n" + +// " \"confirmTime\": \"2021-12-30 12:32:14\",\r\n" + +// " \"vendeeParticipantName\": \"国网山东省电力公司\",\r\n" + +// " \"saleParticipantName\": \"甘肃靖远航天风力发电有限公司\",\r\n" + +// " \"confirmEnergy\": 133.00\r\n" + +// " }\r\n" + +// " ]\r\n" + +// "}"; + //logger.info("获取双边协商-购售方双边申报明细数据, 接口调用结果: {}", declareDetailResult); + if (declareDetailResult == null || "".equals(declareDetailResult)) { + logger.info("获取双边协商-购售方双边申报明细数据, 接口调用结果为空!"); + return new ArrayList<>(); + } + Map declareDetailObj = JSON.parseObject(declareDetailResult, Map.class); + List declareDetailData = JSON.parseArray(JSON.toJSONString(declareDetailObj.get("data")), BuySaleDetail.class); + System.out.println("数据量 :" + declareDetailData.size()); + + if (declareDetailData == null || declareDetailData.size() == 0) { + logger.info("获取购售方双边申报明细数据, data值为NUll或者为空! data: {}", declareDetailData); + return new ArrayList<>(); + } + //List dataSorted = declareDetailData.stream().sorted(Comparator.comparing(BuySaleDetail::getConfirmTime).reversed()).collect(Collectors.toList()); + Collections.sort(declareDetailData, new Comparator() { + @Override + public int compare(BuySaleDetail o1, BuySaleDetail o2) { + return o2.getConfirmTime().compareTo(o1.getConfirmTime()); + } + }); + + //数据量>300的话 限制展示300条 + List newList = declareDetailData.size() > 300 ? declareDetailData.subList(0, 300) : declareDetailData; + System.out.println("newList.Size: " + newList.size()); + //封装结果 + List> resultList = new LinkedList<>(); + for (BuySaleDetail buySaleDetail : newList) { + Map rMap = new HashMap<>(); + rMap.put("saleParticipantName", buySaleDetail.getSaleParticipantName()); + rMap.put("vendeeParticipantName", buySaleDetail.getVendeeParticipantName()); + rMap.put("tradeTimeRange", buySaleDetail.getTradeTimeRange()); + rMap.put("confirmEnergy", new BigDecimal(buySaleDetail.getConfirmEnergy()).setScale(2, BigDecimal.ROUND_HALF_UP)); + rMap.put("confirmTime", buySaleDetail.getConfirmTime()); + resultList.add(rMap); + } + return resultList; + } catch (Exception e) { + e.printStackTrace(); + return new ArrayList<>(); + } + } + + /** + * 交互电力交易平台 == 获取售方申报信息和购方确认信息 - 交易情况数据 + * + * @throws Exception + */ + @Override + @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) + public void getTradeDetailList() { + try { + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + //调用售方申报信息和购方确认信息接口 + String tradeDetailResult = HttpUtils.sendPost(sgccUrl + "/dataPush/tradeDetailInfo/selectTradeDetailList", "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("获取双边协商-售方申报信息和购方确认信息, 接口调用结果: {}", tradeDetailResult); + if (tradeDetailResult == null || "".equals(tradeDetailResult)) { + logger.info("获取双边协商-售方申报信息和购方确认信息, 接口调用结果为空!"); + return; + } + Map tradeDetailObj = JSON.parseObject(tradeDetailResult, Map.class); + List tradeDetailData = JSON.parseArray(JSON.toJSONString(tradeDetailObj.get("data")), TradeStatus.class); + if (tradeDetailData == null || tradeDetailData.size() == 0) { + logger.info("获取双边协商-售方申报信息和购方确认信息, data值为NUll或者为空! data: {}", tradeDetailData); + return; + } + //添加入库时间 + String localDateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + for (TradeStatus tradeStatus : tradeDetailData) { + tradeStatus.setDataTime(localDateTime); + } + if (1 == DataPushUtils.isFormal(sgccUrl)) { + //正式环境数据 + //删除旧数据 + tradeStatusDao.delStatus(); + tradeStatusDao.pushTradeStatus(tradeDetailData); + logger.info("双边协商-交易情况**正式环境**数据入库成功!"); + } else { + //测试环境数据 + tradeStatusDao.delTestStatus(); + tradeStatusDao.pushTestTradeStatus(tradeDetailData); + logger.info("双边协商-交易情况**测试环境**数据入库成功!"); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("-调用双边协商-购售方申报数据异常, 数据获取失败!"); + } + } + + /** + * 交互电力交易平台 == 获取售方申报的电量信息统计 - 发电类型统计 + * + * @throws Exception + */ + @Override + @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) + public void getTradeSaleEnergyList() { + try { + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + //调用售方申报的电量信息统计 + String tradeSaleResult = HttpUtils.sendPost(sgccUrl + "/dataPush/tradeSaleEnergy/selectTradeSaleEnergyList", "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("获取双边协商-售方申报的电量信息统计, 接口调用结果: {}", tradeSaleResult); + if (tradeSaleResult == null || "".equals(tradeSaleResult)) { + logger.info("获取双边协商-售方申报的电量信息统计,接口调用结果为空!"); + return; + } + Map tradeSaleObj = JSON.parseObject(tradeSaleResult, Map.class); + List tradeSaleData = JSON.parseArray(JSON.toJSONString(tradeSaleObj.get("data")), EnergyCensus.class); + if (tradeSaleData == null || tradeSaleData.size() == 0) { + logger.info("获取双边协商-售方申报的电量信息统计, data值为NUll或者为空! data: {}", tradeSaleData); + return; + } + //添加数据入库时间 + String localDateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + for (EnergyCensus energyCensus : tradeSaleData) { + energyCensus.setDataTime(localDateTime); + } + if (1 == DataPushUtils.isFormal(sgccUrl)) { + //删除旧数据 + energyCensusDao.delEnergyCensus(); + energyCensusDao.pushEnergyCensus(tradeSaleData); + logger.info("双边协商-售方申报的电量信息统计 - 发电类型统计**正式环境**数据入库成功!"); + } else { + //删除旧数据 + energyCensusDao.delTestEnergyCensus(); + energyCensusDao.pushTestEnergyCensus(tradeSaleData); + logger.info("双边协商-售方申报的电量信息统计 - 发电类型统计**测试环境**数据入库成功!"); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("-调用双边协商-发电类型统计数据异常, 数据获取失败!"); + } + } + + /** + * 交互电力交易平台 == 获取交易量价走势数据 - 实时数据 + * + * @throws Exception + */ + @Override + @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) + public void getPriceTrend() { + try { + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + String priceTrendResult = HttpUtils.sendPost(sgccUrl + "/dataPush/tradeEnergyPriceLine/selectTradeEnergyPriceLineData", "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("获取双边协商-交易量价走势-实时数据, 接口调用结果: {}", priceTrendResult); + if (priceTrendResult == null || "".equals(priceTrendResult)) { + logger.info("获取双边协商-交易量价走势-实时数据, 接口调用结果为空!"); + return; + } + Map priceTrendObj = JSON.parseObject(priceTrendResult, Map.class); + List priceTrendData = JSON.parseArray(JSON.toJSONString(priceTrendObj.get("data")), PriceTrend.class); + if (priceTrendData == null || priceTrendData.size() == 0) { + logger.info("获取双边协商-交易量价走势-实时数据, data值为NUll或者为空! data: {}", priceTrendData); + return; + } + String localDateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + for (PriceTrend priceTrend : priceTrendData) { + priceTrend.setDataTime(localDateTime); + } + if (1 == DataPushUtils.isFormal(sgccUrl)) { + //删除旧数据 + priceTrendDao.delPriceTrend(); + //添加入库时间,并将申报时间转为yyyy-MM-dd格式 + priceTrendDao.pushPriceTrend(priceTrendData); + logger.info("双边协商-交易量价走势数据-实时数据**正式环境**入库成功!"); + } else { + //删除旧数据 + priceTrendDao.delTestPriceTrend(); + //添加入库时间,并将申报时间转为yyyy-MM-dd格式 + priceTrendDao.pushTestPriceTrend(priceTrendData); + logger.info("双边协商-交易量价走势数据-实时数据**测试环境**入库成功!"); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("-调用双边协商-交易量价走势数据异常, 数据获取失败!"); + } + } + + /** + * 交互电力交易平台 == 获取交易量价走势 - 回演数据 + * + * @throws Exception + */ + @Override + @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) + public void getPriceTrendReplay() { + try { + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + String priceTrendReplayResult = HttpUtils.sendPost(sgccUrl + "/dataPush/tradeEnergyPrice/tradeEnergyPriceFinishDate", "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("获取双边协商-交易量价走势-回演数据, 接口调用结果: {}", priceTrendReplayResult); + if (priceTrendReplayResult == null || "".equals(priceTrendReplayResult)) { + logger.info("获取双边协商-交易量价走势-回演数据, 接口调用结果为空!"); + return; + } + Map priceTrendReplayObj = JSON.parseObject(priceTrendReplayResult, Map.class); + List priceTrendReplayData = JSON.parseArray(JSON.toJSONString(priceTrendReplayObj.get("data")), PriceTrendReplay.class); + if (priceTrendReplayData == null || priceTrendReplayData.size() == 0) { + logger.info("获取双边协商-交易量价走势-回演数据, data值为NUll或者为空! data: {}", priceTrendReplayData); + return; + } + String localDateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + for (PriceTrendReplay priceTrendReplay : priceTrendReplayData) { + priceTrendReplay.setDataTime(localDateTime); + } + if (1 == DataPushUtils.isFormal(sgccUrl)) { + //删除旧数据 + priceTrendReplayDao.delPriceTrendReplay(); + //添加入库时间,并将申报时间转为yyyy-MM-dd格式 + priceTrendReplayDao.pushPriceTrendReplay(priceTrendReplayData); + logger.info("双边协商-交易量价走势-回演数据**正式环境**入库成功!"); + } else { + priceTrendReplayDao.delTestPriceTrendReplay(); + priceTrendReplayDao.pushTestPriceTrendReplay(priceTrendReplayData); + logger.info("双边协商-交易量价走势-回演数据**测试环境**入库成功!"); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("-调用双边协商-交易量价走势-回演数据异常, 数据获取失败!"); + } + } + + /** + * 交互电力交易平台 == 获取多日交易 - 实时状态 交易量价走势数据 + */ + @Override + public void getRealTimeManyDay() { + try { + String sgccUrl = sgccAddressService.getSgccAddress(ENV_KEY); + String manyDayResult = HttpUtils.sendPost(sgccUrl + "/dataPush/TradeEnergyMonth/selectEnergyMonth", "", DataPushUtils.createToken(PUBLIC_KEY)); + logger.info("双边协商-多日交易-实时状态 接口返回结果:{}", JSON.toJSONString(manyDayResult)); + if (StringUtils.isEmpty(manyDayResult)) { + logger.info("双边协商-多日交易-实时状态, 返回结果为空!"); + return; + } + Map manyDayResMap = JSON.parseObject(manyDayResult, Map.class); + //data数据 转 List + List manyDayResArray = JSON.parseArray(JSON.toJSONString(manyDayResMap.get("data")), ManyDayRealTime.class); + if (manyDayResArray == null || manyDayResArray.size() == 0) return; + System.out.println("---" + manyDayResArray); + //数据入库 + if (1 == DataPushUtils.isFormal(sgccUrl)) { + //删除旧数据 + realTimeManyDayDao.delRealTimeManyDay(); + //添加入库时间,并将申报时间转为yyyy-MM-dd格式 + realTimeManyDayDao.pushRealTimeManyDay(manyDayResArray); + logger.info("双边协商-多日交易-实时状态 交易量价走势数据**正式环境**入库成功!"); + } else { + realTimeManyDayDao.delTestRealTimeManyDay(); + realTimeManyDayDao.pushTestRealTimeManyDay(manyDayResArray); + logger.info("双边协商-多日交易-实时状态 交易量价走势数据**测试环境**入库成功!"); + } + } catch (Exception e) { + e.printStackTrace(); + logger.info("-调用双边协商-多日交易-实时状态: 交易量价走势数据异常, 数据获取失败!"); + } + } + + + /** + * 接口 ---- 获取所有交易序列数据 + */ + @Override + public Map selectTradeSeqs(String tradeSeqType) { + try { + if (1 == DataPushUtils.isFormal(sgccAddressService.getSgccAddress(ENV_KEY))) { + Map all = handleSeqList(tradeSeqDao.getAll(tradeSeqType)); + return all; + } else { + Map allTest = handleSeqList(tradeSeqDao.getAllTest(tradeSeqType)); + return allTest; + } + } catch (Exception e) { + e.printStackTrace(); + return new HashMap<>(); + } + } + + /** + * 获取电力交易平台token + */ + @Override + public String getToken() { + try { + return DataPushUtils.createToken(PUBLIC_KEY); + } catch (Exception e) { + e.printStackTrace(); + return ""; + } + } + + /** + * 预览交易公告pdf + * + * @return + */ + @Override + public Map getViewNotice(String tradeSeqId) throws IOException { + //通过交易序列id查询已上传的pdf + Map notice = uploadNoticeMapper.checkUpload(tradeSeqId); + if (StringUtils.isEmpty(notice)) { + return new HashMap<>(); + } + //文件名称 + String uploadName = String.valueOf(notice.get("uploadName")); + String fileName = uploadName.substring(0, uploadName.lastIndexOf(".")); + //文件预览地址 + String uploadPath = String.valueOf(notice.get("uploadPath")); + if (StringUtils.isEmpty(uploadPath)) { + return new HashMap<>(); + } + //获取实际存储地址 + String realUploadPath = uploadPath.replaceAll("/notice/", NOTICE_FILE_PATH); + //获取pdf文件每页大小, 总页数 + Map pdfInfo = getPdfInfo(realUploadPath); + + Map result = new HashMap<>(); + result.put("noticeWidth", pdfInfo.get("width")); + result.put("noticeHeight", pdfInfo.get("height")); + result.put("countPages", pdfInfo.get("countPages")); + result.put("viewPath", uploadPath); + result.put("fileName", fileName); + return result; + } + + /** + * 获取市场建设情况-图片、文件列表信息 + * @return + */ + @Override + public List> getMarketBuildFiles() throws IOException { + List> marketList = uploadNoticeMapper.getMarketList(new HashMap<>()); + if (StringUtils.isEmpty(marketList)) { + return new ArrayList<>(); + } + List> result = new ArrayList<>(); + for (Map map : marketList) { + String fileTitle = map.get("fileTitle"); + String fileUploadPath = map.get("fileUploadPath"); + String imageUploadPath = map.get("imageUploadPath"); + //获取实际上传地址 + String fileRealPath = fileUploadPath.replace("/marketUpload/", MARKET_FILE_PATH); + Map pdfInfo = getPdfInfo(fileRealPath); + + Map resultItem = new HashMap<>(); + resultItem.put("fileName", fileTitle); + resultItem.put("imagePath", imageUploadPath); + resultItem.put("filePath", fileUploadPath); + resultItem.put("noticeWidth", pdfInfo.get("width")); + resultItem.put("noticeHeight", pdfInfo.get("height")); + resultItem.put("countPages", pdfInfo.get("countPages")); + result.add(resultItem); + } + return result; + } + + /** + * 获取pdf每页大小, 总页数 + */ + private Map getPdfInfo(String filePath) throws IOException { + File file = new File(filePath); + PdfReader pdfReader = new PdfReader(new FileInputStream(file)); + //获取总页数 + int countPages = pdfReader.getNumberOfPages(); + //页宽 + float width = pdfReader.getPageSize(1).getWidth(); + //页高 + float height = pdfReader.getPageSize(1).getHeight(); + //单位转换 + //pdf测量单位point 1pt=1/72 inch 1英寸=25.4毫米 + //转为毫米: pt*25.4/72 + double widthCm = width * 25.4 / 72 / 10; + double heightCm = height * 25.4 / 72 / 10; + Map res = new HashMap<>(); + res.put("countPages", countPages); + res.put("width", BigDecimal.valueOf(widthCm).setScale(3, BigDecimal.ROUND_HALF_DOWN)); + res.put("height", BigDecimal.valueOf(heightCm).setScale(3, BigDecimal.ROUND_HALF_DOWN)); + return res; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl.java new file mode 100644 index 0000000..0d2aff6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl.java @@ -0,0 +1,223 @@ +package com.alonginfo.project.gansu.sync.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.GenerationRightDataSyncMapper; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.GenerationRightDataSync; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.io.IOException; +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/5/17 15:12 + * @Description: 发电权交易情况 数据同步 + */ +@Service +@Slf4j +public class GenerationRightDataSyncImpl implements GenerationRightDataSync { + + /** + * 发电权交易组织情况 + */ + private static String dealOrganizeUrl = "/clearingDate/selectPowerGeneration"; + + /** + * 发电权交易市场主体参与情况 + */ + private static String subjectJoinUrl = "/clearingDate/selectParticipant"; + + /** + * 当年买入卖出企业电量排名 + */ + private static String buySaleEnterpriseOrderUrl = "/clearingDate/selectParticipantnameEnergy"; + + /** + * 发电权交易与结算电量 历年数据 + */ + private static String tradeSettlementByYearUrl = "/clearingDate/selectPowerGenerationByYaer"; + + /** + * 发电权交易与结算电量 当年各月数据 + */ + private static String tradeSettlementByCurrentYearMonthUrl = "/clearingDate/selectPowerGenerationByYaerMonth"; + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String publicKey; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private GenerationRightDataSyncMapper generationRightDataSyncMapper; + + /** + * 发电权交易组织情况 + */ + @Override + public void dealOrganize() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String dealOrganizeResStr = HttpUtils.sendPost(sgccAddress + dealOrganizeUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-发电权交易情况-发电权交易组织情况调用结果: {}", dealOrganizeResStr); + if (StringUtils.isEmpty(dealOrganizeResStr)) { + log.error("-发电权交易情况-发电权交易组织情况调用结果为空! url: {}, param: {}, result: {}", dealOrganizeUrl, "", dealOrganizeResStr); + return; + } + Map map = JSON.parseObject(dealOrganizeResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-发电权交易情况-发电权交易组织情况, data为NULL!"); + return; + } + Map dealOrganizeResMap = JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + generationRightDataSyncMapper.insertDealOrganize(dealOrganizeResMap); + } + + /** + * 发电权交易市场主体参与情况 + */ + @Override + public void subjectJoin() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String subjectJoinResStr = HttpUtils.sendPost(sgccAddress + subjectJoinUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-发电权交易情况-发电权交易市场主体参与情况调用结果: {}", subjectJoinResStr); + if (StringUtils.isEmpty(subjectJoinResStr)) { + log.error("-发电权交易情况-发电权交易市场主体参与情况调用结果为空! url: {}, param: {}, result: {}", subjectJoinUrl, "", subjectJoinResStr); + return; + } + Map map = JSON.parseObject(subjectJoinResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-发电权交易情况-发电权交易市场主体参与情况, data为NULL!"); + return; + } + Map subjectJoinResMap = JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + generationRightDataSyncMapper.insertSubjectJoin(subjectJoinResMap); + } + + /** + * 当年买入卖出企业电量排名 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void buySaleEnterpriseOrder() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String buySaleResStr = HttpUtils.sendPost(sgccAddress + buySaleEnterpriseOrderUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-发电权交易情况-当年买入卖出企业电量排名调用结果: {}", buySaleResStr); + if (StringUtils.isEmpty(buySaleResStr)) { + log.error("-发电权交易情况-当年买入卖出企业电量排名调用接口为空! url: {}, param: {}, result: {}", buySaleEnterpriseOrderUrl, "", buySaleResStr); + return; + } + Map map = JSON.parseObject(buySaleResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-发电权交易情况-当年买入卖出企业电量排名, data为NULL!"); + return; + } + List> insertList = new ArrayList<>(); + Map dataMap = (Map) data; + List> sale = JSON.parseObject(JSON.toJSONString(dataMap.get("sale")), new TypeReference>>() {}); + List> vendee = JSON.parseObject(JSON.toJSONString(dataMap.get("vendee")), new TypeReference>>() {}); + //卖出方 type=0 + sale.forEach(item -> { + item.put("type", "0"); + insertList.add(item); + }); + vendee.forEach(item -> { + item.put("type", "1"); + insertList.add(item); + }); + if (CollectionUtils.isEmpty(insertList)) { + return; + } + generationRightDataSyncMapper.delBuySaleOrder(); + generationRightDataSyncMapper.insertBuySaleOrder(insertList); + } + + /** + * 发电权交易与结算电量 历年数据 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void tradeSettlementByYear() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + + List> insertParamList = new ArrayList<>(); + List calendarYear = DateUtils.getLastYear(6); + for (String year : calendarYear) { + Map requestParam = new HashMap<>(); + requestParam.put("tradeYear", year); + String tradeSettlementByYearResStr = HttpUtils.sendPostDataByJson(sgccAddress + tradeSettlementByYearUrl, JSON.toJSONString(requestParam), DataPushUtils.createToken(publicKey)); + log.info("-发电权交易与结算电量-历年数据调用结果: {}", tradeSettlementByYearResStr); + if (StringUtils.isEmpty(tradeSettlementByYearResStr)) { + log.error("-发电权交易与结算电量-历年数据调用结果为空! url: {}, param: {}, result: {}", tradeSettlementByYearUrl, JSON.toJSONString(requestParam), tradeSettlementByYearResStr); + continue; + } + Map map = JSON.parseObject(tradeSettlementByYearResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-发电权交易与结算电量-历年数据, data为NULL!"); + continue; + } + Map yearMap = JSON.parseObject(JSON.toJSONString(data), new TypeReference>() {}); + insertParamList.add(yearMap); + } + if (CollectionUtils.isEmpty(insertParamList)) { + return; + } + generationRightDataSyncMapper.delTradeSettlementYear(); + //TODO 结算电量字段暂无 暂时给settlement + generationRightDataSyncMapper.insertTradeSettlementYear(insertParamList); + } + + /** + * 发电权交易与结算电量 当年各月数据 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void tradeSettlementByCurrentYearMonth() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String tradeSettlementYearMonthResStr = HttpUtils.sendPost(sgccAddress + tradeSettlementByCurrentYearMonthUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-发电权交易与结算电量-当年各月数据调用结果: {}", tradeSettlementYearMonthResStr); + if (StringUtils.isEmpty(tradeSettlementYearMonthResStr)) { + log.error("-发电权交易与结算电量-当年各月数据调用结果为空! url: {}, param: {}, result: {}", tradeSettlementByCurrentYearMonthUrl, "", tradeSettlementYearMonthResStr); + return; + } + Map map = JSON.parseObject(tradeSettlementYearMonthResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-发电权交易与结算电量-当年各月数据, data为NULL!"); + return; + } + List> tradeSettlementResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + + List> insertList = new ArrayList<>(); + tradeSettlementResList.forEach(item -> { + Map insertItemMap = new HashMap<>(); + insertItemMap.put("yearMonth", item.get("yearMonth")); + insertItemMap.put("energy", item.get("energy")); + insertList.add(insertItemMap); + }); + if (CollectionUtils.isEmpty(insertList)) { + return; + } + generationRightDataSyncMapper.delTradeSettlementYearMonth(); + //TODO 结算电量暂无 暂时给settlement + generationRightDataSyncMapper.insertTradeSettlementYearMonth(insertList); + } +} + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl.java new file mode 100644 index 0000000..fbbf9c0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl.java @@ -0,0 +1,130 @@ +package com.alonginfo.project.gansu.sync.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.MarketBuildDataSyncMapper; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.MarketBuildDataSync; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.IOException; +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/1/5 09:49 + * @Description: 市场建设 远程接口调用 + */ +@Service +@Slf4j +public class MarketBuildDataSyncImpl implements MarketBuildDataSync { + + /** + * 市场建设情况场景-年度电力直接交易规模URL + */ + public static String powerDirectDealUrl = "/clearingDate/selectClearingByYear"; + + /** + * 市场建设情况场景-各类市场主体数量接口URL + */ + public static String everyTypeSubjectNumUrl = "/market/getMarketPropertion"; + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String publicKey; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private MarketBuildDataSyncMapper marketBuildDataSyncMapper; + + /** + * 年度电力直接交易规模 + * @return + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void powerDirectDeal() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String powerDirectDealResStr = HttpUtils.sendPost(sgccAddress + powerDirectDealUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-市场建设情况-年度电力直接交易规模接口调用结果: {}", powerDirectDealResStr); + if (StringUtils.isEmpty(powerDirectDealResStr)) { + log.error("-市场建设情况-年度电力直接交易规模接口调用结果为空! url: {}, result: {}", powerDirectDealUrl, powerDirectDealResStr); + return; + } + Map map = JSON.parseObject(powerDirectDealResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场建设情况-年度电力直接交易规模接口, data值为NULL!"); + } + List> dataRes = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + //先删除再入库 + marketBuildDataSyncMapper.delPowerDirectDeal(); + marketBuildDataSyncMapper.insertPowerDirectDeal(dataRes); + } + + /** + * 各类市场主体数量接口 + * 需要传参 year 获取当年数据 + * 页面默认展示以往6年数据 循环调用6年 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void everyTypeSubjectNum() throws IOException { + //获取以往6年年份(包括当年) + List lastYear = DateUtils.getLastYear(6); + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + + //循环获取每年数据结果集合 + List> yearDataRes = new LinkedList<>(); + for (String year : lastYear) { + Map jsonParam = new HashMap<>(); + jsonParam.put("year", year); + String everyTypeSubjectResStr = HttpUtils.sendPostDataByJson(sgccAddress + everyTypeSubjectNumUrl, JSON.toJSONString(jsonParam), DataPushUtils.createToken(publicKey)); + log.info("-市场建设情况-各类市场主体数量接口调用结果: {}", everyTypeSubjectResStr); + if (StringUtils.isEmpty(everyTypeSubjectResStr)) { + log.error("-市场建设情况-各类市场主体数量接口调用结果为空! url: {}, param: {}, result: {}", everyTypeSubjectNumUrl, year, everyTypeSubjectResStr); + continue; + } + Map map = JSON.parseObject(everyTypeSubjectResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-市场建设情况-各类市场主体数量接口, data值为空! params: {}", year); + continue; + } + List> dataResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + //membertype-企业类型 count-注册数 tranCount-参与交易数 + //10 发电企业 + String power = dataResList.stream().filter(f -> "10".equals(f.get("membertype"))).map(m -> m.get("count")).findFirst().orElse(null); + //20 电力用户 + String user = dataResList.stream().filter(f -> "20".equals(f.get("membertype"))).map(m -> m.get("count")).findFirst().orElse(null); + //30 售电公司 + String sale = dataResList.stream().filter(f -> "30".equals(f.get("membertype"))).map(m -> m.get("count")).findFirst().orElse(null); + //封装格式处理后的数据 + Map yearRes = new HashMap<>(); + yearRes.put("year", year); + yearRes.put("power", power); + yearRes.put("sale", sale); + yearRes.put("user", user); + yearDataRes.add(yearRes); + } + if (CollectionUtils.isEmpty(yearDataRes)) { + return; + } + //先删除再入库 + marketBuildDataSyncMapper.delEveryTypeSubject(); + marketBuildDataSyncMapper.insertEveryTypeSubject(yearDataRes); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl.java new file mode 100644 index 0000000..5531f7f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl.java @@ -0,0 +1,171 @@ +package com.alonginfo.project.gansu.sync.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.MarketSurveyDataSyncMapper; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.MarketSurveyDataSync; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.math.BigDecimal; +import java.time.YearMonth; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/1/4 14:57 + * @Description: 市场概况 远程接口调用实现 + */ +@Service +@Slf4j +public class MarketSurveyDataSyncImpl implements MarketSurveyDataSync { + + /** + * 市场主体类型、数量、占比接口 + */ + public static String marketSubjectUrl = "/market/getMarketMemberType"; + + /** + * 发电企业类型、数量、占比接口 + */ + public static String yieldEnterpriseUrl = "/mmBuild/powerRatio"; + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String publicKey; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private MarketSurveyDataSyncMapper marketSurveyDataSyncMapper; + + /** + * 当前市场主体情况-市场主体类型、数量、占比接口 + * @return + */ + @Override + public void getMarketSubjectData() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + int year = YearMonth.now().getYear(); + Map requestParam = new HashMap<>(); + requestParam.put("year", String.valueOf(year)); + String marketSubjectResultStr = HttpUtils.sendPostDataByJson(sgccAddress+marketSubjectUrl, JSON.toJSONString(requestParam), DataPushUtils.createToken(publicKey)); + log.info("-当前市场主体情况-市场主体类型、数量、占比接口结果: {}", marketSubjectResultStr); + if (StringUtils.isEmpty(marketSubjectResultStr)) { + log.error("-当前市场主体情况-市场主体类型、数量、占比接口为空!, 接口地址: {}, result: {}", marketSubjectUrl, marketSubjectResultStr); + return; + } + Map map = JSON.parseObject(marketSubjectResultStr, Map.class); + Object dataRes = map.get("data"); + if (null == dataRes) { + log.error("-当前市场主体情况-市场主体类型、数量、占比接口, data值为空或为NULL!"); + return; + } + List> dataList = JSON.parseObject(JSON.toJSONString(dataRes), new TypeReference>>() {}); + //返回格式 10:发电企业,20:电力用户,30:售电公司 + //{ + // "status": 0, + // "message": "数据查询成功", + // "data ": [{ + // "membertype": "10", + // "count": 1208, + // "tradeCount": 0, + // "proportion": null + // }, { + // "membertype": "20", + // "count": 3804, + // "tradeCount": 0, + // "proportion": null + // }, { + // "membertype": "30", + // "count": 47, + // "tradeCount": 0, + // "proportion": null + // }] + //} + //发电企业家数 + Integer yieldNum = dataList.stream().filter(f -> "10".equals(f.get("membertype"))).map(m -> { + return Integer.parseInt(m.get("count").toString()); + }).findFirst().orElse(0); + // 电力用户数 + Integer userNum = dataList.stream().filter(f -> "20".equals(f.get("membertype"))).map(m -> { + return Integer.parseInt(m.get("count").toString()); + }).findFirst().orElse(0); + //售电公司数 + Integer saleNum = dataList.stream().filter(f -> "30".equals(f.get("membertype"))).map(m -> { + return Integer.parseInt(m.get("count").toString()); + }).findFirst().orElse(0); + + //占比 + BigDecimal yieldDecimal = BigDecimal.valueOf(yieldNum); + BigDecimal userDecimal = BigDecimal.valueOf(userNum); + BigDecimal saleDecimal = BigDecimal.valueOf(saleNum); + BigDecimal countDecimal = BigDecimal.valueOf((yieldNum + userNum + saleNum)); + + BigDecimal yieldRatio = yieldDecimal.divide(countDecimal, 2, BigDecimal.ROUND_HALF_UP); + BigDecimal userRatio = userDecimal.divide(countDecimal, 2, BigDecimal.ROUND_HALF_UP); + BigDecimal saleRatio = saleDecimal.divide(countDecimal, 2, BigDecimal.ROUND_HALF_UP); + + Map dataParam = new HashMap<>(); + dataParam.put("powerCount", yieldNum); + dataParam.put("userCount", userNum); + dataParam.put("saleCount", saleNum); + dataParam.put("power", yieldRatio); + dataParam.put("user", userRatio); + dataParam.put("sale", saleRatio); + //数据入库 + marketSurveyDataSyncMapper.insertMarketSubject(dataParam); + } + + /** + * 当前市场主体情况-发电企业类型、数量、占比接口 + * @return + */ + @Override + public void getYieldEnterpriseData() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String yieldEnterpriseResultStr = HttpUtils.sendPost(sgccAddress+yieldEnterpriseUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-当前市场主体情况-发电企业类型、数量、占比接口结果: {}", yieldEnterpriseResultStr); + if (StringUtils.isEmpty(yieldEnterpriseResultStr)) { + log.error("-当前市场主体情况-发电企业类型、数量、占比接口为空!, 接口地址: {}, result: {}", yieldEnterpriseUrl, yieldEnterpriseResultStr); + return; + } + Map map = JSON.parseObject(yieldEnterpriseResultStr, Map.class); + Map dataRes = (Map)map.get("data"); + if (StringUtils.isEmpty(dataRes)) { + log.error("-当前市场主体情况-发电企业类型、数量、占比接口, data值为空或为NULL"); + return; + } + marketSurveyDataSyncMapper.insertYieldEnterprise(dataRes); + } + +// /** +// * 市场主体参与情况 +// * @return +// */ +// @Override +// public String getMarketSubjectJoin() { +// long beginTime = System.currentTimeMillis(); +// String marketSubjectJoinResultStr = HttpUtils.sendPost(marketSubjectJoinUrl, "", DataPushUtils.createToken(publicKey)); +// log.info("-市场主体参与情况:{}", marketSubjectJoinResultStr); +// if (StringUtils.isEmpty(marketSubjectJoinResultStr)) { +// log.info("-市场主体参与情况接口为空!, 接口地址: {}, result: {}", marketSubjectUrl, marketSubjectJoinResultStr); +// return ""; +// } +// long endTime = System.currentTimeMillis(); +// log.info("-市场主体参与情况接口耗时: {}", (endTime - beginTime)/1000); +// return marketSubjectJoinResultStr; +// } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl.java new file mode 100644 index 0000000..0b0b39d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl.java @@ -0,0 +1,107 @@ +package com.alonginfo.project.gansu.sync.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.MediumLongTermContractDataSyncMapper; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.MediumLongTermContractDataSync; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.IOException; +import java.time.Year; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/15 11:32 + * @Description: 中长期合同签订情况 数据同步 + */ +@Service +@Slf4j +public class MediumLongTermContractDataSyncImpl implements MediumLongTermContractDataSync { + + private static String tradeTypeAndPowerUrl = "/tradeEnergyPriceTrend/selectTradeEnergyPriceDataByEnergyType"; + + private static String powerSupplyUrl = "/tradeEnergyPriceTrend/selectTradeEnergyByGenerationType"; + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String publicKey; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private MediumLongTermContractDataSyncMapper mediumLongTermContractDataSyncMapper; + + /** + * 省内交易品种及交易电量 + * @throws Exception + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void tradeTypeAndPowerByProvinceInner() throws Exception { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map requestParam = new HashMap<>(); + requestParam.put("tradeYear", String.valueOf(Year.now().getValue())); + String tradeTypeAndPowerResStr = HttpUtils.sendPostDataByJson(sgccAddress + tradeTypeAndPowerUrl, JSON.toJSONString(requestParam), DataPushUtils.createToken(publicKey)); + log.info("-中长期合同签订情况-省内交易品种及交易电量调用结果: {}", tradeTypeAndPowerResStr); + if (StringUtils.isEmpty(tradeTypeAndPowerResStr)) { + log.error("-中长期合同签订情况-省内交易品种及交易电量返回结果为空! url:{}, param:{}, result:{}", tradeTypeAndPowerUrl, JSON.toJSONString(requestParam), tradeTypeAndPowerResStr); + return; + } + Map map = JSON.parseObject(tradeTypeAndPowerResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-中长期合同签订情况-省内交易品种及交易电量, data值为NULL!"); + return; + } + List> tradeTypeAndPowerResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>(){}); + if (CollectionUtils.isEmpty(tradeTypeAndPowerResList)) { + return; + } + mediumLongTermContractDataSyncMapper.delTradeTypeAndPower(); + mediumLongTermContractDataSyncMapper.insertTradeTypeAndPower(tradeTypeAndPowerResList); + } + + /** + * 省内电源类型及交易电量 + * @throws Exception + */ + @Override + public void powerSupplyByProvinceInner() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map requestParam = new HashMap<>(); + requestParam.put("tradeYear", String.valueOf(Year.now().getValue())); + String powerSupplyResStr = HttpUtils.sendPostDataByJson(sgccAddress + powerSupplyUrl, JSON.toJSONString(requestParam), DataPushUtils.createToken(publicKey)); + log.info("-中长期合同签订情况-省内电源类型及交易电量调用结果: {}", powerSupplyResStr); + if (StringUtils.isEmpty(powerSupplyResStr)) { + log.error("-中长期合同签订情况-省内电源类型及交易电量返回结果为空! url:{}, param:{}, result:{}", powerSupplyUrl, JSON.toJSONString(requestParam), powerSupplyResStr); + return; + } + Map map = JSON.parseObject(powerSupplyResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-中长期合同签订情况-省内电源类型及交易电量, data值为NULL!"); + return; + } + List> powerSupplyResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + if (CollectionUtils.isEmpty(powerSupplyResList)) { + return; + } + mediumLongTermContractDataSyncMapper.delPowerSupply(); + mediumLongTermContractDataSyncMapper.insertPowerSupply(powerSupplyResList); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl.java new file mode 100644 index 0000000..9793c8b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl.java @@ -0,0 +1,80 @@ +package com.alonginfo.project.gansu.sync.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.NewEnergySurveyDataSyncMapper; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.NewEnergySurveyDataSync; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author: HaoXs + * @Date: 2023/5/17 14:37 + * @Description: 新能源概览 数据同步 + */ +@Service +@Slf4j +public class NewEnergySurveyDataSyncImpl implements NewEnergySurveyDataSync { + + private static String joinDealElectricTrendUrl = "/tradeSituation/selectCleanEnergyListByYear"; + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String publicKey; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private NewEnergySurveyDataSyncMapper newEnergySurveyDataSyncMapper; + + /** + * 新能源参与交易电量趋势 + */ + @Override + public void joinDealElectricTrend() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String joinDealElectricResStr = HttpUtils.sendPost(sgccAddress+joinDealElectricTrendUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-新能源概览-新能源参与交易电量趋势调用结果: {}", joinDealElectricResStr); + if (StringUtils.isEmpty(joinDealElectricResStr)) { + log.error("-新能源概览-新能源参与交易电量趋势接口返回为空! url: {}, param: {}, result: {}", joinDealElectricResStr, "", joinDealElectricTrendUrl); + return; + } + Map map = JSON.parseObject(joinDealElectricResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-新能源概览-新能源参与交易电量趋势, data值为NULL!"); + return; + } + List> joinDealElectricResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + List> insertParamList = new ArrayList<>(); + joinDealElectricResList.forEach(item -> { + Map insertMap = new HashMap<>(); + insertMap.put("tradeYear", item.get("tradeYear")); + insertMap.put("sumVendeeEnergy", item.get("sumVendeeEnergy")); + insertMap.put("sumSaleEnergy", item.get("sumSaleEnergy")); + insertMap.put("energyType", item.get("energyType")); + insertParamList.add(insertMap); + }); + + if (CollectionUtils.isEmpty(insertParamList)) { + return; + } + newEnergySurveyDataSyncMapper.delJoinElectricTrend(); + newEnergySurveyDataSyncMapper.insertJoinElectricTrend(insertParamList); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl.java new file mode 100644 index 0000000..8be64da --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl.java @@ -0,0 +1,307 @@ +package com.alonginfo.project.gansu.sync.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.TypeReference; +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import com.alonginfo.project.gansu.mapper.ProvinceInnerDataSyncMapper; +import com.alonginfo.project.gansu.service.SgccAddressService; +import com.alonginfo.project.gansu.sync.ProvinceInnerDataSync; +import com.alonginfo.utils.DataPushUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.IOException; +import java.time.Year; +import java.time.YearMonth; +import java.util.*; + +/** + * @author: HaoXs + * @Date: 2023/5/12 10:13 + * @Description: 省内交易情况 数据同步 + */ +@Service +@Slf4j +public class ProvinceInnerDataSyncImpl implements ProvinceInnerDataSync { + + /** + * 交易组织情况 + */ + private static String dealOrganizeUrl = "/clearingDate/selectOrgTrade"; + + /** + * 市场主体参与情况 + */ + private static String provinceInnerSubjectJoinUrl = "/clearingDate/selectPxDetails"; + + /** + * 各电源类型交易电量占比 + */ + private static String cleanEnergyDealPowerUrl = "/tradeSituation/selectCleanEnergyList"; + + /** + * 当年交易电量电价走势 + */ + private static String powerPriceTrendUrl = "/tradeEnergyPriceTrend/selectTradeEnergyPriceTrendDataByYear"; + + /** + * 交易概览 + */ + private static String dealSurveyProvinceInnerUrl = "/delivery/selectTradeInfo"; + + @Value("${env.key}") + private String ENV_KEY; + + @Value("${sgcc.publicKey}") + private String publicKey; + + @Autowired + private SgccAddressService sgccAddressService; + + @Autowired + private ProvinceInnerDataSyncMapper provinceInnerDataSyncMapper; + + /** + * 交易组织情况接口 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void dealOrganize() { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + String dealOrganizeResStr = HttpUtils.sendPost(sgccAddress + dealOrganizeUrl, "", DataPushUtils.createToken(publicKey)); + log.info("-省内交易情况-交易组织情况接口调用结果: {}", dealOrganizeResStr); + if (StringUtils.isEmpty(dealOrganizeResStr)) { + log.error("-省内交易情况-交易组织情况接口调用结果为空! url:{}, param:{}, result:{}", dealOrganizeUrl, "", dealOrganizeResStr); + return; + } + Map map = JSON.parseObject(dealOrganizeResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-省内交易情况-交易组织情况接口, data值为NULL!"); + return; + } + List> dataResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + //封装入库参数 + List> insertParamList = new ArrayList<>(); + //tradeYear 交易年份 tradeCount1 双边组织次数 tradeEnergy1 双边交易电量 2、3、4 集中、挂牌、D+3 + dataResList.forEach(mapObj -> { + Map insertParamItem = new HashMap<>(); + insertParamItem.put("tradeYear", mapObj.get("tradeYear")); + insertParamItem.put("sbNum", mapObj.get("tradeCount1")); + insertParamItem.put("jzNum", mapObj.get("tradeCount2")); + insertParamItem.put("gpNum", mapObj.get("tradeCount3")); + insertParamItem.put("d3Num", mapObj.get("tradeCount4")); + insertParamItem.put("sbEnergy", mapObj.get("tradeEnergy1")); + insertParamItem.put("jzEnergy", mapObj.get("tradeEnergy2")); + insertParamItem.put("gpEnergy", mapObj.get("tradeEnergy3")); + insertParamItem.put("d3Energy", mapObj.get("tradeEnergy4")); + insertParamList.add(insertParamItem); + }); + if (CollectionUtils.isEmpty(insertParamList)) { + return; + } + //先删除再入库 + provinceInnerDataSyncMapper.delDealOrganize(); + provinceInnerDataSyncMapper.insertDealOrganize(insertParamList); + } + + /** + * 当年市场主体参与情况 + */ + @Override + public void provinceInnerSubjectJoin() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + //获取当年、前一年的年份 + List years = DateUtils.getLastYear(2); + + //当年、前一年接口返回数据 + List> previousYearData = new ArrayList<>(); + for (String year : years) { + Map requestParam = new HashMap<>(); + requestParam.put("tradeYear", year); + String subjectJoinResStr = HttpUtils.sendPostDataByJson(sgccAddress + provinceInnerSubjectJoinUrl, JSON.toJSONString(requestParam), DataPushUtils.createToken(publicKey)); + log.info("-省内交易情况-当年市场主体参与情况接口调用结果: {}", subjectJoinResStr); + if (StringUtils.isEmpty(subjectJoinResStr)) { + log.error("-省内交易情况-当年市场主体参与情况接口调用结果为空! url:{}, param:{}, result:{}", provinceInnerSubjectJoinUrl, requestParam, subjectJoinResStr); + continue; + } + Map map = JSON.parseObject(subjectJoinResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-省内交易情况-当年市场主体参与情况, data值为NULL!"); + continue; + } + //处理data + //orgTrade 市场准入数据 joinTrade 参与交易数据 + //participantType: 10,发电企业,20售电公司,30 电力用户 + Map>> dataResMap = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>>() { + }); + List> orgTrade = dataResMap.get("orgTrade"); + List> joinTrade = dataResMap.get("joinTrade"); + //市场准入 + String orgYieldNum = null; + String orgSaleNum = null; + String orgUserNum = null; + if (StringUtils.isNotEmpty(orgTrade)) { + orgYieldNum = orgTrade.stream().filter(obj -> "10".equals(obj.get("participantType"))).map(m -> m.get("tradeCount")).findFirst().orElse(null); + orgSaleNum = orgTrade.stream().filter(obj -> "20".equals(obj.get("participantType"))).map(m -> m.get("tradeCount")).findFirst().orElse(null); + orgUserNum = orgTrade.stream().filter(obj -> "30".equals(obj.get("participantType"))).map(m -> m.get("tradeCount")).findFirst().orElse(null); + } + //参与交易 + String joinYieldNum = null; + String joinSaleNum = null; + String joinUserNum = null; + if (StringUtils.isNotEmpty(joinTrade)) { + joinYieldNum = joinTrade.stream().filter(obj -> "10".equals(obj.get("participantType"))).map(m -> m.get("tradeCount")).findFirst().orElse(null); + joinSaleNum = joinTrade.stream().filter(obj -> "20".equals(obj.get("participantType"))).map(m -> m.get("tradeCount")).findFirst().orElse(null); + joinUserNum = joinTrade.stream().filter(obj -> "30".equals(obj.get("participantType"))).map(m -> m.get("tradeCount")).findFirst().orElse(null); + } + //入库参数 + Map insertParam = new HashMap<>(); + insertParam.put("tradeYear", year); + insertParam.put("orgYield", orgYieldNum); + insertParam.put("orgSale", orgSaleNum); + insertParam.put("orgUser", orgUserNum); + insertParam.put("joinYield", joinYieldNum); + insertParam.put("joinSale", joinSaleNum); + insertParam.put("joinUser", joinUserNum); + previousYearData.add(insertParam); + } + if (CollectionUtils.isEmpty(previousYearData)) { + return; + } + provinceInnerDataSyncMapper.delSubjectJoin(); + provinceInnerDataSyncMapper.insertSubjectJoin(previousYearData); + } + + /** + * 各电源类型交易电量占比 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void cleanEnergyDealPower() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + + Map requestParam = new HashMap<>(); + requestParam.put("tradeYear", String.valueOf(Year.now().getValue())); + String cleanEnergyResStr = HttpUtils.sendPostDataByJson(sgccAddress + cleanEnergyDealPowerUrl, JSON.toJSONString(requestParam), DataPushUtils.createToken(publicKey)); + log.info("-省内交易情况-清洁能源成交电量接口调用结果: {}", cleanEnergyResStr); + if (StringUtils.isEmpty(cleanEnergyResStr)) { + log.error("-省内交易情况-清洁能源成交电量接口调用结果为空! url:{}, param:{}, result:{}", provinceInnerSubjectJoinUrl, requestParam, cleanEnergyResStr); + return; + } + Map map = JSON.parseObject(cleanEnergyResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-省内交易情况-清洁能源成交电量, data值为NULL"); + return; + } + List> dataResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + + //封装入库参数 + List> insertParam = new ArrayList<>(); + dataResList.forEach(item -> { + Map insertParamItem = new HashMap<>(); + insertParamItem.put("tradeYear", item.get("tradeYear")); + insertParamItem.put("energyType", item.get("energyType")); + insertParamItem.put("vendee", item.get("sumVendeeEnergy")); + insertParamItem.put("sale", item.get("sumSaleEnergy")); + insertParam.add(insertParamItem); + }); + if (CollectionUtils.isEmpty(insertParam)) { + return; + } + provinceInnerDataSyncMapper.delCleanEnergy(); + provinceInnerDataSyncMapper.insertCleanEnergy(insertParam); + } + + /** + * 当年交易电量电价趋势 + */ + @Override + public void powerPriceTrend() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + Map requestMap = new HashMap<>(); + requestMap.put("tradeYear", String.valueOf(Year.now().getValue())); + String trendResStr = HttpUtils.sendPostDataByJson(sgccAddress + powerPriceTrendUrl, JSON.toJSONString(requestMap), DataPushUtils.createToken(publicKey)); + log.info("-省内交易情况-当年交易电量电价趋势接口调用结果: {}", trendResStr); + if (StringUtils.isEmpty(trendResStr)) { + log.error("-省内交易情况-当年交易电量电价趋势接口调用结果为空! url:{}, param:{}, result:{}", powerPriceTrendUrl, requestMap, trendResStr); + return; + } + Map map = JSON.parseObject(trendResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-省内交易情况-当年交易电量电价趋势, data值为NULL"); + return; + } + List> dataResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + + List> insertList = new ArrayList<>(); + dataResList.forEach(item -> { + Map insertListItem = new HashMap<>(); + insertListItem.put("tradeMonth", item.get("tradeMonth")); + insertListItem.put("vendeeEnergy", item.get("sumVendeeEnergy")); + insertListItem.put("vendeePrice", item.get("avgVendeePrice")); + insertListItem.put("saleEnergy", item.get("sumSaleEnergy")); + insertListItem.put("salePrice", item.get("avgSalePrice")); + insertList.add(insertListItem); + }); + if (CollectionUtils.isEmpty(dataResList)) { + return; + } + provinceInnerDataSyncMapper.delPowerPriceTrend(); + provinceInnerDataSyncMapper.insertPowerPriceTrend(insertList); + } + + /** + * 省内交易概况-交易概览 + */ + @Override + public void dealSurveyProvinceInner() throws IOException { + String sgccAddress = sgccAddressService.getSgccAddress(ENV_KEY); + System.out.println("sgccAddress = " + sgccAddress); + //当年年份、去年年份 + List years = DateUtils.getLastYear(2); + + for (String year : years) { + Map param = new HashMap<>(); + param.put("year", year); + String dealSurveyResStr = HttpUtils.sendPostDataByJson(sgccAddress + dealSurveyProvinceInnerUrl, JSON.toJSONString(param), DataPushUtils.createToken(publicKey)); + log.info("-省内交易情况-交易概览接口调用结果: param:{}, result:{}", year, dealSurveyResStr); + if (StringUtils.isEmpty(dealSurveyResStr)) { + log.error("-省内交易情况-交易概览接口调用结果为空! url:{}, param:{}, result:{}", + dealSurveyProvinceInnerUrl, JSON.toJSONString(param), dealSurveyResStr); + continue; + } + Map map = JSON.parseObject(dealSurveyResStr, Map.class); + Object data = map.get("data"); + if (null == data) { + log.error("-省内交易情况-交易概览, param: {}, data值为NULL!", year); + continue; + } + List> dealSurveyResList = JSON.parseObject(JSON.toJSONString(data), new TypeReference>>() {}); + + List> insertList = new ArrayList<>(); + for (Map dealSurveyResMap : dealSurveyResList) { + Map insertParam = new HashMap<>(); + insertParam.put("tradeYear", year); + insertParam.put("countTrade", dealSurveyResMap.get("tradeCount")); + insertParam.put("sumVendeeEnergy", dealSurveyResMap.get("energy")); + insertList.add(insertParam); + } + if (CollectionUtils.isEmpty(insertList)) { + continue; + } + provinceInnerDataSyncMapper.delDealSurvey(year); + provinceInnerDataSyncMapper.insertDealSurvey(insertList); + } + + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/DynamicDataPushTask.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/DynamicDataPushTask.java new file mode 100644 index 0000000..b52c96e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/DynamicDataPushTask.java @@ -0,0 +1,117 @@ +package com.alonginfo.project.gansu.task; + +import com.alonginfo.project.gansu.sync.BilateralConsultDataSync; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 甘肃二期-双边协商交易过程监视及回演 动态数据获取 定时任务 + * @author HaoXs + * + */ +@Slf4j +@Component +public class DynamicDataPushTask { + + @Autowired + private BilateralConsultDataSync bilateralConsultDataSync; + + /** + * 获取最新交易序列信息 + */ + public void getTradeSeqInfoList() { + try { + log.info("taskJob: ====获取双边协商-最新交易序列信息开始!====="); + bilateralConsultDataSync.getTradeSeqInfoList(); + log.info("taskJob: ====获取双边协商-最新交易序列信息结束!====="); + } catch (Exception e) { + log.info("获取双边协商-最新交易序列信息失败!", e.getMessage()); + e.printStackTrace(); + } + } + + /** + * 具体的交易公告详细信息 + */ + public void getTradeNotice() { + try { + log.info("taskJob: ====获取双边协商-交易公告详细信息开始! ======"); + bilateralConsultDataSync.getTradeNotice(); + log.info("taskJob: ====获取双边协商-交易公告详细信息结束! ======"); + } catch (Exception e) { + log.info("获取双边协商-交易公告详细信息失败!", e.getMessage()); + e.printStackTrace(); + } + } + + /** + * 获取售方申报信息和购方确认信息 - 交易情况数据 + */ + public void getTradeDetailList() { + try { + log.info("taskJob: ====获取双边协商-售方申报信息和购方确认信息开始! ===="); + bilateralConsultDataSync.getTradeDetailList(); + log.info("taskJob: ====获取双边协商-售方申报信息和购方确认信息结束! ===="); + } catch (Exception e) { + log.info("获取双边协商-售方申报信息和购方确认信息失败! ", e.getMessage()); + e.printStackTrace(); + } + } + + /** + * 获取售方申报的电量信息统计 - 发电类型统计 + */ + public void getTradeSaleEnergyList() { + try { + log.info("taskJob: ====获取双边协商-售方申报的电量信息统计开始! ===="); + bilateralConsultDataSync.getTradeSaleEnergyList(); + log.info("taskJob: ====获取双边协商-售方申报的电量信息统计结束! ===="); + } catch (Exception e) { + log.info("获取双边协商-售方申报的电量信息统计失败! ", e.getMessage()); + e.printStackTrace(); + } + } + + /** + * 获取交易量价走势数据 + */ + public void getPriceTrendList() { + try { + log.info("taskJob: ==== 获取双边协商-交易量价走势数据开始! ===="); + bilateralConsultDataSync.getPriceTrend(); + log.info("taskJob: ==== 获取双边协商-交易量价走势数据结束! ===="); + } catch (Exception e) { + log.info(" 获取双边协商-交易量价走势数据失败! ", e.getMessage()); + e.printStackTrace(); + } + } + + /** + * 获取交易量价走势 - 回演数据 + */ + public void getPriceTrendReplayList() { + try { + log.info("taskJob: ==== 获取双边协商-交易量价走势 - 回演数据开始! ===="); + bilateralConsultDataSync.getPriceTrendReplay(); + log.info("taskJob: ==== 获取双边协商-交易量价走势 - 回演数据结束! ===="); + } catch (Exception e) { + log.info(" 获取双边协商-交易量价走势- 回演数据失败! ",e.getMessage()); + e.printStackTrace(); + } + } + + /** + * 多日交易-实时状态:交易量价走势 + */ + public void getManyDayRealTime() { + try { + log.info("taskJob: ==== 获取双边协商-多日交易-实时状态:交易量价走势开始! ===="); + bilateralConsultDataSync.getRealTimeManyDay(); + log.info("taskJob: ==== 获取双边协商-多日交易-实时状态:交易量价走势结束! ===="); + } catch (Exception e) { + e.printStackTrace(); + log.info(" 获取双边协商-多日交易-实时状态:交易量价走势失败!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/PageDataPush.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/PageDataPush.java new file mode 100644 index 0000000..3ed3398 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/PageDataPush.java @@ -0,0 +1,117 @@ +package com.alonginfo.project.gansu.task; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.gansu.service.bilateralconsult.BilateralConsultService; +import com.alonginfo.project.gansu.service.dayaddthree.DayAddThreeSyncGet; +import com.alonginfo.project.gansu.service.focuslisting.FocusBiddingListingDealCommonService; +import com.alonginfo.websocket.server.WebSocketServer; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * 双边协商、挂牌交易、集中竞价、D+3页面实时数据推送 + */ +@Component +@Slf4j +public class PageDataPush { + + @Autowired + private WebSocketServer webSocketServer; + + @Autowired + private BilateralConsultService bilateralConsultService; + + @Autowired + private FocusBiddingListingDealCommonService focusBiddingListingDealCommonService; + + @Autowired + private DayAddThreeSyncGet dayAddThreeSyncGet; + + //双边协商pageId + private static final String sbPageId = "sb"; + + //集中竞价 + private static final String jzPageId = "jz"; + + //挂牌交易 + private static final String gpPageId = "gp"; + + //d+3页面实时数据推送 + private static final String d3PageId = "d3"; + + /** + * 双边协商页面数据推送 + */ + public void bilateralConsultDataPush() { + //判断是否在线 + if (webSocketServer.isOnlineForRealTimePage(sbPageId)) { + //获取tradeId + String tradeIdByPageId = webSocketServer.getTradeIdByPageId(sbPageId); + if (StringUtils.isEmpty(tradeIdByPageId)) { + log.error("-双边协商页面, 交易序列ID为空!, 数据推送失败!"); + return; + } + Map bilateralConsult = bilateralConsultService.getBilateralConsult(tradeIdByPageId); + webSocketServer.pushDataToRealTimePage(sbPageId, JSON.toJSONString(bilateralConsult)); + log.info("-双边协商页面, 实时数据推送成功!"); + } + } + + /** + * 集中竞价页面数据推送 + */ + public void focusBiddingDataPush() { + //判断是否在线 + if (webSocketServer.isOnlineForRealTimePage(jzPageId)) { + //获取tradeId + String tradeId = webSocketServer.getTradeIdByPageId(jzPageId); + if (StringUtils.isEmpty(tradeId)) { + log.error("-集中竞价页面, 交易序列ID为空!, 数据推送失败!"); + return; + } + Map focusBidding = focusBiddingListingDealCommonService.getFocusBidding("1", tradeId); + webSocketServer.pushDataToRealTimePage(sbPageId, JSON.toJSONString(focusBidding)); + log.info("-集中竞价页面, 实时数据推送成功!"); + } + } + + /** + * 挂牌交易页面数据推送 + */ + public void listingDealDataPush() { + //判断是否在线 + if (webSocketServer.isOnlineForRealTimePage(gpPageId)) { + //获取tradeId + String tradeId = webSocketServer.getTradeIdByPageId(gpPageId); + if (StringUtils.isEmpty(tradeId)) { + log.error("-挂牌交易页面, 交易序列ID为空!, 数据推送失败!"); + return; + } + Map listingDeal = focusBiddingListingDealCommonService.getFocusBidding("2", tradeId); + webSocketServer.pushDataToRealTimePage(sbPageId, JSON.toJSONString(listingDeal)); + log.info("-挂牌交易页面, 实时数据推送成功!"); + } + } + + /** + * d+3页面数据推送 + */ + public void dayAddThreeDataPush() { + //判断是否在线 + if (webSocketServer.isOnlineForRealTimePage(d3PageId)) { + //获取tradeId + String tradeId = webSocketServer.getTradeIdByPageId(d3PageId); + if (StringUtils.isEmpty(tradeId)) { + log.error("-D+3页面, 交易序列ID为空!, 数据推送失败!"); + return; + } + Map dayAddThreeResult = dayAddThreeSyncGet.dayAddThreeDataReturn(tradeId); + webSocketServer.pushDataToRealTimePage(sbPageId, JSON.toJSONString(dayAddThreeResult)); + log.info("-D+3页面, 实时数据推送成功!"); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/generation/GenerationRightTask.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/generation/GenerationRightTask.java new file mode 100644 index 0000000..c895393 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/generation/GenerationRightTask.java @@ -0,0 +1,74 @@ +package com.alonginfo.project.gansu.task.generation; + +import com.alonginfo.project.gansu.sync.GenerationRightDataSync; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @author: HaoXs + * @Date: 2023/5/17 17:58 + * @Description: 发电权交易情况场景 + */ +@Component +@Slf4j +public class GenerationRightTask { + + @Autowired + private GenerationRightDataSync generationRightDataSync; + + /** + * 发电权交易组织情况 + */ + public void getDealOrganize() { + try { + generationRightDataSync.dealOrganize(); + }catch (Exception e) { + log.error("-发电权交易情况-发电权交易组织情况数据同步失败!", e); + } + } + + /** + * 发电权交易市场主体参与情况 + */ + public void getSubjectJoin() { + try { + generationRightDataSync.subjectJoin(); + }catch (Exception e) { + log.error("-发电权交易情况-发电权交易市场主体参与情况数据同步失败!", e); + } + } + + /** + * 买入、卖出电量企业排名 + */ + public void getBuySaleEnterpriseOrder() { + try { + generationRightDataSync.buySaleEnterpriseOrder(); + }catch (Exception e) { + log.error("-发电权交易情况-当年买入、卖出电量企业排名数据同步失败!", e); + } + } + + /** + * 发电权交易与结算电量 历年数据 + */ + public void getTradeSettlementByYear() { + try { + generationRightDataSync.tradeSettlementByYear(); + }catch (Exception e) { + log.error("-发电权交易情况-历年发电权交易与结算电量数据同步失败!", e); + } + } + + /** + * 发电权交易与结算电量 当年各月数据 + */ + public void getTradeSettlementByCurrentYearMonth() { + try { + generationRightDataSync.tradeSettlementByCurrentYearMonth(); + }catch (Exception e) { + log.error("-发电权交易情况-当年分月发电权交易与结算电量数据同步失败!", e); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketbuild/MarketBuildTask.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketbuild/MarketBuildTask.java new file mode 100644 index 0000000..865b93f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketbuild/MarketBuildTask.java @@ -0,0 +1,41 @@ +package com.alonginfo.project.gansu.task.marketbuild; + +import com.alonginfo.project.gansu.sync.MarketBuildDataSync; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @author: HaoXs + * @Date: 2023/5/15 17:31 + * @Description: 市场建设 定时任务 + */ +@Slf4j +@Component +public class MarketBuildTask { + + @Autowired + private MarketBuildDataSync marketBuildDataSync; + + /** + * 年度电力直接交易规模 + */ + public void getPowerDirectDeal(){ + try { + marketBuildDataSync.powerDirectDeal(); + }catch (Exception e) { + log.info("-error: 市场建设-年度电力直接交易规模数据同步失败!", e); + } + } + + /** + * 各类市场主体数量 + */ + public void getEveryTypeSubjectNum() { + try { + marketBuildDataSync.everyTypeSubjectNum(); + }catch (Exception e) { + log.info("-error: 市场建设-各类市场主体数量数据同步失败!", e); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketsurvey/MarketSurveyTask.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketsurvey/MarketSurveyTask.java new file mode 100644 index 0000000..7664098 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketsurvey/MarketSurveyTask.java @@ -0,0 +1,38 @@ +package com.alonginfo.project.gansu.task.marketsurvey; + +import com.alonginfo.project.gansu.sync.MarketSurveyDataSync; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @author: HaoXs + * @Date: 2023/5/15 16:03 + * @Description: 市场概览 定时任务 + */ +@Slf4j +@Component +public class MarketSurveyTask { + + @Autowired + private MarketSurveyDataSync marketSurveyDataSync; + + /** + * 市场概览-市场主体类型、数量、占比 + */ + public void getMarketSubjectData() { + try { + marketSurveyDataSync.getMarketSubjectData(); + }catch (Exception e) { + log.error("-error: 市场概览-市场主体类型、数量、占比数据同步失败!", e); + } + } + + public void getYieldEnterpriseData() { + try { + marketSurveyDataSync.getYieldEnterpriseData(); + }catch (Exception e) { + log.error("-error: 市场概览-发电企业类型、数量、占比数据同步失败!", e); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/mltermcontract/MediumLongTermContractTask.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/mltermcontract/MediumLongTermContractTask.java new file mode 100644 index 0000000..947a093 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/mltermcontract/MediumLongTermContractTask.java @@ -0,0 +1,41 @@ +package com.alonginfo.project.gansu.task.mltermcontract; + +import com.alonginfo.project.gansu.sync.MediumLongTermContractDataSync; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @author: HaoXs + * @Date: 2023/5/15 17:49 + * @Description: 中长期合同签订情况 + */ +@Slf4j +@Component +public class MediumLongTermContractTask { + + @Autowired + private MediumLongTermContractDataSync mediumLongTermContractDataSync; + + /** + * 省内交易品种及交易电量 + */ + public void getTradeType() { + try { + mediumLongTermContractDataSync.tradeTypeAndPowerByProvinceInner(); + }catch (Exception e) { + log.error("-error: 中长期合同签订情况-省内交易品种及交易电量数据同步失败!", e); + } + } + + /** + * 省内电源类型及交易电量 + */ + public void getPowerSupply() { + try { + mediumLongTermContractDataSync.powerSupplyByProvinceInner(); + }catch (Exception e){ + log.error("-error: 中长期合同签订情况-省内电源类型及交易电量数据同步失败!", e); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/newenergy/NewEnergySurveyTask.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/newenergy/NewEnergySurveyTask.java new file mode 100644 index 0000000..e600924 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/newenergy/NewEnergySurveyTask.java @@ -0,0 +1,30 @@ +package com.alonginfo.project.gansu.task.newenergy; + +import com.alonginfo.project.gansu.sync.NewEnergySurveyDataSync; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @author: HaoXs + * @Date: 2023/5/17 17:52 + * @Description: 新能源概况场景 + */ +@Component +@Slf4j +public class NewEnergySurveyTask { + + @Autowired + private NewEnergySurveyDataSync newEnergySurveyDataSync; + + /** + * 新能源参与交易电量趋势 + */ + public void getJoinDealElectricTrend() { + try { + newEnergySurveyDataSync.joinDealElectricTrend(); + } catch (Exception e) { + log.error("-error: 新能源概况场景-新能源参与交易电量趋势数据同步失败!", e); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/provinceInner/ProvinceInnerTask.java b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/provinceInner/ProvinceInnerTask.java new file mode 100644 index 0000000..d7ef302 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/provinceInner/ProvinceInnerTask.java @@ -0,0 +1,74 @@ +package com.alonginfo.project.gansu.task.provinceInner; + +import com.alonginfo.project.gansu.sync.ProvinceInnerDataSync; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * @author: HaoXs + * @Date: 2023/5/15 17:37 + * @Description: 省内交易情况 定时任务 + */ +@Slf4j +@Component +public class ProvinceInnerTask { + + @Autowired + private ProvinceInnerDataSync provinceInnerDataSync; + + /** + * 交易组织情况接口 + */ + public void dealOrganize() { + try { + provinceInnerDataSync.dealOrganize(); + }catch (Exception e) { + log.error("-error: 省内交易情况-交易组织情况数据同步失败!", e); + } + } + + /** + * 当年市场主体参与情况 + */ + public void provinceInnerSubjectJoin() { + try { + provinceInnerDataSync.provinceInnerSubjectJoin(); + }catch (Exception e) { + log.error("-error: 省内交易情况-当年市场主体参与情况数据同步失败!", e); + } + } + + /** + * 清洁能源成交电量 + */ + public void cleanEnergyDealPower() { + try { + provinceInnerDataSync.cleanEnergyDealPower(); + }catch (Exception e) { + log.error("-error: 省内交易情况-清洁能源成交电量数据同步失败!", e); + } + } + + /** + * 当年交易电量电价趋势 + */ + public void powerPriceTrend() { + try { + provinceInnerDataSync.powerPriceTrend(); + }catch (Exception e) { + log.error("-error: 省内交易情况-当年交易电量电价趋势数据同步失败!", e); + } + } + + /** + * 交易概览 + */ + public void dealSurvey() { + try { + provinceInnerDataSync.dealSurveyProvinceInner(); + }catch (Exception e) { + log.error("-error: 省内交易情况-交易概览数据同步失败!", e); + } + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/ServerController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/ServerController.java new file mode 100644 index 0000000..f8c99a3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/ServerController.java @@ -0,0 +1,24 @@ +package com.alonginfo.project.monitor.controller; + +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.domain.Server; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 服务器监控 + */ +@RestController +@RequestMapping("/monitor/server") +public class ServerController extends BaseController { + @PreAuthorize("@ss.hasPermi('monitor:server:list')") + @GetMapping() + public AjaxResult getInfo() throws Exception { + Server server = new Server(); + server.copyTo(); + return AjaxResult.success(server); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysLogininforController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysLogininforController.java new file mode 100644 index 0000000..17c6e55 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysLogininforController.java @@ -0,0 +1,63 @@ +package com.alonginfo.project.monitor.controller; + +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.monitor.domain.SysLogininfor; +import com.alonginfo.project.monitor.service.ISysLogininforService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 系统访问记录 + * + * @author sdj + */ +@RestController +@RequestMapping("/monitor/logininfor") +public class SysLogininforController extends BaseController +{ + @Autowired + private ISysLogininforService logininforService; + + @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')") + @GetMapping("/list") + public TableDataInfo list(SysLogininfor logininfor) + { + startPage(); + List list = logininforService.selectLogininforList(logininfor); + return getDataTable(list); + } + + @Log(title = "登陆日志", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('monitor:logininfor:export')") + @GetMapping("/export") + public AjaxResult export(SysLogininfor logininfor) { + List list = logininforService.selectLogininforList(logininfor); + ExcelUtil util = new ExcelUtil(SysLogininfor.class); + return util.exportExcel(list, "登陆日志"); + } + + @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") + @Log(title = "登陆日志", businessType = BusinessType.DELETE) + @DeleteMapping("/{infoIds}") + public AjaxResult remove(@PathVariable Long[] infoIds) + { + return toAjax(logininforService.deleteLogininforByIds(infoIds)); + } + + @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") + @Log(title = "登陆日志", businessType = BusinessType.CLEAN) + @DeleteMapping("/clean") + public AjaxResult clean() + { + logininforService.cleanLogininfor(); + return AjaxResult.success(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysOperlogController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysOperlogController.java new file mode 100644 index 0000000..040fc3c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysOperlogController.java @@ -0,0 +1,57 @@ +package com.alonginfo.project.monitor.controller; + +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.monitor.domain.SysOperLog; +import com.alonginfo.project.monitor.service.ISysOperLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 操作日志记录 + */ +@RestController +@RequestMapping("/monitor/operlog") +public class SysOperlogController extends BaseController { + @Autowired + private ISysOperLogService operLogService; + + @PreAuthorize("@ss.hasPermi('monitor:operlog:list')") + @GetMapping("/list") + public TableDataInfo list(SysOperLog operLog) { + startPage(); + List list = operLogService.selectOperLogList(operLog); + return getDataTable(list); + } + + @Log(title = "操作日志", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('monitor:operlog:export')") + @GetMapping("/export") + public AjaxResult export(SysOperLog operLog) { + List list = operLogService.selectOperLogList(operLog); + ExcelUtil util = new ExcelUtil(SysOperLog.class); + return util.exportExcel(list, "操作日志"); + } + + @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") + @DeleteMapping("/{operIds}") + public AjaxResult remove(@PathVariable Long[] operIds) { + return toAjax(operLogService.deleteOperLogByIds(operIds)); + } + + @Log(title = "操作日志", businessType = BusinessType.CLEAN) + @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") + @DeleteMapping("/clean") + public AjaxResult clean() + { + operLogService.cleanOperLog(); + return AjaxResult.success(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysUserOnlineController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysUserOnlineController.java new file mode 100644 index 0000000..b5d4254 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysUserOnlineController.java @@ -0,0 +1,73 @@ +package com.alonginfo.project.monitor.controller; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.redis.RedisCache; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.monitor.domain.SysUserOnline; +import com.alonginfo.project.system.service.ISysUserOnlineService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * 在线用户监控 + */ +@RestController +@RequestMapping("/monitor/online") +public class SysUserOnlineController extends BaseController { + @Autowired + private ISysUserOnlineService userOnlineService; + + @Autowired + private RedisCache redisCache; + + @PreAuthorize("@ss.hasPermi('monitor:online:list')") + @GetMapping("/list") + public TableDataInfo list(String ipaddr, String userName) { + Collection keys = redisCache.keys(Constants.LOGIN_TOKEN_KEY + "*"); + List userOnlineList = new ArrayList(); + for (String key : keys) { + LoginUser user = redisCache.getCacheObject(key); + if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName)) { + if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername())) { + userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user)); + } + } else if (StringUtils.isNotEmpty(ipaddr)) { + if (StringUtils.equals(ipaddr, user.getIpaddr())) { + userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user)); + } + } else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser())) { + if (StringUtils.equals(userName, user.getUsername())) { + userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user)); + } + } else { + userOnlineList.add(userOnlineService.loginUserToUserOnline(user)); + } + } + Collections.reverse(userOnlineList); + userOnlineList.removeAll(Collections.singleton(null)); + return getDataTable(userOnlineList); + } + + /** + * 强退用户 + */ + @PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')") + @Log(title = "在线用户", businessType = BusinessType.DELETE) + @DeleteMapping("/{tokenId}") + public AjaxResult forceLogout(@PathVariable String tokenId) { + redisCache.deleteObject(Constants.LOGIN_TOKEN_KEY + tokenId); + return AjaxResult.success(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysLogininfor.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysLogininfor.java new file mode 100644 index 0000000..1b1bf4c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysLogininfor.java @@ -0,0 +1,140 @@ +package com.alonginfo.project.monitor.domain; + +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.web.domain.BaseEntity; + +import java.util.Date; + +/** + * 系统访问记录表 sys_logininfor + */ +public class SysLogininfor extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** ID */ + @Excel(name = "序号", cellType = ColumnType.NUMERIC) + private Long infoId; + + /** 用户账号 */ + @Excel(name = "用户账号") + private String userName; + + /** 登录状态 0成功 1失败 */ + @Excel(name = "登录状态", readConverterExp = "0=成功,1=失败") + private String status; + + /** 登录IP地址 */ + @Excel(name = "登录地址") + private String ipaddr; + + /** 登录地点 */ + @Excel(name = "登录地点") + private String loginLocation; + + /** 浏览器类型 */ + @Excel(name = "浏览器") + private String browser; + + /** 操作系统 */ + @Excel(name = "操作系统") + private String os; + + /** 提示消息 */ + @Excel(name = "提示消息") + private String msg; + + /** 访问时间 */ + @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date loginTime; + + public Long getInfoId() + { + return infoId; + } + + public void setInfoId(Long infoId) + { + this.infoId = infoId; + } + + public String getUserName() + { + return userName; + } + + public void setUserName(String userName) + { + this.userName = userName; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getIpaddr() + { + return ipaddr; + } + + public void setIpaddr(String ipaddr) + { + this.ipaddr = ipaddr; + } + + public String getLoginLocation() + { + return loginLocation; + } + + public void setLoginLocation(String loginLocation) + { + this.loginLocation = loginLocation; + } + + public String getBrowser() + { + return browser; + } + + public void setBrowser(String browser) + { + this.browser = browser; + } + + public String getOs() + { + return os; + } + + public void setOs(String os) + { + this.os = os; + } + + public String getMsg() + { + return msg; + } + + public void setMsg(String msg) + { + this.msg = msg; + } + + public Date getLoginTime() + { + return loginTime; + } + + public void setLoginTime(Date loginTime) + { + this.loginTime = loginTime; + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysOperLog.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysOperLog.java new file mode 100644 index 0000000..f5810ff --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysOperLog.java @@ -0,0 +1,251 @@ +package com.alonginfo.project.monitor.domain; + +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.web.domain.BaseEntity; + +import java.util.Date; + +/** + * 操作日志记录表 oper_log + */ +public class SysOperLog extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 日志主键 */ + @Excel(name = "操作序号", cellType = ColumnType.NUMERIC) + private Long operId; + + /** 操作模块 */ + @Excel(name = "操作模块") + private String title; + + /** 业务类型(0其它 1新增 2修改 3删除) */ + @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据") + private Integer businessType; + + /** 业务类型数组 */ + private Integer[] businessTypes; + + /** 请求方法 */ + @Excel(name = "请求方法") + private String method; + + /** 请求方式 */ + @Excel(name = "请求方式") + private String requestMethod; + + /** 操作类别(0其它 1后台用户 2手机端用户) */ + @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户") + private Integer operatorType; + + /** 操作人员 */ + @Excel(name = "操作人员") + private String operName; + + /** 部门名称 */ + @Excel(name = "部门名称") + private String deptName; + + /** 请求url */ + @Excel(name = "请求地址") + private String operUrl; + + /** 操作地址 */ + @Excel(name = "操作地址") + private String operIp; + + /** 操作地点 */ + @Excel(name = "操作地点") + private String operLocation; + + /** 请求参数 */ + @Excel(name = "请求参数") + private String operParam; + + /** 返回参数 */ + @Excel(name = "返回参数") + private String jsonResult; + + /** 操作状态(0正常 1异常) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=异常") + private Integer status; + + /** 错误消息 */ + @Excel(name = "错误消息") + private String errorMsg; + + /** 操作时间 */ + @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date operTime; + + public Long getOperId() + { + return operId; + } + + public void setOperId(Long operId) + { + this.operId = operId; + } + + public String getTitle() + { + return title; + } + + public void setTitle(String title) + { + this.title = title; + } + + public Integer getBusinessType() + { + return businessType; + } + + public void setBusinessType(Integer businessType) + { + this.businessType = businessType; + } + + public Integer[] getBusinessTypes() + { + return businessTypes; + } + + public void setBusinessTypes(Integer[] businessTypes) + { + this.businessTypes = businessTypes; + } + + public String getMethod() + { + return method; + } + + public void setMethod(String method) + { + this.method = method; + } + + public String getRequestMethod() + { + return requestMethod; + } + + public void setRequestMethod(String requestMethod) + { + this.requestMethod = requestMethod; + } + + public Integer getOperatorType() + { + return operatorType; + } + + public void setOperatorType(Integer operatorType) + { + this.operatorType = operatorType; + } + + public String getOperName() + { + return operName; + } + + public void setOperName(String operName) + { + this.operName = operName; + } + + public String getDeptName() + { + return deptName; + } + + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + public String getOperUrl() + { + return operUrl; + } + + public void setOperUrl(String operUrl) + { + this.operUrl = operUrl; + } + + public String getOperIp() + { + return operIp; + } + + public void setOperIp(String operIp) + { + this.operIp = operIp; + } + + public String getOperLocation() + { + return operLocation; + } + + public void setOperLocation(String operLocation) + { + this.operLocation = operLocation; + } + + public String getOperParam() + { + return operParam; + } + + public void setOperParam(String operParam) + { + this.operParam = operParam; + } + + public String getJsonResult() + { + return jsonResult; + } + + public void setJsonResult(String jsonResult) + { + this.jsonResult = jsonResult; + } + + public Integer getStatus() + { + return status; + } + + public void setStatus(Integer status) + { + this.status = status; + } + + public String getErrorMsg() + { + return errorMsg; + } + + public void setErrorMsg(String errorMsg) + { + this.errorMsg = errorMsg; + } + + public Date getOperTime() + { + return operTime; + } + + public void setOperTime(Date operTime) + { + this.operTime = operTime; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysUserOnline.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysUserOnline.java new file mode 100644 index 0000000..a3ee508 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysUserOnline.java @@ -0,0 +1,110 @@ +package com.alonginfo.project.monitor.domain; + +/** + * 当前在线会话 + */ +public class SysUserOnline { + /** 会话编号 */ + private String tokenId; + + /** 部门名称 */ + private String deptName; + + /** 用户名称 */ + private String userName; + + /** 登录IP地址 */ + private String ipaddr; + + /** 登录地址 */ + private String loginLocation; + + /** 浏览器类型 */ + private String browser; + + /** 操作系统 */ + private String os; + + /** 登录时间 */ + private Long loginTime; + + public String getTokenId() + { + return tokenId; + } + + public void setTokenId(String tokenId) + { + this.tokenId = tokenId; + } + + public String getDeptName() + { + return deptName; + } + + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + public String getUserName() + { + return userName; + } + + public void setUserName(String userName) + { + this.userName = userName; + } + + public String getIpaddr() + { + return ipaddr; + } + + public void setIpaddr(String ipaddr) + { + this.ipaddr = ipaddr; + } + + public String getLoginLocation() + { + return loginLocation; + } + + public void setLoginLocation(String loginLocation) + { + this.loginLocation = loginLocation; + } + + public String getBrowser() + { + return browser; + } + + public void setBrowser(String browser) + { + this.browser = browser; + } + + public String getOs() + { + return os; + } + + public void setOs(String os) + { + this.os = os; + } + + public Long getLoginTime() + { + return loginTime; + } + + public void setLoginTime(Long loginTime) + { + this.loginTime = loginTime; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysLogininforMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysLogininforMapper.java new file mode 100644 index 0000000..ab6eaec --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysLogininforMapper.java @@ -0,0 +1,40 @@ +package com.alonginfo.project.monitor.mapper; + +import com.alonginfo.project.monitor.domain.SysLogininfor; + +import java.util.List; + +/** + * 系统访问日志情况信息 数据层 + */ +public interface SysLogininforMapper { + /** + * 新增系统登录日志 + * + * @param logininfor 访问日志对象 + */ + public void insertLogininfor(SysLogininfor logininfor); + + /** + * 查询系统登录日志集合 + * + * @param logininfor 访问日志对象 + * @return 登录记录集合 + */ + public List selectLogininforList(SysLogininfor logininfor); + + /** + * 批量删除系统登录日志 + * + * @param infoIds 需要删除的登录日志ID + * @return 结果 + */ + public int deleteLogininforByIds(Long[] infoIds); + + /** + * 清空系统登录日志 + * + * @return 结果 + */ + public int cleanLogininfor(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysOperLogMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysOperLogMapper.java new file mode 100644 index 0000000..88cd83f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysOperLogMapper.java @@ -0,0 +1,46 @@ +package com.alonginfo.project.monitor.mapper; + +import com.alonginfo.project.monitor.domain.SysOperLog; + +import java.util.List; + +/** + * 操作日志 数据层 + */ +public interface SysOperLogMapper { + /** + * 新增操作日志 + * + * @param operLog 操作日志对象 + */ + public void insertOperlog(SysOperLog operLog); + + /** + * 查询系统操作日志集合 + * + * @param operLog 操作日志对象 + * @return 操作日志集合 + */ + public List selectOperLogList(SysOperLog operLog); + + /** + * 批量删除系统操作日志 + * + * @param operIds 需要删除的操作日志ID + * @return 结果 + */ + public int deleteOperLogByIds(Long[] operIds); + + /** + * 查询操作日志详细 + * + * @param operId 操作ID + * @return 操作日志对象 + */ + public SysOperLog selectOperLogById(Long operId); + + /** + * 清空操作日志 + */ + public void cleanOperLog(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysLogininforService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysLogininforService.java new file mode 100644 index 0000000..6bbb56c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysLogininforService.java @@ -0,0 +1,41 @@ +package com.alonginfo.project.monitor.service; + +import com.alonginfo.project.monitor.domain.SysLogininfor; + +import java.util.List; + +/** + * 系统访问日志情况信息 服务层 + * + * @author sdj + */ +public interface ISysLogininforService +{ + /** + * 新增系统登录日志 + * + * @param logininfor 访问日志对象 + */ + public void insertLogininfor(SysLogininfor logininfor); + + /** + * 查询系统登录日志集合 + * + * @param logininfor 访问日志对象 + * @return 登录记录集合 + */ + public List selectLogininforList(SysLogininfor logininfor); + + /** + * 批量删除系统登录日志 + * + * @param infoIds 需要删除的登录日志ID + * @return + */ + public int deleteLogininforByIds(Long[] infoIds); + + /** + * 清空系统登录日志 + */ + public void cleanLogininfor(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysOperLogService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysOperLogService.java new file mode 100644 index 0000000..33a7b0a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysOperLogService.java @@ -0,0 +1,46 @@ +package com.alonginfo.project.monitor.service; + +import com.alonginfo.project.monitor.domain.SysOperLog; + +import java.util.List; + +/** + * 操作日志 服务层 + */ +public interface ISysOperLogService { + /** + * 新增操作日志 + * + * @param operLog 操作日志对象 + */ + public void insertOperlog(SysOperLog operLog); + + /** + * 查询系统操作日志集合 + * + * @param operLog 操作日志对象 + * @return 操作日志集合 + */ + public List selectOperLogList(SysOperLog operLog); + + /** + * 批量删除系统操作日志 + * + * @param operIds 需要删除的操作日志ID + * @return 结果 + */ + public int deleteOperLogByIds(Long[] operIds); + + /** + * 查询操作日志详细 + * + * @param operId 操作ID + * @return 操作日志对象 + */ + public SysOperLog selectOperLogById(Long operId); + + /** + * 清空操作日志 + */ + public void cleanOperLog(); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysLogininforServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysLogininforServiceImpl.java new file mode 100644 index 0000000..5bdd8cc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysLogininforServiceImpl.java @@ -0,0 +1,63 @@ +package com.alonginfo.project.monitor.service.impl; + +import com.alonginfo.project.monitor.domain.SysLogininfor; +import com.alonginfo.project.monitor.mapper.SysLogininforMapper; +import com.alonginfo.project.monitor.service.ISysLogininforService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 系统访问日志情况信息 服务层处理 + */ +@Service +public class SysLogininforServiceImpl implements ISysLogininforService { + + @Autowired + private SysLogininforMapper logininforMapper; + + /** + * 新增系统登录日志 + * + * @param logininfor 访问日志对象 + */ + @Override + public void insertLogininfor(SysLogininfor logininfor) + { + logininforMapper.insertLogininfor(logininfor); + } + + /** + * 查询系统登录日志集合 + * + * @param logininfor 访问日志对象 + * @return 登录记录集合 + */ + @Override + public List selectLogininforList(SysLogininfor logininfor) + { + return logininforMapper.selectLogininforList(logininfor); + } + + /** + * 批量删除系统登录日志 + * + * @param infoIds 需要删除的登录日志ID + * @return + */ + @Override + public int deleteLogininforByIds(Long[] infoIds) + { + return logininforMapper.deleteLogininforByIds(infoIds); + } + + /** + * 清空系统登录日志 + */ + @Override + public void cleanLogininfor() + { + logininforMapper.cleanLogininfor(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysOperLogServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysOperLogServiceImpl.java new file mode 100644 index 0000000..6f64da7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysOperLogServiceImpl.java @@ -0,0 +1,73 @@ +package com.alonginfo.project.monitor.service.impl; + +import com.alonginfo.project.monitor.domain.SysOperLog; +import com.alonginfo.project.monitor.mapper.SysOperLogMapper; +import com.alonginfo.project.monitor.service.ISysOperLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 操作日志 服务层处理 + */ +@Service +public class SysOperLogServiceImpl implements ISysOperLogService { + @Autowired + private SysOperLogMapper operLogMapper; + + /** + * 新增操作日志 + * + * @param operLog 操作日志对象 + */ + @Override + public void insertOperlog(SysOperLog operLog) + { + operLogMapper.insertOperlog(operLog); + } + + /** + * 查询系统操作日志集合 + * + * @param operLog 操作日志对象 + * @return 操作日志集合 + */ + @Override + public List selectOperLogList(SysOperLog operLog) + { + return operLogMapper.selectOperLogList(operLog); + } + + /** + * 批量删除系统操作日志 + * + * @param operIds 需要删除的操作日志ID + * @return 结果 + */ + public int deleteOperLogByIds(Long[] operIds) + { + return operLogMapper.deleteOperLogByIds(operIds); + } + + /** + * 查询操作日志详细 + * + * @param operId 操作ID + * @return 操作日志对象 + */ + @Override + public SysOperLog selectOperLogById(Long operId) + { + return operLogMapper.selectOperLogById(operId); + } + + /** + * 清空操作日志 + */ + @Override + public void cleanOperLog() + { + operLogMapper.cleanOperLog(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysConfigController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysConfigController.java new file mode 100644 index 0000000..094dc86 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysConfigController.java @@ -0,0 +1,119 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.system.domain.SysConfig; +import com.alonginfo.project.system.service.ISysConfigService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 参数配置 信息操作处理 + * + * @author sdj + */ +@Api(value="参数配置 信息操作处理") +@RestController +@RequestMapping("/system/config") +public class SysConfigController extends BaseController { + @Autowired + private ISysConfigService configService; + + /** + * 获取参数配置列表 + */ + @ApiOperation("获取参数配置列表") + @PreAuthorize("@ss.hasPermi('system:config:list')") + @GetMapping("/list") + public TableDataInfo list(SysConfig config) + { + startPage(); + List list = configService.selectConfigList(config); + return getDataTable(list); + } + + @ApiOperation("参数管理") + @Log(title = "参数管理", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('system:config:export')") + @GetMapping("/export") + public AjaxResult export(SysConfig config) + { + List list = configService.selectConfigList(config); + ExcelUtil util = new ExcelUtil(SysConfig.class); + return util.exportExcel(list, "参数数据"); + } + + /** + * 根据参数编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:config:query')") + @GetMapping(value = "/{configId}") + public AjaxResult getInfo(@PathVariable Long configId) + { + return AjaxResult.success(configService.selectConfigById(configId)); + } + + /** + * 根据参数键名查询参数值 + */ + @GetMapping(value = "/configKey/{configKey}") + public AjaxResult getConfigKey(@PathVariable String configKey) + { + return AjaxResult.success(configService.selectConfigByKey(configKey)); + } + + /** + * 新增参数配置 + */ + @PreAuthorize("@ss.hasPermi('system:config:add')") + @Log(title = "参数管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysConfig config) + { + if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) + { + return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); + } + config.setCreateBy(SecurityUtils.getUsername()); + return toAjax(configService.insertConfig(config)); + } + + /** + * 修改参数配置 + */ + @PreAuthorize("@ss.hasPermi('system:config:edit')") + @Log(title = "参数管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysConfig config) + { + if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) + { + return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在"); + } + config.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(configService.updateConfig(config)); + } + + /** + * 删除参数配置 + */ + @PreAuthorize("@ss.hasPermi('system:config:remove')") + @Log(title = "参数管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{configIds}") + public AjaxResult remove(@PathVariable Long[] configIds) + { + return toAjax(configService.deleteConfigByIds(configIds)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDeptController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDeptController.java new file mode 100644 index 0000000..390f419 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDeptController.java @@ -0,0 +1,124 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.system.domain.SysDept; +import com.alonginfo.project.system.service.ISysDeptService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 部门信息 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/dept") +public class SysDeptController extends BaseController { + @Autowired + private ISysDeptService deptService; + + /** + * 获取部门列表 + */ + @PreAuthorize("@ss.hasPermi('system:dept:list')") + @GetMapping("/list") + public AjaxResult list(SysDept dept) { + List depts = deptService.selectDeptList(dept); + return AjaxResult.success(deptService.buildDeptTree(depts)); + } + + /** + * 根据部门编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:dept:query')") + @GetMapping(value = "/{deptId}") + public AjaxResult getInfo(@PathVariable Long deptId) { + return AjaxResult.success(deptService.selectDeptById(deptId)); + } + + /** + * 获取部门下拉树列表 + */ + @GetMapping("/treeselect") + public AjaxResult treeselect(SysDept dept) { + List depts = deptService.selectDeptList(dept); + return AjaxResult.success(deptService.buildDeptTreeSelect(depts)); + } + + /** + * 加载对应角色部门列表树 + */ + @GetMapping(value = "/roleDeptTreeselect/{roleId}") + public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId) + { + List depts = deptService.selectDeptList(new SysDept()); + AjaxResult ajax = AjaxResult.success(); + ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId)); + ajax.put("depts", deptService.buildDeptTreeSelect(depts)); + return ajax; + } + + /** + * 新增部门 + */ + @PreAuthorize("@ss.hasPermi('system:dept:add')") + @Log(title = "部门管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysDept dept) + { + if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) + { + return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); + } + dept.setCreateBy(SecurityUtils.getUsername()); + return toAjax(deptService.insertDept(dept)); + } + + /** + * 修改部门 + */ + @PreAuthorize("@ss.hasPermi('system:dept:edit')") + @Log(title = "部门管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysDept dept) + { + if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) + { + return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); + } + else if (dept.getParentId().equals(dept.getDeptId())) + { + return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); + } + dept.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(deptService.updateDept(dept)); + } + + /** + * 删除部门 + */ + @PreAuthorize("@ss.hasPermi('system:dept:remove')") + @Log(title = "部门管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{deptId}") + public AjaxResult remove(@PathVariable Long deptId) + { + if (deptService.hasChildByDeptId(deptId)) + { + return AjaxResult.error("存在下级部门,不允许删除"); + } + if (deptService.checkDeptExistUser(deptId)) + { + return AjaxResult.error("部门存在用户,不允许删除"); + } + return toAjax(deptService.deleteDeptById(deptId)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictDataController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictDataController.java new file mode 100644 index 0000000..d3af952 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictDataController.java @@ -0,0 +1,103 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.system.domain.SysDictData; +import com.alonginfo.project.system.service.ISysDictDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 数据字典信息 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/dict/data") +public class SysDictDataController extends BaseController +{ + @Autowired + private ISysDictDataService dictDataService; + + @PreAuthorize("@ss.hasPermi('system:dict:list')") + @GetMapping("/list") + public TableDataInfo list(SysDictData dictData) + { + startPage(); + List list = dictDataService.selectDictDataList(dictData); + return getDataTable(list); + } + + @Log(title = "字典数据", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('system:dict:export')") + @GetMapping("/export") + public AjaxResult export(SysDictData dictData) + { + List list = dictDataService.selectDictDataList(dictData); + ExcelUtil util = new ExcelUtil(SysDictData.class); + return util.exportExcel(list, "字典数据"); + } + + /** + * 查询字典数据详细 + */ + @PreAuthorize("@ss.hasPermi('system:dict:query')") + @GetMapping(value = "/{dictCode}") + public AjaxResult getInfo(@PathVariable Long dictCode) + { + return AjaxResult.success(dictDataService.selectDictDataById(dictCode)); + } + + /** + * 根据字典类型查询字典数据信息 + */ + @GetMapping(value = "/dictType/{dictType}") + public AjaxResult dictType(@PathVariable String dictType) + { + return AjaxResult.success(dictDataService.selectDictDataByType(dictType)); + } + + /** + * 新增字典类型 + */ + @PreAuthorize("@ss.hasPermi('system:dict:add')") + @Log(title = "字典数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysDictData dict) + { + dict.setCreateBy(SecurityUtils.getUsername()); + return toAjax(dictDataService.insertDictData(dict)); + } + + /** + * 修改保存字典类型 + */ + @PreAuthorize("@ss.hasPermi('system:dict:edit')") + @Log(title = "字典数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysDictData dict) + { + dict.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(dictDataService.updateDictData(dict)); + } + + /** + * 删除字典类型 + */ + @PreAuthorize("@ss.hasPermi('system:dict:remove')") + @Log(title = "字典类型", businessType = BusinessType.DELETE) + @DeleteMapping("/{dictCodes}") + public AjaxResult remove(@PathVariable Long[] dictCodes) + { + return toAjax(dictDataService.deleteDictDataByIds(dictCodes)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictTypeController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictTypeController.java new file mode 100644 index 0000000..1dc048f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictTypeController.java @@ -0,0 +1,103 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.system.domain.SysDictType; +import com.alonginfo.project.system.service.ISysDictTypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 数据字典信息 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/dict/type") +public class SysDictTypeController extends BaseController { + @Autowired + private ISysDictTypeService dictTypeService; + + @PreAuthorize("@ss.hasPermi('system:dict:list')") + @GetMapping("/list") + public TableDataInfo list(SysDictType dictType) { + startPage(); + List list = dictTypeService.selectDictTypeList(dictType); + return getDataTable(list); + } + + @Log(title = "字典类型", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('system:dict:export')") + @GetMapping("/export") + public AjaxResult export(SysDictType dictType) { + List list = dictTypeService.selectDictTypeList(dictType); + ExcelUtil util = new ExcelUtil(SysDictType.class); + return util.exportExcel(list, "字典类型"); + } + + /** + * 查询字典类型详细 + */ + @PreAuthorize("@ss.hasPermi('system:dict:query')") + @GetMapping(value = "/{dictId}") + public AjaxResult getInfo(@PathVariable Long dictId) { + return AjaxResult.success(dictTypeService.selectDictTypeById(dictId)); + } + + /** + * 新增字典类型 + */ + @PreAuthorize("@ss.hasPermi('system:dict:add')") + @Log(title = "字典类型", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysDictType dict) { + if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { + return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); + } + dict.setCreateBy(SecurityUtils.getUsername()); + return toAjax(dictTypeService.insertDictType(dict)); + } + + /** + * 修改字典类型 + */ + @PreAuthorize("@ss.hasPermi('system:dict:edit')") + @Log(title = "字典类型", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysDictType dict) { + if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { + return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); + } + dict.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(dictTypeService.updateDictType(dict)); + } + + /** + * 删除字典类型 + */ + @PreAuthorize("@ss.hasPermi('system:dict:remove')") + @Log(title = "字典类型", businessType = BusinessType.DELETE) + @DeleteMapping("/{dictIds}") + public AjaxResult remove(@PathVariable Long[] dictIds) { + return toAjax(dictTypeService.deleteDictTypeByIds(dictIds)); + } + + /** + * 获取字典选择框列表 + */ + @GetMapping("/optionselect") + public AjaxResult optionselect() { + List dictTypes = dictTypeService.selectDictTypeAll(); + return AjaxResult.success(dictTypes); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysLoginController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysLoginController.java new file mode 100644 index 0000000..8015229 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysLoginController.java @@ -0,0 +1,94 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.SysLoginService; +import com.alonginfo.framework.security.service.SysPermissionService; +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.system.domain.SysMenu; +import com.alonginfo.project.system.domain.SysUser; +import com.alonginfo.project.system.service.ISysMenuService; +import com.alonginfo.project.tool.RSAUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Set; + +/** + * 登录验证 + * + * @author sdj + */ +@RestController +public class SysLoginController { + @Autowired + private SysLoginService loginService; + + @Autowired + private ISysMenuService menuService; + + @Autowired + private SysPermissionService permissionService; + + @Autowired + private TokenService tokenService; + + /** + * 登录方法 + * + * @param username 用户名 + * @param password 密码 + * @param captcha 验证码 + * @param uuid 唯一标识 + * @return 结果 + */ + @PostMapping("/login") + public AjaxResult login(String username, String password, String code, String uuid) { + + AjaxResult ajax = AjaxResult.success(); + String password2 = RSAUtils.decrypt(password); + // 生成令牌 + String token = loginService.login(username, password2, code, uuid); + ajax.put(Constants.TOKEN, token); + return ajax; + } + + /** + * 获取用户信息 + * + * @return 用户信息 + */ + @GetMapping("getInfo") + public AjaxResult getInfo() { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + SysUser user = loginUser.getUser(); + // 角色集合 + Set roles = permissionService.getRolePermission(user); + // 权限集合 + Set permissions = permissionService.getMenuPermission(user); + AjaxResult ajax = AjaxResult.success(); + ajax.put("user", user); + ajax.put("roles", roles); + ajax.put("permissions", permissions); + return ajax; + } + + /** + * 获取路由信息 + * + * @return 路由信息 + */ + @GetMapping("getRouters") + public AjaxResult getRouters() { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + // 用户信息 + SysUser user = loginUser.getUser(); + List menus = menuService.selectMenuTreeByUserId(user.getUserId()); + return AjaxResult.success(menuService.buildMenus(menus)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysMenuController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysMenuController.java new file mode 100644 index 0000000..d6236de --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysMenuController.java @@ -0,0 +1,123 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.system.domain.SysMenu; +import com.alonginfo.project.system.service.ISysMenuService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 菜单信息 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/menu") +public class SysMenuController extends BaseController { + @Autowired + private ISysMenuService menuService; + + @Autowired + private TokenService tokenService; + + /** + * 获取菜单列表 + */ + @PreAuthorize("@ss.hasPermi('system:menu:list')") + @GetMapping("/list") + public AjaxResult list(SysMenu menu) { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + Long userId = loginUser.getUser().getUserId(); + List menus = menuService.selectMenuList(menu, userId); + return AjaxResult.success(menuService.buildMenuTree(menus)); + } + + /** + * 根据菜单编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:menu:query')") + @GetMapping(value = "/{menuId}") + public AjaxResult getInfo(@PathVariable Long menuId) { + return AjaxResult.success(menuService.selectMenuById(menuId)); + } + + /** + * 获取菜单下拉树列表 + */ + @GetMapping("/treeselect") + public AjaxResult treeselect(SysMenu menu) { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + Long userId = loginUser.getUser().getUserId(); + List menus = menuService.selectMenuList(menu, userId); + return AjaxResult.success(menuService.buildMenuTreeSelect(menus)); + } + + /** + * 加载对应角色菜单列表树 + */ + @GetMapping(value = "/roleMenuTreeselect/{roleId}") + public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId) { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + List menus = menuService.selectMenuList(loginUser.getUser().getUserId()); + AjaxResult ajax = AjaxResult.success(); + ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId)); + ajax.put("menus", menuService.buildMenuTreeSelect(menus)); + return ajax; + } + + /** + * 新增菜单 + */ + @PreAuthorize("@ss.hasPermi('system:menu:add')") + @Log(title = "菜单管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysMenu menu) { + if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) { + return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); + } + menu.setCreateBy(SecurityUtils.getUsername()); + return toAjax(menuService.insertMenu(menu)); + } + + /** + * 修改菜单 + */ + @PreAuthorize("@ss.hasPermi('system:menu:edit')") + @Log(title = "菜单管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysMenu menu) { + if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) { + return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); + } + menu.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(menuService.updateMenu(menu)); + } + + /** + * 删除菜单 + */ + @PreAuthorize("@ss.hasPermi('system:menu:remove')") + @Log(title = "菜单管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{menuId}") + public AjaxResult remove(@PathVariable("menuId") Long menuId) { + if (menuService.hasChildByMenuId(menuId)) { + return AjaxResult.error("存在子菜单,不允许删除"); + } + if (menuService.checkMenuExistRole(menuId)) { + return AjaxResult.error("菜单已分配,不允许删除"); + } + return toAjax(menuService.deleteMenuById(menuId)); + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysNoticeController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysNoticeController.java new file mode 100644 index 0000000..53f7510 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysNoticeController.java @@ -0,0 +1,86 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.system.domain.SysNotice; +import com.alonginfo.project.system.service.ISysNoticeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 公告 信息操作处理 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/notice") +public class SysNoticeController extends BaseController +{ + @Autowired + private ISysNoticeService noticeService; + + /** + * 获取通知公告列表 + */ + @PreAuthorize("@ss.hasPermi('system:notice:list')") + @GetMapping("/list") + public TableDataInfo list(SysNotice notice) + { + startPage(); + List list = noticeService.selectNoticeList(notice); + return getDataTable(list); + } + + /** + * 根据通知公告编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:notice:query')") + @GetMapping(value = "/{noticeId}") + public AjaxResult getInfo(@PathVariable Long noticeId) + { + return AjaxResult.success(noticeService.selectNoticeById(noticeId)); + } + + /** + * 新增通知公告 + */ + @PreAuthorize("@ss.hasPermi('system:notice:add')") + @Log(title = "通知公告", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysNotice notice) + { + notice.setCreateBy(SecurityUtils.getUsername()); + return toAjax(noticeService.insertNotice(notice)); + } + + /** + * 修改通知公告 + */ + @PreAuthorize("@ss.hasPermi('system:notice:edit')") + @Log(title = "通知公告", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysNotice notice) + { + notice.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(noticeService.updateNotice(notice)); + } + + /** + * 删除通知公告 + */ + @PreAuthorize("@ss.hasPermi('system:notice:remove')") + @Log(title = "通知公告", businessType = BusinessType.DELETE) + @DeleteMapping("/{noticeId}") + public AjaxResult remove(@PathVariable Long noticeId) + { + return toAjax(noticeService.deleteNoticeById(noticeId)); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysPostController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysPostController.java new file mode 100644 index 0000000..3c3aa83 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysPostController.java @@ -0,0 +1,124 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.system.domain.SysPost; +import com.alonginfo.project.system.service.ISysPostService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 岗位信息操作处理 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/post") +public class SysPostController extends BaseController +{ + @Autowired + private ISysPostService postService; + + /** + * 获取岗位列表 + */ + @PreAuthorize("@ss.hasPermi('system:post:list')") + @GetMapping("/list") + public TableDataInfo list(SysPost post) + { + startPage(); + List list = postService.selectPostList(post); + return getDataTable(list); + } + + @Log(title = "岗位管理", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('system:config:export')") + @GetMapping("/export") + public AjaxResult export(SysPost post) + { + List list = postService.selectPostList(post); + ExcelUtil util = new ExcelUtil(SysPost.class); + return util.exportExcel(list, "岗位数据"); + } + + /** + * 根据岗位编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:post:query')") + @GetMapping(value = "/{postId}") + public AjaxResult getInfo(@PathVariable Long postId) + { + return AjaxResult.success(postService.selectPostById(postId)); + } + + /** + * 新增岗位 + */ + @PreAuthorize("@ss.hasPermi('system:post:add')") + @Log(title = "岗位管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysPost post) + { + if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) + { + return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在"); + } + else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) + { + return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在"); + } + post.setCreateBy(SecurityUtils.getUsername()); + return toAjax(postService.insertPost(post)); + } + + /** + * 修改岗位 + */ + @PreAuthorize("@ss.hasPermi('system:post:edit')") + @Log(title = "岗位管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysPost post) + { + if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) + { + return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在"); + } + else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) + { + return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在"); + } + post.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(postService.updatePost(post)); + } + + /** + * 删除岗位 + */ + @PreAuthorize("@ss.hasPermi('system:post:remove')") + @Log(title = "岗位管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{postIds}") + public AjaxResult remove(@PathVariable Long[] postIds) + { + return toAjax(postService.deletePostByIds(postIds)); + } + + /** + * 获取岗位选择框列表 + */ + @GetMapping("/optionselect") + public AjaxResult optionselect() + { + List posts = postService.selectPostAll(); + return AjaxResult.success(posts); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysProfileController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysProfileController.java new file mode 100644 index 0000000..99de0a9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysProfileController.java @@ -0,0 +1,122 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.exception.file.InvalidExtensionException; +import com.alonginfo.common.utils.file.MimeTypeUtils; +import com.alonginfo.common.utils.sign.Base64; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.utils.FileUploadUtils; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.config.MxConfig; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.system.domain.SysUser; +import com.alonginfo.project.system.service.ISysUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.net.URLDecoder; +import java.nio.charset.StandardCharsets; + +/** + * 个人信息 业务处理 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/user/profile") +public class SysProfileController extends BaseController { + @Autowired + private ISysUserService userService; + + @Autowired + private TokenService tokenService; + + /** + * 个人信息 + */ + @GetMapping + public AjaxResult profile() { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + SysUser user = loginUser.getUser(); + AjaxResult ajax = AjaxResult.success(user); + ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername())); + ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername())); + return ajax; + } + + /** + * 修改用户 + */ + @Log(title = "个人信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult updateProfile(@RequestBody SysUser user) { + if (userService.updateUserProfile(user) > 0) { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + // 更新缓存用户信息 + loginUser.getUser().setNickName(user.getNickName()); + loginUser.getUser().setPhonenumber(user.getPhonenumber()); + loginUser.getUser().setEmail(user.getEmail()); + loginUser.getUser().setSex(user.getSex()); + tokenService.setLoginUser(loginUser); + return AjaxResult.success(); + } + return AjaxResult.error("修改个人信息异常,请联系管理员"); + } + + /** + * 重置密码 + */ + @Log(title = "个人信息", businessType = BusinessType.UPDATE) + @PutMapping("/updatePwd") + public AjaxResult updatePwd(String oldPassword, String newPassword) { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + String userName = loginUser.getUsername(); + String password = loginUser.getPassword(); + oldPassword = URLDecoder.decode(new String(Base64.decode(oldPassword), StandardCharsets.UTF_8)); + newPassword = URLDecoder.decode(new String(Base64.decode(newPassword), StandardCharsets.UTF_8)); + if (!SecurityUtils.matchesPassword(oldPassword, password)) { + return AjaxResult.error("修改密码失败,旧密码错误"); + } + if (SecurityUtils.matchesPassword(newPassword, password)) { + return AjaxResult.error("新密码不能与旧密码相同"); + } + if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) { + // 更新缓存用户密码 + loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword)); + tokenService.setLoginUser(loginUser); + return AjaxResult.success(); + } + return AjaxResult.error("修改密码异常,请联系管理员"); + } + + /** + * 头像上传 + */ + @Log(title = "用户头像", businessType = BusinessType.UPDATE) + @PostMapping("/avatar") + public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException, InvalidExtensionException { + if (!file.isEmpty()) { + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + String avatar = FileUploadUtils.upload(MxConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION); + if (userService.updateUserAvatar(loginUser.getUsername(), avatar)) { + AjaxResult ajax = AjaxResult.success(); + ajax.put("imgUrl", avatar); + // 更新缓存用户头像 + loginUser.getUser().setAvatar(avatar); + tokenService.setLoginUser(loginUser); + return ajax; + + }else{ + AjaxResult.error(); + } + } + return AjaxResult.error("上传图片异常,请联系管理员"); + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysRoleController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysRoleController.java new file mode 100644 index 0000000..0dfe6ff --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysRoleController.java @@ -0,0 +1,134 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.system.domain.SysRole; +import com.alonginfo.project.system.service.ISysRoleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 角色信息 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/role") +public class SysRoleController extends BaseController { + @Autowired + private ISysRoleService roleService; + + @PreAuthorize("@ss.hasPermi('system:role:list')") + @GetMapping("/list") + public TableDataInfo list(SysRole role) { + startPage(); + List list = roleService.selectRoleList(role); + return getDataTable(list); + } + + @Log(title = "角色管理", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('system:role:export')") + @GetMapping("/export") + public AjaxResult export(SysRole role) { + List list = roleService.selectRoleList(role); + ExcelUtil util = new ExcelUtil(SysRole.class); + return util.exportExcel(list, "角色数据"); + } + + /** + * 根据角色编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:role:query')") + @GetMapping(value = "/{roleId}") + public AjaxResult getInfo(@PathVariable Long roleId) { + return AjaxResult.success(roleService.selectRoleById(roleId)); + } + + /** + * 新增角色 + */ + @PreAuthorize("@ss.hasPermi('system:role:add')") + @Log(title = "角色管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysRole role) { + if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) { + return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在"); + } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) { + return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在"); + } + role.setCreateBy(SecurityUtils.getUsername()); + return toAjax(roleService.insertRole(role)); + + } + + /** + * 修改保存角色 + */ + @PreAuthorize("@ss.hasPermi('system:role:edit')") + @Log(title = "角色管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysRole role) { + roleService.checkRoleAllowed(role); + if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) { + return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在"); + } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) { + return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在"); + } + role.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(roleService.updateRole(role)); + } + + /** + * 修改保存数据权限 + */ + @PreAuthorize("@ss.hasPermi('system:role:edit')") + @Log(title = "角色管理", businessType = BusinessType.UPDATE) + @PutMapping("/dataScope") + public AjaxResult dataScope(@RequestBody SysRole role) { + roleService.checkRoleAllowed(role); + return toAjax(roleService.authDataScope(role)); + } + + /** + * 状态修改 + */ + @PreAuthorize("@ss.hasPermi('system:role:edit')") + @Log(title = "角色管理", businessType = BusinessType.UPDATE) + @PutMapping("/changeStatus") + public AjaxResult changeStatus(@RequestBody SysRole role) { + roleService.checkRoleAllowed(role); + role.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(roleService.updateRoleStatus(role)); + } + + /** + * 删除角色 + */ + @PreAuthorize("@ss.hasPermi('system:role:remove')") + @Log(title = "角色管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{roleIds}") + public AjaxResult remove(@PathVariable Long[] roleIds) + { + return toAjax(roleService.deleteRoleByIds(roleIds)); + } + + /** + * 获取角色选择框列表 + */ + @PreAuthorize("@ss.hasPermi('system:role:query')") + @GetMapping("/optionselect") + public AjaxResult optionselect() + { + return AjaxResult.success(roleService.selectRoleAll()); + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysUserController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysUserController.java new file mode 100644 index 0000000..dcd3521 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysUserController.java @@ -0,0 +1,187 @@ +package com.alonginfo.project.system.controller; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.project.tool.FileUtil; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.common.utils.ServletUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.utils.ExcelUtil; +import com.alonginfo.framework.aspectj.lang.annotation.Log; +import com.alonginfo.framework.aspectj.lang.enums.BusinessType; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.framework.security.service.TokenService; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.framework.web.page.TableDataInfo; +import com.alonginfo.project.system.domain.SysUser; +import com.alonginfo.project.system.service.ISysPostService; +import com.alonginfo.project.system.service.ISysRoleService; +import com.alonginfo.project.system.service.ISysUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * 用户信息 + * + * @author sdj + */ +@RestController +@RequestMapping("/system/user") +public class SysUserController extends BaseController { + @Autowired + private ISysUserService userService; + + @Autowired + private ISysRoleService roleService; + + @Autowired + private ISysPostService postService; + + @Autowired + private TokenService tokenService; + + /** + * 获取用户列表 + */ + @PreAuthorize("@ss.hasPermi('system:user:list')") + @GetMapping("/list") + public TableDataInfo list(SysUser user) { + startPage(); + List list = userService.selectUserList(user); + return getDataTable(list); + } + + @Log(title = "用户管理", businessType = BusinessType.EXPORT) + @PreAuthorize("@ss.hasPermi('system:user:export')") + @GetMapping("/export") + public AjaxResult export(SysUser user) { + List list = userService.selectUserList(user); + ExcelUtil util = new ExcelUtil(SysUser.class); + return util.exportExcel(list, "用户数据"); + } + + @Log(title = "用户管理", businessType = BusinessType.IMPORT) + @PreAuthorize("@ss.hasPermi('system:user:import')") + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { + String fileName2 = file.getOriginalFilename(); + String extension = ""; + boolean validExtension = false; + if (fileName2 != null && fileName2.contains(".")) { + extension = fileName2.substring(fileName2.lastIndexOf(".")); + String[] validExtensions = {"xlsx","xls"}; + validExtension = FileUtil.isValidExtension(extension, validExtensions); + } + if(validExtension){ + ExcelUtil util = new ExcelUtil(SysUser.class); + List userList = util.importExcel(file.getInputStream()); + LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); + String operName = loginUser.getUsername(); + String message = userService.importUser(userList, updateSupport, operName); + return AjaxResult.success(message); + }else{ + return AjaxResult.error(); + } + } + + @GetMapping("/importTemplate") + public AjaxResult importTemplate() { + ExcelUtil util = new ExcelUtil(SysUser.class); + return util.importTemplateExcel("用户数据"); + } + + /** + * 根据用户编号获取详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:user:query')") + @GetMapping(value = { "/", "/{userId}" }) + public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) { + AjaxResult ajax = AjaxResult.success(); + ajax.put("roles", roleService.selectRoleAll()); + ajax.put("posts", postService.selectPostAll()); + if (StringUtils.isNotNull(userId)) + { + ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId)); + ajax.put("postIds", postService.selectPostListByUserId(userId)); + ajax.put("roleIds", roleService.selectRoleListByUserId(userId)); + } + return ajax; + } + + /** + * 新增用户 + */ + @PreAuthorize("@ss.hasPermi('system:user:add')") + @Log(title = "用户管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@Validated @RequestBody SysUser user) { + if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName()))) { + return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在"); + } else if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { + return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); + } else if (UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { + return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在"); + } + user.setCreateBy(SecurityUtils.getUsername()); + user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); + return toAjax(userService.insertUser(user)); + } + + /** + * 修改用户 + */ + @PreAuthorize("@ss.hasPermi('system:user:edit')") + @Log(title = "用户管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@Validated @RequestBody SysUser user) { + userService.checkUserAllowed(user); + if (UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { + return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); + } else if (UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { + return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); + } + user.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(userService.updateUser(user)); + } + + /** + * 删除用户 + */ + @PreAuthorize("@ss.hasPermi('system:user:remove')") + @Log(title = "用户管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{userIds}") + public AjaxResult remove(@PathVariable Long[] userIds) + { + return toAjax(userService.deleteUserByIds(userIds)); + } + + /** + * 重置密码 + */ + @PreAuthorize("@ss.hasPermi('system:user:edit')") + @Log(title = "用户管理", businessType = BusinessType.UPDATE) + @PutMapping("/resetPwd") + public AjaxResult resetPwd(@RequestBody SysUser user) { + userService.checkUserAllowed(user); + user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); + user.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(userService.resetPwd(user)); + } + + /** + * 状态修改 + */ + @PreAuthorize("@ss.hasPermi('system:user:edit')") + @Log(title = "用户管理", businessType = BusinessType.UPDATE) + @PutMapping("/changeStatus") + public AjaxResult changeStatus(@RequestBody SysUser user) { + userService.checkUserAllowed(user); + user.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(userService.updateUserStatus(user)); + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysConfig.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysConfig.java new file mode 100644 index 0000000..f168248 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysConfig.java @@ -0,0 +1,109 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * 参数配置表 sys_config + */ +public class SysConfig extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 参数主键 */ + @Excel(name = "参数主键", cellType = ColumnType.NUMERIC) + private Long configId; + + /** 参数名称 */ + @Excel(name = "参数名称") + private String configName; + + /** 参数键名 */ + @Excel(name = "参数键名") + private String configKey; + + /** 参数键值 */ + @Excel(name = "参数键值") + private String configValue; + + /** 系统内置(Y是 N否) */ + @Excel(name = "系统内置", readConverterExp = "Y=是,N=否") + private String configType; + + public Long getConfigId() + { + return configId; + } + + public void setConfigId(Long configId) + { + this.configId = configId; + } + + @NotBlank(message = "参数名称不能为空") + @Size(min = 0, max = 100, message = "参数名称不能超过100个字符") + public String getConfigName() + { + return configName; + } + + public void setConfigName(String configName) + { + this.configName = configName; + } + + @NotBlank(message = "参数键名长度不能为空") + @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符") + public String getConfigKey() + { + return configKey; + } + + public void setConfigKey(String configKey) + { + this.configKey = configKey; + } + + @NotBlank(message = "参数键值不能为空") + @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符") + public String getConfigValue() + { + return configValue; + } + + public void setConfigValue(String configValue) + { + this.configValue = configValue; + } + + public String getConfigType() + { + return configType; + } + + public void setConfigType(String configType) + { + this.configType = configType; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("configId", getConfigId()) + .append("configName", getConfigName()) + .append("configKey", getConfigKey()) + .append("configValue", getConfigValue()) + .append("configType", getConfigType()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDept.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDept.java new file mode 100644 index 0000000..3d25302 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDept.java @@ -0,0 +1,200 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.Email; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.util.ArrayList; +import java.util.List; + +/** + * 部门表 sys_dept + */ +public class SysDept extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 部门ID */ + private Long deptId; + + /** 父部门ID */ + private Long parentId; + + /** 祖级列表 */ + private String ancestors; + + /** 部门名称 */ + private String deptName; + + /** 显示顺序 */ + private String orderNum; + + /** 负责人 */ + private String leader; + + /** 联系电话 */ + private String phone; + + /** 邮箱 */ + private String email; + + /** 部门状态:0正常,1停用 */ + private String status; + + /** 删除标志(0代表存在 2代表删除) */ + private String delFlag; + + /** 父部门名称 */ + private String parentName; + + /** 子部门 */ + private List children = new ArrayList(); + + public Long getDeptId() + { + return deptId; + } + + public void setDeptId(Long deptId) + { + this.deptId = deptId; + } + + public Long getParentId() + { + return parentId; + } + + public void setParentId(Long parentId) + { + this.parentId = parentId; + } + + public String getAncestors() + { + return ancestors; + } + + public void setAncestors(String ancestors) + { + this.ancestors = ancestors; + } + + @NotBlank(message = "部门名称不能为空") + @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") + public String getDeptName() + { + return deptName; + } + + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + @NotBlank(message = "显示顺序不能为空") + public String getOrderNum() + { + return orderNum; + } + + public void setOrderNum(String orderNum) + { + this.orderNum = orderNum; + } + + public String getLeader() + { + return leader; + } + + public void setLeader(String leader) + { + this.leader = leader; + } + + @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") + public String getPhone() + { + return phone; + } + + public void setPhone(String phone) + { + this.phone = phone; + } + + @Email(message = "邮箱格式不正确") + @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") + public String getEmail() + { + return email; + } + + public void setEmail(String email) + { + this.email = email; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getDelFlag() + { + return delFlag; + } + + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getParentName() + { + return parentName; + } + + public void setParentName(String parentName) + { + this.parentName = parentName; + } + + public List getChildren() + { + return children; + } + + public void setChildren(List children) + { + this.children = children; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("deptId", getDeptId()) + .append("parentId", getParentId()) + .append("ancestors", getAncestors()) + .append("deptName", getDeptName()) + .append("orderNum", getOrderNum()) + .append("leader", getLeader()) + .append("phone", getPhone()) + .append("email", getEmail()) + .append("status", getStatus()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictData.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictData.java new file mode 100644 index 0000000..67184ae --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictData.java @@ -0,0 +1,174 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * 字典数据表 sys_dict_data + */ +public class SysDictData extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 字典编码 */ + @Excel(name = "字典编码", cellType = ColumnType.NUMERIC) + private Long dictCode; + + /** 字典排序 */ + @Excel(name = "字典排序", cellType = ColumnType.NUMERIC) + private Long dictSort; + + /** 字典标签 */ + @Excel(name = "字典标签") + private String dictLabel; + + /** 字典键值 */ + @Excel(name = "字典键值") + private String dictValue; + + /** 字典类型 */ + @Excel(name = "字典类型") + private String dictType; + + /** 样式属性(其他样式扩展) */ + private String cssClass; + + /** 表格字典样式 */ + private String listClass; + + /** 是否默认(Y是 N否) */ + @Excel(name = "是否默认", readConverterExp = "Y=是,N=否") + private String isDefault; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String status; + + public Long getDictCode() + { + return dictCode; + } + + public void setDictCode(Long dictCode) + { + this.dictCode = dictCode; + } + + public Long getDictSort() + { + return dictSort; + } + + public void setDictSort(Long dictSort) + { + this.dictSort = dictSort; + } + + @NotBlank(message = "字典标签不能为空") + @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") + public String getDictLabel() + { + return dictLabel; + } + + public void setDictLabel(String dictLabel) + { + this.dictLabel = dictLabel; + } + + @NotBlank(message = "字典键值不能为空") + @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") + public String getDictValue() + { + return dictValue; + } + + public void setDictValue(String dictValue) + { + this.dictValue = dictValue; + } + + @NotBlank(message = "字典类型不能为空") + @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") + public String getDictType() + { + return dictType; + } + + public void setDictType(String dictType) + { + this.dictType = dictType; + } + + @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") + public String getCssClass() + { + return cssClass; + } + + public void setCssClass(String cssClass) + { + this.cssClass = cssClass; + } + + public String getListClass() + { + return listClass; + } + + public void setListClass(String listClass) + { + this.listClass = listClass; + } + + public boolean getDefault() + { + return UserConstants.YES.equals(this.isDefault) ? true : false; + } + + public String getIsDefault() + { + return isDefault; + } + + public void setIsDefault(String isDefault) + { + this.isDefault = isDefault; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("dictCode", getDictCode()) + .append("dictSort", getDictSort()) + .append("dictLabel", getDictLabel()) + .append("dictValue", getDictValue()) + .append("dictType", getDictType()) + .append("cssClass", getCssClass()) + .append("listClass", getListClass()) + .append("isDefault", getIsDefault()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictType.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictType.java new file mode 100644 index 0000000..6a0c75c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictType.java @@ -0,0 +1,92 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * 字典类型表 sys_dict_type + */ +public class SysDictType extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 字典主键 */ + @Excel(name = "字典主键", cellType = ColumnType.NUMERIC) + private Long dictId; + + /** 字典名称 */ + @Excel(name = "字典名称") + private String dictName; + + /** 字典类型 */ + @Excel(name = "字典类型") + private String dictType; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String status; + + public Long getDictId() + { + return dictId; + } + + public void setDictId(Long dictId) + { + this.dictId = dictId; + } + + @NotBlank(message = "字典名称不能为空") + @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") + public String getDictName() + { + return dictName; + } + + public void setDictName(String dictName) + { + this.dictName = dictName; + } + + @NotBlank(message = "字典类型不能为空") + @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") + public String getDictType() + { + return dictType; + } + + public void setDictType(String dictType) + { + this.dictType = dictType; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("dictId", getDictId()) + .append("dictName", getDictName()) + .append("dictType", getDictType()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysMenu.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysMenu.java new file mode 100644 index 0000000..ac77cf6 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysMenu.java @@ -0,0 +1,215 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.util.ArrayList; +import java.util.List; + +/** + * 菜单权限表 sys_menu + */ +public class SysMenu extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 菜单ID */ + private Long menuId; + + /** 菜单名称 */ + private String menuName; + + /** 父菜单名称 */ + private String parentName; + + /** 父菜单ID */ + private Long parentId; + + /** 显示顺序 */ + private String orderNum; + + /** 路由地址 */ + private String path; + + /** 组件路径 */ + private String component; + + /** 是否为外链(0是 1否) */ + private String isFrame; + + /** 类型(M目录 C菜单 F按钮) */ + private String menuType; + + /** 菜单状态:0显示,1隐藏 */ + private String visible; + + /** 权限字符串 */ + private String perms; + + /** 菜单图标 */ + private String icon; + + /** 子菜单 */ + private List children = new ArrayList(); + + public Long getMenuId() + { + return menuId; + } + + public void setMenuId(Long menuId) + { + this.menuId = menuId; + } + + @NotBlank(message = "菜单名称不能为空") + @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") + public String getMenuName() + { + return menuName; + } + + public void setMenuName(String menuName) + { + this.menuName = menuName; + } + + public String getParentName() + { + return parentName; + } + + public void setParentName(String parentName) + { + this.parentName = parentName; + } + + public Long getParentId() + { + return parentId; + } + + public void setParentId(Long parentId) + { + this.parentId = parentId; + } + + @NotBlank(message = "显示顺序不能为空") + public String getOrderNum() + { + return orderNum; + } + + public void setOrderNum(String orderNum) + { + this.orderNum = orderNum; + } + + @Size(min = 0, max = 200, message = "路由地址不能超过200个字符") + public String getPath() + { + return path; + } + + public void setPath(String path) + { + this.path = path; + } + + @Size(min = 0, max = 200, message = "组件路径不能超过255个字符") + public String getComponent() + { + return component; + } + + public void setComponent(String component) + { + this.component = component; + } + + public String getIsFrame() + { + return isFrame; + } + + public void setIsFrame(String isFrame) + { + this.isFrame = isFrame; + } + + @NotBlank(message = "菜单类型不能为空") + public String getMenuType() + { + return menuType; + } + + public void setMenuType(String menuType) + { + this.menuType = menuType; + } + + public String getVisible() + { + return visible; + } + + public void setVisible(String visible) + { + this.visible = visible; + } + + @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") + public String getPerms() + { + return perms; + } + + public void setPerms(String perms) + { + this.perms = perms; + } + + public String getIcon() + { + return icon; + } + + public void setIcon(String icon) + { + this.icon = icon; + } + + public List getChildren() + { + return children; + } + + public void setChildren(List children) + { + this.children = children; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("menuId", getMenuId()) + .append("menuName", getMenuName()) + .append("parentId", getParentId()) + .append("orderNum", getOrderNum()) + .append("path", getPath()) + .append("component", getComponent()) + .append("isFrame", getIsFrame()) + .append("menuType", getMenuType()) + .append("visible", getVisible()) + .append("perms", getPerms()) + .append("icon", getIcon()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysNotice.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysNotice.java new file mode 100644 index 0000000..caa1266 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysNotice.java @@ -0,0 +1,98 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * 通知公告表 sys_notice + */ +public class SysNotice extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 公告ID */ + private Long noticeId; + + /** 公告标题 */ + private String noticeTitle; + + /** 公告类型(1通知 2公告) */ + private String noticeType; + + /** 公告内容 */ + private String noticeContent; + + /** 公告状态(0正常 1关闭) */ + private String status; + + public Long getNoticeId() + { + return noticeId; + } + + public void setNoticeId(Long noticeId) + { + this.noticeId = noticeId; + } + + public void setNoticeTitle(String noticeTitle) + { + this.noticeTitle = noticeTitle; + } + + @NotBlank(message = "公告标题不能为空") + @Size(min = 0, max = 50, message = "公告标题不能超过50个字符") + public String getNoticeTitle() + { + return noticeTitle; + } + + public void setNoticeType(String noticeType) + { + this.noticeType = noticeType; + } + + public String getNoticeType() + { + return noticeType; + } + + public void setNoticeContent(String noticeContent) + { + this.noticeContent = noticeContent; + } + + public String getNoticeContent() + { + return noticeContent; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("noticeId", getNoticeId()) + .append("noticeTitle", getNoticeTitle()) + .append("noticeType", getNoticeType()) + .append("noticeContent", getNoticeContent()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysPost.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysPost.java new file mode 100644 index 0000000..665ba5f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysPost.java @@ -0,0 +1,123 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * 岗位表 sys_post + * + * @author sdj + */ +public class SysPost extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 岗位序号 */ + @Excel(name = "岗位序号", cellType = ColumnType.NUMERIC) + private Long postId; + + /** 岗位编码 */ + @Excel(name = "岗位编码") + private String postCode; + + /** 岗位名称 */ + @Excel(name = "岗位名称") + private String postName; + + /** 岗位排序 */ + @Excel(name = "岗位排序") + private String postSort; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String status; + + /** 用户是否存在此岗位标识 默认不存在 */ + private boolean flag = false; + + public Long getPostId() + { + return postId; + } + + public void setPostId(Long postId) + { + this.postId = postId; + } + + @NotBlank(message = "岗位编码不能为空") + @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符") + public String getPostCode() + { + return postCode; + } + + public void setPostCode(String postCode) + { + this.postCode = postCode; + } + + @NotBlank(message = "岗位名称不能为空") + @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符") + public String getPostName() + { + return postName; + } + + public void setPostName(String postName) + { + this.postName = postName; + } + + @NotBlank(message = "显示顺序不能为空") + public String getPostSort() + { + return postSort; + } + + public void setPostSort(String postSort) + { + this.postSort = postSort; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + public boolean isFlag() + { + return flag; + } + + public void setFlag(boolean flag) + { + this.flag = flag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("postId", getPostId()) + .append("postCode", getPostCode()) + .append("postName", getPostName()) + .append("postSort", getPostSort()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRole.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRole.java new file mode 100644 index 0000000..a04a1ba --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRole.java @@ -0,0 +1,197 @@ +package com.alonginfo.project.system.domain; + +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * 角色表 sys_role + * + * @author sdj + */ +public class SysRole extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 角色ID */ + @Excel(name = "角色序号", cellType = ColumnType.NUMERIC) + private Long roleId; + + /** 角色名称 */ + @Excel(name = "角色名称") + private String roleName; + + /** 角色权限 */ + @Excel(name = "角色权限") + private String roleKey; + + /** 角色排序 */ + @Excel(name = "角色排序") + private String roleSort; + + /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */ + @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限") + private String dataScope; + + /** 角色状态(0正常 1停用) */ + @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用") + private String status; + + /** 删除标志(0代表存在 2代表删除) */ + private String delFlag; + + /** 用户是否存在此角色标识 默认不存在 */ + private boolean flag = false; + + /** 菜单组 */ + private Long[] menuIds; + + /** 部门组(数据权限) */ + private Long[] deptIds; + + public SysRole() + { + + } + + public SysRole(Long roleId) + { + this.roleId = roleId; + } + + public Long getRoleId() + { + return roleId; + } + + public void setRoleId(Long roleId) + { + this.roleId = roleId; + } + + public boolean isAdmin() + { + return isAdmin(this.roleId); + } + + public static boolean isAdmin(Long roleId) + { + return roleId != null && 1L == roleId; + } + + @NotBlank(message = "角色名称不能为空") + @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符") + public String getRoleName() + { + return roleName; + } + + public void setRoleName(String roleName) + { + this.roleName = roleName; + } + + @NotBlank(message = "权限字符不能为空") + @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符") + public String getRoleKey() + { + return roleKey; + } + + public void setRoleKey(String roleKey) + { + this.roleKey = roleKey; + } + + @NotBlank(message = "显示顺序不能为空") + public String getRoleSort() + { + return roleSort; + } + + public void setRoleSort(String roleSort) + { + this.roleSort = roleSort; + } + + public String getDataScope() + { + return dataScope; + } + + public void setDataScope(String dataScope) + { + this.dataScope = dataScope; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getDelFlag() + { + return delFlag; + } + + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public boolean isFlag() + { + return flag; + } + + public void setFlag(boolean flag) + { + this.flag = flag; + } + + public Long[] getMenuIds() + { + return menuIds; + } + + public void setMenuIds(Long[] menuIds) + { + this.menuIds = menuIds; + } + + public Long[] getDeptIds() + { + return deptIds; + } + + public void setDeptIds(Long[] deptIds) + { + this.deptIds = deptIds; + } + + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("roleId", getRoleId()) + .append("roleName", getRoleName()) + .append("roleKey", getRoleKey()) + .append("roleSort", getRoleSort()) + .append("dataScope", getDataScope()) + .append("status", getStatus()) + .append("delFlag", getDelFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleDept.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleDept.java new file mode 100644 index 0000000..7482cf7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleDept.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 角色和部门关联 sys_role_dept + * + * @author sdj + */ +public class SysRoleDept { + /** 角色ID */ + private Long roleId; + + /** 部门ID */ + private Long deptId; + + public Long getRoleId() + { + return roleId; + } + + public void setRoleId(Long roleId) + { + this.roleId = roleId; + } + + public Long getDeptId() + { + return deptId; + } + + public void setDeptId(Long deptId) + { + this.deptId = deptId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("roleId", getRoleId()) + .append("deptId", getDeptId()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleMenu.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleMenu.java new file mode 100644 index 0000000..fc8e5f4 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleMenu.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 角色和菜单关联 sys_role_menu + * + * @author sdj + */ +public class SysRoleMenu { + /** 角色ID */ + private Long roleId; + + /** 菜单ID */ + private Long menuId; + + public Long getRoleId() + { + return roleId; + } + + public void setRoleId(Long roleId) + { + this.roleId = roleId; + } + + public Long getMenuId() + { + return menuId; + } + + public void setMenuId(Long menuId) + { + this.menuId = menuId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("roleId", getRoleId()) + .append("menuId", getMenuId()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUser.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUser.java new file mode 100644 index 0000000..c693a13 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUser.java @@ -0,0 +1,326 @@ +package com.alonginfo.project.system.domain; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.alonginfo.framework.aspectj.lang.annotation.Excel; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.ColumnType; +import com.alonginfo.framework.aspectj.lang.annotation.Excel.Type; +import com.alonginfo.framework.aspectj.lang.annotation.Excels; +import com.alonginfo.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.Email; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.util.Date; +import java.util.List; + +/** + * 用户对象 sys_user + * + * @author sdj + */ +public class SysUser extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 用户ID */ + @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号") + private Long userId; + + /** 部门ID */ + @Excel(name = "部门编号", type = Type.IMPORT) + private Long deptId; + + /** 用户账号 */ + @Excel(name = "登录名称") + private String userName; + + /** 用户昵称 */ + @Excel(name = "用户名称") + private String nickName; + + /** 用户邮箱 */ + @Excel(name = "用户邮箱") + private String email; + + /** 手机号码 */ + @Excel(name = "手机号码") + private String phonenumber; + + /** 用户性别 */ + @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") + private String sex; + + /** 用户头像 */ + private String avatar; + + /** 密码 */ + private String password; + + /** 盐加密 */ + private String salt; + + /** 帐号状态(0正常 1停用) */ + @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用") + private String status; + + /** 删除标志(0代表存在 2代表删除) */ + private String delFlag; + + /** 最后登陆IP */ + @Excel(name = "最后登陆IP", type = Type.EXPORT) + private String loginIp; + + /** 最后登陆时间 */ + @Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) + private Date loginDate; + + /** 部门对象 */ + @Excels({ + @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), + @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) + }) + private SysDept dept; + + /** 角色对象 */ + private List roles; + + /** 角色组 */ + private Long[] roleIds; + + /** 岗位组 */ + private Long[] postIds; + + public SysUser() + { + + } + + public SysUser(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public boolean isAdmin() + { + return isAdmin(this.userId); + } + + public static boolean isAdmin(Long userId) + { + return userId != null && 1L == userId; + } + + public Long getDeptId() + { + return deptId; + } + + public void setDeptId(Long deptId) + { + this.deptId = deptId; + } + + @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") + public String getNickName() + { + return nickName; + } + + public void setNickName(String nickName) + { + this.nickName = nickName; + } + + @NotBlank(message = "用户账号不能为空") + @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") + public String getUserName() + { + return userName; + } + + public void setUserName(String userName) + { + this.userName = userName; + } + + @Email(message = "邮箱格式不正确") + @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") + public String getEmail() + { + return email; + } + + public void setEmail(String email) + { + this.email = email; + } + + @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") + public String getPhonenumber() + { + return phonenumber; + } + + public void setPhonenumber(String phonenumber) + { + this.phonenumber = phonenumber; + } + + public String getSex() + { + return sex; + } + + public void setSex(String sex) + { + this.sex = sex; + } + + public String getAvatar() + { + return avatar; + } + + public void setAvatar(String avatar) + { + this.avatar = avatar; + } + + @JsonProperty + public String getPassword() + { + return password; + } + + public void setPassword(String password) + { + this.password = password; + } + + public String getSalt() + { + return salt; + } + + public void setSalt(String salt) + { + this.salt = salt; + } + + public String getStatus() + { + return status; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getDelFlag() + { + return delFlag; + } + + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getLoginIp() + { + return loginIp; + } + + public void setLoginIp(String loginIp) + { + this.loginIp = loginIp; + } + + public Date getLoginDate() + { + return loginDate; + } + + public void setLoginDate(Date loginDate) + { + this.loginDate = loginDate; + } + + public SysDept getDept() + { + return dept; + } + + public void setDept(SysDept dept) + { + this.dept = dept; + } + + public List getRoles() + { + return roles; + } + + public void setRoles(List roles) + { + this.roles = roles; + } + + public Long[] getRoleIds() + { + return roleIds; + } + + public void setRoleIds(Long[] roleIds) + { + this.roleIds = roleIds; + } + + public Long[] getPostIds() + { + return postIds; + } + + public void setPostIds(Long[] postIds) + { + this.postIds = postIds; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("userId", getUserId()) + .append("deptId", getDeptId()) + .append("userName", getUserName()) + .append("nickName", getNickName()) + .append("email", getEmail()) + .append("phonenumber", getPhonenumber()) + .append("sex", getSex()) + .append("avatar", getAvatar()) + .append("password", getPassword()) + .append("salt", getSalt()) + .append("status", getStatus()) + .append("delFlag", getDelFlag()) + .append("loginIp", getLoginIp()) + .append("loginDate", getLoginDate()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("dept", getDept()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserPost.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserPost.java new file mode 100644 index 0000000..5ae6ff0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserPost.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 用户和岗位关联 sys_user_post + * + * @author sdj + */ +public class SysUserPost { + /** 用户ID */ + private Long userId; + + /** 岗位ID */ + private Long postId; + + public Long getUserId() + { + return userId; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getPostId() + { + return postId; + } + + public void setPostId(Long postId) + { + this.postId = postId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("userId", getUserId()) + .append("postId", getPostId()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserRole.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserRole.java new file mode 100644 index 0000000..a547ed1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserRole.java @@ -0,0 +1,45 @@ +package com.alonginfo.project.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 用户和角色关联 sys_user_role + * + * @author sdj + */ +public class SysUserRole { + /** 用户ID */ + private Long userId; + + /** 角色ID */ + private Long roleId; + + public Long getUserId() + { + return userId; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getRoleId() + { + return roleId; + } + + public void setRoleId(Long roleId) + { + this.roleId = roleId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("userId", getUserId()) + .append("roleId", getRoleId()) + .toString(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/MetaVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/MetaVo.java new file mode 100644 index 0000000..bccbd71 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/MetaVo.java @@ -0,0 +1,44 @@ +package com.alonginfo.project.system.domain.vo; + +/** + * 路由显示信息 + */ +public class MetaVo { + /** + * 设置该路由在侧边栏和面包屑中展示的名字 + */ + private String title; + + /** + * 设置该路由的图标,对应路径src/icons/svg + */ + private String icon; + + public MetaVo() { + } + + public MetaVo(String title, String icon) { + this.title = title; + this.icon = icon; + } + + public String getTitle() + { + return title; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getIcon() + { + return icon; + } + + public void setIcon(String icon) + { + this.icon = icon; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/RouterVo.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/RouterVo.java new file mode 100644 index 0000000..21fd8d1 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/RouterVo.java @@ -0,0 +1,132 @@ +package com.alonginfo.project.system.domain.vo; + +import com.fasterxml.jackson.annotation.JsonInclude; + +import java.util.List; + +/** + * 路由配置信息 + */ +@JsonInclude(JsonInclude.Include.NON_EMPTY) +public class RouterVo +{ + /** + * 路由名字 + */ + private String name; + + /** + * 路由地址 + */ + private String path; + + /** + * 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现 + */ + private String hidden; + + /** + * 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 + */ + private String redirect; + + /** + * 组件地址 + */ + private String component; + + /** + * 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 + */ + private Boolean alwaysShow; + + /** + * 其他元素 + */ + private MetaVo meta; + + /** + * 子路由 + */ + private List children; + + public String getName() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public String getPath() + { + return path; + } + + public void setPath(String path) + { + this.path = path; + } + + public String getHidden() + { + return hidden; + } + + public void setHidden(String hidden) + { + this.hidden = hidden; + } + + public String getRedirect() + { + return redirect; + } + + public void setRedirect(String redirect) + { + this.redirect = redirect; + } + + public String getComponent() + { + return component; + } + + public void setComponent(String component) + { + this.component = component; + } + + public Boolean getAlwaysShow() + { + return alwaysShow; + } + + public void setAlwaysShow(Boolean alwaysShow) + { + this.alwaysShow = alwaysShow; + } + + public MetaVo getMeta() + { + return meta; + } + + public void setMeta(MetaVo meta) + { + this.meta = meta; + } + + public List getChildren() + { + return children; + } + + public void setChildren(List children) + { + this.children = children; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysConfigMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysConfigMapper.java new file mode 100644 index 0000000..9a10294 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysConfigMapper.java @@ -0,0 +1,68 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysConfig; + +import java.util.List; + +/** + * 参数配置 数据层 + */ +public interface SysConfigMapper { + /** + * 查询参数配置信息 + * + * @param config 参数配置信息 + * @return 参数配置信息 + */ + public SysConfig selectConfig(SysConfig config); + + /** + * 查询参数配置列表 + * + * @param config 参数配置信息 + * @return 参数配置集合 + */ + public List selectConfigList(SysConfig config); + + /** + * 根据键名查询参数配置信息 + * + * @param configKey 参数键名 + * @return 参数配置信息 + */ + public SysConfig checkConfigKeyUnique(String configKey); + + /** + * 新增参数配置 + * + * @param config 参数配置信息 + * @return 结果 + */ + public int insertConfig(SysConfig config); + + /** + * 修改参数配置 + * + * @param config 参数配置信息 + * @return 结果 + */ + public int updateConfig(SysConfig config); + + /** + * 删除参数配置 + * + * @param configId 参数ID + * @return 结果 + */ + public int deleteConfigById(Long configId); + + /** + * 批量删除参数信息 + * + * @param configIds 需要删除的参数ID + * @return 结果 + */ + public int deleteConfigByIds(Long[] configIds); + + String queryIntroduceByThemeId(String themeId); +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDeptMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDeptMapper.java new file mode 100644 index 0000000..98d2092 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDeptMapper.java @@ -0,0 +1,107 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysDept; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 部门管理 数据层 + */ +public interface SysDeptMapper { + /** + * 查询部门管理数据 + * + * @param dept 部门信息 + * @return 部门信息集合 + */ + public List selectDeptList(SysDept dept); + + /** + * 根据角色ID查询部门树信息 + * + * @param roleId 角色ID + * @return 选中部门列表 + */ + public List selectDeptListByRoleId(Long roleId); + + /** + * 根据部门ID查询信息 + * + * @param deptId 部门ID + * @return 部门信息 + */ + public SysDept selectDeptById(Long deptId); + + /** + * 根据ID查询所有子部门 + * + * @param deptId 部门ID + * @return 部门列表 + */ + public List selectChildrenDeptById(Long deptId); + + /** + * 是否存在子节点 + * + * @param deptId 部门ID + * @return 结果 + */ + public int hasChildByDeptId(Long deptId); + + /** + * 查询部门是否存在用户 + * + * @param deptId 部门ID + * @return 结果 + */ + public int checkDeptExistUser(Long deptId); + + /** + * 校验部门名称是否唯一 + * + * @param deptName 部门名称 + * @param parentId 父部门ID + * @return 结果 + */ + public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId); + + /** + * 新增部门信息 + * + * @param dept 部门信息 + * @return 结果 + */ + public int insertDept(SysDept dept); + + /** + * 修改部门信息 + * + * @param dept 部门信息 + * @return 结果 + */ + public int updateDept(SysDept dept); + + /** + * 修改所在部门的父级部门状态 + * + * @param dept 部门 + */ + public void updateDeptStatus(SysDept dept); + + /** + * 修改子元素关系 + * + * @param depts 子元素 + * @return 结果 + */ + public int updateDeptChildren(@Param("depts") List depts); + + /** + * 删除部门管理信息 + * + * @param deptId 部门ID + * @return 结果 + */ + public int deleteDeptById(Long deptId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictDataMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictDataMapper.java new file mode 100644 index 0000000..dcadf96 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictDataMapper.java @@ -0,0 +1,93 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysDictData; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 字典表 数据层 + */ +public interface SysDictDataMapper { + /** + * 根据条件分页查询字典数据 + * + * @param dictData 字典数据信息 + * @return 字典数据集合信息 + */ + public List selectDictDataList(SysDictData dictData); + + /** + * 根据字典类型查询字典数据 + * + * @param dictType 字典类型 + * @return 字典数据集合信息 + */ + public List selectDictDataByType(String dictType); + + /** + * 根据字典类型和字典键值查询字典数据信息 + * + * @param dictType 字典类型 + * @param dictValue 字典键值 + * @return 字典标签 + */ + public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue); + + /** + * 根据字典数据ID查询信息 + * + * @param dictCode 字典数据ID + * @return 字典数据 + */ + public SysDictData selectDictDataById(Long dictCode); + + /** + * 查询字典数据 + * + * @param dictType 字典类型 + * @return 字典数据 + */ + public int countDictDataByType(String dictType); + + /** + * 通过字典ID删除字典数据信息 + * + * @param dictCode 字典数据ID + * @return 结果 + */ + public int deleteDictDataById(Long dictCode); + + /** + * 批量删除字典数据信息 + * + * @param dictCodes 需要删除的字典数据ID + * @return 结果 + */ + public int deleteDictDataByIds(Long[] dictCodes); + + /** + * 新增字典数据信息 + * + * @param dictData 字典数据信息 + * @return 结果 + */ + public int insertDictData(SysDictData dictData); + + /** + * 修改字典数据信息 + * + * @param dictData 字典数据信息 + * @return 结果 + */ + public int updateDictData(SysDictData dictData); + + /** + * 同步修改字典类型 + * + * @param oldDictType 旧字典类型 + * @param newDictType 新旧字典类型 + * @return 结果 + */ + public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictTypeMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictTypeMapper.java new file mode 100644 index 0000000..41eb29c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictTypeMapper.java @@ -0,0 +1,83 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysDictType; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 字典表 数据层 + */ +@Mapper +public interface SysDictTypeMapper { + /** + * 根据条件分页查询字典类型 + * + * @param dictType 字典类型信息 + * @return 字典类型集合信息 + */ + public List selectDictTypeList(SysDictType dictType); + + /** + * 根据所有字典类型 + * + * @return 字典类型集合信息 + */ + public List selectDictTypeAll(); + + /** + * 根据字典类型ID查询信息 + * + * @param dictId 字典类型ID + * @return 字典类型 + */ + public SysDictType selectDictTypeById(Long dictId); + + /** + * 根据字典类型查询信息 + * + * @param dictType 字典类型 + * @return 字典类型 + */ + public SysDictType selectDictTypeByType(String dictType); + + /** + * 通过字典ID删除字典信息 + * + * @param dictId 字典ID + * @return 结果 + */ + public int deleteDictTypeById(Long dictId); + + /** + * 批量删除字典类型信息 + * + * @param dictIds 需要删除的字典ID + * @return 结果 + */ + public int deleteDictTypeByIds(Long[] dictIds); + + /** + * 新增字典类型信息 + * + * @param dictType 字典类型信息 + * @return 结果 + */ + public int insertDictType(SysDictType dictType); + + /** + * 修改字典类型信息 + * + * @param dictType 字典类型信息 + * @return 结果 + */ + public int updateDictType(SysDictType dictType); + + /** + * 校验字典类型称是否唯一 + * + * @param dictType 字典类型 + * @return 结果 + */ + public SysDictType checkDictTypeUnique(String dictType); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysMenuMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysMenuMapper.java new file mode 100644 index 0000000..db9ab7d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysMenuMapper.java @@ -0,0 +1,114 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysMenu; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 菜单表 数据层 + */ +public interface SysMenuMapper { + /** + * 查询系统菜单列表 + * + * @param menu 菜单信息 + * @return 菜单列表 + */ + public List selectMenuList(SysMenu menu); + + /** + * 根据用户所有权限 + * + * @return 权限列表 + */ + public List selectMenuPerms(); + + /** + * 根据用户查询系统菜单列表 + * + * @param menu 菜单信息 + * @return 菜单列表 + */ + public List selectMenuListByUserId(SysMenu menu); + + /** + * 根据用户ID查询权限 + * + * @param userId 用户ID + * @return 权限列表 + */ + public List selectMenuPermsByUserId(Long userId); + + /** + * 根据用户ID查询菜单 + * + * @return 菜单列表 + */ + public List selectMenuTreeAll(); + + /** + * 根据用户ID查询菜单 + * + * @param username 用户ID + * @return 菜单列表 + */ + public List selectMenuTreeByUserId(Long userId); + + /** + * 根据角色ID查询菜单树信息 + * + * @param roleId 角色ID + * @return 选中菜单列表 + */ + public List selectMenuListByRoleId(Long roleId); + + /** + * 根据菜单ID查询信息 + * + * @param menuId 菜单ID + * @return 菜单信息 + */ + public SysMenu selectMenuById(Long menuId); + + /** + * 是否存在菜单子节点 + * + * @param menuId 菜单ID + * @return 结果 + */ + public int hasChildByMenuId(Long menuId); + + /** + * 新增菜单信息 + * + * @param menu 菜单信息 + * @return 结果 + */ + public int insertMenu(SysMenu menu); + + /** + * 修改菜单信息 + * + * @param menu 菜单信息 + * @return 结果 + */ + public int updateMenu(SysMenu menu); + + /** + * 删除菜单管理信息 + * + * @param menuId 菜单ID + * @return 结果 + */ + public int deleteMenuById(Long menuId); + + /** + * 校验菜单名称是否唯一 + * + * @param menuName 菜单名称 + * @param parentId 父菜单ID + * @return 结果 + */ + public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysNoticeMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysNoticeMapper.java new file mode 100644 index 0000000..6c9bf10 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysNoticeMapper.java @@ -0,0 +1,58 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysNotice; + +import java.util.List; + +/** + * 通知公告表 数据层 + */ +public interface SysNoticeMapper { + /** + * 查询公告信息 + * + * @param noticeId 公告ID + * @return 公告信息 + */ + public SysNotice selectNoticeById(Long noticeId); + + /** + * 查询公告列表 + * + * @param notice 公告信息 + * @return 公告集合 + */ + public List selectNoticeList(SysNotice notice); + + /** + * 新增公告 + * + * @param notice 公告信息 + * @return 结果 + */ + public int insertNotice(SysNotice notice); + + /** + * 修改公告 + * + * @param notice 公告信息 + * @return 结果 + */ + public int updateNotice(SysNotice notice); + + /** + * 批量删除公告 + * + * @param noticeId 公告ID + * @return 结果 + */ + public int deleteNoticeById(Long noticeId); + + /** + * 批量删除公告信息 + * + * @param noticeIds 需要删除的公告ID + * @return 结果 + */ + public int deleteNoticeByIds(Long noticeIds); +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysPostMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysPostMapper.java new file mode 100644 index 0000000..bff2369 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysPostMapper.java @@ -0,0 +1,97 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysPost; + +import java.util.List; + +/** + * 岗位信息 数据层 + */ +public interface SysPostMapper { + /** + * 查询岗位数据集合 + * + * @param post 岗位信息 + * @return 岗位数据集合 + */ + public List selectPostList(SysPost post); + + /** + * 查询所有岗位 + * + * @return 岗位列表 + */ + public List selectPostAll(); + + /** + * 通过岗位ID查询岗位信息 + * + * @param postId 岗位ID + * @return 角色对象信息 + */ + public SysPost selectPostById(Long postId); + + /** + * 根据用户ID获取岗位选择框列表 + * + * @param userId 用户ID + * @return 选中岗位ID列表 + */ + public List selectPostListByUserId(Long userId); + + /** + * 查询用户所属岗位组 + * + * @param userName 用户名 + * @return 结果 + */ + public List selectPostsByUserName(String userName); + + /** + * 删除岗位信息 + * + * @param postId 岗位ID + * @return 结果 + */ + public int deletePostById(Long postId); + + /** + * 批量删除岗位信息 + * + * @param postIds 需要删除的岗位ID + * @return 结果 + */ + public int deletePostByIds(Long[] postIds); + + /** + * 修改岗位信息 + * + * @param post 岗位信息 + * @return 结果 + */ + public int updatePost(SysPost post); + + /** + * 新增岗位信息 + * + * @param post 岗位信息 + * @return 结果 + */ + public int insertPost(SysPost post); + + /** + * 校验岗位名称 + * + * @param postName 岗位名称 + * @return 结果 + */ + public SysPost checkPostNameUnique(String postName); + + /** + * 校验岗位编码 + * + * @param postCode 岗位编码 + * @return 结果 + */ + public SysPost checkPostCodeUnique(String postCode); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleDeptMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleDeptMapper.java new file mode 100644 index 0000000..8dcb7a9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleDeptMapper.java @@ -0,0 +1,42 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysRoleDept; + +import java.util.List; + +/** + * 角色与部门关联表 数据层 + */ +public interface SysRoleDeptMapper { + /** + * 通过角色ID删除角色和部门关联 + * + * @param roleId 角色ID + * @return 结果 + */ + public int deleteRoleDeptByRoleId(Long roleId); + + /** + * 批量删除角色部门关联信息 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteRoleDept(Long[] ids); + + /** + * 查询部门使用数量 + * + * @param deptId 部门ID + * @return 结果 + */ + public int selectCountRoleDeptByDeptId(Long deptId); + + /** + * 批量新增角色部门信息 + * + * @param roleDeptList 角色部门列表 + * @return 结果 + */ + public int batchRoleDept(List roleDeptList); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMapper.java new file mode 100644 index 0000000..02fe536 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMapper.java @@ -0,0 +1,105 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysRole; + +import java.util.List; + +/** + * 角色表 数据层 + */ +public interface SysRoleMapper { + /** + * 根据条件分页查询角色数据 + * + * @param role 角色信息 + * @return 角色数据集合信息 + */ + public List selectRoleList(SysRole role); + + /** + * 根据用户ID查询角色 + * + * @param userId 用户ID + * @return 角色列表 + */ + public List selectRolePermissionByUserId(Long userId); + + /** + * 查询所有角色 + * + * @return 角色列表 + */ + public List selectRoleAll(); + + /** + * 根据用户ID获取角色选择框列表 + * + * @param userId 用户ID + * @return 选中角色ID列表 + */ + public List selectRoleListByUserId(Long userId); + + /** + * 通过角色ID查询角色 + * + * @param roleId 角色ID + * @return 角色对象信息 + */ + public SysRole selectRoleById(Long roleId); + + /** + * 根据用户ID查询角色 + * + * @param userName 用户名 + * @return 角色列表 + */ + public List selectRolesByUserName(String userName); + + /** + * 校验角色名称是否唯一 + * + * @param roleName 角色名称 + * @return 角色信息 + */ + public SysRole checkRoleNameUnique(String roleName); + + /** + * 校验角色权限是否唯一 + * + * @param roleKey 角色权限 + * @return 角色信息 + */ + public SysRole checkRoleKeyUnique(String roleKey); + + /** + * 修改角色信息 + * + * @param role 角色信息 + * @return 结果 + */ + public int updateRole(SysRole role); + + /** + * 新增角色信息 + * + * @param role 角色信息 + * @return 结果 + */ + public int insertRole(SysRole role); + + /** + * 通过角色ID删除角色 + * + * @param roleId 角色ID + * @return 结果 + */ + public int deleteRoleById(Long roleId); + + /** + * 批量删除角色信息 + * + * @param roleIds 需要删除的角色ID + * @return 结果 + */ + public int deleteRoleByIds(Long[] roleIds); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMenuMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMenuMapper.java new file mode 100644 index 0000000..590ecf8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMenuMapper.java @@ -0,0 +1,34 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysRoleMenu; + +import java.util.List; + +/** + * 角色与菜单关联表 数据层 + */ +public interface SysRoleMenuMapper { + /** + * 查询菜单使用数量 + * + * @param menuId 菜单ID + * @return 结果 + */ + public int checkMenuExistRole(Long menuId); + + /** + * 通过角色ID删除角色和菜单关联 + * + * @param roleId 角色ID + * @return 结果 + */ + public int deleteRoleMenuByRoleId(Long roleId); + + /** + * 批量新增角色菜单信息 + * + * @param roleMenuList 角色菜单列表 + * @return 结果 + */ + public int batchRoleMenu(List roleMenuList); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserMapper.java new file mode 100644 index 0000000..d059fd0 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserMapper.java @@ -0,0 +1,109 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysUser; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户表 数据层 + */ +public interface SysUserMapper { + /** + * 根据条件分页查询用户列表 + * + * @param sysUser 用户信息 + * @return 用户信息集合信息 + */ + public List selectUserList(SysUser sysUser); + + /** + * 通过用户名查询用户 + * + * @param userName 用户名 + * @return 用户对象信息 + */ + public SysUser selectUserByUserName(String userName); + + /** + * 通过用户ID查询用户 + * + * @param userId 用户ID + * @return 用户对象信息 + */ + public SysUser selectUserById(Long userId); + + /** + * 新增用户信息 + * + * @param user 用户信息 + * @return 结果 + */ + public int insertUser(SysUser user); + + /** + * 修改用户信息 + * + * @param user 用户信息 + * @return 结果 + */ + public int updateUser(SysUser user); + + /** + * 修改用户头像 + * + * @param userName 用户名 + * @param avatar 头像地址 + * @return 结果 + */ + public int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar); + + /** + * 重置用户密码 + * + * @param userName 用户名 + * @param password 密码 + * @return 结果 + */ + public int resetUserPwd(@Param("userName") String userName, @Param("password") String password); + + /** + * 通过用户ID删除用户 + * + * @param userId 用户ID + * @return 结果 + */ + public int deleteUserById(Long userId); + + /** + * 批量删除用户信息 + * + * @param userIds 需要删除的用户ID + * @return 结果 + */ + public int deleteUserByIds(Long[] userIds); + + /** + * 校验用户名称是否唯一 + * + * @param userName 用户名称 + * @return 结果 + */ + public int checkUserNameUnique(String userName); + + /** + * 校验手机号码是否唯一 + * + * @param phonenumber 手机号码 + * @return 结果 + */ + public SysUser checkPhoneUnique(String phonenumber); + + /** + * 校验email是否唯一 + * + * @param email 用户邮箱 + * @return 结果 + */ + public SysUser checkEmailUnique(String email); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserPostMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserPostMapper.java new file mode 100644 index 0000000..5ffb8d9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserPostMapper.java @@ -0,0 +1,42 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysUserPost; + +import java.util.List; + +/** + * 用户与岗位关联表 数据层 + */ +public interface SysUserPostMapper { + /** + * 通过用户ID删除用户和岗位关联 + * + * @param userId 用户ID + * @return 结果 + */ + public int deleteUserPostByUserId(Long userId); + + /** + * 通过岗位ID查询岗位使用数量 + * + * @param postId 岗位ID + * @return 结果 + */ + public int countUserPostById(Long postId); + + /** + * 批量删除用户和岗位关联 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteUserPost(Long[] ids); + + /** + * 批量新增用户岗位信息 + * + * @param userPostList 用户角色列表 + * @return 结果 + */ + public int batchUserPost(List userPostList); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserRoleMapper.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserRoleMapper.java new file mode 100644 index 0000000..fd6809b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserRoleMapper.java @@ -0,0 +1,60 @@ +package com.alonginfo.project.system.mapper; + +import com.alonginfo.project.system.domain.SysUserRole; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户与角色关联表 数据层 + */ +public interface SysUserRoleMapper { + /** + * 通过用户ID删除用户和角色关联 + * + * @param userId 用户ID + * @return 结果 + */ + public int deleteUserRoleByUserId(Long userId); + + /** + * 批量删除用户和角色关联 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteUserRole(Long[] ids); + + /** + * 通过角色ID查询角色使用数量 + * + * @param roleId 角色ID + * @return 结果 + */ + public int countUserRoleByRoleId(Long roleId); + + /** + * 批量新增用户角色信息 + * + * @param userRoleList 用户角色列表 + * @return 结果 + */ + public int batchUserRole(List userRoleList); + + /** + * 删除用户和角色关联信息 + * + * @param userRole 用户和角色关联信息 + * @return 结果 + */ + public int deleteUserRoleInfo(SysUserRole userRole); + + /** + * 批量取消授权用户角色 + * + * @param roleId 角色ID + * @param userIds 需要删除的用户数据ID + * @return 结果 + */ + public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysConfigService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysConfigService.java new file mode 100644 index 0000000..bbf4e5f --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysConfigService.java @@ -0,0 +1,78 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.project.system.domain.SysConfig; + +import java.util.List; + +/** + * 参数配置 服务层 + * + * @author sdj + */ +public interface ISysConfigService { + /** + * 查询参数配置信息 + * + * @param configId 参数配置ID + * @return 参数配置信息 + */ + public SysConfig selectConfigById(Long configId); + + /** + * 根据键名查询参数配置信息 + * + * @param configKey 参数键名 + * @return 参数键值 + */ + public String selectConfigByKey(String configKey); + + /** + * 查询参数配置列表 + * + * @param config 参数配置信息 + * @return 参数配置集合 + */ + public List selectConfigList(SysConfig config); + + /** + * 新增参数配置 + * + * @param config 参数配置信息 + * @return 结果 + */ + public int insertConfig(SysConfig config); + + /** + * 修改参数配置 + * + * @param config 参数配置信息 + * @return 结果 + */ + public int updateConfig(SysConfig config); + + /** + * 删除参数配置信息 + * + * @param configId 参数ID + * @return 结果 + */ + public int deleteConfigById(Long configId); + + /** + * 批量删除参数信息 + * + * @param configIds 需要删除的参数ID + * @return 结果 + */ + public int deleteConfigByIds(Long[] configIds); + + /** + * 校验参数键名是否唯一 + * + * @param config 参数信息 + * @return 结果 + */ + public String checkConfigKeyUnique(SysConfig config); + + String getIntroduceByThemeId(String themeId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDeptService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDeptService.java new file mode 100644 index 0000000..47e3ce7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDeptService.java @@ -0,0 +1,101 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.framework.web.domain.TreeSelect; +import com.alonginfo.project.system.domain.SysDept; + +import java.util.List; + +/** + * 部门管理 服务层 + * + * @author sdj + */ +public interface ISysDeptService { + /** + * 查询部门管理数据 + * + * @param dept 部门信息 + * @return 部门信息集合 + */ + public List selectDeptList(SysDept dept); + + /** + * 构建前端所需要树结构 + * + * @param depts 部门列表 + * @return 树结构列表 + */ + public List buildDeptTree(List depts); + + /** + * 构建前端所需要下拉树结构 + * + * @param depts 部门列表 + * @return 下拉树结构列表 + */ + public List buildDeptTreeSelect(List depts); + + /** + * 根据角色ID查询部门树信息 + * + * @param roleId 角色ID + * @return 选中部门列表 + */ + public List selectDeptListByRoleId(Long roleId); + + /** + * 根据部门ID查询信息 + * + * @param deptId 部门ID + * @return 部门信息 + */ + public SysDept selectDeptById(Long deptId); + + /** + * 是否存在部门子节点 + * + * @param deptId 部门ID + * @return 结果 + */ + public boolean hasChildByDeptId(Long deptId); + + /** + * 查询部门是否存在用户 + * + * @param deptId 部门ID + * @return 结果 true 存在 false 不存在 + */ + public boolean checkDeptExistUser(Long deptId); + + /** + * 校验部门名称是否唯一 + * + * @param dept 部门信息 + * @return 结果 + */ + public String checkDeptNameUnique(SysDept dept); + + /** + * 新增保存部门信息 + * + * @param dept 部门信息 + * @return 结果 + */ + public int insertDept(SysDept dept); + + /** + * 修改保存部门信息 + * + * @param dept 部门信息 + * @return 结果 + */ + public int updateDept(SysDept dept); + + /** + * 删除部门管理信息 + * + * @param deptId 部门ID + * @return 结果 + */ + public int deleteDeptById(Long deptId); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictDataService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictDataService.java new file mode 100644 index 0000000..7bc53c7 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictDataService.java @@ -0,0 +1,77 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.project.system.domain.SysDictData; + +import java.util.List; + +/** + * 字典 业务层 + * + * @author sdj + */ +public interface ISysDictDataService { + /** + * 根据条件分页查询字典数据 + * + * @param dictData 字典数据信息 + * @return 字典数据集合信息 + */ + public List selectDictDataList(SysDictData dictData); + + /** + * 根据字典类型查询字典数据 + * + * @param dictType 字典类型 + * @return 字典数据集合信息 + */ + public List selectDictDataByType(String dictType); + + /** + * 根据字典类型和字典键值查询字典数据信息 + * + * @param dictType 字典类型 + * @param dictValue 字典键值 + * @return 字典标签 + */ + public String selectDictLabel(String dictType, String dictValue); + + /** + * 根据字典数据ID查询信息 + * + * @param dictCode 字典数据ID + * @return 字典数据 + */ + public SysDictData selectDictDataById(Long dictCode); + + /** + * 通过字典ID删除字典数据信息 + * + * @param dictCode 字典数据ID + * @return 结果 + */ + public int deleteDictDataById(Long dictCode); + + /** + * 批量删除字典数据信息 + * + * @param dictCodes 需要删除的字典数据ID + * @return 结果 + */ + public int deleteDictDataByIds(Long[] dictCodes); + + /** + * 新增保存字典数据信息 + * + * @param dictData 字典数据信息 + * @return 结果 + */ + public int insertDictData(SysDictData dictData); + + /** + * 修改保存字典数据信息 + * + * @param dictData 字典数据信息 + * @return 结果 + */ + public int updateDictData(SysDictData dictData); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictTypeService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictTypeService.java new file mode 100644 index 0000000..1e3d911 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictTypeService.java @@ -0,0 +1,83 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.project.system.domain.SysDictType; + +import java.util.List; + +/** + * 字典 业务层 + * + * @author sdj + */ +public interface ISysDictTypeService { + /** + * 根据条件分页查询字典类型 + * + * @param dictType 字典类型信息 + * @return 字典类型集合信息 + */ + public List selectDictTypeList(SysDictType dictType); + + /** + * 根据所有字典类型 + * + * @return 字典类型集合信息 + */ + public List selectDictTypeAll(); + + /** + * 根据字典类型ID查询信息 + * + * @param dictId 字典类型ID + * @return 字典类型 + */ + public SysDictType selectDictTypeById(Long dictId); + + /** + * 根据字典类型查询信息 + * + * @param dictType 字典类型 + * @return 字典类型 + */ + public SysDictType selectDictTypeByType(String dictType); + + /** + * 通过字典ID删除字典信息 + * + * @param dictId 字典ID + * @return 结果 + */ + public int deleteDictTypeById(Long dictId); + + /** + * 批量删除字典信息 + * + * @param dictIds 需要删除的字典ID + * @return 结果 + */ + public int deleteDictTypeByIds(Long[] dictIds); + + /** + * 新增保存字典类型信息 + * + * @param dictType 字典类型信息 + * @return 结果 + */ + public int insertDictType(SysDictType dictType); + + /** + * 修改保存字典类型信息 + * + * @param dictType 字典类型信息 + * @return 结果 + */ + public int updateDictType(SysDictType dictType); + + /** + * 校验字典类型称是否唯一 + * + * @param dictType 字典类型 + * @return 结果 + */ + public String checkDictTypeUnique(SysDictType dictType); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysMenuService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysMenuService.java new file mode 100644 index 0000000..612a74c --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysMenuService.java @@ -0,0 +1,136 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.framework.web.domain.TreeSelect; +import com.alonginfo.project.system.domain.SysMenu; +import com.alonginfo.project.system.domain.vo.RouterVo; + +import java.util.List; +import java.util.Set; + +/** + * 菜单 业务层 + * + * @author sdj + */ +public interface ISysMenuService { + /** + * 根据用户查询系统菜单列表 + * + * @param userId 用户ID + * @return 菜单列表 + */ + public List selectMenuList(Long userId); + + /** + * 根据用户查询系统菜单列表 + * + * @param menu 菜单信息 + * @param userId 用户ID + * @return 菜单列表 + */ + public List selectMenuList(SysMenu menu, Long userId); + + /** + * 根据用户ID查询权限 + * + * @param userId 用户ID + * @return 权限列表 + */ + public Set selectMenuPermsByUserId(Long userId); + + /** + * 根据用户ID查询菜单树信息 + * + * @param userId 用户ID + * @return 菜单列表 + */ + public List selectMenuTreeByUserId(Long userId); + + /** + * 根据角色ID查询菜单树信息 + * + * @param roleId 角色ID + * @return 选中菜单列表 + */ + public List selectMenuListByRoleId(Long roleId); + + /** + * 构建前端路由所需要的菜单 + * + * @param menus 菜单列表 + * @return 路由列表 + */ + public List buildMenus(List menus); + + /** + * 构建前端所需要树结构 + * + * @param menus 菜单列表 + * @return 树结构列表 + */ + public List buildMenuTree(List menus); + + /** + * 构建前端所需要下拉树结构 + * + * @param menus 菜单列表 + * @return 下拉树结构列表 + */ + public List buildMenuTreeSelect(List menus); + + /** + * 根据菜单ID查询信息 + * + * @param menuId 菜单ID + * @return 菜单信息 + */ + public SysMenu selectMenuById(Long menuId); + + /** + * 是否存在菜单子节点 + * + * @param menuId 菜单ID + * @return 结果 true 存在 false 不存在 + */ + public boolean hasChildByMenuId(Long menuId); + + /** + * 查询菜单是否存在角色 + * + * @param menuId 菜单ID + * @return 结果 true 存在 false 不存在 + */ + public boolean checkMenuExistRole(Long menuId); + + /** + * 新增保存菜单信息 + * + * @param menu 菜单信息 + * @return 结果 + */ + public int insertMenu(SysMenu menu); + + /** + * 修改保存菜单信息 + * + * @param menu 菜单信息 + * @return 结果 + */ + public int updateMenu(SysMenu menu); + + /** + * 删除菜单管理信息 + * + * @param menuId 菜单ID + * @return 结果 + */ + public int deleteMenuById(Long menuId); + + /** + * 校验菜单名称是否唯一 + * + * @param menu 菜单信息 + * @return 结果 + */ + public String checkMenuNameUnique(SysMenu menu); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysNoticeService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysNoticeService.java new file mode 100644 index 0000000..c3eb2e8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysNoticeService.java @@ -0,0 +1,60 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.project.system.domain.SysNotice; + +import java.util.List; + +/** + * 公告 服务层 + * + * @author sdj + */ +public interface ISysNoticeService { + /** + * 查询公告信息 + * + * @param noticeId 公告ID + * @return 公告信息 + */ + public SysNotice selectNoticeById(Long noticeId); + + /** + * 查询公告列表 + * + * @param notice 公告信息 + * @return 公告集合 + */ + public List selectNoticeList(SysNotice notice); + + /** + * 新增公告 + * + * @param notice 公告信息 + * @return 结果 + */ + public int insertNotice(SysNotice notice); + + /** + * 修改公告 + * + * @param notice 公告信息 + * @return 结果 + */ + public int updateNotice(SysNotice notice); + + /** + * 删除公告信息 + * + * @param noticeId 公告ID + * @return 结果 + */ + public int deleteNoticeById(Long noticeId); + + /** + * 批量删除公告信息 + * + * @param noticeIds 需要删除的公告ID + * @return 结果 + */ + public int deleteNoticeByIds(Long noticeIds); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysPostService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysPostService.java new file mode 100644 index 0000000..9b1bebc --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysPostService.java @@ -0,0 +1,100 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.project.system.domain.SysPost; + +import java.util.List; + +/** + * 岗位信息 服务层 + * + * @author sdj + */ +public interface ISysPostService { + /** + * 查询岗位信息集合 + * + * @param post 岗位信息 + * @return 岗位列表 + */ + public List selectPostList(SysPost post); + + /** + * 查询所有岗位 + * + * @return 岗位列表 + */ + public List selectPostAll(); + + /** + * 通过岗位ID查询岗位信息 + * + * @param postId 岗位ID + * @return 角色对象信息 + */ + public SysPost selectPostById(Long postId); + + /** + * 根据用户ID获取岗位选择框列表 + * + * @param userId 用户ID + * @return 选中岗位ID列表 + */ + public List selectPostListByUserId(Long userId); + + /** + * 校验岗位名称 + * + * @param post 岗位信息 + * @return 结果 + */ + public String checkPostNameUnique(SysPost post); + + /** + * 校验岗位编码 + * + * @param post 岗位信息 + * @return 结果 + */ + public String checkPostCodeUnique(SysPost post); + + /** + * 通过岗位ID查询岗位使用数量 + * + * @param postId 岗位ID + * @return 结果 + */ + public int countUserPostById(Long postId); + + /** + * 删除岗位信息 + * + * @param postId 岗位ID + * @return 结果 + */ + public int deletePostById(Long postId); + + /** + * 批量删除岗位信息 + * + * @param postIds 需要删除的岗位ID + * @return 结果 + * @throws Exception 异常 + */ + public int deletePostByIds(Long[] postIds); + + /** + * 新增保存岗位信息 + * + * @param post 岗位信息 + * @return 结果 + */ + public int insertPost(SysPost post); + + /** + * 修改保存岗位信息 + * + * @param post 岗位信息 + * @return 结果 + */ + public int updatePost(SysPost post); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysRoleService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysRoleService.java new file mode 100644 index 0000000..01868df --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysRoleService.java @@ -0,0 +1,131 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.project.system.domain.SysRole; + +import java.util.List; +import java.util.Set; + +/** + * 角色业务层 + * + * @author sdj + */ +public interface ISysRoleService { + /** + * 根据条件分页查询角色数据 + * + * @param role 角色信息 + * @return 角色数据集合信息 + */ + public List selectRoleList(SysRole role); + + /** + * 根据用户ID查询角色 + * + * @param userId 用户ID + * @return 权限列表 + */ + public Set selectRolePermissionByUserId(Long userId); + + /** + * 查询所有角色 + * + * @return 角色列表 + */ + public List selectRoleAll(); + + /** + * 根据用户ID获取角色选择框列表 + * + * @param userId 用户ID + * @return 选中角色ID列表 + */ + public List selectRoleListByUserId(Long userId); + + /** + * 通过角色ID查询角色 + * + * @param roleId 角色ID + * @return 角色对象信息 + */ + public SysRole selectRoleById(Long roleId); + + /** + * 校验角色名称是否唯一 + * + * @param role 角色信息 + * @return 结果 + */ + public String checkRoleNameUnique(SysRole role); + + /** + * 校验角色权限是否唯一 + * + * @param role 角色信息 + * @return 结果 + */ + public String checkRoleKeyUnique(SysRole role); + + /** + * 校验角色是否允许操作 + * + * @param role 角色信息 + */ + public void checkRoleAllowed(SysRole role); + + /** + * 通过角色ID查询角色使用数量 + * + * @param roleId 角色ID + * @return 结果 + */ + public int countUserRoleByRoleId(Long roleId); + + /** + * 新增保存角色信息 + * + * @param role 角色信息 + * @return 结果 + */ + public int insertRole(SysRole role); + + /** + * 修改保存角色信息 + * + * @param role 角色信息 + * @return 结果 + */ + public int updateRole(SysRole role); + + /** + * 修改角色状态 + * + * @param role 角色信息 + * @return 结果 + */ + public int updateRoleStatus(SysRole role); + + /** + * 修改数据权限信息 + * + * @param role 角色信息 + * @return 结果 + */ + public int authDataScope(SysRole role); + + /** + * 通过角色ID删除角色 + * + * @param roleId 角色ID + * @return 结果 + */ + public int deleteRoleById(Long roleId); + + /** + * 批量删除角色信息 + * + * @param roleIds 需要删除的角色ID + * @return 结果 + */ + public int deleteRoleByIds(Long[] roleIds); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserOnlineService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserOnlineService.java new file mode 100644 index 0000000..b390356 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserOnlineService.java @@ -0,0 +1,47 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.project.monitor.domain.SysUserOnline; + +/** + * 在线用户 服务层 + * + * @author sdj + */ +public interface ISysUserOnlineService { + /** + * 通过登录地址查询信息 + * + * @param ipaddr 登录地址 + * @param user 用户信息 + * @return 在线用户信息 + */ + public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user); + + /** + * 通过用户名称查询信息 + * + * @param userName 用户名称 + * @param user 用户信息 + * @return 在线用户信息 + */ + public SysUserOnline selectOnlineByUserName(String userName, LoginUser user); + + /** + * 通过登录地址/用户名称查询信息 + * + * @param ipaddr 登录地址 + * @param userName 用户名称 + * @param user 用户信息 + * @return 在线用户信息 + */ + public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user); + + /** + * 设置在线用户信息 + * + * @param user 用户信息 + * @return 在线用户 + */ + public SysUserOnline loginUserToUserOnline(LoginUser user); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserService.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserService.java new file mode 100644 index 0000000..ca158c3 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserService.java @@ -0,0 +1,167 @@ +package com.alonginfo.project.system.service; + +import com.alonginfo.project.system.domain.SysUser; + +import java.util.List; + +/** + * 用户 业务层 + * + * @author sdj + */ +public interface ISysUserService { + /** + * 根据条件分页查询用户列表 + * + * @param user 用户信息 + * @return 用户信息集合信息 + */ + public List selectUserList(SysUser user); + + /** + * 通过用户名查询用户 + * + * @param userName 用户名 + * @return 用户对象信息 + */ + public SysUser selectUserByUserName(String userName); + + /** + * 通过用户ID查询用户 + * + * @param userId 用户ID + * @return 用户对象信息 + */ + public SysUser selectUserById(Long userId); + + /** + * 根据用户ID查询用户所属角色组 + * + * @param userName 用户名 + * @return 结果 + */ + public String selectUserRoleGroup(String userName); + + /** + * 根据用户ID查询用户所属岗位组 + * + * @param userName 用户名 + * @return 结果 + */ + public String selectUserPostGroup(String userName); + + /** + * 校验用户名称是否唯一 + * + * @param userName 用户名称 + * @return 结果 + */ + public String checkUserNameUnique(String userName); + + /** + * 校验手机号码是否唯一 + * + * @param user 用户信息 + * @return 结果 + */ + public String checkPhoneUnique(SysUser user); + + /** + * 校验email是否唯一 + * + * @param user 用户信息 + * @return 结果 + */ + public String checkEmailUnique(SysUser user); + + /** + * 校验用户是否允许操作 + * + * @param user 用户信息 + */ + public void checkUserAllowed(SysUser user); + + /** + * 新增用户信息 + * + * @param user 用户信息 + * @return 结果 + */ + public int insertUser(SysUser user); + + /** + * 修改用户信息 + * + * @param user 用户信息 + * @return 结果 + */ + public int updateUser(SysUser user); + + /** + * 修改用户状态 + * + * @param user 用户信息 + * @return 结果 + */ + public int updateUserStatus(SysUser user); + + /** + * 修改用户基本信息 + * + * @param user 用户信息 + * @return 结果 + */ + public int updateUserProfile(SysUser user); + + /** + * 修改用户头像 + * + * @param userName 用户名 + * @param avatar 头像地址 + * @return 结果 + */ + public boolean updateUserAvatar(String userName, String avatar); + + /** + * 重置用户密码 + * + * @param user 用户信息 + * @return 结果 + */ + public int resetPwd(SysUser user); + + /** + * 重置用户密码 + * + * @param userName 用户名 + * @param password 密码 + * @return 结果 + */ + public int resetUserPwd(String userName, String password); + + /** + * 通过用户ID删除用户 + * + * @param userId 用户ID + * @return 结果 + */ + public int deleteUserById(Long userId); + + /** + * 批量删除用户信息 + * + * @param userIds 需要删除的用户ID + * @return 结果 + */ + public int deleteUserByIds(Long[] userIds); + + /** + * 导入用户数据 + * + * @param userList 用户数据列表 + * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 + * @param operName 操作用户 + * @return 结果 + */ + public String importUser(List userList, Boolean isUpdateSupport, String operName); +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysConfigServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysConfigServiceImpl.java new file mode 100644 index 0000000..8f054db --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysConfigServiceImpl.java @@ -0,0 +1,134 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.system.domain.SysConfig; +import com.alonginfo.project.system.mapper.SysConfigMapper; +import com.alonginfo.project.system.service.ISysConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 参数配置 服务层实现 + * + * @author sdj + */ +@Service +public class SysConfigServiceImpl implements ISysConfigService { + @Autowired + private SysConfigMapper configMapper; + + /** + * 查询参数配置信息 + * + * @param configId 参数配置ID + * @return 参数配置信息 + */ + @Override + public SysConfig selectConfigById(Long configId) + { + SysConfig config = new SysConfig(); + config.setConfigId(configId); + return configMapper.selectConfig(config); + } + + /** + * 根据键名查询参数配置信息 + * + * @param configKey 参数key + * @return 参数键值 + */ + @Override + public String selectConfigByKey(String configKey) + { + SysConfig config = new SysConfig(); + config.setConfigKey(configKey); + SysConfig retConfig = configMapper.selectConfig(config); + return StringUtils.isNotNull(retConfig) ? retConfig.getConfigValue() : ""; + } + + /** + * 查询参数配置列表 + * + * @param config 参数配置信息 + * @return 参数配置集合 + */ + @Override + public List selectConfigList(SysConfig config) + { + return configMapper.selectConfigList(config); + } + + /** + * 新增参数配置 + * + * @param config 参数配置信息 + * @return 结果 + */ + @Override + public int insertConfig(SysConfig config) + { + return configMapper.insertConfig(config); + } + + /** + * 修改参数配置 + * + * @param config 参数配置信息 + * @return 结果 + */ + @Override + public int updateConfig(SysConfig config) + { + return configMapper.updateConfig(config); + } + + /** + * 删除参数配置信息 + * + * @param configId 参数ID + * @return 结果 + */ + @Override + public int deleteConfigById(Long configId) + { + return configMapper.deleteConfigById(configId); + } + + /** + * 批量删除参数信息 + * + * @param configIds 需要删除的参数ID + * @return 结果 + */ + @Override + public int deleteConfigByIds(Long[] configIds) + { + return configMapper.deleteConfigByIds(configIds); + } + + /** + * 校验参数键名是否唯一 + * + * @param config 参数配置信息 + * @return 结果 + */ + @Override + public String checkConfigKeyUnique(SysConfig config) + { + Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId(); + SysConfig info = configMapper.checkConfigKeyUnique(config.getConfigKey()); + if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + @Override + public String getIntroduceByThemeId(String themeId) { + return configMapper.queryIntroduceByThemeId(themeId); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDeptServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDeptServiceImpl.java new file mode 100644 index 0000000..d24a848 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDeptServiceImpl.java @@ -0,0 +1,294 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.DataScope; +import com.alonginfo.framework.web.domain.TreeSelect; +import com.alonginfo.project.system.domain.SysDept; +import com.alonginfo.project.system.mapper.SysDeptMapper; +import com.alonginfo.project.system.service.ISysDeptService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 部门管理 服务实现 + * + * @author sdj + */ +@Service +public class SysDeptServiceImpl implements ISysDeptService { + @Autowired + private SysDeptMapper deptMapper; + + /** + * 查询部门管理数据 + * + * @param dept 部门信息 + * @return 部门信息集合 + */ + @Override + @DataScope(deptAlias = "d") + public List selectDeptList(SysDept dept) + { + return deptMapper.selectDeptList(dept); + } + + /** + * 构建前端所需要树结构 + * + * @param depts 部门列表 + * @return 树结构列表 + */ + @Override + public List buildDeptTree(List depts) + { + List returnList = new ArrayList(); + List tempList = new ArrayList(); + for (SysDept dept : depts) + { + tempList.add(dept.getDeptId()); + } + for (Iterator iterator = depts.iterator(); iterator.hasNext();) + { + SysDept dept = (SysDept) iterator.next(); + // 如果是顶级节点, 遍历该父节点的所有子节点 + if (!tempList.contains(dept.getParentId())) + { + recursionFn(depts, dept); + returnList.add(dept); + } + } + if (returnList.isEmpty()) + { + returnList = depts; + } + return returnList; + } + + /** + * 构建前端所需要下拉树结构 + * + * @param depts 部门列表 + * @return 下拉树结构列表 + */ + @Override + public List buildDeptTreeSelect(List depts) + { + List deptTrees = buildDeptTree(depts); + return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); + } + + /** + * 根据角色ID查询部门树信息 + * + * @param roleId 角色ID + * @return 选中部门列表 + */ + @Override + public List selectDeptListByRoleId(Long roleId) + { + return deptMapper.selectDeptListByRoleId(roleId); + } + + /** + * 根据部门ID查询信息 + * + * @param deptId 部门ID + * @return 部门信息 + */ + @Override + public SysDept selectDeptById(Long deptId) + { + return deptMapper.selectDeptById(deptId); + } + + /** + * 是否存在子节点 + * + * @param deptId 部门ID + * @return 结果 + */ + @Override + public boolean hasChildByDeptId(Long deptId) + { + int result = deptMapper.hasChildByDeptId(deptId); + return result > 0 ? true : false; + } + + /** + * 查询部门是否存在用户 + * + * @param deptId 部门ID + * @return 结果 true 存在 false 不存在 + */ + @Override + public boolean checkDeptExistUser(Long deptId) + { + int result = deptMapper.checkDeptExistUser(deptId); + return result > 0 ? true : false; + } + + /** + * 校验部门名称是否唯一 + * + * @param dept 部门信息 + * @return 结果 + */ + @Override + public String checkDeptNameUnique(SysDept dept) + { + Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId(); + SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId()); + if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 新增保存部门信息 + * + * @param dept 部门信息 + * @return 结果 + */ + @Override + public int insertDept(SysDept dept) + { + SysDept info = deptMapper.selectDeptById(dept.getParentId()); + // 如果父节点不为正常状态,则不允许新增子节点 + if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) + { + throw new CustomException("部门停用,不允许新增"); + } + dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); + return deptMapper.insertDept(dept); + } + + /** + * 修改保存部门信息 + * + * @param dept 部门信息 + * @return 结果 + */ + @Override + public int updateDept(SysDept dept) + { + SysDept newParentDept = deptMapper.selectDeptById(dept.getParentId()); + SysDept oldDept = deptMapper.selectDeptById(dept.getDeptId()); + if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) + { + String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); + String oldAncestors = oldDept.getAncestors(); + dept.setAncestors(newAncestors); + updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); + } + int result = deptMapper.updateDept(dept); + if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) + { + // 如果该部门是启用状态,则启用该部门的所有上级部门 + updateParentDeptStatus(dept); + } + return result; + } + + /** + * 修改该部门的父级部门状态 + * + * @param dept 当前部门 + */ + private void updateParentDeptStatus(SysDept dept) + { + String updateBy = dept.getUpdateBy(); + dept = deptMapper.selectDeptById(dept.getDeptId()); + dept.setUpdateBy(updateBy); + deptMapper.updateDeptStatus(dept); + } + + /** + * 修改子元素关系 + * + * @param deptId 被修改的部门ID + * @param newAncestors 新的父ID集合 + * @param oldAncestors 旧的父ID集合 + */ + public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) + { + List children = deptMapper.selectChildrenDeptById(deptId); + for (SysDept child : children) + { + child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors)); + } + if (children.size() > 0) + { + deptMapper.updateDeptChildren(children); + } + } + + /** + * 删除部门管理信息 + * + * @param deptId 部门ID + * @return 结果 + */ + @Override + public int deleteDeptById(Long deptId) + { + return deptMapper.deleteDeptById(deptId); + } + + /** + * 递归列表 + */ + private void recursionFn(List list, SysDept t) + { + // 得到子节点列表 + List childList = getChildList(list, t); + t.setChildren(childList); + for (SysDept tChild : childList) + { + if (hasChild(list, tChild)) + { + // 判断是否有子节点 + Iterator it = childList.iterator(); + while (it.hasNext()) + { + SysDept n = (SysDept) it.next(); + recursionFn(list, n); + } + } + } + } + + /** + * 得到子节点列表 + */ + private List getChildList(List list, SysDept t) + { + List tlist = new ArrayList(); + Iterator it = list.iterator(); + while (it.hasNext()) + { + SysDept n = (SysDept) it.next(); + if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) + { + tlist.add(n); + } + } + return tlist; + } + + /** + * 判断是否有子节点 + */ + private boolean hasChild(List list, SysDept t) + { + return getChildList(list, t).size() > 0 ? true : false; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictDataServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictDataServiceImpl.java new file mode 100644 index 0000000..0f1a311 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictDataServiceImpl.java @@ -0,0 +1,116 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.project.system.domain.SysDictData; +import com.alonginfo.project.system.mapper.SysDictDataMapper; +import com.alonginfo.project.system.service.ISysDictDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 字典 业务层处理 + * + * @author sdj + */ +@Service +public class SysDictDataServiceImpl implements ISysDictDataService { + @Autowired + private SysDictDataMapper dictDataMapper; + + /** + * 根据条件分页查询字典数据 + * + * @param dictData 字典数据信息 + * @return 字典数据集合信息 + */ + @Override + public List selectDictDataList(SysDictData dictData) + { + return dictDataMapper.selectDictDataList(dictData); + } + + /** + * 根据字典类型查询字典数据 + * + * @param dictType 字典类型 + * @return 字典数据集合信息 + */ + @Override + public List selectDictDataByType(String dictType) + { + return dictDataMapper.selectDictDataByType(dictType); + } + + /** + * 根据字典类型和字典键值查询字典数据信息 + * + * @param dictType 字典类型 + * @param dictValue 字典键值 + * @return 字典标签 + */ + @Override + public String selectDictLabel(String dictType, String dictValue) + { + return dictDataMapper.selectDictLabel(dictType, dictValue); + } + + /** + * 根据字典数据ID查询信息 + * + * @param dictCode 字典数据ID + * @return 字典数据 + */ + @Override + public SysDictData selectDictDataById(Long dictCode) + { + return dictDataMapper.selectDictDataById(dictCode); + } + + /** + * 通过字典ID删除字典数据信息 + * + * @param dictCode 字典数据ID + * @return 结果 + */ + @Override + public int deleteDictDataById(Long dictCode) + { + return dictDataMapper.deleteDictDataById(dictCode); + } + + /** + * 批量删除字典数据信息 + * + * @param dictCodes 需要删除的字典数据ID + * @return 结果 + */ + public int deleteDictDataByIds(Long[] dictCodes) + { + return dictDataMapper.deleteDictDataByIds(dictCodes); + } + + /** + * 新增保存字典数据信息 + * + * @param dictData 字典数据信息 + * @return 结果 + */ + @Override + public int insertDictData(SysDictData dictData) + { + return dictDataMapper.insertDictData(dictData); + } + + /** + * 修改保存字典数据信息 + * + * @param dictData 字典数据信息 + * @return 结果 + */ + @Override + public int updateDictData(SysDictData dictData) + { + return dictDataMapper.updateDictData(dictData); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictTypeServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictTypeServiceImpl.java new file mode 100644 index 0000000..1c29331 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictTypeServiceImpl.java @@ -0,0 +1,141 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.system.domain.SysDictType; +import com.alonginfo.project.system.mapper.SysDictDataMapper; +import com.alonginfo.project.system.mapper.SysDictTypeMapper; +import com.alonginfo.project.system.service.ISysDictTypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 字典 业务层处理 + * + * @author sdj + */ +@Service +public class SysDictTypeServiceImpl implements ISysDictTypeService { + @Autowired + private SysDictTypeMapper dictTypeMapper; + + @Autowired + private SysDictDataMapper dictDataMapper; + + /** + * 根据条件分页查询字典类型 + * + * @param dictType 字典类型信息 + * @return 字典类型集合信息 + */ + @Override + public List selectDictTypeList(SysDictType dictType) + { + return dictTypeMapper.selectDictTypeList(dictType); + } + + /** + * 根据所有字典类型 + * + * @return 字典类型集合信息 + */ + @Override + public List selectDictTypeAll() + { + return dictTypeMapper.selectDictTypeAll(); + } + + /** + * 根据字典类型ID查询信息 + * + * @param dictId 字典类型ID + * @return 字典类型 + */ + @Override + public SysDictType selectDictTypeById(Long dictId) + { + return dictTypeMapper.selectDictTypeById(dictId); + } + + /** + * 根据字典类型查询信息 + * + * @param dictType 字典类型 + * @return 字典类型 + */ + public SysDictType selectDictTypeByType(String dictType) + { + return dictTypeMapper.selectDictTypeByType(dictType); + } + + /** + * 通过字典ID删除字典信息 + * + * @param dictId 字典ID + * @return 结果 + */ + @Override + public int deleteDictTypeById(Long dictId) + { + return dictTypeMapper.deleteDictTypeById(dictId); + } + + /** + * 批量删除字典类型信息 + * + * @param dictIds 需要删除的字典ID + * @return 结果 + */ + public int deleteDictTypeByIds(Long[] dictIds) + { + return dictTypeMapper.deleteDictTypeByIds(dictIds); + } + + /** + * 新增保存字典类型信息 + * + * @param dictType 字典类型信息 + * @return 结果 + */ + @Override + public int insertDictType(SysDictType dictType) + { + return dictTypeMapper.insertDictType(dictType); + } + + /** + * 修改保存字典类型信息 + * + * @param dictType 字典类型信息 + * @return 结果 + */ + @Override + @Transactional + public int updateDictType(SysDictType dictType) + { + SysDictType oldDict = dictTypeMapper.selectDictTypeById(dictType.getDictId()); + dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType()); + return dictTypeMapper.updateDictType(dictType); + } + + /** + * 校验字典类型称是否唯一 + * + * @param dict 字典类型 + * @return 结果 + */ + @Override + public String checkDictTypeUnique(SysDictType dict) + { + Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId(); + SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType()); + if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysMenuServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysMenuServiceImpl.java new file mode 100644 index 0000000..b1e8410 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysMenuServiceImpl.java @@ -0,0 +1,375 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.web.domain.TreeSelect; +import com.alonginfo.project.system.domain.SysMenu; +import com.alonginfo.project.system.domain.SysUser; +import com.alonginfo.project.system.domain.vo.MetaVo; +import com.alonginfo.project.system.domain.vo.RouterVo; +import com.alonginfo.project.system.mapper.SysMenuMapper; +import com.alonginfo.project.system.mapper.SysRoleMenuMapper; +import com.alonginfo.project.system.service.ISysMenuService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * 菜单 业务层处理 + * + * @author sdj + */ +@Service +public class SysMenuServiceImpl implements ISysMenuService { + public static final String PREMISSION_STRING = "perms[\"{0}\"]"; + + @Autowired + private SysMenuMapper menuMapper; + + @Autowired + private SysRoleMenuMapper roleMenuMapper; + + /** + * 根据用户查询系统菜单列表 + * + * @param userId 用户ID + * @return 菜单列表 + */ + @Override + public List selectMenuList(Long userId) + { + return selectMenuList(new SysMenu(), userId); + } + + /** + * 查询系统菜单列表 + * + * @param menu 菜单信息 + * @return 菜单列表 + */ + @Override + public List selectMenuList(SysMenu menu, Long userId) + { + List menuList = null; + // 管理员显示所有菜单信息 + if (SysUser.isAdmin(userId)) + { + menuList = menuMapper.selectMenuList(menu); + } + else + { + menu.getParams().put("userId", userId); + menuList = menuMapper.selectMenuListByUserId(menu); + } + return menuList; + } + + /** + * 根据用户ID查询权限 + * + * @param userId 用户ID + * @return 权限列表 + */ + @Override + public Set selectMenuPermsByUserId(Long userId) + { + List perms = menuMapper.selectMenuPermsByUserId(userId); + Set permsSet = new HashSet<>(); + for (String perm : perms) + { + if (StringUtils.isNotEmpty(perm)) + { + permsSet.addAll(Arrays.asList(perm.trim().split(","))); + } + } + return permsSet; + } + + /** + * 根据用户ID查询菜单 + * + * @param userId 用户名称 + * @return 菜单列表 + */ + @Override + public List selectMenuTreeByUserId(Long userId) + { + List menus = null; + if (SecurityUtils.isAdmin(userId)) + { + menus = menuMapper.selectMenuTreeAll(); + } + else + { + menus = menuMapper.selectMenuTreeByUserId(userId); + } + return getChildPerms(menus, 0); + } + + /** + * 根据角色ID查询菜单树信息 + * + * @param roleId 角色ID + * @return 选中菜单列表 + */ + public List selectMenuListByRoleId(Long roleId) + { + return menuMapper.selectMenuListByRoleId(roleId); + } + + /** + * 构建前端路由所需要的菜单 + * + * @param menus 菜单列表 + * @return 路由列表 + */ + @Override + public List buildMenus(List menus) + { + List routers = new LinkedList(); + for (SysMenu menu : menus) + { + RouterVo router = new RouterVo(); + router.setName(StringUtils.capitalize(menu.getPath())); + router.setPath(getRouterPath(menu)); + router.setComponent(StringUtils.isEmpty(menu.getComponent()) ? "Layout" : menu.getComponent()); + router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon())); + List cMenus = menu.getChildren(); + if (!cMenus.isEmpty() && cMenus.size() > 0 && "M".equals(menu.getMenuType())) + { + router.setAlwaysShow(true); + router.setRedirect("noRedirect"); + router.setChildren(buildMenus(cMenus)); + } + routers.add(router); + } + return routers; + } + + /** + * 构建前端所需要树结构 + * + * @param menus 菜单列表 + * @return 树结构列表 + */ + @Override + public List buildMenuTree(List menus) + { + List returnList = new ArrayList(); + for (Iterator iterator = menus.iterator(); iterator.hasNext();) + { + SysMenu t = (SysMenu) iterator.next(); + // 根据传入的某个父节点ID,遍历该父节点的所有子节点 + if (t.getParentId() == 0) + { + recursionFn(menus, t); + returnList.add(t); + } + } + if (returnList.isEmpty()) + { + returnList = menus; + } + return returnList; + } + + /** + * 构建前端所需要下拉树结构 + * + * @param menus 菜单列表 + * @return 下拉树结构列表 + */ + @Override + public List buildMenuTreeSelect(List menus) + { + List menuTrees = buildMenuTree(menus); + return menuTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); + } + + /** + * 根据菜单ID查询信息 + * + * @param menuId 菜单ID + * @return 菜单信息 + */ + @Override + public SysMenu selectMenuById(Long menuId) + { + return menuMapper.selectMenuById(menuId); + } + + /** + * 是否存在菜单子节点 + * + * @param menuId 菜单ID + * @return 结果 + */ + @Override + public boolean hasChildByMenuId(Long menuId) + { + int result = menuMapper.hasChildByMenuId(menuId); + return result > 0 ? true : false; + } + + /** + * 查询菜单使用数量 + * + * @param menuId 菜单ID + * @return 结果 + */ + @Override + public boolean checkMenuExistRole(Long menuId) + { + int result = roleMenuMapper.checkMenuExistRole(menuId); + return result > 0 ? true : false; + } + + /** + * 新增保存菜单信息 + * + * @param menu 菜单信息 + * @return 结果 + */ + @Override + public int insertMenu(SysMenu menu) + { + return menuMapper.insertMenu(menu); + } + + /** + * 修改保存菜单信息 + * + * @param menu 菜单信息 + * @return 结果 + */ + @Override + public int updateMenu(SysMenu menu) + { + return menuMapper.updateMenu(menu); + } + + /** + * 删除菜单管理信息 + * + * @param menuId 菜单ID + * @return 结果 + */ + @Override + public int deleteMenuById(Long menuId) + { + return menuMapper.deleteMenuById(menuId); + } + + /** + * 校验菜单名称是否唯一 + * + * @param menu 菜单信息 + * @return 结果 + */ + @Override + public String checkMenuNameUnique(SysMenu menu) + { + Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId(); + SysMenu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId()); + if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 获取路由地址 + * + * @param menu 菜单信息 + * @return 路由地址 + */ + public String getRouterPath(SysMenu menu) + { + String routerPath = menu.getPath(); + // 非外链并且是一级目录 + if (0 == menu.getParentId() && "1".equals(menu.getIsFrame())) + { + routerPath = "/" + menu.getPath(); + } + return routerPath; + } + + /** + * 根据父节点的ID获取所有子节点 + * + * @param list 分类表 + * @param parentId 传入的父节点ID + * @return String + */ + public List getChildPerms(List list, int parentId) + { + List returnList = new ArrayList(); + for (Iterator iterator = list.iterator(); iterator.hasNext();) + { + SysMenu t = (SysMenu) iterator.next(); + // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 + if (t.getParentId() == parentId) + { + recursionFn(list, t); + returnList.add(t); + } + } + return returnList; + } + + /** + * 递归列表 + * + * @param list + * @param t + */ + private void recursionFn(List list, SysMenu t) + { + // 得到子节点列表 + List childList = getChildList(list, t); + t.setChildren(childList); + for (SysMenu tChild : childList) + { + if (hasChild(list, tChild)) + { + // 判断是否有子节点 + Iterator it = childList.iterator(); + while (it.hasNext()) + { + SysMenu n = (SysMenu) it.next(); + recursionFn(list, n); + } + } + } + } + + /** + * 得到子节点列表 + */ + private List getChildList(List list, SysMenu t) + { + List tlist = new ArrayList(); + Iterator it = list.iterator(); + while (it.hasNext()) + { + SysMenu n = (SysMenu) it.next(); + if (n.getParentId().longValue() == t.getMenuId().longValue()) + { + tlist.add(n); + } + } + return tlist; + } + + /** + * 判断是否有子节点 + */ + private boolean hasChild(List list, SysMenu t) + { + return getChildList(list, t).size() > 0 ? true : false; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysNoticeServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysNoticeServiceImpl.java new file mode 100644 index 0000000..a799f5b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysNoticeServiceImpl.java @@ -0,0 +1,91 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.project.system.domain.SysNotice; +import com.alonginfo.project.system.mapper.SysNoticeMapper; +import com.alonginfo.project.system.service.ISysNoticeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 公告 服务层实现 + * + * @author 师登举 + */ +@Service +public class SysNoticeServiceImpl implements ISysNoticeService { + @Autowired + private SysNoticeMapper noticeMapper; + + /** + * 查询公告信息 + * + * @param noticeId 公告ID + * @return 公告信息 + */ + @Override + public SysNotice selectNoticeById(Long noticeId) + { + return noticeMapper.selectNoticeById(noticeId); + } + + /** + * 查询公告列表 + * + * @param notice 公告信息 + * @return 公告集合 + */ + @Override + public List selectNoticeList(SysNotice notice) + { + return noticeMapper.selectNoticeList(notice); + } + + /** + * 新增公告 + * + * @param notice 公告信息 + * @return 结果 + */ + @Override + public int insertNotice(SysNotice notice) + { + return noticeMapper.insertNotice(notice); + } + + /** + * 修改公告 + * + * @param notice 公告信息 + * @return 结果 + */ + @Override + public int updateNotice(SysNotice notice) + { + return noticeMapper.updateNotice(notice); + } + + /** + * 删除公告对象 + * + * @param noticeId 公告ID + * @return 结果 + */ + @Override + public int deleteNoticeById(Long noticeId) + { + return noticeMapper.deleteNoticeById(noticeId); + } + + /** + * 批量删除公告信息 + * + * @param noticeIds 需要删除的公告ID + * @return 结果 + */ + public int deleteNoticeByIds(Long noticeIds) + { + return noticeMapper.deleteNoticeByIds(noticeIds); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysPostServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysPostServiceImpl.java new file mode 100644 index 0000000..9ac89ed --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysPostServiceImpl.java @@ -0,0 +1,178 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.project.system.domain.SysPost; +import com.alonginfo.project.system.mapper.SysPostMapper; +import com.alonginfo.project.system.mapper.SysUserPostMapper; +import com.alonginfo.project.system.service.ISysPostService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 岗位信息 服务层处理 + * + * @author sdj + */ +@Service +public class SysPostServiceImpl implements ISysPostService +{ + @Autowired + private SysPostMapper postMapper; + + @Autowired + private SysUserPostMapper userPostMapper; + + /** + * 查询岗位信息集合 + * + * @param post 岗位信息 + * @return 岗位信息集合 + */ + @Override + public List selectPostList(SysPost post) + { + return postMapper.selectPostList(post); + } + + /** + * 查询所有岗位 + * + * @return 岗位列表 + */ + @Override + public List selectPostAll() + { + return postMapper.selectPostAll(); + } + + /** + * 通过岗位ID查询岗位信息 + * + * @param postId 岗位ID + * @return 角色对象信息 + */ + @Override + public SysPost selectPostById(Long postId) + { + return postMapper.selectPostById(postId); + } + + /** + * 根据用户ID获取岗位选择框列表 + * + * @param userId 用户ID + * @return 选中岗位ID列表 + */ + public List selectPostListByUserId(Long userId) + { + return postMapper.selectPostListByUserId(userId); + } + + /** + * 校验岗位名称是否唯一 + * + * @param post 岗位信息 + * @return 结果 + */ + @Override + public String checkPostNameUnique(SysPost post) + { + Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId(); + SysPost info = postMapper.checkPostNameUnique(post.getPostName()); + if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 校验岗位编码是否唯一 + * + * @param post 岗位信息 + * @return 结果 + */ + @Override + public String checkPostCodeUnique(SysPost post) + { + Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId(); + SysPost info = postMapper.checkPostCodeUnique(post.getPostCode()); + if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 通过岗位ID查询岗位使用数量 + * + * @param postId 岗位ID + * @return 结果 + */ + @Override + public int countUserPostById(Long postId) + { + return userPostMapper.countUserPostById(postId); + } + + /** + * 删除岗位信息 + * + * @param postId 岗位ID + * @return 结果 + */ + @Override + public int deletePostById(Long postId) + { + return postMapper.deletePostById(postId); + } + + /** + * 批量删除岗位信息 + * + * @param postIds 需要删除的岗位ID + * @return 结果 + * @throws Exception 异常 + */ + public int deletePostByIds(Long[] postIds) + { + for (Long postId : postIds) + { + SysPost post = selectPostById(postId); + if (countUserPostById(postId) > 0) + { + throw new CustomException(String.format("%1$s已分配,不能删除", post.getPostName())); + } + } + return postMapper.deletePostByIds(postIds); + } + + /** + * 新增保存岗位信息 + * + * @param post 岗位信息 + * @return 结果 + */ + @Override + public int insertPost(SysPost post) + { + return postMapper.insertPost(post); + } + + /** + * 修改保存岗位信息 + * + * @param post 岗位信息 + * @return 结果 + */ + @Override + public int updatePost(SysPost post) + { + return postMapper.updatePost(post); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysRoleServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysRoleServiceImpl.java new file mode 100644 index 0000000..ac4eac9 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysRoleServiceImpl.java @@ -0,0 +1,307 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.DataScope; +import com.alonginfo.project.system.domain.SysRole; +import com.alonginfo.project.system.domain.SysRoleDept; +import com.alonginfo.project.system.domain.SysRoleMenu; +import com.alonginfo.project.system.mapper.SysRoleDeptMapper; +import com.alonginfo.project.system.mapper.SysRoleMapper; +import com.alonginfo.project.system.mapper.SysRoleMenuMapper; +import com.alonginfo.project.system.mapper.SysUserRoleMapper; +import com.alonginfo.project.system.service.ISysRoleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +/** + * 角色 业务层处理 + * + * @author sdj + */ +@Service +public class SysRoleServiceImpl implements ISysRoleService { + @Autowired + private SysRoleMapper roleMapper; + + @Autowired + private SysRoleMenuMapper roleMenuMapper; + + @Autowired + private SysUserRoleMapper userRoleMapper; + + @Autowired + private SysRoleDeptMapper roleDeptMapper; + + /** + * 根据条件分页查询角色数据 + * + * @param role 角色信息 + * @return 角色数据集合信息 + */ + @Override + @DataScope(deptAlias = "d") + public List selectRoleList(SysRole role) + { + return roleMapper.selectRoleList(role); + } + + /** + * 根据用户ID查询权限 + * + * @param userId 用户ID + * @return 权限列表 + */ + @Override + public Set selectRolePermissionByUserId(Long userId) + { + List perms = roleMapper.selectRolePermissionByUserId(userId); + Set permsSet = new HashSet<>(); + for (SysRole perm : perms) + { + if (StringUtils.isNotNull(perm)) + { + permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(","))); + } + } + return permsSet; + } + + /** + * 查询所有角色 + * + * @return 角色列表 + */ + public List selectRoleAll() + { + return roleMapper.selectRoleAll(); + } + + /** + * 根据用户ID获取角色选择框列表 + * + * @param userId 用户ID + * @return 选中角色ID列表 + */ + public List selectRoleListByUserId(Long userId) + { + return roleMapper.selectRoleListByUserId(userId); + } + + /** + * 通过角色ID查询角色 + * + * @param roleId 角色ID + * @return 角色对象信息 + */ + public SysRole selectRoleById(Long roleId) + { + return roleMapper.selectRoleById(roleId); + } + + /** + * 校验角色名称是否唯一 + * + * @param role 角色信息 + * @return 结果 + */ + @Override + public String checkRoleNameUnique(SysRole role) + { + Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); + SysRole info = roleMapper.checkRoleNameUnique(role.getRoleName()); + if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 校验角色权限是否唯一 + * + * @param role 角色信息 + * @return 结果 + */ + @Override + public String checkRoleKeyUnique(SysRole role) + { + Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); + SysRole info = roleMapper.checkRoleKeyUnique(role.getRoleKey()); + if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) + { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 校验角色是否允许操作 + * + * @param role 角色信息 + */ + public void checkRoleAllowed(SysRole role) + { + if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) + { + throw new CustomException("不允许操作超级管理员角色"); + } + } + + /** + * 通过角色ID查询角色使用数量 + * + * @param roleId 角色ID + * @return 结果 + */ + @Override + public int countUserRoleByRoleId(Long roleId) + { + return userRoleMapper.countUserRoleByRoleId(roleId); + } + + /** + * 新增保存角色信息 + * + * @param role 角色信息 + * @return 结果 + */ + @Override + @Transactional + public int insertRole(SysRole role) + { + // 新增角色信息 + roleMapper.insertRole(role); + return insertRoleMenu(role); + } + + /** + * 修改保存角色信息 + * + * @param role 角色信息 + * @return 结果 + */ + @Override + @Transactional + public int updateRole(SysRole role) + { + // 修改角色信息 + roleMapper.updateRole(role); + // 删除角色与菜单关联 + roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId()); + return insertRoleMenu(role); + } + + /** + * 修改角色状态 + * + * @param role 角色信息 + * @return 结果 + */ + public int updateRoleStatus(SysRole role) + { + return roleMapper.updateRole(role); + } + + /** + * 修改数据权限信息 + * + * @param role 角色信息 + * @return 结果 + */ + @Override + @Transactional + public int authDataScope(SysRole role) + { + // 修改角色信息 + roleMapper.updateRole(role); + // 删除角色与部门关联 + roleDeptMapper.deleteRoleDeptByRoleId(role.getRoleId()); + // 新增角色和部门信息(数据权限) + return insertRoleDept(role); + } + + /** + * 新增角色菜单信息 + * + * @param role 角色对象 + */ + public int insertRoleMenu(SysRole role) + { + int rows = 1; + // 新增用户与角色管理 + List list = new ArrayList(); + for (Long menuId : role.getMenuIds()) + { + SysRoleMenu rm = new SysRoleMenu(); + rm.setRoleId(role.getRoleId()); + rm.setMenuId(menuId); + list.add(rm); + } + if (list.size() > 0) + { + rows = roleMenuMapper.batchRoleMenu(list); + } + return rows; + } + + /** + * 新增角色部门信息(数据权限) + * + * @param role 角色对象 + */ + public int insertRoleDept(SysRole role) + { + int rows = 1; + // 新增角色与部门(数据权限)管理 + List list = new ArrayList(); + for (Long deptId : role.getDeptIds()) + { + SysRoleDept rd = new SysRoleDept(); + rd.setRoleId(role.getRoleId()); + rd.setDeptId(deptId); + list.add(rd); + } + if (list.size() > 0) + { + rows = roleDeptMapper.batchRoleDept(list); + } + return rows; + } + + /** + * 通过角色ID删除角色 + * + * @param roleId 角色ID + * @return 结果 + */ + @Override + public int deleteRoleById(Long roleId) + { + return roleMapper.deleteRoleById(roleId); + } + + /** + * 批量删除角色信息 + * + * @param roleIds 需要删除的角色ID + * @return 结果 + */ + public int deleteRoleByIds(Long[] roleIds) + { + for (Long roleId : roleIds) + { + checkRoleAllowed(new SysRole(roleId)); + SysRole role = selectRoleById(roleId); + if (countUserRoleByRoleId(roleId) > 0) + { + throw new CustomException(String.format("%1$s已分配,不能删除", role.getRoleName())); + } + } + return roleMapper.deleteRoleByIds(roleIds); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserOnlineServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserOnlineServiceImpl.java new file mode 100644 index 0000000..8920086 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserOnlineServiceImpl.java @@ -0,0 +1,85 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.security.LoginUser; +import com.alonginfo.project.monitor.domain.SysUserOnline; +import com.alonginfo.project.system.service.ISysUserOnlineService; +import org.springframework.stereotype.Service; + +/** + * 在线用户 服务层处理 + * + * @author sdj + */ +@Service +public class SysUserOnlineServiceImpl implements ISysUserOnlineService { + /** + * 通过登录地址查询信息 + * + * @param ipaddr 登录地址 + * @param user 用户信息 + * @return 在线用户信息 + */ + @Override + public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user) { + if (StringUtils.equals(ipaddr, user.getIpaddr())) { + return loginUserToUserOnline(user); + } + return null; + } + + /** + * 通过用户名称查询信息 + * + * @param userName 用户名称 + * @param user 用户信息 + * @return 在线用户信息 + */ + @Override + public SysUserOnline selectOnlineByUserName(String userName, LoginUser user) { + if (StringUtils.equals(userName, user.getUsername())) { + return loginUserToUserOnline(user); + } + return null; + } + + /** + * 通过登录地址/用户名称查询信息 + * + * @param ipaddr 登录地址 + * @param userName 用户名称 + * @param user 用户信息 + * @return 在线用户信息 + */ + @Override + public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user) { + if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername())) { + return loginUserToUserOnline(user); + } + return null; + } + + /** + * 设置在线用户信息 + * + * @param user 用户信息 + * @return 在线用户 + */ + public SysUserOnline loginUserToUserOnline(LoginUser user) { + if (StringUtils.isNull(user) && StringUtils.isNull(user.getUser())) { + return null; + } + SysUserOnline sysUserOnline = new SysUserOnline(); + sysUserOnline.setTokenId(user.getToken()); + sysUserOnline.setUserName(user.getUsername()); + sysUserOnline.setIpaddr(user.getIpaddr()); + sysUserOnline.setLoginLocation(user.getLoginLocation()); + sysUserOnline.setBrowser(user.getBrowser()); + sysUserOnline.setOs(user.getOs()); + sysUserOnline.setLoginTime(user.getLoginTime()); + if (StringUtils.isNotNull(user.getUser().getDept())) { + sysUserOnline.setDeptName(user.getUser().getDept().getDeptName()); + } + return sysUserOnline; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserServiceImpl.java b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserServiceImpl.java new file mode 100644 index 0000000..f73a5a2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserServiceImpl.java @@ -0,0 +1,406 @@ +package com.alonginfo.project.system.service.impl; + +import com.alonginfo.common.constant.UserConstants; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.utils.SecurityUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.aspectj.lang.annotation.DataScope; +import com.alonginfo.project.system.domain.*; +import com.alonginfo.project.system.mapper.*; +import com.alonginfo.project.system.service.ISysConfigService; +import com.alonginfo.project.system.service.ISysUserService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用户 业务层处理 + * + * @author sdj + */ +@Service +public class SysUserServiceImpl implements ISysUserService { + private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class); + + @Autowired + private SysUserMapper userMapper; + + @Autowired + private SysRoleMapper roleMapper; + + @Autowired + private SysPostMapper postMapper; + + @Autowired + private SysUserRoleMapper userRoleMapper; + + @Autowired + private SysUserPostMapper userPostMapper; + + @Autowired + private ISysConfigService configService; + + /** + * 根据条件分页查询用户列表 + * + * @param user 用户信息 + * @return 用户信息集合信息 + */ + @Override + @DataScope(deptAlias = "d", userAlias = "u") + public List selectUserList(SysUser user) + { + return userMapper.selectUserList(user); + } + + /** + * 通过用户名查询用户 + * + * @param userName 用户名 + * @return 用户对象信息 + */ + @Override + public SysUser selectUserByUserName(String userName) + { + return userMapper.selectUserByUserName(userName); + } + + /** + * 通过用户ID查询用户 + * + * @param userId 用户ID + * @return 用户对象信息 + */ + @Override + public SysUser selectUserById(Long userId) + { + return userMapper.selectUserById(userId); + } + + /** + * 查询用户所属角色组 + * + * @param userName 用户名 + * @return 结果 + */ + @Override + public String selectUserRoleGroup(String userName) { + List list = roleMapper.selectRolesByUserName(userName); + StringBuffer idsStr = new StringBuffer(); + for (SysRole role : list) { + idsStr.append(role.getRoleName()).append(","); + } + if (StringUtils.isNotEmpty(idsStr.toString())) { + return idsStr.substring(0, idsStr.length() - 1); + } + return idsStr.toString(); + } + + /** + * 查询用户所属岗位组 + * + * @param userName 用户名 + * @return 结果 + */ + @Override + public String selectUserPostGroup(String userName) { + List list = postMapper.selectPostsByUserName(userName); + StringBuffer idsStr = new StringBuffer(); + for (SysPost post : list) { + idsStr.append(post.getPostName()).append(","); + } + if (StringUtils.isNotEmpty(idsStr.toString())) { + return idsStr.substring(0, idsStr.length() - 1); + } + return idsStr.toString(); + } + + /** + * 校验用户名称是否唯一 + * + * @param userName 用户名称 + * @return 结果 + */ + @Override + public String checkUserNameUnique(String userName) { + int count = userMapper.checkUserNameUnique(userName); + if (count > 0) { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 校验用户名称是否唯一 + * + * @param user 用户信息 + * @return + */ + @Override + public String checkPhoneUnique(SysUser user) { + Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); + SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber()); + if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 校验email是否唯一 + * + * @param user 用户信息 + * @return + */ + @Override + public String checkEmailUnique(SysUser user) { + Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); + SysUser info = userMapper.checkEmailUnique(user.getEmail()); + if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 校验用户是否允许操作 + * + * @param user 用户信息 + */ + public void checkUserAllowed(SysUser user) { + if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) { + throw new CustomException("不允许操作超级管理员用户"); + } + } + + /** + * 新增保存用户信息 + * + * @param user 用户信息 + * @return 结果 + */ + @Override + @Transactional + public int insertUser(SysUser user) { + // 新增用户信息 + int rows = userMapper.insertUser(user); + // 新增用户岗位关联 + insertUserPost(user); + // 新增用户与角色管理 + insertUserRole(user); + return rows; + } + + /** + * 修改保存用户信息 + * + * @param user 用户信息 + * @return 结果 + */ + @Override + @Transactional + public int updateUser(SysUser user) { + Long userId = user.getUserId(); + // 删除用户与角色关联 + userRoleMapper.deleteUserRoleByUserId(userId); + // 新增用户与角色管理 + insertUserRole(user); + // 删除用户与岗位关联 + userPostMapper.deleteUserPostByUserId(userId); + // 新增用户与岗位管理 + insertUserPost(user); + return userMapper.updateUser(user); + } + + /** + * 修改用户状态 + * + * @param user 用户信息 + * @return 结果 + */ + @Override + public int updateUserStatus(SysUser user) + { + return userMapper.updateUser(user); + } + + /** + * 修改用户基本信息 + * + * @param user 用户信息 + * @return 结果 + */ + @Override + public int updateUserProfile(SysUser user) + { + return userMapper.updateUser(user); + } + + /** + * 修改用户头像 + * + * @param userId 用户ID + * @param avatar 头像地址 + * @return 结果 + */ + public boolean updateUserAvatar(String userName, String avatar) + { + return userMapper.updateUserAvatar(userName, avatar) > 0; + } + + /** + * 重置用户密码 + * + * @param user 用户信息 + * @return 结果 + */ + @Override + public int resetPwd(SysUser user) + { + return userMapper.updateUser(user); + } + + /** + * 重置用户密码 + * + * @param userName 用户名 + * @param password 密码 + * @return 结果 + */ + @Override + public int resetUserPwd(String userName, String password) + { + return userMapper.resetUserPwd(userName, password); + } + + /** + * 新增用户角色信息 + * + * @param user 用户对象 + */ + public void insertUserRole(SysUser user) { + Long[] roles = user.getRoleIds(); + if (StringUtils.isNotNull(roles)) { + // 新增用户与角色管理 + List list = new ArrayList(); + for (Long roleId : roles) { + SysUserRole ur = new SysUserRole(); + ur.setUserId(user.getUserId()); + ur.setRoleId(roleId); + list.add(ur); + } + if (list.size() > 0) { + userRoleMapper.batchUserRole(list); + } + } + } + + /** + * 新增用户岗位信息 + * + * @param user 用户对象 + */ + public void insertUserPost(SysUser user) { + Long[] posts = user.getPostIds(); + if (StringUtils.isNotNull(posts)) { + // 新增用户与岗位管理 + List list = new ArrayList(); + for (Long postId : posts) { + SysUserPost up = new SysUserPost(); + up.setUserId(user.getUserId()); + up.setPostId(postId); + list.add(up); + } + if (list.size() > 0) { + userPostMapper.batchUserPost(list); + } + } + } + + /** + * 通过用户ID删除用户 + * + * @param userId 用户ID + * @return 结果 + */ + @Override + public int deleteUserById(Long userId) { + // 删除用户与角色关联 + userRoleMapper.deleteUserRoleByUserId(userId); + // 删除用户与岗位表 + userPostMapper.deleteUserPostByUserId(userId); + return userMapper.deleteUserById(userId); + } + + /** + * 批量删除用户信息 + * + * @param userIds 需要删除的用户ID + * @return 结果 + */ + public int deleteUserByIds(Long[] userIds) { + for (Long userId : userIds) { + checkUserAllowed(new SysUser(userId)); + } + return userMapper.deleteUserByIds(userIds); + } + + /** + * 导入用户数据 + * + * @param userList 用户数据列表 + * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 + * @param operName 操作用户 + * @return 结果 + */ + @Override + public String importUser(List userList, Boolean isUpdateSupport, String operName) { + if (StringUtils.isNull(userList) || userList.size() == 0) { + throw new CustomException("导入用户数据不能为空!"); + } + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + String password = configService.selectConfigByKey("sys.user.initPassword"); + for (SysUser user : userList) { + try { + // 验证是否存在这个用户 + SysUser u = userMapper.selectUserByUserName(user.getUserName()); + if (StringUtils.isNull(u)) { + user.setPassword(SecurityUtils.encryptPassword(password)); + user.setCreateBy(operName); + this.insertUser(user); + successNum++; + successMsg.append("
" + successNum + "、账号 " + user.getUserName() + " 导入成功"); + } else if (isUpdateSupport) { + user.setUpdateBy(operName); + this.updateUser(user); + successNum++; + successMsg.append("
" + successNum + "、账号 " + user.getUserName() + " 更新成功"); + } else { + failureNum++; + failureMsg.append("
" + failureNum + "、账号 " + user.getUserName() + " 已存在"); + } + } catch (Exception e) { + failureNum++; + String msg = "
" + failureNum + "、账号 " + user.getUserName() + " 导入失败:"; + failureMsg.append(msg + e.getMessage()); + log.error(msg, e); + } + } + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new CustomException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + } + return successMsg.toString(); + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/tool/FileUtil.java b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/FileUtil.java new file mode 100644 index 0000000..21cdbc4 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/FileUtil.java @@ -0,0 +1,16 @@ +package com.alonginfo.project.tool; + +public class FileUtil { + + public static boolean isValidExtension(String fileExtension, String[] validExtensions) { + if (fileExtension == null) { + return false; + } + for (String validExtension : validExtensions) { + if (fileExtension.equalsIgnoreCase(validExtension)) { + return true; + } + } + return false; + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/tool/MagicNumberFileTypeChecker.java b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/MagicNumberFileTypeChecker.java new file mode 100644 index 0000000..b5c7d1b --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/MagicNumberFileTypeChecker.java @@ -0,0 +1,58 @@ +package com.alonginfo.project.tool; + +import java.io.FileInputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class MagicNumberFileTypeChecker { + // 定义魔术字节常量,以十六进制格式表示 + private static final String JPEG_MAGIC = "FFD8FF"; + private static final String PNG_MAGIC = "89504E47"; + private static final String GIF_MAGIC = "47494638"; + private static final String PDF_MAGIC = "25504446"; + private static final String ZIP_MAGIC = "504B0304"; + + // 文件类型映射 + private static final Map MAGIC_MAP = new HashMap<>(); + + static { + MAGIC_MAP.put("JPEG Image", JPEG_MAGIC); + MAGIC_MAP.put("PNG Image", PNG_MAGIC); + MAGIC_MAP.put("GIF Image", GIF_MAGIC); + MAGIC_MAP.put("PDF Document", PDF_MAGIC); + MAGIC_MAP.put("ZIP Archive", ZIP_MAGIC); + } + + // 获取文件的前几个字节 + public static byte[] getFileMagicNumber(String filePath, int length) throws IOException { + try (FileInputStream fis = new FileInputStream(filePath)) { + byte[] magicNumber = new byte[length]; + if (fis.read(magicNumber) != length) { + throw new IOException("Unable to read enough bytes from file"); + } + return magicNumber; + } + } + + // 将字节数组转换为十六进制字符串 + private static String toHexString(byte[] bytes) { + StringBuilder sb = new StringBuilder(); + for (byte b : bytes) { + sb.append(String.format("%02X", b)); + } + return sb.toString(); + } + + // 识别文件类型 + public static String identifyFileType(byte[] magicNumber) { + String magicHex = toHexString(magicNumber); + for (Map.Entry entry : MAGIC_MAP.entrySet()) { + if (magicHex.startsWith(entry.getValue())) { + return entry.getKey(); + } + } + return "Unknown File Type"; + + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/tool/RSAUtils.java b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/RSAUtils.java new file mode 100644 index 0000000..780cd1e --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/RSAUtils.java @@ -0,0 +1,32 @@ +package com.alonginfo.project.tool; + +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.KeyType; + +/** + * @Author: Fanqunjing + * @Date: 2024/1/11 14:31 + * @Description: + **/ +public class RSAUtils { + + public static String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCT/HVT4qVEy9sTgmdNZ19yEmN8LU9tENA4xyKSs1uyMFrvlc/Rw7UNe2xEn5fcTMzAJIRMVidlfVkBzZgwzyA9dP1nwSKO8hwaI0FwMCtCFjbQi34JBIBbwYiwLBNIu1xpQHtIYJ/mSflLWHmxDN0qon/WRgcDxK7ZS7HdsJicXwIDAQAB"; + + public static String privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJP8dVPipUTL2xOCZ01nX3ISY3wtT20Q0DjHIpKzW7IwWu+Vz9HDtQ17bESfl9xMzMAkhExWJ2V9WQHNmDDPID10/WfBIo7yHBojQXAwK0IWNtCLfgkEgFvBiLAsE0i7XGlAe0hgn+ZJ+UtYebEM3Sqif9ZGBwPErtlLsd2wmJxfAgMBAAECgYBjVPQUKG+yq/sTL1bTt+1zDjDE600C8mQxmEj2m3mTM632X2KtdGYU9KGJtm4iq1JMLra23qV3FBooga4EJSOH15ehMVDzI+rdVfuvIcbPMnxlQWXmx86T7Cfo3i8bofqeM+9J5Q7+DRpzCXmA3arrd+LW1RYgaDzwgOsXfvK6cQJBAMgXp1LJ0QNMsNCC/LRvrRrGT+EwX5nk6ISpS1M7rQSgR3crEAiLG5aVilQVN7eK05HfhdkmjhUnLdNb30eLfZUCQQC9VbbhrUAHVWR0A5GVvwtyt+jP8uZWMjY4yc8rOSfmO3M1rO0As7dMRtp+0e/VuXSBx2TOPj/yPKbuglYEVm0jAkBUq02uhp/fWZBoa0UrxSXm8ovSqnmJ0Ydiu5CYQ+RO1NPo5Vv/gX3HFrhWJDRTgndMft1QqjPtV4rYqUOuLqSRAkAD3BN2VknP3HXHx6rYGqTpGcatNo5rg2qHjdWjU+70SpH2rifGs+MwsuERZMY23Sj63E25xpsXHRVqF04ZmIlxAkASeliYTbdWtlMTQwvV1T/aMCl6avjaV8doBbSlgg2e538VzvbcZiRsq4J4hxMwEzqC6ROwrnjkuZ7wKmRA7h+L"; + + public static String decrypt(String data){ + return SecureUtil.rsa(privateKey, publicKey).decryptStr(data, KeyType.PrivateKey); + } + + public static String encrypt(String data){ + return SecureUtil.rsa(privateKey, publicKey).encryptBase64(data, KeyType.PublicKey); + } + + public static void main(String[] args) { + + String eecrypt = RSAUtils.encrypt("Admin123"); + System.out.println(eecrypt); + String decrypt = RSAUtils.decrypt("QWRtaW4xMjM="); + System.out.println(decrypt); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/tool/Sm4Utils.java b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/Sm4Utils.java new file mode 100644 index 0000000..7094177 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/Sm4Utils.java @@ -0,0 +1,83 @@ +package com.alonginfo.project.tool; + +import org.bouncycastle.crypto.CipherParameters; +import org.bouncycastle.crypto.engines.SM4Engine; +import org.bouncycastle.crypto.modes.CBCBlockCipher; +import org.bouncycastle.crypto.modes.CBCModeCipher; +import org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher; +import org.bouncycastle.crypto.params.KeyParameter; +import org.bouncycastle.crypto.params.ParametersWithIV; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.security.Security; +import java.util.Arrays; +import java.util.Base64; + + +public class Sm4Utils { + static { + Security.addProvider(new BouncyCastleProvider()); + } + + public static String encrypt(byte[] key, byte[] iv, byte[] data) throws Exception { + byte[] out=new byte[0]; + String encryptedData=null; + try{ + SM4Engine engine = new SM4Engine(); + CBCModeCipher cbcBlockCipher = CBCBlockCipher.newInstance(engine); + PaddedBufferedBlockCipher cipher = new PaddedBufferedBlockCipher(cbcBlockCipher); + CipherParameters params = new ParametersWithIV(new KeyParameter(key), iv); + cipher.init(true, params); + out = new byte[cipher.getOutputSize(data.length)]; + int len = cipher.processBytes(data, 0, data.length, out, 0); + len += cipher.doFinal(out, len); + encryptedData = Base64.getEncoder().encodeToString(out); + return encryptedData; + } catch (Exception e) { + // 处理异常 + throw e; + } finally { + Arrays.fill(out, (byte) 0); + encryptedData = null; + } + } + public static byte[] decrypt(byte[] key, byte[] iv, byte[] data) throws Exception { + byte[] out = new byte[0]; + byte[] temp = new byte[0]; + try { + byte[] encryptedBytes = Base64.getDecoder().decode(data); + SM4Engine engine = new SM4Engine(); + CBCModeCipher cbcBlockCipher = CBCBlockCipher.newInstance(engine); + PaddedBufferedBlockCipher cipher = new PaddedBufferedBlockCipher(cbcBlockCipher); + CipherParameters params = new ParametersWithIV(new KeyParameter(key), iv); + cipher.init(false, params); + temp = new byte[cipher.getOutputSize(encryptedBytes.length)]; + int len = cipher.processBytes(encryptedBytes, 0, encryptedBytes.length, temp, 0); + len += cipher.doFinal(temp, len); + out = new byte[len]; + System.arraycopy(temp, 0, out, 0, len); + return out; + } catch (Exception e) { + // 处理异常 + throw e; + } finally { +// Arrays.fill(out, (byte) 0); +// Arrays.fill(temp, (byte) 0); + } + } + + public static void main(String[] args) throws Exception { + String sm4key = "edcssm4key071520"; + String iv = "abcdef1234567890"; + String test = "Hxs1909."; + String encrypt = Sm4Utils.encrypt(sm4key.getBytes(), iv.getBytes(), test.getBytes()); + System.out.println(encrypt); + byte[] decrypt = Sm4Utils.decrypt(sm4key.getBytes(), iv.getBytes(), encrypt.getBytes()); + Charset charset = Charset.forName("UTF-8"); + String str = new String(decrypt, charset); + System.out.println(str); + } +} + diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/tool/excludes/ExcludeController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/excludes/ExcludeController.java new file mode 100644 index 0000000..db1d8c2 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/excludes/ExcludeController.java @@ -0,0 +1,22 @@ +package com.alonginfo.project.tool.excludes; + +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 测试以 mxDatav_开头的url不需要权限进行访问 + */ + +@RestController +@RequestMapping("/mxDatav_test/notice") +public class ExcludeController extends BaseController { + + @GetMapping(value = "/list") + public AjaxResult getInfo() { + return AjaxResult.success("请求验证成功!"); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/project/tool/swagger/TestController.java b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/swagger/TestController.java new file mode 100644 index 0000000..0cc60d8 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/project/tool/swagger/TestController.java @@ -0,0 +1,151 @@ +package com.alonginfo.project.tool.swagger; + +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.framework.web.controller.BaseController; +import com.alonginfo.framework.web.domain.AjaxResult; +import io.swagger.annotations.*; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * swagger 用户测试方法 + */ +@Api("用户信息管理") +@RestController +@RequestMapping("/test/user") +public class TestController extends BaseController { + private final static Map users = new LinkedHashMap();{ + users.put(1, new UserEntity(1, "admin", "admin123", "15888888888")); + users.put(2, new UserEntity(2, "root", "admin123", "15666666666")); + } + + @ApiOperation("获取用户列表") + @GetMapping("/list") + public AjaxResult userList() { + List userList = new ArrayList(users.values()); + return AjaxResult.success(userList); + } + + @ApiOperation("获取用户详细") + @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") + @GetMapping("/{userId}") + public AjaxResult getUser(@PathVariable Integer userId) { + if (!users.isEmpty() && users.containsKey(userId)) + { + return AjaxResult.success(users.get(userId)); + } + else + { + return AjaxResult.error("用户不存在"); + } + } + + @ApiOperation("新增用户") + @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") + @PostMapping("/save") + public AjaxResult save(UserEntity user) { + if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) { + return AjaxResult.error("用户ID不能为空"); + } + return AjaxResult.success(users.put(user.getUserId(), user)); + } + + @ApiOperation("更新用户") + @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") + @PutMapping("/update") + public AjaxResult update(UserEntity user) { + if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) { + return AjaxResult.error("用户ID不能为空"); + } + if (users.isEmpty() || !users.containsKey(user.getUserId())) { + return AjaxResult.error("用户不存在"); + } + users.remove(user.getUserId()); + return AjaxResult.success(users.put(user.getUserId(), user)); + } + + @ApiOperation("删除用户信息") + @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") + @DeleteMapping("/{userId}") + public AjaxResult delete(@PathVariable Integer userId) { + if (!users.isEmpty() && users.containsKey(userId)) { + users.remove(userId); + return AjaxResult.success(); + } else { + return AjaxResult.error("用户不存在"); + } + } +} + +@ApiModel("用户实体") +class UserEntity +{ + @ApiModelProperty("用户ID") + private Integer userId; + + @ApiModelProperty("用户名称") + private String username; + + @ApiModelProperty("用户密码") + private String password; + + @ApiModelProperty("用户手机") + private String mobile; + + public UserEntity() + { + + } + + public UserEntity(Integer userId, String username, String password, String mobile) + { + this.userId = userId; + this.username = username; + this.password = password; + this.mobile = mobile; + } + + public Integer getUserId() + { + return userId; + } + + public void setUserId(Integer userId) + { + this.userId = userId; + } + + public String getUsername() + { + return username; + } + + public void setUsername(String username) + { + this.username = username; + } + + public String getPassword() + { + return password; + } + + public void setPassword(String password) + { + this.password = password; + } + + public String getMobile() + { + return mobile; + } + + public void setMobile(String mobile) + { + this.mobile = mobile; + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/DBUtil.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/DBUtil.java new file mode 100644 index 0000000..9fad75d --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/DBUtil.java @@ -0,0 +1,63 @@ +package com.alonginfo.utils; + +import com.alonginfo.framework.web.domain.AjaxResult; +import com.alonginfo.project.business.domain.MxDatabase; + +import java.sql.DriverManager; +import java.sql.SQLException; + +/** + * @author Li先生 + */ +public class DBUtil { + /** + * 测试 数据源是否正确 + * @param mxDatabase + * @return + */ + public static AjaxResult TestMxDatabase(MxDatabase mxDatabase){ + String url = mxDatabase.getUrl(); + String username = mxDatabase.getUsername(); + String password = mxDatabase.getPassword(); + String driverClass = mxDatabase.getDriverClass(); + if (!forName(driverClass)){ + return AjaxResult.error("数据库驱动错误"); + } + if (!testConnection(url,username,password)) { + return AjaxResult.error("数据库连接或用户名密码错误"); + } + return AjaxResult.success(); + } + + /** + * 判断驱动是否正确 + * @param driverClass + * @return + */ + private static boolean forName(String driverClass) { + try { + Class.forName(driverClass).newInstance(); + } catch (Exception e) { + return false; + } + return true; + } + + + /** + * 如果程序发生异常,则表明无法连接 + * @return + * @throws SQLException + */ + private static boolean testConnection(String url,String username,String password ) { + try { + DriverManager.getConnection(url, username, password);// 获取连接对象 + return true; + } catch (Exception e) { + return false; + } + } + + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/DataPushUtils.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/DataPushUtils.java new file mode 100644 index 0000000..75a1d76 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/DataPushUtils.java @@ -0,0 +1,305 @@ +package com.alonginfo.utils; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; + +/** + * 双边协商、集中竞价、挂牌交易、D+3滚动交易 公共方法 + * @author Administrator + * + */ +public class DataPushUtils { + + private static final Logger logger = LoggerFactory.getLogger(DataPushUtils.class); + + /** + * 电力交易平台测试环境ip + */ + private static final String TEST_IP = "25.215.196.155"; + /** + * 电力交易平台生产环境ip + */ + private static final String PROD_IP = "25.215.196.215"; + + /** + * 生成校验token + * @throws Exception + */ + public static String createToken(String publicKey){ + try { + //约定传递字符串gspx+当天日期 + String dateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); + String key = "gspx" + dateTime; + //RSA加密 + String encryptStr = RSAUtil.encrypt(key, publicKey); + return encryptStr; + }catch (Exception e) { + e.printStackTrace(); + logger.info("-生成token密钥异常!"); + return ""; + } + + } + + /** + * 判断当前电力交易平台为测试环境还是正式环境 + * @return 1-生产 0-测试 + */ + public static int isFormal(String ip) { + if (ip.contains(PROD_IP)) { + return 1; + } + return 0; + } + + /** + * 生成pdf文件映射地址 + * @return + */ + private static String trimPdfAddress(String address) { + String fileString = address; + String substring = fileString.substring(fileString.lastIndexOf("/"), fileString.length()); + String result = "views" +substring; + return result; + } + + /** + * 处理交易序列返回格式 + * List -> Map<>{list:[] 交易序列集合; arr:[] 交易序列id集合} + */ + public static Map handleSeqList(List> seqList) { + try { + List seqIds = new ArrayList<>(); + for (Map seq : seqList) { + seqIds.add(seq.get("tradeSeqId")); + } + + Map result = new HashMap<>(); + result.put("list", seqList); + result.put("arr", seqIds); + return result; + } catch (Exception e) { + e.printStackTrace(); + logger.info("处理交易序列数据失败!"); + return new HashMap<>(); + } + } + + /** + * 处理购售方确认信息 - 表格数据 + * @param buySaleDetails + */ + public static List> dealBuySaleDetail(List> buySaleDetails) { + if (buySaleDetails == null || buySaleDetails.size() == 0) { + return new ArrayList>(); + } + List> resultList = new LinkedList>(); + for (Map map : buySaleDetails) { + LinkedList linkedList = new LinkedList(); + linkedList.add(map.get("saleParticipantName") == null ? "" : String.valueOf(map.get("saleParticipantName"))); + linkedList.add(map.get("vendeeParticipantName") == null ? "" : String.valueOf(map.get("vendeeParticipantName"))); + linkedList.add(map.get("tradeTimeRange") == null ? "" : String.valueOf(map.get("tradeTimeRange"))); + linkedList.add(map.get("confirmEnergy") == null ? "" : String.valueOf(map.get("confirmEnergy"))); + linkedList.add(map.get("confirmTime") == null ? "" : String.valueOf(map.get("confirmTime"))); + resultList.add(linkedList); + } + return resultList; + } + + /** + * 处理实时状态-多日交易 交易量价走势 + * @param manyDayList + * @return + */ + public static Map> handleRealTimeManyDay(List> manyDayList) { + try { + if (manyDayList == null || manyDayList.size() == 0) return new HashMap<>(); + List xAxis = new LinkedList<>(); + List value = new LinkedList<>(); + List price = new LinkedList<>(); + for (Map map : manyDayList) { + xAxis.add(map.get("createTime")); + value.add(map.get("sumEnergy")); + price.add(map.get("avgPrice")); + } + Map> result = new HashMap(); + result.put("xAxis", xAxis); + result.put("value", value); + result.put("price", price); + return result; + } catch (Exception e) { + e.printStackTrace(); + return new HashMap<>(); + } + } + + /** + * 处理交易量价走势数据 - 实时数据 + * @param trends + * @return + */ + public static Map dealTrends(List> trends) { + if (trends==null || trends.size()==0) { + return new HashMap<>(); + } + try { + List xAxisData = new LinkedList<>(); + //峰值 + List peak = new LinkedList<>(); + //平值 + List flat = new LinkedList<>(); + //谷值 + List valley = new LinkedList<>(); + //峰端均价 + List peakAvg = new LinkedList<>(); + //平段均价 + List flatAvg = new LinkedList<>(); + //谷段均价 + List valleyAvg = new LinkedList<>(); + for (Map map : trends) { + xAxisData.add(String.valueOf(map.get("reportTime"))); + peak.add(new BigDecimal(String.valueOf(map.get("peakEnergy")))); + flat.add(new BigDecimal(String.valueOf(map.get("flatEnergy")))); + valley.add(new BigDecimal(String.valueOf(map.get("valleyEnergy")))); + peakAvg.add(new BigDecimal(String.valueOf(map.get("peakAvgValue")))); + flatAvg.add(new BigDecimal(String.valueOf(map.get("flatAvgValue")))); + valleyAvg.add(new BigDecimal(String.valueOf(map.get("valleyAvgValue")))); + } + //封装返回结果 + Map resultMap = new LinkedHashMap(); + resultMap.put("peak", peak); + resultMap.put("flat", flat); + resultMap.put("valley", valley); + resultMap.put("peakAvg", peakAvg); + resultMap.put("flatAvg", flatAvg); + resultMap.put("valleyAvg", valleyAvg); + resultMap.put("xAxisData", xAxisData); + return resultMap; + } catch (Exception e) { + e.printStackTrace(); + return new HashMap<>(); + } + } + + /** + * 处理交易量价走势数据 - 回演数据 + * @param trendReplayBySeqId + * @return + */ + public static Map dealTrendReplays(List> trendReplayBySeqId) { + try { + if (trendReplayBySeqId == null || trendReplayBySeqId.size() == 0) { + return new HashMap<>(); + } + List xAxisData = new LinkedList<>(); + List countEnergy = new LinkedList<>(); + List peakAvg = new LinkedList<>(); + List flatAvg = new LinkedList<>(); + List valleyAvg = new LinkedList<>(); + //按照峰、平、谷排序 + for (Map map : trendReplayBySeqId) { + String timeDivisionNmae = Optional.ofNullable(map.get("timeDivisionNmae")).orElse(""); + + xAxisData.add(map.get("tradeTimeRange")); + countEnergy.add(new BigDecimal(String.valueOf(map.get("countEnergy"))).setScale(2, BigDecimal.ROUND_HALF_UP)); + if (timeDivisionNmae.contains("峰")) { + peakAvg.add(new BigDecimal(String.valueOf(map.get("avgValue"))).setScale(2, BigDecimal.ROUND_HALF_UP)); + flatAvg.add(null); + valleyAvg.add(null); + } else if (timeDivisionNmae.contains("平")){ + peakAvg.add(null); + flatAvg.add(new BigDecimal(String.valueOf(map.get("avgValue"))).setScale(2, BigDecimal.ROUND_HALF_UP)); + valleyAvg.add(null); + } else if (timeDivisionNmae.contains("谷")) { + peakAvg.add(null); + flatAvg.add(null); + valleyAvg.add(new BigDecimal(String.valueOf(map.get("avgValue"))).setScale(2, BigDecimal.ROUND_HALF_UP)); + } else { + peakAvg.add(null); + flatAvg.add(null); + valleyAvg.add(null); + } + } + Map resultMap = new LinkedHashMap<>(); + resultMap.put("xAxisData", xAxisData); + resultMap.put("countEnergy", countEnergy); + resultMap.put("peakAvg", peakAvg); + resultMap.put("flatAvg", flatAvg); + resultMap.put("valleyAvg", valleyAvg); + return resultMap; + } catch (Exception e) { + e.printStackTrace(); + logger.info("集中竞价、挂牌交易, 回演状态, 处理交易量价走势数据失败!"); + return new HashMap<>(); + } + } + + /** + * map 判空 + * @return + */ + public static Map mapIsEmpty(Map map) { + if (map == null) { + return new HashMap<>(); + } + return map; + } + + /** + * Map拆分(指定分组个数) + * @param map Map + * @param groupSize 分组个数 (>=1) + * @param Key + * @param Value + * @return 子Map列表 + */ + public static List> splitByGroupSize(Map map, int groupSize){ + if(Objects.isNull(map) || map.isEmpty() || groupSize<1){ + //空map或者分组数<1,无法拆分 + return Collections.emptyList(); + } + + List> list = Lists.newArrayListWithCapacity(groupSize); + if(groupSize == 1){ //只有1个分组的情况 + list.add(map); + return list; + } + + int mapSize = map.size(); //键值对总数 + int chunkIndex = 0; //当前分组的下标,[0, groupSize-1] + int restCount = mapSize % groupSize; //平均后剩余的键值对数 + int chunkSize0 = mapSize / groupSize; //每个分组键值对数量 + int chunkSize1 = chunkSize0 + 1; //多分一个 + int chunkSize = chunkIndex subMap = Maps.newHashMapWithExpectedSize(chunkSize);//子Map + + for (Map.Entry entry : map.entrySet()) { + if(count < chunkSize){ + //每个分组按实际分组大小(chunkSize)加入键值对 + subMap.put(entry.getKey(), entry.getValue()); + count ++; //组内计数+1 + }else{ + //结束上一个分组 + list.add(subMap); //当前分组装满了->加入列表 + chunkIndex ++; //分组个数+1 + + //开始下一个分组 + chunkSize = chunkIndex { + private static final Logger log = LoggerFactory.getLogger(ExcelUtil.class); + + /** + * Excel sheet最大行数,默认65536 + */ + public static final int sheetSize = 65536; + + /** + * 工作表名称 + */ + private String sheetName; + + /** + * 导出类型(EXPORT:导出数据;IMPORT:导入模板) + */ + private Type type; + + /** + * 工作薄对象 + */ + private Workbook wb; + + /** + * 工作表对象 + */ + private Sheet sheet; + + /** + * 样式列表 + */ + private Map styles; + + /** + * 导入导出数据列表 + */ + private List list; + + /** + * 注解列表 + */ + private List fields; + + /** + * 实体对象 + */ + public Class clazz; + + public ExcelUtil(Class clazz) + { + this.clazz = clazz; + } + + public void init(List list, String sheetName, Type type) + { + if (list == null) + { + list = new ArrayList(); + } + this.list = list; + this.sheetName = sheetName; + this.type = type; + createExcelField(); + createWorkbook(); + } + + /** + * 对excel表单默认第一个索引名转换成list + * + * @param is 输入流 + * @return 转换后集合 + */ + public List importExcel(InputStream is) throws Exception + { + return importExcel(StringUtils.EMPTY, is); + } + + /** + * 对excel表单指定表格索引名转换成list + * + * @param sheetName 表格索引名 + * @param is 输入流 + * @return 转换后集合 + */ + public List importExcel(String sheetName, InputStream is) throws Exception + { + this.type = Type.IMPORT; + this.wb = WorkbookFactory.create(is); + List list = new ArrayList(); + Sheet sheet = null; + if (StringUtils.isNotEmpty(sheetName)) + { + // 如果指定sheet名,则取指定sheet中的内容. + sheet = wb.getSheet(sheetName); + } + else + { + // 如果传入的sheet名不存在则默认指向第1个sheet. + sheet = wb.getSheetAt(0); + } + + if (sheet == null) + { + throw new IOException("文件sheet不存在"); + } + + int rows = sheet.getPhysicalNumberOfRows(); + + if (rows > 0) + { + // 定义一个map用于存放excel列的序号和field. + Map cellMap = new HashMap(); + // 获取表头 + Row heard = sheet.getRow(0); + for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) + { + Cell cell = heard.getCell(i); + if (StringUtils.isNotNull(cell != null)) + { + String value = this.getCellValue(heard, i).toString(); + cellMap.put(value, i); + } + else + { + cellMap.put(null, i); + } + } + // 有数据时才处理 得到类的所有field. + Field[] allFields = clazz.getDeclaredFields(); + // 定义一个map用于存放列的序号和field. + Map fieldsMap = new HashMap(); + for (int col = 0; col < allFields.length; col++) + { + Field field = allFields[col]; + Excel attr = field.getAnnotation(Excel.class); + if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) + { + // 设置类的私有字段属性可访问. + field.setAccessible(true); + Integer column = cellMap.get(attr.name()); + fieldsMap.put(column, field); + } + } + for (int i = 1; i < rows; i++) + { + // 从第2行开始取数据,默认第一行是表头. + Row row = sheet.getRow(i); + T entity = null; + for (Map.Entry entry : fieldsMap.entrySet()) + { + Object val = this.getCellValue(row, entry.getKey()); + + // 如果不存在实例则新建. + entity = (entity == null ? clazz.newInstance() : entity); + // 从map中得到对应列的field. + Field field = fieldsMap.get(entry.getKey()); + // 取得类型,并根据对象类型设置值. + Class fieldType = field.getType(); + if (String.class == fieldType) + { + String s = Convert.toStr(val); + if (StringUtils.endsWith(s, ".0")) + { + val = StringUtils.substringBefore(s, ".0"); + } + else + { + val = Convert.toStr(val); + } + } + else if ((Integer.TYPE == fieldType) || (Integer.class == fieldType)) + { + val = Convert.toInt(val); + } + else if ((Long.TYPE == fieldType) || (Long.class == fieldType)) + { + val = Convert.toLong(val); + } + else if ((Double.TYPE == fieldType) || (Double.class == fieldType)) + { + val = Convert.toDouble(val); + } + else if ((Float.TYPE == fieldType) || (Float.class == fieldType)) + { + val = Convert.toFloat(val); + } + else if (BigDecimal.class == fieldType) + { + val = Convert.toBigDecimal(val); + } + else if (Date.class == fieldType) + { + if (val instanceof String) + { + val = DateUtils.parseDate(val); + } + else if (val instanceof Double) + { + val = DateUtil.getJavaDate((Double) val); + } + } + if (StringUtils.isNotNull(fieldType)) + { + Excel attr = field.getAnnotation(Excel.class); + String propertyName = field.getName(); + if (StringUtils.isNotEmpty(attr.targetAttr())) + { + propertyName = field.getName() + "." + attr.targetAttr(); + } + else if (StringUtils.isNotEmpty(attr.readConverterExp())) + { + val = reverseByExp(String.valueOf(val), attr.readConverterExp()); + } + ReflectUtils.invokeSetter(entity, propertyName, val); + } + } + list.add(entity); + } + } + return list; + } + + /** + * 对list数据源将其里面的数据导入到excel表单 + * + * @param list 导出数据集合 + * @param sheetName 工作表的名称 + * @return 结果 + */ + public AjaxResult exportExcel(List list, String sheetName) + { + this.init(list, sheetName, Type.EXPORT); + return exportExcel(); + } + + /** + * 对list数据源将其里面的数据导入到excel表单 + * + * @param sheetName 工作表的名称 + * @return 结果 + */ + public AjaxResult importTemplateExcel(String sheetName) + { + this.init(null, sheetName, Type.IMPORT); + return exportExcel(); + } + + /** + * 对list数据源将其里面的数据导入到excel表单 + * + * @return 结果 + */ + public AjaxResult exportExcel() + { + OutputStream out = null; + try + { + // 取出一共有多少个sheet. + double sheetNo = Math.ceil(list.size() / sheetSize); + for (int index = 0; index <= sheetNo; index++) + { + createSheet(sheetNo, index); + + // 产生一行 + Row row = sheet.createRow(0); + int column = 0; + // 写入各个字段的列头名称 + for (Object[] os : fields) + { + Excel excel = (Excel) os[1]; + this.createCell(excel, row, column++); + } + if (Type.EXPORT.equals(type)) + { + fillExcelData(index, row); + } + } + String filename = encodingFilename(sheetName); + out = new FileOutputStream(getAbsoluteFile(filename)); + wb.write(out); + return AjaxResult.success(filename); + } + catch (Exception e) + { + log.error("导出Excel异常{}", e.getMessage()); + throw new CustomException("导出Excel失败,请联系网站管理员!"); + } + finally + { + if (wb != null) + { + try + { + wb.close(); + } + catch (IOException e1) + { + e1.printStackTrace(); + } + } + if (out != null) + { + try + { + out.close(); + } + catch (IOException e1) + { + e1.printStackTrace(); + } + } + } + } + + /** + * 填充excel数据 + * + * @param index 序号 + * @param row 单元格行 + */ + public void fillExcelData(int index, Row row) + { + int startNo = index * sheetSize; + int endNo = Math.min(startNo + sheetSize, list.size()); + for (int i = startNo; i < endNo; i++) + { + row = sheet.createRow(i + 1 - startNo); + // 得到导出对象. + T vo = (T) list.get(i); + int column = 0; + for (Object[] os : fields) + { + Field field = (Field) os[0]; + Excel excel = (Excel) os[1]; + // 设置实体类私有属性可访问 + field.setAccessible(true); + this.addCell(excel, row, vo, field, column++); + } + } + } + + /** + * 创建表格样式 + * + * @param wb 工作薄对象 + * @return 样式列表 + */ + private Map createStyles(Workbook wb) + { + // 写入各条记录,每条记录对应excel表中的一行 + Map styles = new HashMap(); + CellStyle style = wb.createCellStyle(); + style.setAlignment(HorizontalAlignment.CENTER); + style.setVerticalAlignment(VerticalAlignment.CENTER); + style.setBorderRight(BorderStyle.THIN); + style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + style.setBorderLeft(BorderStyle.THIN); + style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + style.setBorderTop(BorderStyle.THIN); + style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + style.setBorderBottom(BorderStyle.THIN); + style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + Font dataFont = wb.createFont(); + dataFont.setFontName("Arial"); + dataFont.setFontHeightInPoints((short) 10); + style.setFont(dataFont); + styles.put("data", style); + + style = wb.createCellStyle(); + style.cloneStyleFrom(styles.get("data")); + style.setAlignment(HorizontalAlignment.CENTER); + style.setVerticalAlignment(VerticalAlignment.CENTER); + style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex()); + style.setFillPattern(FillPatternType.SOLID_FOREGROUND); + Font headerFont = wb.createFont(); + headerFont.setFontName("Arial"); + headerFont.setFontHeightInPoints((short) 10); + headerFont.setBold(true); + headerFont.setColor(IndexedColors.WHITE.getIndex()); + style.setFont(headerFont); + styles.put("header", style); + + return styles; + } + + /** + * 创建单元格 + */ + public Cell createCell(Excel attr, Row row, int column) + { + // 创建列 + Cell cell = row.createCell(column); + // 写入列信息 + cell.setCellValue(attr.name()); + setDataValidation(attr, row, column); + cell.setCellStyle(styles.get("header")); + return cell; + } + + /** + * 设置单元格信息 + * + * @param value 单元格值 + * @param attr 注解相关 + * @param cell 单元格信息 + */ + public void setCellVo(Object value, Excel attr, Cell cell) + { + if (ColumnType.STRING == attr.cellType()) + { + cell.setCellType(CellType.NUMERIC); + cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : value + attr.suffix()); + } + else if (ColumnType.NUMERIC == attr.cellType()) + { + cell.setCellType(CellType.NUMERIC); + cell.setCellValue(Integer.parseInt(value + "")); + } + } + + /** + * 创建表格样式 + */ + public void setDataValidation(Excel attr, Row row, int column) + { + if (attr.name().indexOf("注:") >= 0) + { + sheet.setColumnWidth(column, 6000); + } + else + { + // 设置列宽 + sheet.setColumnWidth(column, (int) ((attr.width() + 0.72) * 256)); + row.setHeight((short) (attr.height() * 20)); + } + // 如果设置了提示信息则鼠标放上去提示. + if (StringUtils.isNotEmpty(attr.prompt())) + { + // 这里默认设了2-101列提示. + setXSSFPrompt(sheet, "", attr.prompt(), 1, 100, column, column); + } + // 如果设置了combo属性则本列只能选择不能输入 + if (attr.combo().length > 0) + { + // 这里默认设了2-101列只能选择不能输入. + setXSSFValidation(sheet, attr.combo(), 1, 100, column, column); + } + } + + /** + * 添加单元格 + */ + public Cell addCell(Excel attr, Row row, T vo, Field field, int column) + { + Cell cell = null; + try + { + // 设置行高 + row.setHeight((short) (attr.height() * 20)); + // 根据Excel中设置情况决定是否导出,有些情况需要保持为空,希望用户填写这一列. + if (attr.isExport()) + { + // 创建cell + cell = row.createCell(column); + cell.setCellStyle(styles.get("data")); + + // 用于读取对象中的属性 + Object value = getTargetValue(vo, field, attr); + String dateFormat = attr.dateFormat(); + String readConverterExp = attr.readConverterExp(); + if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) + { + cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date) value)); + } + else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) + { + cell.setCellValue(convertByExp(String.valueOf(value), readConverterExp)); + } + else + { + // 设置列类型 + setCellVo(value, attr, cell); + } + } + } + catch (Exception e) + { + log.error("导出Excel失败{}", e); + } + return cell; + } + + /** + * 设置 POI XSSFSheet 单元格提示 + * + * @param sheet 表单 + * @param promptTitle 提示标题 + * @param promptContent 提示内容 + * @param firstRow 开始行 + * @param endRow 结束行 + * @param firstCol 开始列 + * @param endCol 结束列 + */ + public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow, + int firstCol, int endCol) + { + DataValidationHelper helper = sheet.getDataValidationHelper(); + DataValidationConstraint constraint = helper.createCustomConstraint("DD1"); + CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); + DataValidation dataValidation = helper.createValidation(constraint, regions); + dataValidation.createPromptBox(promptTitle, promptContent); + dataValidation.setShowPromptBox(true); + sheet.addValidationData(dataValidation); + } + + /** + * 设置某些列的值只能输入预制的数据,显示下拉框. + * + * @param sheet 要设置的sheet. + * @param textlist 下拉框显示的内容 + * @param firstRow 开始行 + * @param endRow 结束行 + * @param firstCol 开始列 + * @param endCol 结束列 + * @return 设置好的sheet. + */ + public void setXSSFValidation(Sheet sheet, String[] textlist, int firstRow, int endRow, int firstCol, int endCol) + { + DataValidationHelper helper = sheet.getDataValidationHelper(); + // 加载下拉列表内容 + DataValidationConstraint constraint = helper.createExplicitListConstraint(textlist); + // 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列 + CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); + // 数据有效性对象 + DataValidation dataValidation = helper.createValidation(constraint, regions); + // 处理Excel兼容性问题 + if (dataValidation instanceof XSSFDataValidation) + { + dataValidation.setSuppressDropDownArrow(true); + dataValidation.setShowErrorBox(true); + } + else + { + dataValidation.setSuppressDropDownArrow(false); + } + + sheet.addValidationData(dataValidation); + } + + /** + * 解析导出值 0=男,1=女,2=未知 + * + * @param propertyValue 参数值 + * @param converterExp 翻译注解 + * @return 解析后值 + * @throws Exception + */ + public static String convertByExp(String propertyValue, String converterExp) throws Exception + { + try + { + String[] convertSource = converterExp.split(","); + for (String item : convertSource) + { + String[] itemArray = item.split("="); + if (itemArray[0].equals(propertyValue)) + { + return itemArray[1]; + } + } + } + catch (Exception e) + { + throw e; + } + return propertyValue; + } + + /** + * 反向解析值 男=0,女=1,未知=2 + * + * @param propertyValue 参数值 + * @param converterExp 翻译注解 + * @return 解析后值 + * @throws Exception + */ + public static String reverseByExp(String propertyValue, String converterExp) throws Exception + { + try + { + String[] convertSource = converterExp.split(","); + for (String item : convertSource) + { + String[] itemArray = item.split("="); + if (itemArray[1].equals(propertyValue)) + { + return itemArray[0]; + } + } + } + catch (Exception e) + { + throw e; + } + return propertyValue; + } + + /** + * 编码文件名 + */ + public String encodingFilename(String filename) + { + filename = UUID.randomUUID().toString() + "_" + filename + ".xlsx"; + return filename; + } + + /** + * 获取下载路径 + * + * @param filename 文件名称 + */ + public String getAbsoluteFile(String filename) + { + String downloadPath = MxConfig.getDownloadPath() + filename; + File desc = new File(downloadPath); + if (!desc.getParentFile().exists()) + { + desc.getParentFile().mkdirs(); + } + return downloadPath; + } + + /** + * 获取bean中的属性值 + * + * @param vo 实体对象 + * @param field 字段 + * @param excel 注解 + * @return 最终的属性值 + * @throws Exception + */ + private Object getTargetValue(T vo, Field field, Excel excel) throws Exception + { + Object o = field.get(vo); + if (StringUtils.isNotEmpty(excel.targetAttr())) + { + String target = excel.targetAttr(); + if (target.indexOf(".") > -1) + { + String[] targets = target.split("[.]"); + for (String name : targets) + { + o = getValue(o, name); + } + } + else + { + o = getValue(o, target); + } + } + return o; + } + + /** + * 以类的属性的get方法方法形式获取值 + * + * @param o + * @param name + * @return value + * @throws Exception + */ + private Object getValue(Object o, String name) throws Exception + { + if (StringUtils.isNotEmpty(name)) + { + Class clazz = o.getClass(); + String methodName = "get" + name.substring(0, 1).toUpperCase() + name.substring(1); + Method method = clazz.getMethod(methodName); + o = method.invoke(o); + } + return o; + } + + /** + * 得到所有定义字段 + */ + private void createExcelField() + { + this.fields = new ArrayList(); + List tempFields = new ArrayList<>(); + tempFields.addAll(Arrays.asList(clazz.getSuperclass().getDeclaredFields())); + tempFields.addAll(Arrays.asList(clazz.getDeclaredFields())); + for (Field field : tempFields) + { + // 单注解 + if (field.isAnnotationPresent(Excel.class)) + { + putToField(field, field.getAnnotation(Excel.class)); + } + + // 多注解 + if (field.isAnnotationPresent(Excels.class)) + { + Excels attrs = field.getAnnotation(Excels.class); + Excel[] excels = attrs.value(); + for (Excel excel : excels) + { + putToField(field, excel); + } + } + } + } + + /** + * 放到字段集合中 + */ + private void putToField(Field field, Excel attr) + { + if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) + { + this.fields.add(new Object[] { field, attr }); + } + } + + /** + * 创建一个工作簿 + */ + public void createWorkbook() + { + this.wb = new SXSSFWorkbook(500); + } + + /** + * 创建工作表 + * + * @param sheetNo sheet数量 + * @param index 序号 + */ + public void createSheet(double sheetNo, int index) + { + this.sheet = wb.createSheet(); + this.styles = createStyles(wb); + // 设置工作表的名称. + if (sheetNo == 0) + { + wb.setSheetName(index, sheetName); + } + else + { + wb.setSheetName(index, sheetName + index); + } + } + + /** + * 获取单元格值 + * + * @param row 获取的行 + * @param column 获取单元格列号 + * @return 单元格值 + */ + public Object getCellValue(Row row, int column) + { + if (row == null) + { + return row; + } + Object val = ""; + try + { + Cell cell = row.getCell(column); + if (cell != null) + { + if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA) + { + val = cell.getNumericCellValue(); + if (HSSFDateUtil.isCellDateFormatted(cell)) + { + val = DateUtil.getJavaDate((Double) val); // POI Excel 日期格式转换 + } + else + { + if ((Double) val % 1 > 0) + { + val = new DecimalFormat("0.00").format(val); + } + else + { + val = new DecimalFormat("0").format(val); + } + } + } + else if (cell.getCellTypeEnum() == CellType.STRING) + { + val = cell.getStringCellValue(); + } + else if (cell.getCellTypeEnum() == CellType.BOOLEAN) + { + val = cell.getBooleanCellValue(); + } + else if (cell.getCellTypeEnum() == CellType.ERROR) + { + val = cell.getErrorCellValue(); + } + + } + } + catch (Exception e) + { + return val; + } + return val; + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/FileUploadUtils.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/FileUploadUtils.java new file mode 100644 index 0000000..bb4a056 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/FileUploadUtils.java @@ -0,0 +1,253 @@ +package com.alonginfo.utils; + +import com.alonginfo.common.constant.Constants; +import com.alonginfo.common.exception.file.FileNameLengthLimitExceededException; +import com.alonginfo.common.exception.file.FileSizeLimitExceededException; +import com.alonginfo.common.exception.file.InvalidExtensionException; +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.file.MimeTypeUtils; +import com.alonginfo.common.utils.security.Md5Utils; +import com.alonginfo.framework.config.MxConfig; +import org.apache.commons.io.FilenameUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Paths; +import java.util.Objects; + +/** + * 文件上传工具类 + * + * @author sdj + */ +public class FileUploadUtils { + /** + * 默认大小 50M + */ + public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024; + + /** + * 默认的文件名最大长度 100 + */ + public static final int DEFAULT_FILE_NAME_LENGTH = 100; + + /** + * 默认上传的地址 + */ + private static String defaultBaseDir = MxConfig.getProfile(); + + public static void setDefaultBaseDir(String defaultBaseDir) + { + FileUploadUtils.defaultBaseDir = defaultBaseDir; + } + + public static String getDefaultBaseDir() + { + return defaultBaseDir; + } + + /** + * 以默认配置进行文件上传 + * + * @param file 上传的文件 + * @return 文件名称 + * @throws Exception + */ + public static final String upload(MultipartFile file) throws IOException + { + try + { + return upload(getDefaultBaseDir(), file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); + } + catch (Exception e) + { + throw new IOException(e.getMessage(), e); + } + } + + /** + * 根据文件路径上传 + * + * @param baseDir 相对应用的基目录 + * @param file 上传的文件 + * @return 文件名称 + * @throws IOException + */ + public static final String upload(String baseDir, MultipartFile file) throws IOException + { + try + { + return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); + } + catch (Exception e) + { + throw new IOException(e.getMessage(), e); + } + } + + /** + * 文件上传 + * + * @param baseDir 相对应用的基目录 + * @param file 上传的文件 + * @param allowedExtension 上传文件类型 + * @return 返回上传成功的文件名 + * @throws FileSizeLimitExceededException 如果超出最大大小 + * @throws FileNameLengthLimitExceededException 文件名太长 + * @throws IOException 比如读写文件出错时 + * @throws InvalidExtensionException 文件校验异常 + */ + public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension) + throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, + InvalidExtensionException + { + int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length(); + if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) + { + throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); + } + + assertAllowed(file, allowedExtension); + + String fileName = extractFilename(file); + + String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath(); + file.transferTo(Paths.get(absPath)); + return getPathFileName(baseDir, fileName); + } + + /** + * 编码文件名 + */ + public static final String extractFilename(MultipartFile file) + { + return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(), + FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file)); + } + + public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException + { + File desc = new File(uploadDir + File.separator + fileName); + + if (!desc.exists()) + { + if (!desc.getParentFile().exists()) + { + desc.getParentFile().mkdirs(); + } + } + return desc; + } + + public static final String getPathFileName(String uploadDir, String fileName) throws IOException + { + int dirLastIndex = MxConfig.getProfile().length() + 1; + String currentDir = StringUtils.substring(uploadDir, dirLastIndex); + return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; + } + + /** + * 文件大小校验 + * + * @param file 上传的文件 + * @return + * @throws FileSizeLimitExceededException 如果超出最大大小 + * @throws InvalidExtensionException + */ + public static final void assertAllowed(MultipartFile file, String[] allowedExtension) + throws FileSizeLimitExceededException, InvalidExtensionException + { + long size = file.getSize(); + if (size > DEFAULT_MAX_SIZE) + { + throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024); + } + + String fileName = file.getOriginalFilename(); + String extension = getExtension(file); + if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) + { + if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION) + { + throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension, + fileName); + } + else if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION) + { + throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension, + fileName); + } + else if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION) + { + throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension, + fileName); + } + else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION) + { + throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension, + fileName); + } + else + { + throw new InvalidExtensionException(allowedExtension, extension, fileName); + } + } + } + + /** + * 判断MIME类型是否是允许的MIME类型 + * + * @param extension + * @param allowedExtension + * @return + */ + public static final boolean isAllowedExtension(String extension, String[] allowedExtension) + { + for (String str : allowedExtension) + { + if (str.equalsIgnoreCase(extension)) + { + return true; + } + } + return false; + } + + /** + * 获取文件名的后缀 + * + * @param file 表单文件 + * @return 后缀名 + */ + public static final String getExtension(MultipartFile file) + { + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + if (StringUtils.isEmpty(extension)) + { + extension = MimeTypeUtils.getExtension(Objects.requireNonNull(file.getContentType())); + } + return extension; + } + + /** + * 根据文件路径上传 + * + * @param baseDir 相对应用的基目录 + * @param file 上传的文件 + * @return 文件名称 + * @throws IOException + */ + public static final String uploadMedia(String baseDir, MultipartFile file) throws IOException + { + try + { + return upload(baseDir, file, MimeTypeUtils.MEDIA_EXTENSION); + } + catch (Exception e) + { + throw new IOException(e.getMessage(), e); + } + } +} \ No newline at end of file diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/FocusBiddingUtil.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/FocusBiddingUtil.java new file mode 100644 index 0000000..777a008 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/FocusBiddingUtil.java @@ -0,0 +1,150 @@ +package com.alonginfo.utils; + +import com.alibaba.fastjson.JSON; +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; +import com.alonginfo.common.utils.http.HttpUtils; +import org.apache.http.client.ClientProtocolException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.Year; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.Map.Entry; + +/** + * 集中竞价、挂牌交易 远程接口调用方法 + * @author Administrator + * + */ +public class FocusBiddingUtil { + + private static final Logger log = LoggerFactory.getLogger(FocusBiddingUtil.class); + + /** + * 开标后的结果 + * 远程接口获取集中交易-购售方申报数据(中间表格的数据;接口1.8) || 挂牌交易 - 挂/摘牌信息 ===== 实时交易 + * @param role 购方/售方 + * @param seqId 交易序列id + * @param sgccAddress 交易平台地址 + * @return + * @throws IOException + * @throws ClientProtocolException + */ + public static List getRportAndHangPickBidAfter(int role, String seqId, String sgccAddress, String token) throws ClientProtocolException, IOException { + List resiltList = new ArrayList<>(); + int pageNum = 1; + while (true) { +// if (pageNum>1) { +// return resiltList; +// } + //封装查询参数 + Map pageInfo = new HashMap<>(); + pageInfo.put("pageNum", pageNum); + pageInfo.put("pageSize", 30); + Map map = new HashMap<>(); + map.put("tradeRole", role); + map.put("tradeseqId", seqId); + Map paramsMap = new HashMap(); + paramsMap.put("data", map); + paramsMap.put("pageInfo", pageInfo); + //获取集中竞价/挂牌交易 实时交易时 中间模块数据 + String focusAndListingTradeReport = HttpUtils.sendPostDataByJson(sgccAddress + "/dataPush/tradeDeclareDetail/selectTradeReport", JSON.toJSONString(paramsMap), token); + log.info("reportAndHangPickBidAfter = " + focusAndListingTradeReport); + Map tradeReportResMap = JSON.parseObject(focusAndListingTradeReport, Map.class); + Map data = (Map) tradeReportResMap.get("data"); + if (data == null || data.size() == 0) { + log.info("接口: /dataPush/tradeDeclareDetail/selectTradeReport, data值为空!"); + return resiltList; + } + //获取结果只 接口返回数据结构: data: {"total": xx, "list": [{}]} + List listResult = JSON.parseArray(JSON.toJSONString(data.get("list")), Map.class); + if (listResult == null || listResult.size() == 0) { + log.info("接口: /dataPush/tradeDeclareDetail/selectTradeReport, 当前页数据为空, 循环跳出; 已获取{}页", pageNum); + return resiltList; + } + resiltList.addAll(listResult); + pageNum++; + } + } + + /** + * 获取集中竞价、挂牌交易 实时交易--- 购售方申报信息 (接口2.1 -- 开标前数据) + * @param role + * @param seqId + * @param sgccAddress + * @param token + * @return + * @throws IOException + * @throws ClientProtocolException + */ + public static List getRportAndHangPickBidBefore(int role, String seqId, String sgccAddress, String token) throws Exception { + List result = new ArrayList<>(); + Map params = new HashMap<>(); + params.put("tradeseqId", seqId); + params.put("tradeRole", role); + String focusAndListingTradeReport = HttpUtils.sendPostDataByJson(sgccAddress + "/dataPush/tradeDeclareDetail/selectBeforeOpen", JSON.toJSONString(params), token); + if (focusAndListingTradeReport == null || "".equals(focusAndListingTradeReport)) { + log.info("接口:/dataPush/tradeDeclareDetail/selectBeforeOpen, 返回结果为NULL"); + return new ArrayList<>(); + } + log.info("接口url:{}, 调用结果:{}", "/tradeDeclareDetail/selectBeforeOpen", focusAndListingTradeReport); + Map resMap = JSON.parseObject(focusAndListingTradeReport, Map.class); + Map data = (Map) resMap.get("data"); + if (data == null || data.size() == 0) { + log.info("接口:/dataPush/tradeDeclareDetail/selectBeforeOpen, 返回结果中data为NULL"); + return result; + } + //结果数据 data: {total: xx, list: [{}]} + List list = JSON.parseArray(JSON.toJSONString(data.get("list")), Map.class); + result.addAll(list); + return result; + } + + /** + * 远程接口获取集中交易-购售方申报数据(中间表格的数据;接口2.0) || 挂牌交易 - 挂/摘牌信息 ===== 回演交易 + * @param seqId + * @return + * @throws IOException + * @throws ClientProtocolException + */ + public static List> getReportAndHandPickReplay(String seqId, String sgccAddress, String token){ + try { + List> resultList = new ArrayList<>(); + //封装查询参数 + Map map = new HashMap<>(); + map.put("tradeseqId", seqId); + //获取集中竞价/挂牌交易 实时交易时 中间模块数据 + String focusAndListingTradeReport = HttpUtils.sendPostDataByJson(sgccAddress + "/dataPush/tradeDeclareDetail/query", JSON.toJSONString(map), token); + Map tradeReportResMap = JSON.parseObject(focusAndListingTradeReport, Map.class); + List> data = (List>) tradeReportResMap.get("data"); + if (data == null || data.size() == 0) { + log.info("获取回演 挂/摘牌信息接口2.0, data数据为NULL或空! "); + return new ArrayList<>(); + } + //获取数据 + for (Map dataItem : data) { + Map resultMap = new HashMap(); + resultMap.put("saleParticipantName", dataItem.get("saleParticipantname")); + resultMap.put("vendeeParticipantName", dataItem.get("vendeeParticipantname")); + resultMap.put("tradeTimeRange", dataItem.get("timeDivisionRange")); + resultMap.put("confirmEnergy", dataItem.get("clearingEnergy")); + resultMap.put("confirmTime", DateUtils.dateTimeFormat(String.valueOf(dataItem.get("createTime")))); + resultList.add(resultMap); + } + return resultList; + } catch (Exception e) { + e.printStackTrace(); + log.info("集中竞价、挂牌交易, 回演状态, 购售方申报数据获取失败!"); + return new ArrayList<>(); + } + + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/JsonUtil.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/JsonUtil.java new file mode 100644 index 0000000..89c09e5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/JsonUtil.java @@ -0,0 +1,121 @@ +package com.alonginfo.utils; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonParser; +import com.google.gson.reflect.TypeToken; +import org.jsoup.helper.StringUtil; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * json工具类 + * + * @author LIMING + * + */ +public class JsonUtil { + //public static Gson gson = new Gson(); + ////设置将类型的属性进行格式转换 + public static Gson gson = new GsonBuilder().registerTypeAdapter(Timestamp.class, new TimestampTypeAdapter()).setDateFormat("yyyy-MM-dd HH:mm:ss").create(); + /** + * 将json字符串转换为Map + * @param jsonString + * @return + */ + @SuppressWarnings("rawtypes") + public static Map jsonStr2Map(String jsonString) { + return gson.fromJson(jsonString, Map.class); + } + + /** + * 将map转换成json + * @param map + * @return + */ + public static String map2JsonStr(Map map) { + return gson.toJson(map); + } + + /** + * 从一个JSON 对象字符格式中得到一个java对象 + * @param jsonString + * @param pojoCalss + * @return + */ + public static Object getObject4JsonString(String jsonString, Class modelCalss) { + return gson.fromJson(jsonString, modelCalss); + } + + /** + * 从json HASH表达式中获取一个map + * @param jsonString + * @return + */ + public static Map getMap4Json(String jsonString) { + return gson.fromJson(jsonString, new TypeToken>() {}.getType()); + } + + /** + * 按KEY中获取JSON中值 + * @param jsonStr + * @param key + * @return + */ + public static String getJsonValue(String jsonStr, String key) { + if(StringUtil.isBlank(jsonStr)){ + return ""; + } + String data = new JsonParser().parse(jsonStr).getAsJsonObject().get(key).toString(); + //如果获取的key是花括号开始的 那么就默认json存的是对象 那就不用截取了 + String value=data.substring(0,1); + if(!"{".equals(value)&&"\"".equals(value)){ + return data.substring(1, data.length()-1); + } + return data; + } + + /** + * @Description:将java对象转换成json字符串 + * @param javaObj + * @return + */ + public static String getJsonString4JavaModel(Object javaObj) { + return gson.toJson(javaObj); + } + + /** + * @Description:从json对象集合表达式中得到一个java对象列表LIST + * @param jsonString + * @param pojoClass + * @return + */ + public static List getList4Json(String jsonString, Class pojoClass) { + List list = new ArrayList(); + JsonArray jsonArray = gson.fromJson(jsonString, JsonArray.class); + for (int i = 0; i < jsonArray.size(); i++) + list.add(gson.fromJson(jsonArray.get(i), pojoClass)); + return list; + } + + /** + * @Description:从json数组中解析出java字符串数组 + * @param jsonString + * @return + */ + /*public static String[] getStringArray4Json(String jsonString) { + JsonArray jsonArray = new JsonArray(); + jsonArray.add(jsonString); + String[] stringArray = new String[jsonArray.size()]; + for (int i = 0; i < jsonArray.size(); i++) + stringArray[i] = jsonArray.getAsString(); + return stringArray; + }*/ + + + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/RSAUtil.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/RSAUtil.java new file mode 100644 index 0000000..8899b11 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/RSAUtil.java @@ -0,0 +1,106 @@ +package com.alonginfo.utils; + +/** + * @Author ASUS + * @Date 2022-3-1410:49 + */ + +import org.apache.commons.codec.binary.Base64; + +import javax.crypto.Cipher; +import java.security.*; +import java.security.interfaces.RSAPrivateKey; +import java.security.interfaces.RSAPublicKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.HashMap; +import java.util.Map; + +/** + * 加密工具类 + */ +public class RSAUtil { + + /** + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception { + //生成公钥和私钥 + Map keyMap = genKeyPair(); + //加密字符串 + String message = "sgcc20220314"; + System.out.println("随机生成的公钥为:" + keyMap.get(0)); + System.out.println("随机生成的私钥为:" + keyMap.get(1)); + String messageEn = encrypt(message, keyMap.get(0)); + System.out.println(message + "\t加密后的字符串为:" + messageEn); + String messageDe = decrypt(messageEn, keyMap.get(1)); + System.out.println("还原后的字符串为:" + messageDe); + } + + /** + * 随机生成密钥对 + * + * @throws NoSuchAlgorithmException + */ + public static Map genKeyPair() throws NoSuchAlgorithmException { + // KeyPairGenerator类用于生成公钥和私钥对,基于RSA算法生成对象 + KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA"); + // 初始化密钥对生成器,密钥大小为96-1024位 + keyPairGen.initialize(1024, new SecureRandom()); + // 生成一个密钥对,保存在keyPair中 + KeyPair keyPair = keyPairGen.generateKeyPair(); + RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate(); // 得到私钥 + RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic(); // 得到公钥 + String publicKeyString = new String(Base64.encodeBase64(publicKey.getEncoded())); + // 得到私钥字符串 + String privateKeyString = new String(Base64.encodeBase64((privateKey.getEncoded()))); + //用于封装随机产生的公钥与私钥 + Map keyMap = new HashMap(); + // 将公钥和私钥保存到Map + keyMap.put(0, publicKeyString); //0表示公钥 + keyMap.put(1, privateKeyString); //1表示私钥 + return keyMap; + } + + /** + * RSA公钥加密 + * + * @param str 加密字符串 + * @param publicKey 公钥 + * @return 密文 + * @throws Exception 加密过程中的异常信息 + */ + public static String encrypt(String str, String publicKey) throws Exception { + //base64编码的公钥 + byte[] decoded = Base64.decodeBase64(publicKey); + RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(decoded)); + //RSA加密 + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.ENCRYPT_MODE, pubKey); + String outStr = Base64.encodeBase64String(cipher.doFinal(str.getBytes("UTF-8"))); + return outStr; + } + + /** + * RSA私钥解密 + * + * @param str 加密字符串 + * @param privateKey 私钥 + * @return 铭文 + * @throws Exception 解密过程中的异常信息 + */ + public static String decrypt(String str, String privateKey) throws Exception { + //64位解码加密后的字符串 + byte[] inputByte = Base64.decodeBase64(str.getBytes("UTF-8")); + //base64编码的私钥 + byte[] decoded = Base64.decodeBase64(privateKey); + RSAPrivateKey priKey = (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(decoded)); + //RSA解密 + Cipher cipher = Cipher.getInstance("RSA"); + cipher.init(Cipher.DECRYPT_MODE, priKey); + String outStr = new String(cipher.doFinal(inputByte)); + return outStr; + } + +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/SM4Utils.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/SM4Utils.java new file mode 100644 index 0000000..7e53c56 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/SM4Utils.java @@ -0,0 +1,50 @@ +package com.alonginfo.utils; + + +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.SmUtil; +import cn.hutool.crypto.symmetric.SymmetricCrypto; + + +public class SM4Utils { + + //key必须是16字节,即128位 + final static String key = "BC13D6BD076F612567EE1B145A85CCBC"; + + //指明加密算法和秘钥 + static SymmetricCrypto sm4 = new SymmetricCrypto("SM4/ECB/PKCS5Padding", key.getBytes()); + + /** + * 加密为16进制,也可以加密成base64/字节数组 + * + * @param plaintext + * @return + */ + public static String encryptSm4(String plaintext) { + SymmetricCrypto sm4 = SmUtil.sm4(); + if (StrUtil.isBlank(plaintext)) { + return ""; + } + return SM4Utils.sm4.encryptHex(plaintext); + } + + + /** + * 解密 + * + * @param ciphertext + * @return + */ + public static String decryptSm4(String ciphertext) { + if (StrUtil.isBlank(ciphertext)) { + return ""; + } + return sm4.decryptStr(ciphertext); + } + + public static void main(String[] args) { + String aa= "passw0rd@123"; + String s = encryptSm4(aa); + System.out.println(s); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/SecurityUtils.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/SecurityUtils.java new file mode 100644 index 0000000..1397969 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/SecurityUtils.java @@ -0,0 +1,94 @@ +package com.alonginfo.utils; + +import com.alonginfo.common.constant.HttpStatus; +import com.alonginfo.common.exception.CustomException; +import com.alonginfo.framework.security.LoginUser; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; + +/** + * 安全服务工具类 + */ +public class SecurityUtils { + /** + * 获取用户账户 + **/ + public static String getUsername() { + try { + return getLoginUser().getUsername(); + } catch (Exception e) { + throw new CustomException("获取用户账户异常", HttpStatus.UNAUTHORIZED); + } + } + + /** + * 获取用户 + **/ + public static LoginUser getLoginUser() { + try { + return (LoginUser) getAuthentication().getPrincipal(); + } catch (Exception e) { + throw new CustomException("获取用户信息异常", HttpStatus.UNAUTHORIZED); + } + } + + /** + * 获取在线用户userid + * @return + */ + public static Long getUserId() { + try { + return getLoginUser().getUser().getUserId(); + } catch (Exception e) { + throw new CustomException("获取用户账户异常", HttpStatus.UNAUTHORIZED); + } + } + + /** + * 获取Authentication + */ + public static Authentication getAuthentication() + { + return SecurityContextHolder.getContext().getAuthentication(); + } + + /** + * 生成BCryptPasswordEncoder密码 + * + * @param password 密码 + * @return 加密字符串 + */ + public static String encryptPassword(String password) { + BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); + return passwordEncoder.encode(password); + } + + /** + * 判断密码是否相同 + * + * @param rawPassword 真实密码 + * @param encodedPassword 加密后字符 + * @return 结果 + */ + public static boolean matchesPassword(String rawPassword, String encodedPassword) { + BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); + return passwordEncoder.matches(rawPassword, encodedPassword); + } + + /** + * 是否为管理员 + * + * @param userId 用户ID + * @return 结果 + */ + public static boolean isAdmin(Long userId) + { + return userId != null && 1L == userId; + } + + public static void main(String[] args) { + System.out.println(SecurityUtils.encryptPassword("Admin123")); + System.out.println(matchesPassword("Admin123","$2a$10$zAQw1VL6Q69liGkd1IaiuuDS1CWpXgz1TeTIQSYKux8zHzzvipGNu")); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/Seq.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/Seq.java new file mode 100644 index 0000000..820dcc5 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/Seq.java @@ -0,0 +1,87 @@ +package com.alonginfo.utils; + +import com.alonginfo.common.utils.DateUtils; +import com.alonginfo.common.utils.StringUtils; + +import java.util.concurrent.atomic.AtomicInteger; + +/** + * 序列生成类 + */ +public class Seq +{ + // 通用序列类型 + public static final String commSeqType = "COMMON"; + + // 上传序列类型 + public static final String uploadSeqType = "UPLOAD"; + + // 通用接口序列数 + private static AtomicInteger commSeq = new AtomicInteger(1); + + // 上传接口序列数 + private static AtomicInteger uploadSeq = new AtomicInteger(1); + + // 机器标识 + private static final String machineCode = "A"; + + /** + * 获取通用序列号 + * + * @return 序列值 + */ + public static String getId() + { + return getId(commSeqType); + } + + /** + * 默认16位序列号 yyMMddHHmmss + 一位机器标识 + 3长度循环递增字符串 + * + * @return 序列值 + */ + public static String getId(String type) + { + AtomicInteger atomicInt = commSeq; + if (uploadSeqType.equals(type)) + { + atomicInt = uploadSeq; + } + return getId(atomicInt, 3); + } + + /** + * 通用接口序列号 yyMMddHHmmss + 一位机器标识 + length长度循环递增字符串 + * + * @param atomicInt 序列数 + * @param length 数值长度 + * @return 序列值 + */ + public static String getId(AtomicInteger atomicInt, int length) + { + String result = DateUtils.dateTimeNow(); + result += machineCode; + result += getSeq(atomicInt, length); + return result; + } + + /** + * 序列循环递增字符串[1, 10 的 (length)幂次方), 用0左补齐length位数 + * + * @return 序列值 + */ + private synchronized static String getSeq(AtomicInteger atomicInt, int length) + { + // 先取值再+1 + int value = atomicInt.getAndIncrement(); + + // 如果更新后值>=10 的 (length)幂次方则重置为1 + int maxSeq = (int) Math.pow(10, length); + if (atomicInt.get() >= maxSeq) + { + atomicInt.set(1); + } + // 转字符串,用0左补齐 + return StringUtils.padl(value, length); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/SignUtil.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/SignUtil.java new file mode 100644 index 0000000..5f50c3a --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/SignUtil.java @@ -0,0 +1,55 @@ +package com.alonginfo.utils; + +import cn.hutool.core.collection.CollUtil; +import com.alibaba.fastjson2.JSONObject; +import com.alonginfo.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.DigestUtils; + +import java.util.Map; + +@Slf4j +public class SignUtil { + + /** + * 验证签名 + * + * @param params + * @param sign + * @return + */ + public static boolean verifySign(Map params, String sign, Long timestamp) { + String paramsJsonStr = "Timestamp" + timestamp + (CollUtil.isEmpty(params)?"":JSONObject.toJSONString(params)); + return verifySign(paramsJsonStr, sign); + } + + public static boolean verifySign(String body, String sign, Long timestamp) { + String paramsJsonStr = "Timestamp" + timestamp + body; + return verifySign(paramsJsonStr, sign); + } + + /** + * 验证签名 + * + * @param params + * @param sign + * @return + */ + public static boolean verifySign(String params, String sign) { + log.info("Header Sign : {}", sign); + if (StringUtils.isEmpty(params)) { + return false; + } + log.info("Param : {}", params); + String paramsSign = getParamsSign(params); + log.info("Param Sign : {}", paramsSign); + return sign.equals(paramsSign); + } + + /** + * @return 得到签名 + */ + public static String getParamsSign(String params) { + return DigestUtils.md5DigestAsHex(params.getBytes()).toLowerCase(); + } +} diff --git a/mxdata_v-system/src/main/java/com/alonginfo/utils/TimestampTypeAdapter.java b/mxdata_v-system/src/main/java/com/alonginfo/utils/TimestampTypeAdapter.java new file mode 100644 index 0000000..3b28675 --- /dev/null +++ b/mxdata_v-system/src/main/java/com/alonginfo/utils/TimestampTypeAdapter.java @@ -0,0 +1,31 @@ +package com.alonginfo.utils; + +import com.google.gson.*; + +import java.lang.reflect.Type; +import java.sql.Timestamp; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class TimestampTypeAdapter implements JsonSerializer, JsonDeserializer { + private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + public JsonElement serialize(Timestamp src, Type arg1, JsonSerializationContext arg2) { + String dateFormatAsString = format.format(new Date(src.getTime())); + return new JsonPrimitive(dateFormatAsString); + } + + public Timestamp deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { + if (!(json instanceof JsonPrimitive)) { + throw new JsonParseException("The date should be a string value"); + } + try { + Date date = format.parse(json.getAsString()); + return new Timestamp(date.getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } +} diff --git a/mxdata_v-system/src/main/resources/application-dev.yml b/mxdata_v-system/src/main/resources/application-dev.yml new file mode 100644 index 0000000..bd8c032 --- /dev/null +++ b/mxdata_v-system/src/main/resources/application-dev.yml @@ -0,0 +1,145 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 16002 + servlet: + # 应用的访问路径 + context-path: / + undertow: + io-threads: 16 + worker-threads: 256 + buffer-size: 1024 + buffers-per-region: 1024 + direct-buffers: true + +# 项目相关配置 +mxDataV: + # 名称 + name: mxDataV + # 版本 + version: 1.0.0 + # 版权年份 + copyrightYear: 2020 + # 实例演示开关 + demoEnabled: true + # 文件路径 示例( Windows配置D:/mx/uploadPath,Linux配置 /home/mx/uploadPath) + #profile: D:\bigScreen\gansu\mx +# profile: /Users/mingyanglee/Desktop/Lee/mxData-java/G-GanSu2/uploadPath + profile: /Users/sunkexin/uploadPath + # 获取ip地址开关 + addressEnabled: true + +# redis 配置 +spring: + #mysql + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + # 主库数据源 + master: +# url: jdbc:mysql://47.97.193.17:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 +# username: root +# password: PQkqqog5hz+fYrheMkxJNgc3L3t/Q7DdRp2o5O4OLhYq26mPNedGWUaMwT30Gj444+afyN6/9V1J/xAYsm7B0w== + url: jdbc:mysql://39.96.27.4:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 + username: root +# password: HzLQvhTlxR6dKyq1MC5a5YJiJ2fuyXGb8dVKkVjNTSSv+9PKELqXUaHQcIij/BC4joI59qtFsyFozSYjzkV3wg== + password: 2SqD+5iNuRR/af7/5i7G1Q== +# url: jdbc:mysql://127.0.0.1:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 +# username: root +# password: bNVOqb7WKLX5Bjnw+LMv92taj25KOxDimXxILPQjw42wgv+1lHzOH8kr97xDwWdhpY67QuYCS7sWN4W46YbkFA== +# password: DrudQ3JPbVy3qiZ1VML3DSS9m0dmYFfu8jIOJ5xofJeoPGc/wUNpPwrcxjLFi/8tk6EEBoPxu4MzpvBPsAyDkQ== + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + enabled: false + url: + username: + password: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: false + statViewServlet: + enabled: false + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: admin + login-password: admin + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true +# filters: config +# connection-properties: config.decrypt=false + logging: + pattern: + console: "%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr([%15.15t]){cyan} %clr(%X{__traceId}){magenta} %clr(%-40.40logger{39}){blue} %clr(:) %m%n" + level: + com.alonginfo.project: debug + #redis + redis: + # 地址 + host: 127.0.0.1 + #host: 39.96.27.4 + # 端口,默认为6379 + port: 6379 + # 密码 + password: DHmE1Yr2YfmnOr01pVzzWw== + # 连接超时时间 + timeout: 10s + database: 0 + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +#对接交易平台环境标识 +env: + key: dev + +#甘肃电力交易平台相关配置 +sgcc: + uploadPath: D:/upload/ + videoPath: D:/video/ + publicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeCzY9bdSYp/Ju6S8MROkQaCeuvj2OYSMCGF6B+jmNKIM2W/n7nAUJyUet7Owsg8y1YZIxryHUoxABJYiZADb7mqNhirVzPL8uBvH9pRX0VP/AstTKVcjdWNXTtGZJozfEJT9xdNt1LSVyBWRL+3eQZVdzGqvUzmi35CGdDiBYGwIDAQAB + #信息披露服务地址 + informationAddress: http://39.96.27.4:16016/px-settlement-infpubgrid-lz +# informationAddress: http://localhost:16016/px-settlement-infpubgrid-lz + +#交易公告上传路径 +notice: + filePath: E:/notice/ +market: + filePath: E:/notice/market/ \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/application-prd.yml b/mxdata_v-system/src/main/resources/application-prd.yml new file mode 100644 index 0000000..3c109f5 --- /dev/null +++ b/mxdata_v-system/src/main/resources/application-prd.yml @@ -0,0 +1,137 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 16002 + servlet: + # 应用的访问路径 + context-path: / + undertow: + io-threads: 16 + worker-threads: 256 + buffer-size: 1024 + buffers-per-region: 1024 + direct-buffers: true + + +# 项目相关配置 +mxDataV: + # 名称 + name: mxDataV + # 版本 + version: 1.0.0 + # 版权年份 + copyrightYear: 2020 + # 实例演示开关 + demoEnabled: true + # 文件路径 示例( Windows配置D:/mx/uploadPath,Linux配置 /home/mx/uploadPath) + #/Users/mingyanglee/logs/mx/uploadPath + # profile: /home/projects/chongqing/mx/uploadPath/upload/202112 + profile: /home/mxdatav_gs/uploadPath/ + # 获取ip地址开关 + addressEnabled: true + +# redis 配置 +spring: + #Mysql + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + # 主库数据源 + master: + url: jdbc:mysql://21.76.128.3:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 + username: root + password: EK+f7WE15vc4yQzyJf974FlDbL6EBxbeGkDo4wLjwhB6PWDKtPEQI0ulbnWknKe+wzoFWbGjF0Mwp533fWqWUw== + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + enabled: false + url: + username: + password: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: + login-password: + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + filters: config + connection-properties: config.decrypt=true + logging: + pattern: + console: "%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr([%15.15t]){cyan} %clr(%X{__traceId}){magenta} %clr(%-40.40logger{39}){blue} %clr(:) %m%n" + level: + com.alonginfo.project: debug + + redis: + # 地址 + # host: 39.96.27.4 + host: 21.76.128.4 + # 端口,默认为6379 + port: 6379 + # 密码 + #password: zGSPX@7837 + password: JxDYpu0EO6w+xfFtzGeUPA== + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +#对接交易平台环境标识 +env: + key: prd + +#甘肃电力交易平台相关配置 +sgcc: + uploadPath: /home/along/ + videoPath: /home/video/ + publicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeCzY9bdSYp/Ju6S8MROkQaCeuvj2OYSMCGF6B+jmNKIM2W/n7nAUJyUet7Owsg8y1YZIxryHUoxABJYiZADb7mqNhirVzPL8uBvH9pRX0VP/AstTKVcjdWNXTtGZJozfEJT9xdNt1LSVyBWRL+3eQZVdzGqvUzmi35CGdDiBYGwIDAQAB + #信息披露服务地址 + informationAddress: http://25.215.196.215/px-settlement-infpubgrid-lz + +#交易公告上传路径 +notice: + filePath: /home/mxdatav_gs/notice/ +market: + filePath: /home/mxdatav_gs/notice/market/ \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/application.yml b/mxdata_v-system/src/main/resources/application.yml new file mode 100644 index 0000000..fd84e3e --- /dev/null +++ b/mxdata_v-system/src/main/resources/application.yml @@ -0,0 +1,60 @@ +# Spring配置 +spring: + # 资源信息 + messages: + # 国际化资源文件路径 + basename: i18n/messages + profiles: + active: dev + # 文件上传 + servlet: + multipart: + # 单个文件大小 + max-file-size: 10MB + # 设置总上传的文件大小 + max-request-size: 20MB + # 服务模块 + devtools: + restart: + # 热部署开关 + enabled: false + +# token配置 +token: + # 令牌自定义标识 + header: Authorization + # 令牌秘钥 + secret: abcdefghijklmnopqrstuvwxyz + # 令牌有效期(默认30分钟) + expireTime: 30 + +# MyBatis配置 +mybatis: + # 搜索指定包别名 + typeAliasesPackage: com.alonginfo.project.**.domain + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapperLocations: classpath*:mybatis/**/*Mapper.xml + # 加载全局的配置文件 + configLocation: classpath:mybatis/mybatis-config.xml + +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# 防止XSS攻击 +xss: + # 过滤开关 + enabled: true + # 排除链接(多个用逗号分隔) + excludes: /system/notice/* + # 匹配链接 + urlPatterns: /system/*,/monitor/*,/tool/* + +# 日志配置 +logging: + level: + com.alongifo: debug + org.springframework: warn \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/banner.txt b/mxdata_v-system/src/main/resources/banner.txt new file mode 100644 index 0000000..fa1f88d --- /dev/null +++ b/mxdata_v-system/src/main/resources/banner.txt @@ -0,0 +1,9 @@ +Application Version: ${mxDataV.version} +Spring Boot Version: ${spring-boot.version} + __ ____ __ _____ _ __ __ + | \/ \ \ / / | __ \ | | \ \ / / + | \ / |\ V /_____| | | | __ _| |_ __ \ \ / / + | |\/| | > <______| | | |/ _` | __/ _` \ \/ / + | | | |/ . \ | |__| | (_| | || (_| |\ / + |_| |_/_/ \_\ |_____/ \__,_|\__\__,_| \/ + diff --git a/mxdata_v-system/src/main/resources/i18n/messages.properties b/mxdata_v-system/src/main/resources/i18n/messages.properties new file mode 100644 index 0000000..d63aa1f --- /dev/null +++ b/mxdata_v-system/src/main/resources/i18n/messages.properties @@ -0,0 +1,36 @@ +#错误消息 +not.null=* 必须填写 +user.jcaptcha.error=验证码错误 +user.jcaptcha.expire=验证码已失效 +user.not.exists=用户不存在/密码错误 +user.password.not.match=用户不存在/密码错误 +user.password.retry.limit.count=密码输入错误{0}次 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟 +user.password.delete=对不起,您的账号已被删除 +user.blocked=用户已封禁,请联系管理员 +role.blocked=角色已封禁,请联系管理员 +user.logout.success=退出成功 + +length.not.valid=长度必须在{min}到{max}个字符之间 + +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 +user.password.not.valid=* 5-50个字符 + +user.email.not.valid=邮箱格式错误 +user.mobile.phone.number.not.valid=手机号格式错误 +user.login.success=登录成功 +user.notfound=请重新登录 +user.forcelogout=管理员强制退出,请重新登录 +user.unknown.error=未知错误,请重新登录 + +##文件上传消息 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! +upload.filename.exceed.length=上传的文件名最长{0}个字符 + +##权限 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] diff --git a/mxdata_v-system/src/main/resources/logback.xml b/mxdata_v-system/src/main/resources/logback.xml new file mode 100644 index 0000000..9485201 --- /dev/null +++ b/mxdata_v-system/src/main/resources/logback.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/sys-info.log + + + + ${log.path}/sys-info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/sys-error.log + + + + ${log.path}/sys-error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + ${log.path}/sys-user.log + + + ${log.path}/sys-user.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxBusinessDataMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxBusinessDataMapper.xml new file mode 100644 index 0000000..4f02be0 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxBusinessDataMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE + FROM + ${params.tableName} + WHERE + ${params.tableKey} = #{params.keyValue} + + + + + UPDATE + ${params.tableName} + SET + + ${key} = #{value} + + WHERE + ${params.tableKey} = #{params.keyValue} + + + + + INSERT + INTO + ${params.tableName} + + ${key} + + VALUES + + #{value} + + + + + + + + DELETE FROM ${tableName} + + diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxComponentsMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxComponentsMapper.xml new file mode 100644 index 0000000..4bf44df --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxComponentsMapper.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select com_type_id,com_type_name,remark,create_date + from mx_components_type + + + select com_id,com_type_id,com_name,com_alias_name,remark,enabled,com_png_url,create_date + from mx_components + + + + + + insert into mx_components_type( + com_type_id, + com_type_name, + remark, + create_date + ) + values( + #{comTypeId}, + #{comTypeName}, + #{remark}, + sysdate() + ) + + + + + + delete from mx_components_type where com_type_id = #{comTypeId} + + + + + + update mx_components_type + + com_type_name = #{comTypeName}, + remark = #{remark}, + create_date = sysdate() + + where com_type_id = #{comTypeId} + + + + + + + + + + + insert into mx_components( + com_id, + com_type_id, + com_name, + com_alias_name, + remark, + enabled, + com_png_url, + create_date + ) + values( + #{comId}, + #{comTypeId}, + #{comName}, + #{comAliasName}, + #{remark}, + #{enabled}, + #{comPngUrl}, + sysdate() + ) + + + + delete from mx_components where com_id = #{comId} + + + + delete from mx_components where com_type_id = #{comTypeId} + + + + update mx_components + + com_type_id = #{comTypeId}, + com_name = #{comName}, + com_alias_name = #{comAliasName}, + remark = #{remark}, + enabled = #{enabled}, + com_png_url = #{comPngUrl}, + create_date = sysdate() + + where com_id = #{comId} + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxDataSetMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxDataSetMapper.xml new file mode 100644 index 0000000..6bbafb3 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxDataSetMapper.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select d_group_id, d_group_name,d_group_sort, create_time from mx_data_group order by d_group_sort + + + select DS_ID,DS_NAME,DATABASE_ID,DATA_SQL,d_group_id,has_param,code_get_id from mx_data_set + + + + + + + + insert into mx_data_group( + d_group_id, + d_group_name, + d_group_sort, + create_time + ) + values( + #{dGroupId}, + #{dGroupName}, + #{dGroupSort}, + sysdate() + ) + + + + + delete from mx_data_group where d_group_id = #{dGroupId} + + + + + update mx_data_group + + d_group_name = #{dGroupName}, + d_group_sort = #{dGroupSort}, + create_time = sysdate() + + where d_group_id = #{dGroupId} + + + + + + + + + + + + + + + + insert into mx_data_set( + ds_id, + ds_name, + database_id, + data_sql, + d_group_id, + has_param, + code_get_id, + create_time + ) + values( + #{dsId}, + #{dsName}, + #{databaseId}, + #{dataSql}, + #{dGroupId}, + #{hasParam}, + #{ajaxId}, + sysdate() + ) + + + + + insert into mx_data_set_key(KEY_ID,KEY_NAME,DS_ID) values(#{keyId},#{keyName},#{dsId}) + + + + + delete from mx_data_set where ds_id =#{dsId} + + + + delete from mx_data_set_key where ds_id =#{dsId} + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxDatabaseMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxDatabaseMapper.xml new file mode 100644 index 0000000..aca90dd --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxDatabaseMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + select id,alias_name,config_name,type,driver_class,username,password,url,create_date,is_open + from mx_database + + + + + + insert into mx_database( + id, + alias_name, + config_name, + type, + driver_class, + username, + password, + url, + is_open, + create_date + ) + values( + #{id}, + #{aliasName}, + #{configName}, + #{type}, + #{driverClass}, + #{username}, + #{password}, + #{url}, + #{isOpen}, + sysdate() + ) + + + + delete from mx_database where id = #{id} + + + + + update mx_database + + alias_name = #{aliasName}, + config_name = #{configName}, + type = #{type}, + driver_class = #{driverClass}, + username = #{username}, + password = #{password}, + url = #{url}, + is_open = #{isOpen}, + create_date = sysdate() + + where id = #{id} + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxGroupSettingMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxGroupSettingMapper.xml new file mode 100644 index 0000000..2752aab --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxGroupSettingMapper.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + select setting_id, setting_name, auto_switch, switch_animation, switch_time, description from mx_group_setting + + + + + + + + + + insert into mx_group_setting + + setting_id, + setting_name, + auto_switch, + switch_animation, + switch_time, + description, + + + #{settingId}, + #{settingName}, + #{autoSwitch}, + #{switchAnimation}, + #{switchTime}, + #{description}, + + + + + update mx_group_setting + + setting_name = #{settingName}, + auto_switch = #{autoSwitch}, + switch_animation = #{switchAnimation}, + switch_time = #{switchTime}, + description = #{description}, + + where setting_id = #{settingId} + + + + delete from mx_group_setting where setting_id = #{settingId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxIntroduceMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxIntroduceMapper.xml new file mode 100644 index 0000000..d608799 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxIntroduceMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + UPDATE mx_pages SET introduce = #{introduce} WHERE page_id = #{pageId} + + diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxPageGroupMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxPageGroupMapper.xml new file mode 100644 index 0000000..f4889c8 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxPageGroupMapper.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT + a.group_id, + a.group_name, + a.page_path, + a.setting_id, + a.description, + a.create_time, + b.setting_name, + b.auto_switch, + b.switch_animation, + b.switch_time, + b.description setting_description, + d.page_name , + d.page_id + + FROM + mx_page_group a + LEFT JOIN mx_group_setting b ON a.setting_id = b.setting_id + left join mx_page_mid_group c on a.group_id = c.group_id + left join mx_pages d on c.page_id=d.page_id + order by a.group_id , c.order_num + + + + + + + + + + + insert into mx_page_group + + group_id, + group_name, + page_path, + setting_id, + description, + create_time + + + #{groupId}, + #{groupName}, + #{pagePath}, + #{settingId}, + #{description}, + sysdate() + + + + + + update mx_page_group + + group_name = #{groupName}, + setting_id = #{settingId}, + description = #{description}, + create_time = sysdate() + + where group_id = #{groupId} + + + + + delete from mx_page_group where group_id = #{groupId} + + + + delete from mx_page_mid_group where group_id = #{groupId} + + + + delete from mx_page_mid_group where group_id = #{groupId} and page_id =#{themeId} + + + + + insert into mx_page_mid_group(group_id,page_id,order_num) + values + + (#{groupId},#{item.themeId},#{item.orderNum}) + + + + + + + + + + + + + + update mx_page_mid_group set order_num = #{orderNum} where group_id=#{groupId} and page_id=#{themeId} + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/business/MxQuartzMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/MxQuartzMapper.xml new file mode 100644 index 0000000..9e0382d --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/MxQuartzMapper.xml @@ -0,0 +1,90 @@ + + + + + job_id jobId, job_name jobName, job_group jobGroup, invoke_target invokeTarget, cron_expression cronExpression, + misfire_policy misfirePolicy, concurrent, status, create_by createBy, DATe_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') createTime, + update_by updateBy, DATe_FORMAT(update_time, '%Y-%m-%d %H:%i:%s') updateTime, remark + + + + + + + + + + + + UPDATE sys_job + + + job_name = #{jobName}, + + + job_group = #{jobGroup}, + + + invoke_target = #{invokeTarget}, + + + cron_expression = #{cronExpression}, + + + misfire_policy = #{misfirePolicy}, + + + concurrent = #{concurrent}, + + + status = #{status}, + + + remark = #{remark}, + + + update_by = #{updateBy}, + + update_time = now() + + WHERE job_id = #{jobId} + + + + + INSERT INTO sys_job + (job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, + status, create_by, create_time, update_by, update_time) + VALUES + (null, #{jobName}, #{jobGroup}, #{invokeTarget}, #{cronExpression}, #{misfirePolicy}, #{concurrent}, + #{status}, #{createBy}, now(), #{updateBy}, #{updateTime}) + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/business/YwMonthTransactionMapper.xml b/mxdata_v-system/src/main/resources/mybatis/business/YwMonthTransactionMapper.xml new file mode 100644 index 0000000..884c3b5 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/business/YwMonthTransactionMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/engine/MxPagesMapper.xml b/mxdata_v-system/src/main/resources/mybatis/engine/MxPagesMapper.xml new file mode 100644 index 0000000..86c9956 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/engine/MxPagesMapper.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select page_id, page_name, pro_id, page_path, page_component, page_developCanvas, page_layout, is_own_chartTheme, + theme_id, page_publish,is_encrypt,password,create_time,create_by,remark + from mx_pages + + + + + + + + + + + + + + + insert into mx_pages ( + page_id, + page_name, + pro_id, + page_path, + page_component, + page_developCanvas, + page_layout, + is_own_chartTheme, + theme_id, + page_publish, + is_encrypt, + password, + remark, + create_by, + create_time + ) values ( + #{pageId}, + #{pageName}, + #{proId}, + #{pagePath}, + #{pageComponent}, + #{pageDevelopCanvas}, + #{pageLayout}, + #{isOwnChartTheme}, + #{themeId}, + #{pagePublish}, + #{isEncrypt}, + #{password}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + + update mx_pages + + page_name = #{pageName}, + page_path = #{pagePath}, + page_component = #{pageComponent}, + page_developCanvas = #{pageDevelopCanvas}, + page_layout = #{pageLayout}, + is_own_chartTheme = #{isOwnChartTheme}, + theme_id = #{themeId}, + page_publish = #{pagePublish}, + is_encrypt = #{isEncrypt}, + password = #{password}, + remark = #{remark}, + app_ctrl = #{appCtrl}, + + where page_id = #{pageId} + + + + + update mx_pages + + page_publish = #{pagePublish}, + is_encrypt = #{isEncrypt}, + password = #{password}, + + where page_id = #{pageId} + + + + + delete from mx_pages where page_id = #{pageId} + + + + + delete from mx_pages where pro_id in + + #{proId} + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/engine/MxProjectMapper.xml b/mxdata_v-system/src/main/resources/mybatis/engine/MxProjectMapper.xml new file mode 100644 index 0000000..b401141 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/engine/MxProjectMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + insert into mx_project ( + pro_id, + pro_name, + pro_state, + theme_id, + create_by, + remark, + create_time + ) values ( + #{proId}, + #{proName}, + #{proState}, + #{themeId}, + #{createBy}, + remark, + sysdate() + ) + + + + + + + + update mx_project + + pro_name = #{proName}, + theme_id = #{themeId}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + + where pro_id = #{proId} + + + + + delete from mx_project where pro_id in + + #{proId} + + + + + + update mx_project set pro_state = #{proState} where pro_id = #{proId} + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/engine/ThemeManagerMapper.xml b/mxdata_v-system/src/main/resources/mybatis/engine/ThemeManagerMapper.xml new file mode 100644 index 0000000..c62d2ac --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/engine/ThemeManagerMapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + insert into mx_theme_manager ( + theme_id, + theme_name, + json_text, + remark, + user_id, + create_date + ) values ( + #{themeId}, + #{themeName}, + #{jsonText}, + #{remark}, + #{userId}, + sysdate() + ) + + + + + + + + update mx_theme_manager + + theme_name = #{themeName}, + json_text = #{jsonText}, + remark = #{remark} + + where theme_id = #{themeId} + + + + + delete from mx_theme_manager where theme_id in + + #{themeId} + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkGzzdMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkGzzdMapper.xml new file mode 100644 index 0000000..2e834b4 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkGzzdMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + data_id + ,data_x,data_y1, + data_y2,update_time + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkGzzkMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkGzzkMapper.xml new file mode 100644 index 0000000..15cf08c --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkGzzkMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + data_id,data_x,data_y, + update_time + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkLybhMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkLybhMapper.xml new file mode 100644 index 0000000..9af9601 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/BsHggkLybhMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + data_id,data_x,data_y, + update_time + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/BuySaleDetailMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/BuySaleDetailMapper.xml new file mode 100644 index 0000000..40ff393 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/BuySaleDetailMapper.xml @@ -0,0 +1,38 @@ + + + + + + + INSERT INTO + task_buy_sale_detail + (detail_id, trade_seq_id, trade_time_part, trade_time_range, sale_units_names, + vendee_units_names, sale_participant_name, vendee_participant_name, confirm_energy, + confirm_time, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.tradeTimePart}, #{item.tradeTimeRange}, + #{item.saleUnitsNames}, #{item.vendeeUnitsNames}, #{item.saleParticipantName}, + #{item.vendeeParticipantName}, #{item.confirmEnergy}, #{item.confirmTime}, #{item.dataTime}) + + + + + + + + + DELETE FROM + task_buy_sale_detail + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/CarbonMonitorMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/CarbonMonitorMapper.xml new file mode 100644 index 0000000..2178072 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/CarbonMonitorMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/ClearEnergyAbsorptionMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/ClearEnergyAbsorptionMapper.xml new file mode 100644 index 0000000..956472a --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/ClearEnergyAbsorptionMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/DayAddThreeMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/DayAddThreeMapper.xml new file mode 100644 index 0000000..8cb4a0b --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/DayAddThreeMapper.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/DynamicDataPushMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/DynamicDataPushMapper.xml new file mode 100644 index 0000000..02a1b59 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/DynamicDataPushMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + INSERT INTO + task_trade_seq(trade_seq_id, trade_seq_caption, data_time) + VALUES + + (#{item.tradeSeqId}, #{item.tradeSeqCaption}, #{item.dataTime}) + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/EnergyCensusMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/EnergyCensusMapper.xml new file mode 100644 index 0000000..7c31d62 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/EnergyCensusMapper.xml @@ -0,0 +1,71 @@ + + + + + + INSERT INTO + task_energy_census + (data_id, trade_seq_id, group_names, sale_energy, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.groupNames}, #{item.saleEnergy}, #{item.dataTime}) + + + + + + DELETE FROM task_energy_census + + + + + + + + INSERT INTO + test_task_energy_census + (data_id, trade_seq_id, group_names, sale_energy, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.groupNames}, #{item.saleEnergy}, #{item.dataTime}) + + + + + + DELETE FROM test_task_energy_census + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/GenerationRightDataSyncMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/GenerationRightDataSyncMapper.xml new file mode 100644 index 0000000..e6a9bbc --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/GenerationRightDataSyncMapper.xml @@ -0,0 +1,64 @@ + + + + + + INSERT INTO job_ge_deal_organize + (data_id, power_count, power_count_per, deal_num, deal_num_per, deal_energy, deal_energy_per) + VALUES + (1, #{data.powerCount}, #{data.powerCountPer}, #{data.dealNum}, #{data.dealNumPer}, #{data.dealEnergy}, #{data.dealEnergyPer}) + ON DUPLICATE KEY UPDATE + power_count=#{data.powerCount}, power_count_per=#{data.powerCountPer}, deal_num=#{data.dealNum}, deal_num_per=#{data.dealNumPer}, + deal_energy=#{data.dealEnergy}, deal_energy_per=#{data.dealEnergyPer}, update_time=now() + + + + INSERT INTO job_ge_subject_join + (data_id, participant_count, vendee_participant_count, sale_participant_count) + VALUES + (1, #{data.participantCount}, #{data.vendeeParticipantCount}, #{data.saleParticipantCount}) + ON DUPLICATE KEY UPDATE + participant_count=#{data.participantCount}, vendee_participant_count=#{data.vendeeParticipantCount}, + sale_participant_count=#{data.saleParticipantCount}, update_time=now() + + + + DELETE FROM job_ge_buy_sale_order + + + + INSERT INTO job_ge_buy_sale_order + (type, sum_sale_energy, sale_participant_name, sum_vendee_energy, vendee_participant_name) + VALUES + + (#{item.type}, #{item.sumSaleEnergy}, #{item.saleParticipantname}, #{item.sumVendeeEnergy}, #{item.vendeeParticipantname}) + + + + + DELETE FROM job_ge_deal_energy_year + + + + INSERT INTO + job_ge_deal_energy_year + (year, energy, settlement) + VALUES + + (#{item.yearMonth}, #{item.energy}, #{item.settlement}) + + + + + DELETE FROM job_ge_deal_energy_year_month + + + + INSERT INTO job_ge_deal_energy_year_month + (`year_month`, energy, settlement) + VALUES + + (#{item.yearMonth}, #{item.energy}, #{item.settlement}) + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/GenerationRightMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/GenerationRightMapper.xml new file mode 100644 index 0000000..b470eb2 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/GenerationRightMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/GreenTradeMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/GreenTradeMapper.xml new file mode 100644 index 0000000..e9ec36a --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/GreenTradeMapper.xml @@ -0,0 +1,22 @@ + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/GridMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/GridMapper.xml new file mode 100644 index 0000000..c3186bb --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/GridMapper.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/MarketBuildDataSyncMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketBuildDataSyncMapper.xml new file mode 100644 index 0000000..79f7095 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketBuildDataSyncMapper.xml @@ -0,0 +1,30 @@ + + + + + + DELETE FROM job_mb_power_direct_deal + + + + INSERT INTO job_mb_power_direct_deal + (trade_year, sum_vendee_energy) + VALUES + + (#{item.tradeYear}, #{item.sumVendeeEnergy}) + + + + + DELETE FROM job_mb_every_type_subject + + + + INSERT INTO job_mb_every_type_subject + (year, power, sale, user) + VALUES + + (#{item.year}, #{item.power}, #{item.sale}, #{item.user}) + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/MarketBuildMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketBuildMapper.xml new file mode 100644 index 0000000..0336e2a --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketBuildMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/MarketSurveyDataSyncMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketSurveyDataSyncMapper.xml new file mode 100644 index 0000000..78c6b1e --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketSurveyDataSyncMapper.xml @@ -0,0 +1,25 @@ + + + + + + INSERT INTO job_ms_market_subject_ratio + (data_id, sale_count, user_count, power_count, sale, user, power) + VALUES + (1, #{data.saleCount}, #{data.userCount}, #{data.powerCount}, #{data.sale}, #{data.user}, #{data.power}) + ON DUPLICATE KEY UPDATE + sale_count=#{data.saleCount}, user_count=#{data.userCount}, power_count=#{data.powerCount}, + sale=#{data.sale}, user=#{data.user}, power=#{data.power}, update_time = now() + + + + INSERT INTO job_ms_market_subject_enterprise + (data_id, water_count, fire_count, wind_count, sun_count, other_count, water, fire, wind, sun, other) + VALUES + (1, #{data.waterCount}, #{data.fireCount}, #{data.windCount}, #{data.sunCount}, #{data.otherCount}, + #{data.water}, #{data.fire}, #{data.wind}, #{data.sun}, #{data.other}) + ON DUPLICATE KEY UPDATE + water_count=#{data.waterCount}, fire_count=#{data.fireCount}, wind_count=#{data.windCount}, sun_count=#{data.sunCount}, other_count = #{data.otherCount}, + water=#{data.water}, fire=#{data.fire}, wind=#{data.wind}, sun=#{data.sun}, other=#{data.other}, update_time = now() + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/MarketSurveyMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketSurveyMapper.xml new file mode 100644 index 0000000..f9911f4 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/MarketSurveyMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/MediumLongTermContractDataSyncMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/MediumLongTermContractDataSyncMapper.xml new file mode 100644 index 0000000..9b8c396 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/MediumLongTermContractDataSyncMapper.xml @@ -0,0 +1,30 @@ + + + + + + DELETE FROM job_mlt_contract_type_power + + + + INSERT INTO job_mlt_contract_type_power + (energy_type, sum_energy) + VALUES + + (#{item.energyType}, #{item.sumEnergy}) + + + + + DELETE FROM job_mlt_contract_supply_type + + + + INSERT INTO job_mlt_contract_supply_type + (trade_year, vendee_energy, sale_energy, energy_type) + VALUES + + (#{item.tradeYear}, #{item.sumVendeeEnergy}, #{item.sumSaleEnergy}, #{item.energyType}) + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/MediumLongTermContractMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/MediumLongTermContractMapper.xml new file mode 100644 index 0000000..483b358 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/MediumLongTermContractMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/NewEnergySurveyDataSyncMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/NewEnergySurveyDataSyncMapper.xml new file mode 100644 index 0000000..e6c6247 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/NewEnergySurveyDataSyncMapper.xml @@ -0,0 +1,17 @@ + + + + + + DELETE FROM job_ne_join_trend + + + + INSERT INTO job_ne_join_trend + (trade_year, sum_vendee_energy, sum_sale_energy, energy_type) + VALUES + + (#{item.tradeYear}, #{item.sumVendeeEnergy}, #{item.sumSaleEnergy}, #{item.energyType}) + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/NewEnergySurveyMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/NewEnergySurveyMapper.xml new file mode 100644 index 0000000..523506a --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/NewEnergySurveyMapper.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/PriceTrendMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/PriceTrendMapper.xml new file mode 100644 index 0000000..c928d81 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/PriceTrendMapper.xml @@ -0,0 +1,69 @@ + + + + + + INSERT INTO + task_price_trend + (data_id, trade_seq_id, report_time, peak_energy, flat_energy, + valley_energy, peak_avg_value, flat_avg_value, valley_avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.reportTime}, #{item.peakEnergy}, #{item.flatEnergy}, + #{item.valleyEnergy}, #{item.peakAvgValue}, #{item.flatAvgValue}, #{item.valleyAvgValue}, #{item.dataTime}) + + + + + + DELETE FROM + task_price_trend + + + + + + + + INSERT INTO + test_task_price_trend + (data_id, trade_seq_id, report_time, peak_energy, flat_energy, + valley_energy, peak_avg_value, flat_avg_value, valley_avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.reportTime}, #{item.peakEnergy}, #{item.flatEnergy}, + #{item.valleyEnergy}, #{item.peakAvgValue}, #{item.flatAvgValue}, #{item.valleyAvgValue}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_price_trend + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/PriceTrendReplayMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/PriceTrendReplayMapper.xml new file mode 100644 index 0000000..9d936db --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/PriceTrendReplayMapper.xml @@ -0,0 +1,60 @@ + + + + + + INSERT INTO + task_price_trend_replay + (data_id, trade_seq_id, count_energy, trade_time_range, time_division_nmae, avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.countEnergy}, #{item.tradeTimeRange}, #{item.timeDivisionNmae}, + #{item.avgValue}, #{item.dataTime}) + + + + + + DELETE FROM + task_price_trend_replay + + + + + + + INSERT INTO + test_task_price_trend_replay + (data_id, trade_seq_id, count_energy, trade_time_range, time_division_nmae, avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.countEnergy}, #{item.tradeTimeRange}, #{item.timeDivisionNmae}, + #{item.avgValue}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_price_trend_replay + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceInnerDataSyncMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceInnerDataSyncMapper.xml new file mode 100644 index 0000000..3462ee4 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceInnerDataSyncMapper.xml @@ -0,0 +1,70 @@ + + + + + + DELETE FROM job_pi_deal_organize + + + + INSERT INTO job_pi_deal_organize + (trade_year, sb_num, jz_num, gp_num, d3_num, sb_energy, jz_energy, gp_energy, d3_energy) + VALUES + + (#{item.tradeYear}, #{item.sbNum}, #{item.jzNum}, #{item.gpNum}, #{item.d3Num}, + #{item.sbEnergy}, #{item.jzEnergy}, #{item.gpEnergy}, #{item.d3Energy}) + + + + + DELETE FROM job_pi_clean_energy_deal + + + + INSERT INTO job_pi_clean_energy_deal + (trade_year, energy_type, vendee, sale) + VALUES + + (#{item.tradeYear}, #{item.energyType}, #{item.vendee}, #{item.sale}) + + + + + DELETE FROM job_pi_subject_join + + + + INSERT INTO job_pi_subject_join + (trade_year, org_yield, org_sale, org_user, join_yield, join_sale, join_user) + VALUES + + (#{item.tradeYear}, #{item.orgYield}, #{item.orgSale}, #{item.orgUser}, #{item.joinYield}, #{item.joinSale}, #{item.joinUser}) + + + + + DELETE FROM job_pi_power_price_trend + + + + INSERT INTO job_pi_power_price_trend + (trade_month, vendee_energy, vendee_price, sale_energy, sale_price) + VALUES + + (#{item.tradeMonth}, #{item.vendeeEnergy}, #{item.vendeePrice}, #{item.saleEnergy}, #{item.salePrice}) + + + + + DELETE FROM job_pi_trade_survey WHERE trade_year = #{year} + + + + INSERT INTO job_pi_trade_survey + (trade_year, count_trade, sum_vendee_energy) + VALUES + + (#{item.tradeYear}, #{item.countTrade}, #{item.sumVendeeEnergy}) + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceInnerMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceInnerMapper.xml new file mode 100644 index 0000000..adb6253 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceInnerMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceMiddleMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceMiddleMapper.xml new file mode 100644 index 0000000..1d85a9f --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/ProvinceMiddleMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/RealTimeManyDayMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/RealTimeManyDayMapper.xml new file mode 100644 index 0000000..b6d0d5f --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/RealTimeManyDayMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + INSERT INTO task_many_day_real + (sum_energy, avg_price, create_time, time_range, data_time) + VALUES + + (#{item.sumEnergy}, #{item.avgPrice}, #{item.createTime}, #{item.timeRange}, DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:00')) + + + + + + DELETE FROM + task_many_day_real + + + + + + + + INSERT INTO test_task_many_day_real + (sum_energy, avg_price, create_time, time_range, data_time) + VALUES + + (#{item.sumEnergy}, #{item.avgPrice}, #{item.createTime}, #{item.timeRange}, DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:00')) + + + + + + DELETE FROM + test_task_many_day_real + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/ResourcesMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/ResourcesMapper.xml new file mode 100644 index 0000000..cc1d057 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/ResourcesMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/SgccAddressMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/SgccAddressMapper.xml new file mode 100644 index 0000000..eaf4874 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/SgccAddressMapper.xml @@ -0,0 +1,45 @@ + + + + + + INSERT INTO + sgcc_address + (id, sgcc_name, sgcc_address) + VALUES + (null, #{sgccName}, #{sgccAddress}) + + + + + + + + + + UPDATE sgcc_address + SET sgcc_name = #{sgccName}, sgcc_address = #{sgccAddress} + WHERE + id = #{id} + + + + DElETE FROM + sgcc_address + WHERE + id in + + #{item} + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/TradeNoticeMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeNoticeMapper.xml new file mode 100644 index 0000000..b64d9b4 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeNoticeMapper.xml @@ -0,0 +1,69 @@ + + + + + + INSERT INTO + task_trade_notice + (notice_id, trade_seq_id, begin_date, end_date, con_beg_date, con_end_date, band_num, tradetype_mode, + tradeseq_cycle, sale_num, vendee_num, pub_time, file, res_pub_time, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.beginDate}, #{item.endDate}, #{item.conBegDate}, #{item.conEndDate}, + #{item.bandNum}, #{item.tradetypeMode}, #{item.tradeseqCycle}, #{item.saleNum}, #{item.vendeeNum}, #{item.pubTime}, + #{item.file}, #{item.resPubTime}, #{item.dataTime}) + + + + + + DELETE FROM + task_trade_notice + + + + + + + + INSERT INTO + test_task_trade_notice + (notice_id, trade_seq_id, begin_date, end_date, con_beg_date, con_end_date, band_num, tradetype_mode, + tradeseq_cycle, sale_num, vendee_num, pub_time, file, res_pub_time, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.beginDate}, #{item.endDate}, #{item.conBegDate}, #{item.conEndDate}, + #{item.bandNum}, #{item.tradetypeMode}, #{item.tradeseqCycle}, #{item.saleNum}, #{item.vendeeNum}, #{item.pubTime}, + #{item.file}, #{item.resPubTime}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_trade_notice + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/TradeSeqMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeSeqMapper.xml new file mode 100644 index 0000000..e8e262f --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeSeqMapper.xml @@ -0,0 +1,105 @@ + + + + + + INSERT INTO + task_trade_seq(trade_seq_id, trade_seq_caption, sub_trade_type, trade_seq_type, creat_time, data_time) + VALUES + + (#{item.tradeSeqId}, #{item.tradeSeqCaption}, #{item.subTradetype}, #{item.tradeSeqType}, #{item.creatTime}, #{item.dataTime}) + + + + + + DELETE FROM + task_trade_seq + + + + + + + + + + INSERT INTO + test_task_trade_seq(trade_seq_id, trade_seq_caption, sub_trade_type, trade_seq_type, creat_time, data_time) + VALUES + + (#{item.tradeSeqId}, #{item.tradeSeqCaption}, #{item.subTradetype}, #{item.tradeSeqType}, #{item.creatTime}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_trade_seq + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/TradeSettleMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeSettleMapper.xml new file mode 100644 index 0000000..1fd7486 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeSettleMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/TradeStatusMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeStatusMapper.xml new file mode 100644 index 0000000..dd1fb44 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/TradeStatusMapper.xml @@ -0,0 +1,75 @@ + + + + + + INSERT INTO + task_trade_status + (data_id, trade_seq_id, sale_suote_num, sale_result_num, sale_energy, + vendee_confim_num, vendee_num, vendee_energy, direct_result_num, retail_result_num, energy, avg_price, max_price, + min_price, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.saleSuoteNum}, #{item.saleResultNum}, #{item.saleEnergy}, + #{item.vendeeConfimNum}, #{item.vendeeNum}, #{item.vendeeEnergy}, #{item.directResultNum}, #{item.retailResultNum}, #{item.energy}, #{item.avgPrice}, #{item.maxPrice}, + #{item.minPrice}, #{item.dataTime}) + + + + + + DELETE FROM + task_trade_status + + + + + + + + INSERT INTO + test_task_trade_status + (data_id, trade_seq_id, sale_suote_num, sale_result_num, sale_energy, + vendee_confim_num, vendee_num, vendee_energy, direct_result_num, retail_result_num, energy, avg_price, max_price, + min_price, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.saleSuoteNum}, #{item.saleResultNum}, #{item.saleEnergy}, + #{item.vendeeConfimNum}, #{item.vendeeNum}, #{item.vendeeEnergy}, #{item.directResultNum}, #{item.retailResultNum}, #{item.energy}, #{item.avgPrice}, #{item.maxPrice}, + #{item.minPrice}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_trade_status + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/TradingCenterMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/TradingCenterMapper.xml new file mode 100644 index 0000000..80db511 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/TradingCenterMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/gansu/UploadNoticeMapper.xml b/mxdata_v-system/src/main/resources/mybatis/gansu/UploadNoticeMapper.xml new file mode 100644 index 0000000..611b31e --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/gansu/UploadNoticeMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + INSERT INTO upload_notice_notes + + + upload_id, + + + trade_seq_id, + + + trade_seq_name, + + + upload_name, + + + upload_encode_name, + + + upload_path, + + + + + #{uuid}, + + + #{seqId}, + + + #{seqName}, + + + #{fileName}, + + + #{encodeName}, + + + #{visitPath}, + + + + + + + + + + DELETE + FROM upload_notice_notes + WHERE trade_seq_id = #{seqId} + + + + INSERT INTO upload_market_build + + + upload_id, + + + file_title, + + + image_real_name, + + + image_encode_name, + + + image_upload_path, + + + file_real_name, + + + file_encode_name, + + + file_upload_path, + + + + + #{uuid}, + + + #{fileTitle}, + + + #{imageName}, + + + #{imageEncodeName}, + + + #{imageVisitPath}, + + + #{noticeFileName}, + + + #{fileEncodeName}, + + + #{fileVisitPath}, + + + + + + + + DELETE + FROM upload_market_build + WHERE file_title = #{fileTitle} + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/monitor/SysLogininforMapper.xml b/mxdata_v-system/src/main/resources/mybatis/monitor/SysLogininforMapper.xml new file mode 100644 index 0000000..5949efd --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/monitor/SysLogininforMapper.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) + values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) + + + + + + delete from sys_logininfor where info_id in + + #{infoId} + + + + + truncate table sys_logininfor + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/monitor/SysOperLogMapper.xml b/mxdata_v-system/src/main/resources/mybatis/monitor/SysOperLogMapper.xml new file mode 100644 index 0000000..0aad2d9 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/monitor/SysOperLogMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time + from sys_oper_log + + + + insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time) + values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate()) + + + + + + delete from sys_oper_log where oper_id in + + #{operId} + + + + + + + truncate table sys_oper_log + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/mybatis-config.xml b/mxdata_v-system/src/main/resources/mybatis/mybatis-config.xml new file mode 100644 index 0000000..e8b52be --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/mybatis-config.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysConfigMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysConfigMapper.xml new file mode 100644 index 0000000..1c0d2ed --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysConfigMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark + from sys_config + + + + + + + and config_id = #{configId} + + + and config_key = #{configKey} + + + + + + + + + + + + insert into sys_config ( + config_name, + config_key, + config_value, + config_type, + create_by, + remark, + create_time + )values( + #{configName}, + #{configKey}, + #{configValue}, + #{configType}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + update sys_config + + config_name = #{configName}, + config_key = #{configKey}, + config_value = #{configValue}, + config_type = #{configType}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where config_id = #{configId} + + + + delete from sys_config where config_id = #{configId} + + + + delete from sys_config where config_id in + + #{configId} + + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysDeptMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysDeptMapper.xml new file mode 100644 index 0000000..cc025f0 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysDeptMapper.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time + from sys_dept d + + + + + + + + + + + + + + + + + + insert into sys_dept( + dept_id, + parent_id, + dept_name, + ancestors, + order_num, + leader, + phone, + email, + status, + create_by, + create_time + )values( + #{deptId}, + #{parentId}, + #{deptName}, + #{ancestors}, + #{orderNum}, + #{leader}, + #{phone}, + #{email}, + #{status}, + #{createBy}, + sysdate() + ) + + + + update sys_dept + + parent_id = #{parentId}, + dept_name = #{deptName}, + ancestors = #{ancestors}, + order_num = #{orderNum}, + leader = #{leader}, + phone = #{phone}, + email = #{email}, + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where dept_id = #{deptId} + + + + update sys_dept set ancestors = + + when #{item.deptId} then #{item.ancestors} + + where dept_id in + + #{item.deptId} + + + + + update sys_dept + + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where dept_id = #{deptId} + + + + update sys_dept set del_flag = '2' where dept_id = #{deptId} + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysDictDataMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysDictDataMapper.xml new file mode 100644 index 0000000..d215eb0 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysDictDataMapper.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark + from sys_dict_data + + + + + + + + + + + + + + delete from sys_dict_data where dict_code = #{dictCode} + + + + delete from sys_dict_data where dict_code in + + #{dictCode} + + + + + update sys_dict_data + + dict_sort = #{dictSort}, + dict_label = #{dictLabel}, + dict_value = #{dictValue}, + dict_type = #{dictType}, + css_class = #{cssClass}, + list_class = #{listClass}, + is_default = #{isDefault}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_code = #{dictCode} + + + + update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} + + + + insert into sys_dict_data( + dict_sort, + dict_label, + dict_value, + dict_type, + css_class, + list_class, + is_default, + status, + remark, + create_by, + create_time + )values( + #{dictSort}, + #{dictLabel}, + #{dictValue}, + #{dictType}, + #{cssClass}, + #{listClass}, + #{isDefault}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysDictTypeMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysDictTypeMapper.xml new file mode 100644 index 0000000..f8a389e --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysDictTypeMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + select dict_id, dict_name, dict_type, status, create_by, create_time, remark + from sys_dict_type + + + + + + + + + + + + + + delete from sys_dict_type where dict_id = #{dictId} + + + + delete from sys_dict_type where dict_id in + + #{dictId} + + + + + update sys_dict_type + + dict_name = #{dictName}, + dict_type = #{dictType}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_id = #{dictId} + + + + insert into sys_dict_type( + dict_name, + dict_type, + status, + remark, + create_by, + create_time + )values( + #{dictName}, + #{dictType}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysMenuMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysMenuMapper.xml new file mode 100644 index 0000000..ce559b4 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysMenuMapper.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select menu_id, menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, ifnull(perms,'') as perms, icon, create_time + from sys_menu + + + + + + + + + + + + + + + + + + + + + + + + update sys_menu + + menu_name = #{menuName}, + parent_id = #{parentId}, + order_num = #{orderNum}, + path = #{path}, + component = #{component}, + is_frame = #{isFrame}, + menu_type = #{menuType}, + visible = #{visible}, + perms = #{perms}, + icon = #{icon}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where menu_id = #{menuId} + + + + insert into sys_menu( + menu_id, + parent_id, + menu_name, + order_num, + path, + component, + is_frame, + menu_type, + visible, + perms, + icon, + remark, + create_by, + create_time + )values( + #{menuId}, + #{parentId}, + #{menuName}, + #{orderNum}, + #{path}, + #{component}, + #{isFrame}, + #{menuType}, + #{visible}, + #{perms}, + #{icon}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + delete from sys_menu where menu_id = #{menuId} + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysNoticeMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysNoticeMapper.xml new file mode 100644 index 0000000..4485288 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysNoticeMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark + from sys_notice + + + + + + + + insert into sys_notice ( + notice_title, + notice_type, + notice_content, + status, + remark, + create_by, + create_time + )values( + #{noticeTitle}, + #{noticeType}, + #{noticeContent}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + update sys_notice + + notice_title = #{noticeTitle}, + notice_type = #{noticeType}, + notice_content = #{noticeContent}, + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where notice_id = #{noticeId} + + + + delete from sys_notice where notice_id = #{noticeId} + + + + delete from sys_notice where notice_id in + + #{noticeId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysPostMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysPostMapper.xml new file mode 100644 index 0000000..4745eab --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysPostMapper.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark + from sys_post + + + + + + + + + + + + + + + + + + update sys_post + + post_code = #{postCode}, + post_name = #{postName}, + post_sort = #{postSort}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where post_id = #{postId} + + + + insert into sys_post( + post_id, + post_code, + post_name, + post_sort, + status, + remark, + create_by, + create_time + )values( + #{postId}, + #{postCode}, + #{postName}, + #{postSort}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + delete from sys_post where post_id = #{postId} + + + + delete from sys_post where post_id in + + #{postId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysRoleDeptMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysRoleDeptMapper.xml new file mode 100644 index 0000000..3ee9dff --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysRoleDeptMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_role_dept where role_id=#{roleId} + + + + + + delete from sys_role_dept where role_id in + + #{roleId} + + + + + insert into sys_role_dept(role_id, dept_id) values + + (#{item.roleId},#{item.deptId}) + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysRoleMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysRoleMapper.xml new file mode 100644 index 0000000..3517be6 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysRoleMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, + r.status, r.del_flag, r.create_time, r.remark + from sys_role r + left join sys_user_role ur on ur.role_id = r.role_id + left join sys_user u on u.user_id = ur.user_id + left join sys_dept d on u.dept_id = d.dept_id + + + + + + + + + + + + + + + + + + + + insert into sys_role( + role_id, + role_name, + role_key, + role_sort, + data_scope, + status, + remark, + create_by, + create_time + )values( + #{roleId}, + #{roleName}, + #{roleKey}, + #{roleSort}, + #{dataScope}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + update sys_role + + role_name = #{roleName}, + role_key = #{roleKey}, + role_sort = #{roleSort}, + data_scope = #{dataScope}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where role_id = #{roleId} + + + + update sys_user set status = #{status} where user_id = #{userId} + + + + delete from sys_role where role_id = #{roleId} + + + + update sys_role set del_flag = '2' where role_id in + + #{roleId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysRoleMenuMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysRoleMenuMapper.xml new file mode 100644 index 0000000..4330d10 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysRoleMenuMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + delete from sys_role_menu where role_id=#{roleId} + + + + insert into sys_role_menu(role_id, menu_id) values + + (#{item.roleId},#{item.menuId}) + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysUserMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysUserMapper.xml new file mode 100644 index 0000000..1e6f1fa --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysUserMapper.xml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, + d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status, + r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status + from sys_user u + left join sys_dept d on u.dept_id = d.dept_id + left join sys_user_role ur on u.user_id = ur.user_id + left join sys_role r on r.role_id = ur.role_id + + + + + + + + + + + + + + + + insert into sys_user( + user_id, + dept_id, + user_name, + nick_name, + email, + avatar, + phonenumber, + sex, + password, + status, + create_by, + remark, + create_time + )values( + #{userId}, + #{deptId}, + #{userName}, + #{nickName}, + #{email}, + #{avatar}, + #{phonenumber}, + #{sex}, + #{password}, + #{status}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + update sys_user + + dept_id = #{deptId}, + user_name = #{userName}, + nick_name = #{nickName}, + email = #{email}, + phonenumber = #{phonenumber}, + sex = #{sex}, + avatar = #{avatar}, + password = #{password}, + status = #{status}, + login_ip = #{loginIp}, + login_date = #{loginDate}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where user_id = #{userId} + + + + update sys_user set status = #{status} where user_id = #{userId} + + + + update sys_user set avatar = #{avatar} where user_name = #{userName} + + + + update sys_user set password = #{password} where user_name = #{userName} + + + + delete from sys_user where user_id = #{userId} + + + + update sys_user set del_flag = '2' where user_id in + + #{userId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysUserPostMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysUserPostMapper.xml new file mode 100644 index 0000000..1f11413 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysUserPostMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_user_post where user_id=#{userId} + + + + + + delete from sys_user_post where user_id in + + #{userId} + + + + + insert into sys_user_post(user_id, post_id) values + + (#{item.userId},#{item.postId}) + + + + \ No newline at end of file diff --git a/mxdata_v-system/src/main/resources/mybatis/system/SysUserRoleMapper.xml b/mxdata_v-system/src/main/resources/mybatis/system/SysUserRoleMapper.xml new file mode 100644 index 0000000..783e2c5 --- /dev/null +++ b/mxdata_v-system/src/main/resources/mybatis/system/SysUserRoleMapper.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + delete from sys_user_role where user_id=#{userId} + + + + + + delete from sys_user_role where user_id in + + #{userId} + + + + + insert into sys_user_role(user_id, role_id) values + + (#{item.userId},#{item.roleId}) + + + + + delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} + + + + delete from sys_user_role where role_id=#{roleId} and user_id in + + #{userId} + + + \ No newline at end of file diff --git a/mxdata_v-system/src/test/java/com/alonginfo/Tmp.java b/mxdata_v-system/src/test/java/com/alonginfo/Tmp.java new file mode 100644 index 0000000..1ae95d4 --- /dev/null +++ b/mxdata_v-system/src/test/java/com/alonginfo/Tmp.java @@ -0,0 +1,93 @@ +package com.alonginfo; + +import com.alonginfo.project.gansu.domain.BsHggkGzzd; +import com.alonginfo.project.gansu.domain.BsHggkGzzk; +import com.alonginfo.project.gansu.domain.BsHggkLybh; +import com.alonginfo.project.gansu.mapper.BsHggkGzzdMapper; +import com.alonginfo.project.gansu.mapper.BsHggkGzzkMapper; +import com.alonginfo.project.gansu.mapper.BsHggkLybhMapper; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.HashMap; +import java.util.List; +import java.util.stream.Collectors; + +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@RunWith(SpringRunner.class) +public class Tmp { + + @Autowired + private BsHggkGzzdMapper bsHggkGzzdMapper; + + @Autowired + private BsHggkGzzkMapper bsHggkGzzkMapper; + + @Autowired + private BsHggkLybhMapper bsHggkLybhMapper; + + @Test + public void selAll1() { + List bsHggkGzzds = bsHggkGzzdMapper.selAll(); + System.out.println("bsHggkGzzds = " + bsHggkGzzds); + + List x1; + List y1; + List y2; + + x1 = bsHggkGzzds.stream().map(BsHggkGzzd::getDataX).collect(Collectors.toList()); + y1 = bsHggkGzzds.stream().map(BsHggkGzzd::getDataY1).collect(Collectors.toList()); + y2 = bsHggkGzzds.stream().map(BsHggkGzzd::getDataY2).collect(Collectors.toList()); + + HashMap> map = new HashMap<>(); + map.put("xAxis", x1); + map.put("yAxis1", y1); + map.put("yAxis2", y2); + + System.out.println(); + System.out.println("map = " + map); + } + + + @Test + public void selAll2() { + List bsHggkGzzks = bsHggkGzzkMapper.selAll(); + System.out.println("bsHggkGzzks = " + bsHggkGzzks); + + List x1; + List y1; + + x1 = bsHggkGzzks.stream().map(BsHggkGzzk::getDataX).collect(Collectors.toList()); + y1 = bsHggkGzzks.stream().map(BsHggkGzzk::getDataY).collect(Collectors.toList()); + + HashMap> map = new HashMap<>(); + map.put("xAxis", x1); + map.put("yAxis", y1); + + System.out.println(); + System.out.println("map = " + map); + + } + + @Test + public void selAll3() { + List bsHggkLybhs = bsHggkLybhMapper.selAll(); + System.out.println("bsHggkLybhs = " + bsHggkLybhs); + + List x1; + List y1; + + x1 = bsHggkLybhs.stream().map(BsHggkLybh::getDataX).collect(Collectors.toList()); + y1 = bsHggkLybhs.stream().map(BsHggkLybh::getDataY).collect(Collectors.toList()); + + HashMap> map = new HashMap<>(); + map.put("xAxis", x1); + map.put("yAxis", y1); + + System.out.println(); + System.out.println("map = " + map); + } +} diff --git a/mxdata_v-system/target/classes/application-dev.yml b/mxdata_v-system/target/classes/application-dev.yml new file mode 100644 index 0000000..bd8c032 --- /dev/null +++ b/mxdata_v-system/target/classes/application-dev.yml @@ -0,0 +1,145 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 16002 + servlet: + # 应用的访问路径 + context-path: / + undertow: + io-threads: 16 + worker-threads: 256 + buffer-size: 1024 + buffers-per-region: 1024 + direct-buffers: true + +# 项目相关配置 +mxDataV: + # 名称 + name: mxDataV + # 版本 + version: 1.0.0 + # 版权年份 + copyrightYear: 2020 + # 实例演示开关 + demoEnabled: true + # 文件路径 示例( Windows配置D:/mx/uploadPath,Linux配置 /home/mx/uploadPath) + #profile: D:\bigScreen\gansu\mx +# profile: /Users/mingyanglee/Desktop/Lee/mxData-java/G-GanSu2/uploadPath + profile: /Users/sunkexin/uploadPath + # 获取ip地址开关 + addressEnabled: true + +# redis 配置 +spring: + #mysql + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + # 主库数据源 + master: +# url: jdbc:mysql://47.97.193.17:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 +# username: root +# password: PQkqqog5hz+fYrheMkxJNgc3L3t/Q7DdRp2o5O4OLhYq26mPNedGWUaMwT30Gj444+afyN6/9V1J/xAYsm7B0w== + url: jdbc:mysql://39.96.27.4:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 + username: root +# password: HzLQvhTlxR6dKyq1MC5a5YJiJ2fuyXGb8dVKkVjNTSSv+9PKELqXUaHQcIij/BC4joI59qtFsyFozSYjzkV3wg== + password: 2SqD+5iNuRR/af7/5i7G1Q== +# url: jdbc:mysql://127.0.0.1:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 +# username: root +# password: bNVOqb7WKLX5Bjnw+LMv92taj25KOxDimXxILPQjw42wgv+1lHzOH8kr97xDwWdhpY67QuYCS7sWN4W46YbkFA== +# password: DrudQ3JPbVy3qiZ1VML3DSS9m0dmYFfu8jIOJ5xofJeoPGc/wUNpPwrcxjLFi/8tk6EEBoPxu4MzpvBPsAyDkQ== + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + enabled: false + url: + username: + password: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: false + statViewServlet: + enabled: false + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: admin + login-password: admin + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true +# filters: config +# connection-properties: config.decrypt=false + logging: + pattern: + console: "%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr([%15.15t]){cyan} %clr(%X{__traceId}){magenta} %clr(%-40.40logger{39}){blue} %clr(:) %m%n" + level: + com.alonginfo.project: debug + #redis + redis: + # 地址 + host: 127.0.0.1 + #host: 39.96.27.4 + # 端口,默认为6379 + port: 6379 + # 密码 + password: DHmE1Yr2YfmnOr01pVzzWw== + # 连接超时时间 + timeout: 10s + database: 0 + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +#对接交易平台环境标识 +env: + key: dev + +#甘肃电力交易平台相关配置 +sgcc: + uploadPath: D:/upload/ + videoPath: D:/video/ + publicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeCzY9bdSYp/Ju6S8MROkQaCeuvj2OYSMCGF6B+jmNKIM2W/n7nAUJyUet7Owsg8y1YZIxryHUoxABJYiZADb7mqNhirVzPL8uBvH9pRX0VP/AstTKVcjdWNXTtGZJozfEJT9xdNt1LSVyBWRL+3eQZVdzGqvUzmi35CGdDiBYGwIDAQAB + #信息披露服务地址 + informationAddress: http://39.96.27.4:16016/px-settlement-infpubgrid-lz +# informationAddress: http://localhost:16016/px-settlement-infpubgrid-lz + +#交易公告上传路径 +notice: + filePath: E:/notice/ +market: + filePath: E:/notice/market/ \ No newline at end of file diff --git a/mxdata_v-system/target/classes/application-prd.yml b/mxdata_v-system/target/classes/application-prd.yml new file mode 100644 index 0000000..3c109f5 --- /dev/null +++ b/mxdata_v-system/target/classes/application-prd.yml @@ -0,0 +1,137 @@ +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 16002 + servlet: + # 应用的访问路径 + context-path: / + undertow: + io-threads: 16 + worker-threads: 256 + buffer-size: 1024 + buffers-per-region: 1024 + direct-buffers: true + + +# 项目相关配置 +mxDataV: + # 名称 + name: mxDataV + # 版本 + version: 1.0.0 + # 版权年份 + copyrightYear: 2020 + # 实例演示开关 + demoEnabled: true + # 文件路径 示例( Windows配置D:/mx/uploadPath,Linux配置 /home/mx/uploadPath) + #/Users/mingyanglee/logs/mx/uploadPath + # profile: /home/projects/chongqing/mx/uploadPath/upload/202112 + profile: /home/mxdatav_gs/uploadPath/ + # 获取ip地址开关 + addressEnabled: true + +# redis 配置 +spring: + #Mysql + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + # 主库数据源 + master: + url: jdbc:mysql://21.76.128.3:3306/mx-datav-gansu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 + username: root + password: EK+f7WE15vc4yQzyJf974FlDbL6EBxbeGkDo4wLjwhB6PWDKtPEQI0ulbnWknKe+wzoFWbGjF0Mwp533fWqWUw== + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + enabled: false + url: + username: + password: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: + login-password: + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + filters: config + connection-properties: config.decrypt=true + logging: + pattern: + console: "%d{yyyy-MM-dd HH:mm:ss.SSS} %clr(%5p) %clr([%15.15t]){cyan} %clr(%X{__traceId}){magenta} %clr(%-40.40logger{39}){blue} %clr(:) %m%n" + level: + com.alonginfo.project: debug + + redis: + # 地址 + # host: 39.96.27.4 + host: 21.76.128.4 + # 端口,默认为6379 + port: 6379 + # 密码 + #password: zGSPX@7837 + password: JxDYpu0EO6w+xfFtzGeUPA== + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +#对接交易平台环境标识 +env: + key: prd + +#甘肃电力交易平台相关配置 +sgcc: + uploadPath: /home/along/ + videoPath: /home/video/ + publicKey: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeCzY9bdSYp/Ju6S8MROkQaCeuvj2OYSMCGF6B+jmNKIM2W/n7nAUJyUet7Owsg8y1YZIxryHUoxABJYiZADb7mqNhirVzPL8uBvH9pRX0VP/AstTKVcjdWNXTtGZJozfEJT9xdNt1LSVyBWRL+3eQZVdzGqvUzmi35CGdDiBYGwIDAQAB + #信息披露服务地址 + informationAddress: http://25.215.196.215/px-settlement-infpubgrid-lz + +#交易公告上传路径 +notice: + filePath: /home/mxdatav_gs/notice/ +market: + filePath: /home/mxdatav_gs/notice/market/ \ No newline at end of file diff --git a/mxdata_v-system/target/classes/application.yml b/mxdata_v-system/target/classes/application.yml new file mode 100644 index 0000000..fd84e3e --- /dev/null +++ b/mxdata_v-system/target/classes/application.yml @@ -0,0 +1,60 @@ +# Spring配置 +spring: + # 资源信息 + messages: + # 国际化资源文件路径 + basename: i18n/messages + profiles: + active: dev + # 文件上传 + servlet: + multipart: + # 单个文件大小 + max-file-size: 10MB + # 设置总上传的文件大小 + max-request-size: 20MB + # 服务模块 + devtools: + restart: + # 热部署开关 + enabled: false + +# token配置 +token: + # 令牌自定义标识 + header: Authorization + # 令牌秘钥 + secret: abcdefghijklmnopqrstuvwxyz + # 令牌有效期(默认30分钟) + expireTime: 30 + +# MyBatis配置 +mybatis: + # 搜索指定包别名 + typeAliasesPackage: com.alonginfo.project.**.domain + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapperLocations: classpath*:mybatis/**/*Mapper.xml + # 加载全局的配置文件 + configLocation: classpath:mybatis/mybatis-config.xml + +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# 防止XSS攻击 +xss: + # 过滤开关 + enabled: true + # 排除链接(多个用逗号分隔) + excludes: /system/notice/* + # 匹配链接 + urlPatterns: /system/*,/monitor/*,/tool/* + +# 日志配置 +logging: + level: + com.alongifo: debug + org.springframework: warn \ No newline at end of file diff --git a/mxdata_v-system/target/classes/banner.txt b/mxdata_v-system/target/classes/banner.txt new file mode 100644 index 0000000..fa1f88d --- /dev/null +++ b/mxdata_v-system/target/classes/banner.txt @@ -0,0 +1,9 @@ +Application Version: ${mxDataV.version} +Spring Boot Version: ${spring-boot.version} + __ ____ __ _____ _ __ __ + | \/ \ \ / / | __ \ | | \ \ / / + | \ / |\ V /_____| | | | __ _| |_ __ \ \ / / + | |\/| | > <______| | | |/ _` | __/ _` \ \/ / + | | | |/ . \ | |__| | (_| | || (_| |\ / + |_| |_/_/ \_\ |_____/ \__,_|\__\__,_| \/ + diff --git a/mxdata_v-system/target/classes/com/alonginfo/MxApplication.class b/mxdata_v-system/target/classes/com/alonginfo/MxApplication.class new file mode 100644 index 0000000..6bf8f81 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/MxApplication.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/MxServletInitializer.class b/mxdata_v-system/target/classes/com/alonginfo/MxServletInitializer.class new file mode 100644 index 0000000..2a6e330 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/MxServletInitializer.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/DataScopeAspect.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/DataScopeAspect.class new file mode 100644 index 0000000..9ef4ec5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/DataScopeAspect.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/DataSourceAspect.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/DataSourceAspect.class new file mode 100644 index 0000000..5a9f833 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/DataSourceAspect.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/LogAspect.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/LogAspect.class new file mode 100644 index 0000000..f30b619 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/LogAspect.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/DataScope.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/DataScope.class new file mode 100644 index 0000000..779369d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/DataScope.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/DataSource.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/DataSource.class new file mode 100644 index 0000000..0e34e3e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/DataSource.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel$ColumnType.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel$ColumnType.class new file mode 100644 index 0000000..a5c285e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel$ColumnType.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel$Type.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel$Type.class new file mode 100644 index 0000000..d4ee773 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel$Type.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel.class new file mode 100644 index 0000000..4928211 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excel.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excels.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excels.class new file mode 100644 index 0000000..91acb50 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Excels.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Log.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Log.class new file mode 100644 index 0000000..45016b0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/annotation/Log.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/BusinessStatus.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/BusinessStatus.class new file mode 100644 index 0000000..280d0c3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/BusinessStatus.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/BusinessType.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/BusinessType.class new file mode 100644 index 0000000..4e34b14 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/BusinessType.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/DataSourceType.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/DataSourceType.class new file mode 100644 index 0000000..c13f308 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/DataSourceType.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/OperatorType.class b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/OperatorType.class new file mode 100644 index 0000000..2cb8a82 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/aspectj/lang/enums/OperatorType.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/ApplicationConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ApplicationConfig.class new file mode 100644 index 0000000..baf2c3e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ApplicationConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/DruidConfig$1.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/DruidConfig$1.class new file mode 100644 index 0000000..9066cb3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/DruidConfig$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/DruidConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/DruidConfig.class new file mode 100644 index 0000000..bdb4069 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/DruidConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/FastJson2JsonRedisSerializer.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/FastJson2JsonRedisSerializer.class new file mode 100644 index 0000000..48289ed Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/FastJson2JsonRedisSerializer.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/FilterConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/FilterConfig.class new file mode 100644 index 0000000..f556ec1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/FilterConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/MxConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/MxConfig.class new file mode 100644 index 0000000..0d4ebfe Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/MxConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/MyBatisConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/MyBatisConfig.class new file mode 100644 index 0000000..883cc92 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/MyBatisConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/RedisConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/RedisConfig.class new file mode 100644 index 0000000..13cf134 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/RedisConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/ResourcesConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ResourcesConfig.class new file mode 100644 index 0000000..a7cf06a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ResourcesConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/SecurityConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/SecurityConfig.class new file mode 100644 index 0000000..423f62b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/SecurityConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/ServerConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ServerConfig.class new file mode 100644 index 0000000..aa94d80 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ServerConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/SwaggerConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/SwaggerConfig.class new file mode 100644 index 0000000..a5e7a31 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/SwaggerConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/ThreadPoolConfig$1.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ThreadPoolConfig$1.class new file mode 100644 index 0000000..414ea58 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ThreadPoolConfig$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/ThreadPoolConfig.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ThreadPoolConfig.class new file mode 100644 index 0000000..c3941d0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/ThreadPoolConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/config/properties/DruidProperties.class b/mxdata_v-system/target/classes/com/alonginfo/framework/config/properties/DruidProperties.class new file mode 100644 index 0000000..d691a05 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/config/properties/DruidProperties.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/datasource/DynamicDataSource.class b/mxdata_v-system/target/classes/com/alonginfo/framework/datasource/DynamicDataSource.class new file mode 100644 index 0000000..7a2b0c8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/datasource/DynamicDataSource.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/datasource/DynamicDataSourceContextHolder.class b/mxdata_v-system/target/classes/com/alonginfo/framework/datasource/DynamicDataSourceContextHolder.class new file mode 100644 index 0000000..29fc856 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/datasource/DynamicDataSourceContextHolder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/AjaxResult.class b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/AjaxResult.class new file mode 100644 index 0000000..cc41dde Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/AjaxResult.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/CacheConstants.class b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/CacheConstants.class new file mode 100644 index 0000000..ca8b9ef Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/CacheConstants.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/RepeatSubmitInterceptor.class b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/RepeatSubmitInterceptor.class new file mode 100644 index 0000000..3b2a00d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/RepeatSubmitInterceptor.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/SecurityProperties.class b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/SecurityProperties.class new file mode 100644 index 0000000..b996d73 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/SecurityProperties.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/SignAuthFilter.class b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/SignAuthFilter.class new file mode 100644 index 0000000..d4fcd05 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/SignAuthFilter.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/annotation/RepeatSubmit.class b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/annotation/RepeatSubmit.class new file mode 100644 index 0000000..7e4273f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/annotation/RepeatSubmit.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/impl/SameUrlDataInterceptor.class b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/impl/SameUrlDataInterceptor.class new file mode 100644 index 0000000..6817f35 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/interceptor/impl/SameUrlDataInterceptor.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/manager/AsyncManager.class b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/AsyncManager.class new file mode 100644 index 0000000..bb2af99 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/AsyncManager.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/manager/ShutdownManager.class b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/ShutdownManager.class new file mode 100644 index 0000000..8d92102 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/ShutdownManager.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory$1.class b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory$1.class new file mode 100644 index 0000000..7b619bd Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory$2.class b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory$2.class new file mode 100644 index 0000000..267a52e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory.class b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory.class new file mode 100644 index 0000000..8fb3116 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/manager/factory/AsyncFactory.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/redis/RedisCache.class b/mxdata_v-system/target/classes/com/alonginfo/framework/redis/RedisCache.class new file mode 100644 index 0000000..fc7de01 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/redis/RedisCache.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/LoginUser.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/LoginUser.class new file mode 100644 index 0000000..4558b5b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/LoginUser.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/filter/JwtAuthenticationTokenFilter.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/filter/JwtAuthenticationTokenFilter.class new file mode 100644 index 0000000..e239d52 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/filter/JwtAuthenticationTokenFilter.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/handle/AuthenticationEntryPointImpl.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/handle/AuthenticationEntryPointImpl.class new file mode 100644 index 0000000..05108e1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/handle/AuthenticationEntryPointImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/handle/LogoutSuccessHandlerImpl.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/handle/LogoutSuccessHandlerImpl.class new file mode 100644 index 0000000..a1e6e93 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/handle/LogoutSuccessHandlerImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/PermissionService.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/PermissionService.class new file mode 100644 index 0000000..db152c8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/PermissionService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/SysLoginService.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/SysLoginService.class new file mode 100644 index 0000000..08f99bc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/SysLoginService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/SysPermissionService.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/SysPermissionService.class new file mode 100644 index 0000000..8294017 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/SysPermissionService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/TokenService.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/TokenService.class new file mode 100644 index 0000000..3ac3e32 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/TokenService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/UserDetailsServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/UserDetailsServiceImpl.class new file mode 100644 index 0000000..0ca3bd9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/security/service/UserDetailsServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/controller/BaseController$1.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/controller/BaseController$1.class new file mode 100644 index 0000000..3e01a8b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/controller/BaseController$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/controller/BaseController.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/controller/BaseController.class new file mode 100644 index 0000000..c9c8fd9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/controller/BaseController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/AjaxResult.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/AjaxResult.class new file mode 100644 index 0000000..2ca44fb Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/AjaxResult.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/BaseEntity.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/BaseEntity.class new file mode 100644 index 0000000..9630bd4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/BaseEntity.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/Server.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/Server.class new file mode 100644 index 0000000..6030fc6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/Server.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/TreeSelect.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/TreeSelect.class new file mode 100644 index 0000000..d3920eb Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/TreeSelect.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Cpu.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Cpu.class new file mode 100644 index 0000000..ea5806f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Cpu.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Jvm.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Jvm.class new file mode 100644 index 0000000..5c9ed12 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Jvm.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Mem.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Mem.class new file mode 100644 index 0000000..79bb004 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Mem.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Sys.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Sys.class new file mode 100644 index 0000000..55a022f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/Sys.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/SysFile.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/SysFile.class new file mode 100644 index 0000000..dd7c709 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/domain/server/SysFile.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/exception/GlobalExceptionHandler.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/exception/GlobalExceptionHandler.class new file mode 100644 index 0000000..afd8159 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/exception/GlobalExceptionHandler.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/PageDomain.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/PageDomain.class new file mode 100644 index 0000000..50295e4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/PageDomain.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/TableDataInfo.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/TableDataInfo.class new file mode 100644 index 0000000..543952c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/TableDataInfo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/TableSupport.class b/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/TableSupport.class new file mode 100644 index 0000000..7cf9881 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/framework/web/page/TableSupport.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxBusinessDataController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxBusinessDataController.class new file mode 100644 index 0000000..83292a2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxBusinessDataController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxComponentsController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxComponentsController.class new file mode 100644 index 0000000..f2acce2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxComponentsController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxDataSetController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxDataSetController.class new file mode 100644 index 0000000..dfcbc88 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxDataSetController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxDatabaseController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxDatabaseController.class new file mode 100644 index 0000000..06fc136 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxDatabaseController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxGroupSettingController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxGroupSettingController.class new file mode 100644 index 0000000..28ff3fb Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxGroupSettingController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxIntroduceController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxIntroduceController.class new file mode 100644 index 0000000..50f3501 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxIntroduceController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxPageGroupController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxPageGroupController.class new file mode 100644 index 0000000..f1a8e0e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxPageGroupController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxQuartzController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxQuartzController.class new file mode 100644 index 0000000..c26188f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxQuartzController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxRedisController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxRedisController.class new file mode 100644 index 0000000..35552aa Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxRedisController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxShowDataSetController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxShowDataSetController.class new file mode 100644 index 0000000..bb5c24e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/MxShowDataSetController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/WebSocketController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/WebSocketController.class new file mode 100644 index 0000000..27dee05 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/WebSocketController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/YwMonthTransactionController.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/YwMonthTransactionController.class new file mode 100644 index 0000000..408068d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/controller/YwMonthTransactionController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/DataSetMenu.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/DataSetMenu.class new file mode 100644 index 0000000..1e026ab Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/DataSetMenu.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxComponents.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxComponents.class new file mode 100644 index 0000000..1a6adf4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxComponents.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxComponentsType.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxComponentsType.class new file mode 100644 index 0000000..6742e64 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxComponentsType.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataGroup.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataGroup.class new file mode 100644 index 0000000..c5f01d7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataGroup.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataInfo.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataInfo.class new file mode 100644 index 0000000..0765e28 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataInfo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataSet.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataSet.class new file mode 100644 index 0000000..95fb9f3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataSet.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataSetKey.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataSetKey.class new file mode 100644 index 0000000..0e748ea Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDataSetKey.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDatabase.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDatabase.class new file mode 100644 index 0000000..07e873f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxDatabase.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxGroupSetting.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxGroupSetting.class new file mode 100644 index 0000000..a475775 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxGroupSetting.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxPageGroup.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxPageGroup.class new file mode 100644 index 0000000..7d3515e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxPageGroup.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxTableColumn.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxTableColumn.class new file mode 100644 index 0000000..15cd88b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxTableColumn.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxTableInfo.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxTableInfo.class new file mode 100644 index 0000000..8497efe Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/domain/MxTableInfo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxBusinessDataMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxBusinessDataMapper.class new file mode 100644 index 0000000..2304eb9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxBusinessDataMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxComponentsMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxComponentsMapper.class new file mode 100644 index 0000000..e735a85 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxComponentsMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxDataSetMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxDataSetMapper.class new file mode 100644 index 0000000..ac10a1c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxDataSetMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxDatabaseMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxDatabaseMapper.class new file mode 100644 index 0000000..90ca037 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxDatabaseMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxGroupSettingMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxGroupSettingMapper.class new file mode 100644 index 0000000..208ee17 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxGroupSettingMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxIntroduceMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxIntroduceMapper.class new file mode 100644 index 0000000..b3ec754 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxIntroduceMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxPageGroupMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxPageGroupMapper.class new file mode 100644 index 0000000..cb20e5b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxPageGroupMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxQuartzMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxQuartzMapper.class new file mode 100644 index 0000000..70125a0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/MxQuartzMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/YwMonthTransactionMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/YwMonthTransactionMapper.class new file mode 100644 index 0000000..e6f514b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/mapper/YwMonthTransactionMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxBusinessDataService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxBusinessDataService.class new file mode 100644 index 0000000..d927727 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxBusinessDataService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxComponentsService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxComponentsService.class new file mode 100644 index 0000000..e1d5bd4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxComponentsService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxDataSetService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxDataSetService.class new file mode 100644 index 0000000..2326b23 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxDataSetService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxDatabaseService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxDatabaseService.class new file mode 100644 index 0000000..a68e888 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxDatabaseService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxGroupSettingService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxGroupSettingService.class new file mode 100644 index 0000000..b7e46ed Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxGroupSettingService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxIntroduceService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxIntroduceService.class new file mode 100644 index 0000000..e0d1194 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxIntroduceService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxPageGroupService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxPageGroupService.class new file mode 100644 index 0000000..dfa311d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxPageGroupService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxQuartzService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxQuartzService.class new file mode 100644 index 0000000..e994ab8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxQuartzService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxShowDataSetService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxShowDataSetService.class new file mode 100644 index 0000000..3f9260a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/IMxShowDataSetService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/YwMonthTransactionService.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/YwMonthTransactionService.class new file mode 100644 index 0000000..6a7f699 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/YwMonthTransactionService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxBusinessDataServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxBusinessDataServiceImpl.class new file mode 100644 index 0000000..23f7272 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxBusinessDataServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxComponentsServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxComponentsServiceImpl.class new file mode 100644 index 0000000..d9086d2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxComponentsServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxDataSetServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxDataSetServiceImpl.class new file mode 100644 index 0000000..e6ea563 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxDataSetServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxDatabaseServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxDatabaseServiceImpl.class new file mode 100644 index 0000000..6967e40 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxDatabaseServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxGroupSettingServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxGroupSettingServiceImpl.class new file mode 100644 index 0000000..53dbc35 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxGroupSettingServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxIntroduceServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxIntroduceServiceImpl.class new file mode 100644 index 0000000..ff03825 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxIntroduceServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxPageGroupServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxPageGroupServiceImpl.class new file mode 100644 index 0000000..a69be30 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxPageGroupServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxQuartzServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxQuartzServiceImpl.class new file mode 100644 index 0000000..cfe0031 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxQuartzServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxShowDataSetImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxShowDataSetImpl.class new file mode 100644 index 0000000..fddfbd0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/MxShowDataSetImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/YwMonthTransactionServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/YwMonthTransactionServiceImpl.class new file mode 100644 index 0000000..1470625 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/business/service/impl/YwMonthTransactionServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/common/CaptchaController.class b/mxdata_v-system/target/classes/com/alonginfo/project/common/CaptchaController.class new file mode 100644 index 0000000..66689fa Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/common/CaptchaController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/common/CommonController.class b/mxdata_v-system/target/classes/com/alonginfo/project/common/CommonController.class new file mode 100644 index 0000000..ac3bbef Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/common/CommonController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/MxPagesController.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/MxPagesController.class new file mode 100644 index 0000000..762aa65 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/MxPagesController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/MxProjectController.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/MxProjectController.class new file mode 100644 index 0000000..3c6f27c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/MxProjectController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/ReleaseDataController.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/ReleaseDataController.class new file mode 100644 index 0000000..6699bce Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/ReleaseDataController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/ThemeManagerController.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/ThemeManagerController.class new file mode 100644 index 0000000..3fa1e43 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/controller/ThemeManagerController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/MxPages.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/MxPages.class new file mode 100644 index 0000000..c0db909 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/MxPages.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/MxProject.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/MxProject.class new file mode 100644 index 0000000..747661d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/MxProject.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/ThemeManager.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/ThemeManager.class new file mode 100644 index 0000000..33feb3e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/domain/ThemeManager.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/MxPagesMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/MxPagesMapper.class new file mode 100644 index 0000000..6b1ce1c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/MxPagesMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/MxProjectMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/MxProjectMapper.class new file mode 100644 index 0000000..d5f257d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/MxProjectMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/ThemeManagerMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/ThemeManagerMapper.class new file mode 100644 index 0000000..58d52e4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/mapper/ThemeManagerMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IMxPagesService.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IMxPagesService.class new file mode 100644 index 0000000..a93b784 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IMxPagesService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IMxProjectService.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IMxProjectService.class new file mode 100644 index 0000000..39820a2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IMxProjectService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IThemeManagerService.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IThemeManagerService.class new file mode 100644 index 0000000..fce7dc6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/IThemeManagerService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/MxPagesServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/MxPagesServiceImpl.class new file mode 100644 index 0000000..74238dd Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/MxPagesServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/MxProjectServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/MxProjectServiceImpl.class new file mode 100644 index 0000000..11c7278 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/MxProjectServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/ThemeManagerServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/ThemeManagerServiceImpl.class new file mode 100644 index 0000000..39231e3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/engine/service/impl/ThemeManagerServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$1.class new file mode 100644 index 0000000..e87567a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$10.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$10.class new file mode 100644 index 0000000..12e0b82 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$10.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$11.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$11.class new file mode 100644 index 0000000..dbd9f5c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$11.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$12.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$12.class new file mode 100644 index 0000000..cef9d0f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$12.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$13.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$13.class new file mode 100644 index 0000000..858030f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$13.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$14.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$14.class new file mode 100644 index 0000000..b5fcb74 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$14.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$15.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$15.class new file mode 100644 index 0000000..1082012 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$15.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$16.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$16.class new file mode 100644 index 0000000..d8b6e90 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$16.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$17.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$17.class new file mode 100644 index 0000000..63e485c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$17.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$18.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$18.class new file mode 100644 index 0000000..e8f49fd Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$18.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$19.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$19.class new file mode 100644 index 0000000..6eafe0c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$19.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$2.class new file mode 100644 index 0000000..5a0b524 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$20.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$20.class new file mode 100644 index 0000000..b16b9a6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$20.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$21.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$21.class new file mode 100644 index 0000000..f8d71d2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$21.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$22.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$22.class new file mode 100644 index 0000000..185d396 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$22.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$23.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$23.class new file mode 100644 index 0000000..ead2b0a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$23.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$24.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$24.class new file mode 100644 index 0000000..42451b8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$24.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$25.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$25.class new file mode 100644 index 0000000..2f225b8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$25.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$26.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$26.class new file mode 100644 index 0000000..8092866 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$26.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$27.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$27.class new file mode 100644 index 0000000..8b43877 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$27.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$28.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$28.class new file mode 100644 index 0000000..f632923 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$28.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$29.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$29.class new file mode 100644 index 0000000..2830a11 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$29.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$3.class new file mode 100644 index 0000000..df4f957 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$30.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$30.class new file mode 100644 index 0000000..66f5a44 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$30.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$31.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$31.class new file mode 100644 index 0000000..0e5b84f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$31.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$32.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$32.class new file mode 100644 index 0000000..474d22b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$32.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$33.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$33.class new file mode 100644 index 0000000..79f0fc0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$33.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$34.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$34.class new file mode 100644 index 0000000..074f9c5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$34.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$4.class new file mode 100644 index 0000000..9c68d51 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$5.class new file mode 100644 index 0000000..70a73ac Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$6.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$6.class new file mode 100644 index 0000000..0e2704e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$6.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$7.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$7.class new file mode 100644 index 0000000..5cbbde5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$7.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$8.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$8.class new file mode 100644 index 0000000..65879f8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$8.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$9.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$9.class new file mode 100644 index 0000000..9ca1faf Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController$9.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController.class new file mode 100644 index 0000000..e6b31d1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/DynamicDataPushController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/Heguigk/HggkController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/Heguigk/HggkController.class new file mode 100644 index 0000000..b6c3972 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/Heguigk/HggkController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/bilateralconsult/BilateralConsultController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/bilateralconsult/BilateralConsultController.class new file mode 100644 index 0000000..f8654d9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/bilateralconsult/BilateralConsultController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/carbon/CarbonMonitorController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/carbon/CarbonMonitorController.class new file mode 100644 index 0000000..43ebba8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/carbon/CarbonMonitorController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/clearenergy/ClearEnergyAbsorptionController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/clearenergy/ClearEnergyAbsorptionController.class new file mode 100644 index 0000000..6da2667 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/clearenergy/ClearEnergyAbsorptionController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/dayaddthree/DayAddThreeController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/dayaddthree/DayAddThreeController.class new file mode 100644 index 0000000..3345f34 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/dayaddthree/DayAddThreeController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/focuslisting/FocusListingController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/focuslisting/FocusListingController.class new file mode 100644 index 0000000..adde61c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/focuslisting/FocusListingController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/DeliveryController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/DeliveryController.class new file mode 100644 index 0000000..585d46a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/DeliveryController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/GreenConsumerController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/GreenConsumerController.class new file mode 100644 index 0000000..d49cf41 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/GreenConsumerController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/InfoDisclosureController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/InfoDisclosureController.class new file mode 100644 index 0000000..f0876c2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/InfoDisclosureController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TradeInfoController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TradeInfoController.class new file mode 100644 index 0000000..4709b53 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TradeInfoController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TradeMarketInfoController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TradeMarketInfoController.class new file mode 100644 index 0000000..39e0c1a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TradeMarketInfoController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TransactionPowerController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TransactionPowerController.class new file mode 100644 index 0000000..52a3dcd Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/forward/TransactionPowerController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/generation/GenerationRightController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/generation/GenerationRightController.class new file mode 100644 index 0000000..4c6c884 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/generation/GenerationRightController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/green/GreenTradeController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/green/GreenTradeController.class new file mode 100644 index 0000000..9ecec16 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/green/GreenTradeController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/grid/GridController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/grid/GridController.class new file mode 100644 index 0000000..c74b254 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/grid/GridController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/marketbuild/MarketBuildController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/marketbuild/MarketBuildController.class new file mode 100644 index 0000000..e5d0a32 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/marketbuild/MarketBuildController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/marketsurvey/MarketSurveyController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/marketsurvey/MarketSurveyController.class new file mode 100644 index 0000000..e3236ce Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/marketsurvey/MarketSurveyController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/mltermcontract/MediumLongTermContractController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/mltermcontract/MediumLongTermContractController.class new file mode 100644 index 0000000..ee2aa6e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/mltermcontract/MediumLongTermContractController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/newenergy/NewEnergySurveyController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/newenergy/NewEnergySurveyController.class new file mode 100644 index 0000000..9c08491 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/newenergy/NewEnergySurveyController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/provinceinner/ProvinceInnerController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/provinceinner/ProvinceInnerController.class new file mode 100644 index 0000000..8da2bcf Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/provinceinner/ProvinceInnerController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/provincemiddle/ProvinceMiddleController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/provincemiddle/ProvinceMiddleController.class new file mode 100644 index 0000000..a042d90 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/provincemiddle/ProvinceMiddleController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/resources/ResourcesController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/resources/ResourcesController.class new file mode 100644 index 0000000..a587aca Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/resources/ResourcesController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/tradeSettle/TradeSettleController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/tradeSettle/TradeSettleController.class new file mode 100644 index 0000000..c85e2f9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/tradeSettle/TradeSettleController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/tradecenter/TradingCenterController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/tradecenter/TradingCenterController.class new file mode 100644 index 0000000..eae6747 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/tradecenter/TradingCenterController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/uploadnotice/UploadNoticeController.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/uploadnotice/UploadNoticeController.class new file mode 100644 index 0000000..82ad4f7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/controller/uploadnotice/UploadNoticeController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BilateralConsultResultVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BilateralConsultResultVo.class new file mode 100644 index 0000000..470481a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BilateralConsultResultVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkGzzd.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkGzzd.class new file mode 100644 index 0000000..f15c6a8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkGzzd.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkGzzk.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkGzzk.class new file mode 100644 index 0000000..7da5812 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkGzzk.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkLybh.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkLybh.class new file mode 100644 index 0000000..5b95072 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BsHggkLybh.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BuySaleDetail.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BuySaleDetail.class new file mode 100644 index 0000000..d9051a9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/BuySaleDetail.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO$CarbonMapTopContentDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO$CarbonMapTopContentDTOBuilder.class new file mode 100644 index 0000000..794b49d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO$CarbonMapTopContentDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO.class new file mode 100644 index 0000000..fb5e8a4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearAbsorptionAnalysisDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearAbsorptionAnalysisDTO.class new file mode 100644 index 0000000..a4aa06b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearAbsorptionAnalysisDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearInstallTrendDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearInstallTrendDTO.class new file mode 100644 index 0000000..7f199f5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearInstallTrendDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearRationDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearRationDTO.class new file mode 100644 index 0000000..2ebb268 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearRationDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearReduceGainDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearReduceGainDTO.class new file mode 100644 index 0000000..73054da Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ClearReduceGainDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CostAndAvgDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CostAndAvgDTO.class new file mode 100644 index 0000000..f2a512a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CostAndAvgDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO$CountPowerByTypeDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO$CountPowerByTypeDTOBuilder.class new file mode 100644 index 0000000..e392099 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO$CountPowerByTypeDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO.class new file mode 100644 index 0000000..7dac218 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DayAddThreeNotice.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DayAddThreeNotice.class new file mode 100644 index 0000000..1d8cee8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DayAddThreeNotice.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealOrganizeDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealOrganizeDTO.class new file mode 100644 index 0000000..f35e64e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealOrganizeDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealOrganizeVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealOrganizeVo.class new file mode 100644 index 0000000..fb901e0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealOrganizeVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealTrends.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealTrends.class new file mode 100644 index 0000000..4065573 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DealTrends.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DirectDealDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DirectDealDTO.class new file mode 100644 index 0000000..6140116 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DirectDealDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DirectDealPo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DirectDealPo.class new file mode 100644 index 0000000..98d2217 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/DirectDealPo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ElectricAbsorptionDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ElectricAbsorptionDTO.class new file mode 100644 index 0000000..12756e0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ElectricAbsorptionDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ElectricTrendDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ElectricTrendDTO.class new file mode 100644 index 0000000..af45ae8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ElectricTrendDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnergyCensus.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnergyCensus.class new file mode 100644 index 0000000..31f97b3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnergyCensus.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnterpriseChangesVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnterpriseChangesVo.class new file mode 100644 index 0000000..2b3e36a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnterpriseChangesVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnterprisePo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnterprisePo.class new file mode 100644 index 0000000..692038d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EnterprisePo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EveryTypeSubjectDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EveryTypeSubjectDTO.class new file mode 100644 index 0000000..6949d20 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EveryTypeSubjectDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EveryTypeSubjectPo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EveryTypeSubjectPo.class new file mode 100644 index 0000000..263a7ec Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/EveryTypeSubjectPo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenElectricDealVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenElectricDealVo.class new file mode 100644 index 0000000..21ffed1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenElectricDealVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenSyndromeTradeByYearDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenSyndromeTradeByYearDTO.class new file mode 100644 index 0000000..b4b3953 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenSyndromeTradeByYearDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO$GreenTradeInfoDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO$GreenTradeInfoDTOBuilder.class new file mode 100644 index 0000000..718ebc0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO$GreenTradeInfoDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO.class new file mode 100644 index 0000000..320246e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/IndustryEmissionDTO$IndustryEmissionDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/IndustryEmissionDTO$IndustryEmissionDTOBuilder.class new file mode 100644 index 0000000..500e504 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/IndustryEmissionDTO$IndustryEmissionDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/IndustryEmissionDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/IndustryEmissionDTO.class new file mode 100644 index 0000000..b4b45ea Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/IndustryEmissionDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallAndHoursDTO$InstallAndHoursDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallAndHoursDTO$InstallAndHoursDTOBuilder.class new file mode 100644 index 0000000..b30a0c0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallAndHoursDTO$InstallAndHoursDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallAndHoursDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallAndHoursDTO.class new file mode 100644 index 0000000..d2507bf Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallAndHoursDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallCapicatyPowerDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallCapicatyPowerDTO.class new file mode 100644 index 0000000..867b8d7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallCapicatyPowerDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallSituationDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallSituationDTO.class new file mode 100644 index 0000000..9709aba Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallSituationDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureCount.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureCount.class new file mode 100644 index 0000000..7d991c8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureCount.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureDTO.class new file mode 100644 index 0000000..ccd4486 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureTable.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureTable.class new file mode 100644 index 0000000..496452c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/InstallStructureTable.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/JoinEnergyTrendDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/JoinEnergyTrendDTO.class new file mode 100644 index 0000000..9b5571a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/JoinEnergyTrendDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/JoinTradeDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/JoinTradeDTO.class new file mode 100644 index 0000000..442452e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/JoinTradeDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LegalPersonDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LegalPersonDTO.class new file mode 100644 index 0000000..beb6d37 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LegalPersonDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LineCapacityDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LineCapacityDTO.class new file mode 100644 index 0000000..87809d5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LineCapacityDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LineTransportDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LineTransportDTO.class new file mode 100644 index 0000000..31e4d31 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/LineTransportDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ManyDayRealTime.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ManyDayRealTime.class new file mode 100644 index 0000000..7a2bb4a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ManyDayRealTime.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapInfoDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapInfoDTO.class new file mode 100644 index 0000000..788f2f4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapInfoDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapInfoVO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapInfoVO.class new file mode 100644 index 0000000..8db8309 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapInfoVO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTextDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTextDTO.class new file mode 100644 index 0000000..6d0aa9a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTextDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTextVO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTextVO.class new file mode 100644 index 0000000..36a1457 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTextVO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopCanvasDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopCanvasDTO.class new file mode 100644 index 0000000..e541e46 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopCanvasDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopContentDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopContentDTO.class new file mode 100644 index 0000000..8f1a66d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopContentDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopOverviewDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopOverviewDTO.class new file mode 100644 index 0000000..2918984 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MapTopOverviewDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketBuildUploadVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketBuildUploadVo.class new file mode 100644 index 0000000..a917f54 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketBuildUploadVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO$MarketCountExecuteDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO$MarketCountExecuteDTOBuilder.class new file mode 100644 index 0000000..2ed42bf Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO$MarketCountExecuteDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO.class new file mode 100644 index 0000000..dd96086 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OrganizeAndTypeVO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OrganizeAndTypeVO.class new file mode 100644 index 0000000..4b28ad6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OrganizeAndTypeVO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OutProvinceDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OutProvinceDTO.class new file mode 100644 index 0000000..bfed3f4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OutProvinceDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OutsideDeliverDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OutsideDeliverDTO.class new file mode 100644 index 0000000..d682fce Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OutsideDeliverDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OverviewDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OverviewDTO.class new file mode 100644 index 0000000..1b4623d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/OverviewDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiCleanEnergyVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiCleanEnergyVo.class new file mode 100644 index 0000000..e2b6731 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiCleanEnergyVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiDealOrganizeVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiDealOrganizeVo.class new file mode 100644 index 0000000..7fd1852 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiDealOrganizeVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiDealSurveyDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiDealSurveyDTO.class new file mode 100644 index 0000000..2f2bfc4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiDealSurveyDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiPowerPriceTrendDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiPowerPriceTrendDTO.class new file mode 100644 index 0000000..a4a3e29 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiPowerPriceTrendDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiPowerPriceTrendVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiPowerPriceTrendVo.class new file mode 100644 index 0000000..8e70b8d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiPowerPriceTrendVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiSubjectJoinVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiSubjectJoinVo.class new file mode 100644 index 0000000..1e3b73e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PiSubjectJoinVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PowerByYearDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PowerByYearDTO.class new file mode 100644 index 0000000..7a00409 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PowerByYearDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PowerByYearMonthDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PowerByYearMonthDTO.class new file mode 100644 index 0000000..7696dfc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PowerByYearMonthDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PrefectureInstallDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PrefectureInstallDTO.class new file mode 100644 index 0000000..a9250a0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PrefectureInstallDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PriceTrend.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PriceTrend.class new file mode 100644 index 0000000..6a40f9f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PriceTrend.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PriceTrendReplay.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PriceTrendReplay.class new file mode 100644 index 0000000..611b971 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/PriceTrendReplay.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/RegisterTrendVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/RegisterTrendVo.class new file mode 100644 index 0000000..d21d92f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/RegisterTrendVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ResourcesDevelopDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ResourcesDevelopDTO.class new file mode 100644 index 0000000..a97eacf Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ResourcesDevelopDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SaleBuyEnterpriseOrderDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SaleBuyEnterpriseOrderDTO.class new file mode 100644 index 0000000..1cc8043 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SaleBuyEnterpriseOrderDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SgccAddress.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SgccAddress.class new file mode 100644 index 0000000..1c5b3e0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SgccAddress.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ShareHoldingDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ShareHoldingDTO.class new file mode 100644 index 0000000..bba6155 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/ShareHoldingDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/StaffTeamDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/StaffTeamDTO.class new file mode 100644 index 0000000..25386bd Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/StaffTeamDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectInfoDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectInfoDTO.class new file mode 100644 index 0000000..9522f5e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectInfoDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectJoinDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectJoinDTO.class new file mode 100644 index 0000000..c27462e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectJoinDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectRatioPo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectRatioPo.class new file mode 100644 index 0000000..52edc87 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SubjectRatioPo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SupplyTypeDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SupplyTypeDTO.class new file mode 100644 index 0000000..5764407 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/SupplyTypeDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TextBoxVO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TextBoxVO.class new file mode 100644 index 0000000..a491985 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TextBoxVO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeELectricCalendarYearDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeELectricCalendarYearDTO.class new file mode 100644 index 0000000..b027356 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeELectricCalendarYearDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeElectricCurrentYearDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeElectricCurrentYearDTO.class new file mode 100644 index 0000000..0839aeb Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeElectricCurrentYearDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeElectricTypeDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeElectricTypeDTO.class new file mode 100644 index 0000000..d556c0e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeElectricTypeDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeNotice.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeNotice.class new file mode 100644 index 0000000..d7f77ab Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeNotice.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSeq.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSeq.class new file mode 100644 index 0000000..b5b0652 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSeq.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSettleDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSettleDTO.class new file mode 100644 index 0000000..d784e47 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSettleDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSettleMapInfoVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSettleMapInfoVo.class new file mode 100644 index 0000000..031a697 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSettleMapInfoVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSizeDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSizeDTO.class new file mode 100644 index 0000000..5c82f7f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeSizeDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeStatus.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeStatus.class new file mode 100644 index 0000000..77131d1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeStatus.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO$TradeVolumeCurrentDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO$TradeVolumeCurrentDTOBuilder.class new file mode 100644 index 0000000..22b26b8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO$TradeVolumeCurrentDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO.class new file mode 100644 index 0000000..0befb94 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TransactionPowerVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TransactionPowerVo.class new file mode 100644 index 0000000..f432c30 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TransactionPowerVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TransformerInfoVO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TransformerInfoVO.class new file mode 100644 index 0000000..6a20102 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TransformerInfoVO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TypePowerDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TypePowerDTO.class new file mode 100644 index 0000000..ee679a4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TypePowerDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TypePowerVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TypePowerVo.class new file mode 100644 index 0000000..3156310 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/TypePowerVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UploadNoticeVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UploadNoticeVo.class new file mode 100644 index 0000000..5ded463 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UploadNoticeVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO$UseTrendCurrentYearDTOBuilder.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO$UseTrendCurrentYearDTOBuilder.class new file mode 100644 index 0000000..98ca8c3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO$UseTrendCurrentYearDTOBuilder.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO.class new file mode 100644 index 0000000..974b5e6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/common/EchartsCommonDTO.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/common/EchartsCommonDTO.class new file mode 100644 index 0000000..6101dc1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/domain/common/EchartsCommonDTO.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkGzzdMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkGzzdMapper.class new file mode 100644 index 0000000..1237c28 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkGzzdMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkGzzkMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkGzzkMapper.class new file mode 100644 index 0000000..6dd19be Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkGzzkMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkLybhMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkLybhMapper.class new file mode 100644 index 0000000..da095f1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BsHggkLybhMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BuySaleDetailDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BuySaleDetailDao.class new file mode 100644 index 0000000..9ebf3e1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/BuySaleDetailDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/CarbonMonitorMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/CarbonMonitorMapper.class new file mode 100644 index 0000000..3ccd909 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/CarbonMonitorMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ClearEnergyAbsorptionMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ClearEnergyAbsorptionMapper.class new file mode 100644 index 0000000..804ab32 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ClearEnergyAbsorptionMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/DayAddThreeDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/DayAddThreeDao.class new file mode 100644 index 0000000..7167248 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/DayAddThreeDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/EnergyCensusDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/EnergyCensusDao.class new file mode 100644 index 0000000..8381329 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/EnergyCensusDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GenerationRightDataSyncMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GenerationRightDataSyncMapper.class new file mode 100644 index 0000000..c97ac0e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GenerationRightDataSyncMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GenerationRightMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GenerationRightMapper.class new file mode 100644 index 0000000..179861a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GenerationRightMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GreenTradeMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GreenTradeMapper.class new file mode 100644 index 0000000..41ecbde Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GreenTradeMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GridMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GridMapper.class new file mode 100644 index 0000000..fc89c93 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/GridMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketBuildDataSyncMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketBuildDataSyncMapper.class new file mode 100644 index 0000000..116093d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketBuildDataSyncMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketBuildMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketBuildMapper.class new file mode 100644 index 0000000..2822485 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketBuildMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketSurveyDataSyncMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketSurveyDataSyncMapper.class new file mode 100644 index 0000000..e781dc8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketSurveyDataSyncMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketSurveyMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketSurveyMapper.class new file mode 100644 index 0000000..23d8e52 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MarketSurveyMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MediumLongTermContractDataSyncMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MediumLongTermContractDataSyncMapper.class new file mode 100644 index 0000000..05ddf10 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MediumLongTermContractDataSyncMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MediumLongTermContractMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MediumLongTermContractMapper.class new file mode 100644 index 0000000..975eb9c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/MediumLongTermContractMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/NewEnergySurveyDataSyncMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/NewEnergySurveyDataSyncMapper.class new file mode 100644 index 0000000..ca6f5c6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/NewEnergySurveyDataSyncMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/NewEnergySurveyMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/NewEnergySurveyMapper.class new file mode 100644 index 0000000..710f6ef Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/NewEnergySurveyMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/PriceTrendDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/PriceTrendDao.class new file mode 100644 index 0000000..5c8691a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/PriceTrendDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/PriceTrendReplayDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/PriceTrendReplayDao.class new file mode 100644 index 0000000..7be054b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/PriceTrendReplayDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceInnerDataSyncMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceInnerDataSyncMapper.class new file mode 100644 index 0000000..e602fb2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceInnerDataSyncMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceInnerMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceInnerMapper.class new file mode 100644 index 0000000..e84bba7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceInnerMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceMiddleMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceMiddleMapper.class new file mode 100644 index 0000000..750d13e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ProvinceMiddleMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/RealTimeManyDayDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/RealTimeManyDayDao.class new file mode 100644 index 0000000..5951aa2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/RealTimeManyDayDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ResourcesMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ResourcesMapper.class new file mode 100644 index 0000000..4c1515d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/ResourcesMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/SgccAddressDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/SgccAddressDao.class new file mode 100644 index 0000000..71fad50 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/SgccAddressDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeNoticeDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeNoticeDao.class new file mode 100644 index 0000000..7ca3e41 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeNoticeDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeSeqDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeSeqDao.class new file mode 100644 index 0000000..c747e74 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeSeqDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeSettleDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeSettleDao.class new file mode 100644 index 0000000..3fcfd4d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeSettleDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeStatusDao.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeStatusDao.class new file mode 100644 index 0000000..5827d0f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradeStatusDao.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradingCenterMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradingCenterMapper.class new file mode 100644 index 0000000..a07558f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/TradingCenterMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/UploadNoticeMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/UploadNoticeMapper.class new file mode 100644 index 0000000..9469752 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/mapper/UploadNoticeMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/SgccAddressService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/SgccAddressService.class new file mode 100644 index 0000000..390df2c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/SgccAddressService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/bilateralconsult/BilateralConsultService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/bilateralconsult/BilateralConsultService.class new file mode 100644 index 0000000..c38e940 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/bilateralconsult/BilateralConsultService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/carbon/ICarbonMonitorService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/carbon/ICarbonMonitorService.class new file mode 100644 index 0000000..d29b77a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/carbon/ICarbonMonitorService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/clearenergy/IClearEnergyAbsorptionService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/clearenergy/IClearEnergyAbsorptionService.class new file mode 100644 index 0000000..84c5da1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/clearenergy/IClearEnergyAbsorptionService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeService.class new file mode 100644 index 0000000..09845f7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeSyncGet.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeSyncGet.class new file mode 100644 index 0000000..f899d6c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeSyncGet.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/focuslisting/FocusBiddingListingDealCommonService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/focuslisting/FocusBiddingListingDealCommonService.class new file mode 100644 index 0000000..b6e2da6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/focuslisting/FocusBiddingListingDealCommonService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IDeliveryService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IDeliveryService.class new file mode 100644 index 0000000..7560ffc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IDeliveryService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IGreenConsumer.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IGreenConsumer.class new file mode 100644 index 0000000..dfb420f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IGreenConsumer.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IInfoDisclosureService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IInfoDisclosureService.class new file mode 100644 index 0000000..33f6523 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/IInfoDisclosureService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/ITradeInfoService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/ITradeInfoService.class new file mode 100644 index 0000000..83ffd09 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/ITradeInfoService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/ITradeMarketInfoService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/ITradeMarketInfoService.class new file mode 100644 index 0000000..92714c8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/ITradeMarketInfoService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/TransactionPowerService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/TransactionPowerService.class new file mode 100644 index 0000000..86ead7d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/forward/TransactionPowerService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/generation/IGenerationRightService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/generation/IGenerationRightService.class new file mode 100644 index 0000000..79e80b5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/generation/IGenerationRightService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/green/IGreenTradeService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/green/IGreenTradeService.class new file mode 100644 index 0000000..132b97a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/green/IGreenTradeService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/grid/IGridService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/grid/IGridService.class new file mode 100644 index 0000000..0a48abf Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/grid/IGridService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/marketbuild/IMarketBuildService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/marketbuild/IMarketBuildService.class new file mode 100644 index 0000000..09cf2bc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/marketbuild/IMarketBuildService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/marketsurvey/IMarketSurveyService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/marketsurvey/IMarketSurveyService.class new file mode 100644 index 0000000..2f7d4cb Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/marketsurvey/IMarketSurveyService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/mltermcontract/IMediumLongTermContractService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/mltermcontract/IMediumLongTermContractService.class new file mode 100644 index 0000000..df1efa3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/mltermcontract/IMediumLongTermContractService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/newEnergy/INewEnergySurveyService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/newEnergy/INewEnergySurveyService.class new file mode 100644 index 0000000..a99302b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/newEnergy/INewEnergySurveyService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/provinceinner/IProvinceInnerService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/provinceinner/IProvinceInnerService.class new file mode 100644 index 0000000..f97ec87 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/provinceinner/IProvinceInnerService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/provincemiddle/IProvinceMiddleService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/provincemiddle/IProvinceMiddleService.class new file mode 100644 index 0000000..7d5a88b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/provincemiddle/IProvinceMiddleService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/resources/IResourcesService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/resources/IResourcesService.class new file mode 100644 index 0000000..d13412e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/resources/IResourcesService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/tradeSettle/TradeSettleService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/tradeSettle/TradeSettleService.class new file mode 100644 index 0000000..e7090e4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/tradeSettle/TradeSettleService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/tradecenter/ITradingCenterService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/tradecenter/ITradingCenterService.class new file mode 100644 index 0000000..b9f114b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/tradecenter/ITradingCenterService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/uploadnotice/IUploadNoticeService.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/uploadnotice/IUploadNoticeService.class new file mode 100644 index 0000000..b70724a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/service/uploadnotice/IUploadNoticeService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/SgccAddressServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/SgccAddressServiceImpl.class new file mode 100644 index 0000000..93d503a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/SgccAddressServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl$1.class new file mode 100644 index 0000000..9836702 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl.class new file mode 100644 index 0000000..cfb3a4a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/carbon/CarbonMonitorServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/carbon/CarbonMonitorServiceImpl.class new file mode 100644 index 0000000..323d1b0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/carbon/CarbonMonitorServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/clearenergy/ClearEnergyAbsorptionServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/clearenergy/ClearEnergyAbsorptionServiceImpl.class new file mode 100644 index 0000000..e1fb09f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/clearenergy/ClearEnergyAbsorptionServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeDataReturnImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeDataReturnImpl.class new file mode 100644 index 0000000..a4ff898 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeDataReturnImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$1.class new file mode 100644 index 0000000..2e04e70 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$2.class new file mode 100644 index 0000000..57fa5a8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$3.class new file mode 100644 index 0000000..da29e84 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl.class new file mode 100644 index 0000000..9a46743 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl$1.class new file mode 100644 index 0000000..d7bb83b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl$2.class new file mode 100644 index 0000000..c24ecce Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl.class new file mode 100644 index 0000000..2335d97 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$1.class new file mode 100644 index 0000000..e7d466d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$10.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$10.class new file mode 100644 index 0000000..13991b6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$10.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$11.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$11.class new file mode 100644 index 0000000..823a0c9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$11.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$12.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$12.class new file mode 100644 index 0000000..3c1e7a0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$12.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$13.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$13.class new file mode 100644 index 0000000..1dc65c6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$13.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$14.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$14.class new file mode 100644 index 0000000..815694c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$14.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$15.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$15.class new file mode 100644 index 0000000..b1f63d6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$15.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$16.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$16.class new file mode 100644 index 0000000..34befc0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$16.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$17.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$17.class new file mode 100644 index 0000000..848b0de Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$17.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$18.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$18.class new file mode 100644 index 0000000..ccf48a8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$18.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$19.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$19.class new file mode 100644 index 0000000..3ac6fc2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$19.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$2.class new file mode 100644 index 0000000..019ab53 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$20.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$20.class new file mode 100644 index 0000000..b8940fe Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$20.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$21.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$21.class new file mode 100644 index 0000000..e4b1dd4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$21.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$3.class new file mode 100644 index 0000000..ef9c1d0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$4.class new file mode 100644 index 0000000..c54d7c6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$5.class new file mode 100644 index 0000000..f376b64 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$6.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$6.class new file mode 100644 index 0000000..28c0142 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$6.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$7.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$7.class new file mode 100644 index 0000000..c94f422 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$7.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$8.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$8.class new file mode 100644 index 0000000..6ae21d3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$8.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$9.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$9.class new file mode 100644 index 0000000..349224d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl$9.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl.class new file mode 100644 index 0000000..194832b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$1.class new file mode 100644 index 0000000..a776849 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$2.class new file mode 100644 index 0000000..f3fdb23 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$3.class new file mode 100644 index 0000000..1290885 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$4.class new file mode 100644 index 0000000..daa5837 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$5.class new file mode 100644 index 0000000..4a789db Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl.class new file mode 100644 index 0000000..edc58a5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$1.class new file mode 100644 index 0000000..1910cf6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$2.class new file mode 100644 index 0000000..e88c019 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$3.class new file mode 100644 index 0000000..a52f9bb Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$4.class new file mode 100644 index 0000000..e809249 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl.class new file mode 100644 index 0000000..72680bf Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$1.class new file mode 100644 index 0000000..dcb1307 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$2.class new file mode 100644 index 0000000..232972b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$3.class new file mode 100644 index 0000000..c3c3c96 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$4.class new file mode 100644 index 0000000..658a5ea Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$5.class new file mode 100644 index 0000000..c8f3955 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$6.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$6.class new file mode 100644 index 0000000..e367868 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$6.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$7.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$7.class new file mode 100644 index 0000000..3e50558 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$7.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$8.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$8.class new file mode 100644 index 0000000..38e41e1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl$8.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl.class new file mode 100644 index 0000000..26476b9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$1.class new file mode 100644 index 0000000..60a2446 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$2.class new file mode 100644 index 0000000..ae68218 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$3.class new file mode 100644 index 0000000..0a7e690 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$4.class new file mode 100644 index 0000000..fa333aa Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$5.class new file mode 100644 index 0000000..d04583e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$6.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$6.class new file mode 100644 index 0000000..f0c603b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$6.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$7.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$7.class new file mode 100644 index 0000000..3e62067 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$7.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$8.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$8.class new file mode 100644 index 0000000..cc114df Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl$8.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl.class new file mode 100644 index 0000000..3dcf950 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$1.class new file mode 100644 index 0000000..1d2eb9e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$2.class new file mode 100644 index 0000000..9f20fa9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$3.class new file mode 100644 index 0000000..a2878f1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$4.class new file mode 100644 index 0000000..8d751da Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$5.class new file mode 100644 index 0000000..f5ff7ff Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl.class new file mode 100644 index 0000000..40a2cf7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1$1.class new file mode 100644 index 0000000..0004d4c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1$2.class new file mode 100644 index 0000000..1373ed6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1.class new file mode 100644 index 0000000..002d8c2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2$1.class new file mode 100644 index 0000000..cbaf36b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2$2.class new file mode 100644 index 0000000..dd628e8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2.class new file mode 100644 index 0000000..7f9109b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl.class new file mode 100644 index 0000000..6270e32 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/green/GreenTradeServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/green/GreenTradeServiceImpl.class new file mode 100644 index 0000000..0b3dfb4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/green/GreenTradeServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/grid/GridServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/grid/GridServiceImpl.class new file mode 100644 index 0000000..3e7d63c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/grid/GridServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$1.class new file mode 100644 index 0000000..03c82f8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$2.class new file mode 100644 index 0000000..2d6fbcc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$3.class new file mode 100644 index 0000000..2de807b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl.class new file mode 100644 index 0000000..79cc445 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketsurvey/MarketSurveyServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketsurvey/MarketSurveyServiceImpl.class new file mode 100644 index 0000000..45739bc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/marketsurvey/MarketSurveyServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/mltermcontract/MediumLongTermContractServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/mltermcontract/MediumLongTermContractServiceImpl.class new file mode 100644 index 0000000..a8aef9a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/mltermcontract/MediumLongTermContractServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl$1.class new file mode 100644 index 0000000..41f7570 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl$2.class new file mode 100644 index 0000000..f7b1274 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl.class new file mode 100644 index 0000000..b81df08 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1$1.class new file mode 100644 index 0000000..155c496 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1$2.class new file mode 100644 index 0000000..2b400c6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1.class new file mode 100644 index 0000000..2dd347f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl.class new file mode 100644 index 0000000..0cf7279 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provincemiddle/ProvinceMiddleServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provincemiddle/ProvinceMiddleServiceImpl.class new file mode 100644 index 0000000..9b56b15 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/provincemiddle/ProvinceMiddleServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$1.class new file mode 100644 index 0000000..c2da2d2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$2.class new file mode 100644 index 0000000..03227e4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$3.class new file mode 100644 index 0000000..71e903f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$4.class new file mode 100644 index 0000000..ebbfafc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl.class new file mode 100644 index 0000000..4eaf00e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl$1.class new file mode 100644 index 0000000..00195dc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl.class new file mode 100644 index 0000000..9275d57 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradecenter/TradingCenterServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradecenter/TradingCenterServiceImpl.class new file mode 100644 index 0000000..480eaa2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/tradecenter/TradingCenterServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/uploadnotice/UploadNoticeServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/uploadnotice/UploadNoticeServiceImpl.class new file mode 100644 index 0000000..6100aaa Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/serviceimpl/uploadnotice/UploadNoticeServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/BilateralConsultDataSync.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/BilateralConsultDataSync.class new file mode 100644 index 0000000..47f18df Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/BilateralConsultDataSync.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/GenerationRightDataSync.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/GenerationRightDataSync.class new file mode 100644 index 0000000..66d5c52 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/GenerationRightDataSync.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MarketBuildDataSync.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MarketBuildDataSync.class new file mode 100644 index 0000000..5de9c88 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MarketBuildDataSync.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MarketSurveyDataSync.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MarketSurveyDataSync.class new file mode 100644 index 0000000..cbe7ca3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MarketSurveyDataSync.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MediumLongTermContractDataSync.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MediumLongTermContractDataSync.class new file mode 100644 index 0000000..1936e0a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/MediumLongTermContractDataSync.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/NewEnergySurveyDataSync.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/NewEnergySurveyDataSync.class new file mode 100644 index 0000000..c7c03ce Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/NewEnergySurveyDataSync.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/ProvinceInnerDataSync.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/ProvinceInnerDataSync.class new file mode 100644 index 0000000..7b2fb5b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/ProvinceInnerDataSync.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl$1.class new file mode 100644 index 0000000..908d941 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl.class new file mode 100644 index 0000000..4fce2af Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$1.class new file mode 100644 index 0000000..88f281a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$2.class new file mode 100644 index 0000000..eb8d9af Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$3.class new file mode 100644 index 0000000..96eb2a8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$4.class new file mode 100644 index 0000000..f348b8e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$5.class new file mode 100644 index 0000000..a03c29e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$6.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$6.class new file mode 100644 index 0000000..0080723 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl$6.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl.class new file mode 100644 index 0000000..0d2b597 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl$1.class new file mode 100644 index 0000000..441eeab Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl$2.class new file mode 100644 index 0000000..66538a3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl.class new file mode 100644 index 0000000..77597c6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl$1.class new file mode 100644 index 0000000..df659e8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl.class new file mode 100644 index 0000000..81b0c5e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl$1.class new file mode 100644 index 0000000..1c34f6d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl$2.class new file mode 100644 index 0000000..534886b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl.class new file mode 100644 index 0000000..cd6c362 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl$1.class new file mode 100644 index 0000000..70682cc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl.class new file mode 100644 index 0000000..6cf5d86 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$1.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$1.class new file mode 100644 index 0000000..646bf4a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$2.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$2.class new file mode 100644 index 0000000..72f1b75 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$2.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$3.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$3.class new file mode 100644 index 0000000..d5ddfa7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$3.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$4.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$4.class new file mode 100644 index 0000000..2422d93 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$4.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$5.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$5.class new file mode 100644 index 0000000..803307c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl$5.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl.class new file mode 100644 index 0000000..a7b31a0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/DynamicDataPushTask.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/DynamicDataPushTask.class new file mode 100644 index 0000000..731b54c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/DynamicDataPushTask.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/PageDataPush.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/PageDataPush.class new file mode 100644 index 0000000..beb45ea Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/PageDataPush.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/generation/GenerationRightTask.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/generation/GenerationRightTask.class new file mode 100644 index 0000000..8bac4ee Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/generation/GenerationRightTask.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/marketbuild/MarketBuildTask.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/marketbuild/MarketBuildTask.class new file mode 100644 index 0000000..4c6feb5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/marketbuild/MarketBuildTask.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/marketsurvey/MarketSurveyTask.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/marketsurvey/MarketSurveyTask.class new file mode 100644 index 0000000..5ace833 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/marketsurvey/MarketSurveyTask.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/mltermcontract/MediumLongTermContractTask.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/mltermcontract/MediumLongTermContractTask.class new file mode 100644 index 0000000..867a339 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/mltermcontract/MediumLongTermContractTask.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/newenergy/NewEnergySurveyTask.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/newenergy/NewEnergySurveyTask.class new file mode 100644 index 0000000..c2eb90b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/newenergy/NewEnergySurveyTask.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/provinceInner/ProvinceInnerTask.class b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/provinceInner/ProvinceInnerTask.class new file mode 100644 index 0000000..e6d35b9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/gansu/task/provinceInner/ProvinceInnerTask.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/ServerController.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/ServerController.class new file mode 100644 index 0000000..c9a4235 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/ServerController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysLogininforController.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysLogininforController.class new file mode 100644 index 0000000..ec50ab2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysLogininforController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysOperlogController.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysOperlogController.class new file mode 100644 index 0000000..6d9276a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysOperlogController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysUserOnlineController.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysUserOnlineController.class new file mode 100644 index 0000000..a74a121 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/controller/SysUserOnlineController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysLogininfor.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysLogininfor.class new file mode 100644 index 0000000..b5cade6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysLogininfor.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysOperLog.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysOperLog.class new file mode 100644 index 0000000..4a14e2c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysOperLog.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysUserOnline.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysUserOnline.class new file mode 100644 index 0000000..7dd6a49 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/domain/SysUserOnline.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/mapper/SysLogininforMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/mapper/SysLogininforMapper.class new file mode 100644 index 0000000..4c89974 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/mapper/SysLogininforMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/mapper/SysOperLogMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/mapper/SysOperLogMapper.class new file mode 100644 index 0000000..f8e0b4b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/mapper/SysOperLogMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/ISysLogininforService.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/ISysLogininforService.class new file mode 100644 index 0000000..21e67d9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/ISysLogininforService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/ISysOperLogService.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/ISysOperLogService.class new file mode 100644 index 0000000..f7c83a5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/ISysOperLogService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/impl/SysLogininforServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/impl/SysLogininforServiceImpl.class new file mode 100644 index 0000000..6984766 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/impl/SysLogininforServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/impl/SysOperLogServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/impl/SysOperLogServiceImpl.class new file mode 100644 index 0000000..653f7ca Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/monitor/service/impl/SysOperLogServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysConfigController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysConfigController.class new file mode 100644 index 0000000..124b918 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysConfigController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDeptController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDeptController.class new file mode 100644 index 0000000..69cdee9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDeptController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDictDataController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDictDataController.class new file mode 100644 index 0000000..33525b9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDictDataController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDictTypeController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDictTypeController.class new file mode 100644 index 0000000..e407228 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysDictTypeController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysLoginController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysLoginController.class new file mode 100644 index 0000000..f37286c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysLoginController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysMenuController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysMenuController.class new file mode 100644 index 0000000..056c48f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysMenuController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysNoticeController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysNoticeController.class new file mode 100644 index 0000000..61fd6af Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysNoticeController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysPostController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysPostController.class new file mode 100644 index 0000000..a107229 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysPostController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysProfileController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysProfileController.class new file mode 100644 index 0000000..fab9088 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysProfileController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysRoleController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysRoleController.class new file mode 100644 index 0000000..10421ea Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysRoleController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysUserController.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysUserController.class new file mode 100644 index 0000000..9dacae7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/controller/SysUserController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysConfig.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysConfig.class new file mode 100644 index 0000000..4557ffe Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysConfig.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDept.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDept.class new file mode 100644 index 0000000..7a45bac Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDept.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDictData.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDictData.class new file mode 100644 index 0000000..81f91f6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDictData.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDictType.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDictType.class new file mode 100644 index 0000000..07a932e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysDictType.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysMenu.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysMenu.class new file mode 100644 index 0000000..bed6ce8 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysMenu.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysNotice.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysNotice.class new file mode 100644 index 0000000..3039f9a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysNotice.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysPost.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysPost.class new file mode 100644 index 0000000..5f0024e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysPost.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRole.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRole.class new file mode 100644 index 0000000..d1b202c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRole.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRoleDept.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRoleDept.class new file mode 100644 index 0000000..c870e6f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRoleDept.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRoleMenu.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRoleMenu.class new file mode 100644 index 0000000..d1e7725 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysRoleMenu.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUser.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUser.class new file mode 100644 index 0000000..c07cc08 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUser.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUserPost.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUserPost.class new file mode 100644 index 0000000..f773df3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUserPost.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUserRole.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUserRole.class new file mode 100644 index 0000000..17ea8cd Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/SysUserRole.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/vo/MetaVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/vo/MetaVo.class new file mode 100644 index 0000000..21ce8e3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/vo/MetaVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/vo/RouterVo.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/vo/RouterVo.class new file mode 100644 index 0000000..dee5cc2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/domain/vo/RouterVo.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysConfigMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysConfigMapper.class new file mode 100644 index 0000000..45fbf54 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysConfigMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDeptMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDeptMapper.class new file mode 100644 index 0000000..e7380d4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDeptMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDictDataMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDictDataMapper.class new file mode 100644 index 0000000..fd2daf4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDictDataMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDictTypeMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDictTypeMapper.class new file mode 100644 index 0000000..6a857bd Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysDictTypeMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysMenuMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysMenuMapper.class new file mode 100644 index 0000000..18c27be Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysMenuMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysNoticeMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysNoticeMapper.class new file mode 100644 index 0000000..80801a7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysNoticeMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysPostMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysPostMapper.class new file mode 100644 index 0000000..4b13ef9 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysPostMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleDeptMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleDeptMapper.class new file mode 100644 index 0000000..c3c1ae1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleDeptMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleMapper.class new file mode 100644 index 0000000..23915dc Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleMenuMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleMenuMapper.class new file mode 100644 index 0000000..6dcdaa6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysRoleMenuMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserMapper.class new file mode 100644 index 0000000..2c64fdb Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserPostMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserPostMapper.class new file mode 100644 index 0000000..f7c94e3 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserPostMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserRoleMapper.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserRoleMapper.class new file mode 100644 index 0000000..f98c4d1 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/mapper/SysUserRoleMapper.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysConfigService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysConfigService.class new file mode 100644 index 0000000..2f41a89 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysConfigService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDeptService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDeptService.class new file mode 100644 index 0000000..d6f313f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDeptService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDictDataService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDictDataService.class new file mode 100644 index 0000000..5f8edc5 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDictDataService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDictTypeService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDictTypeService.class new file mode 100644 index 0000000..aa7d4af Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysDictTypeService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysMenuService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysMenuService.class new file mode 100644 index 0000000..bd98482 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysMenuService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysNoticeService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysNoticeService.class new file mode 100644 index 0000000..b7149be Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysNoticeService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysPostService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysPostService.class new file mode 100644 index 0000000..8541907 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysPostService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysRoleService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysRoleService.class new file mode 100644 index 0000000..37d167e Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysRoleService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysUserOnlineService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysUserOnlineService.class new file mode 100644 index 0000000..2bd1f49 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysUserOnlineService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysUserService.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysUserService.class new file mode 100644 index 0000000..a55b055 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/ISysUserService.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysConfigServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysConfigServiceImpl.class new file mode 100644 index 0000000..8a43f90 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysConfigServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDeptServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDeptServiceImpl.class new file mode 100644 index 0000000..f3ea3b4 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDeptServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDictDataServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDictDataServiceImpl.class new file mode 100644 index 0000000..ec0f96b Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDictDataServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDictTypeServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDictTypeServiceImpl.class new file mode 100644 index 0000000..76cd1b0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysDictTypeServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysMenuServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysMenuServiceImpl.class new file mode 100644 index 0000000..ab444c0 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysMenuServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysNoticeServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysNoticeServiceImpl.class new file mode 100644 index 0000000..2df4797 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysNoticeServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysPostServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysPostServiceImpl.class new file mode 100644 index 0000000..f4a974f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysPostServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysRoleServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysRoleServiceImpl.class new file mode 100644 index 0000000..8ce0b17 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysRoleServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysUserOnlineServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysUserOnlineServiceImpl.class new file mode 100644 index 0000000..fdbbf25 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysUserOnlineServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysUserServiceImpl.class b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysUserServiceImpl.class new file mode 100644 index 0000000..d1a3a56 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/system/service/impl/SysUserServiceImpl.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/tool/FileUtil.class b/mxdata_v-system/target/classes/com/alonginfo/project/tool/FileUtil.class new file mode 100644 index 0000000..bd99c19 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/tool/FileUtil.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/tool/MagicNumberFileTypeChecker.class b/mxdata_v-system/target/classes/com/alonginfo/project/tool/MagicNumberFileTypeChecker.class new file mode 100644 index 0000000..29e3a6f Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/tool/MagicNumberFileTypeChecker.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/tool/RSAUtils.class b/mxdata_v-system/target/classes/com/alonginfo/project/tool/RSAUtils.class new file mode 100644 index 0000000..7a06700 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/tool/RSAUtils.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/tool/Sm4Utils.class b/mxdata_v-system/target/classes/com/alonginfo/project/tool/Sm4Utils.class new file mode 100644 index 0000000..99ec698 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/tool/Sm4Utils.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/tool/excludes/ExcludeController.class b/mxdata_v-system/target/classes/com/alonginfo/project/tool/excludes/ExcludeController.class new file mode 100644 index 0000000..c5c6228 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/tool/excludes/ExcludeController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/tool/swagger/TestController.class b/mxdata_v-system/target/classes/com/alonginfo/project/tool/swagger/TestController.class new file mode 100644 index 0000000..9c8eb71 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/tool/swagger/TestController.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/project/tool/swagger/UserEntity.class b/mxdata_v-system/target/classes/com/alonginfo/project/tool/swagger/UserEntity.class new file mode 100644 index 0000000..83a4db6 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/project/tool/swagger/UserEntity.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/DBUtil.class b/mxdata_v-system/target/classes/com/alonginfo/utils/DBUtil.class new file mode 100644 index 0000000..9df8e9a Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/DBUtil.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/DataPushUtils.class b/mxdata_v-system/target/classes/com/alonginfo/utils/DataPushUtils.class new file mode 100644 index 0000000..d9bb03c Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/DataPushUtils.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/ExcelUtil.class b/mxdata_v-system/target/classes/com/alonginfo/utils/ExcelUtil.class new file mode 100644 index 0000000..38d6505 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/ExcelUtil.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/FileUploadUtils.class b/mxdata_v-system/target/classes/com/alonginfo/utils/FileUploadUtils.class new file mode 100644 index 0000000..073a246 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/FileUploadUtils.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/FocusBiddingUtil.class b/mxdata_v-system/target/classes/com/alonginfo/utils/FocusBiddingUtil.class new file mode 100644 index 0000000..8e60e5d Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/FocusBiddingUtil.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/JsonUtil$1.class b/mxdata_v-system/target/classes/com/alonginfo/utils/JsonUtil$1.class new file mode 100644 index 0000000..dafa9c7 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/JsonUtil$1.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/JsonUtil.class b/mxdata_v-system/target/classes/com/alonginfo/utils/JsonUtil.class new file mode 100644 index 0000000..8d2db68 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/JsonUtil.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/RSAUtil.class b/mxdata_v-system/target/classes/com/alonginfo/utils/RSAUtil.class new file mode 100644 index 0000000..f768221 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/RSAUtil.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/SM4Utils.class b/mxdata_v-system/target/classes/com/alonginfo/utils/SM4Utils.class new file mode 100644 index 0000000..d2e8187 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/SM4Utils.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/SecurityUtils.class b/mxdata_v-system/target/classes/com/alonginfo/utils/SecurityUtils.class new file mode 100644 index 0000000..90e0ca2 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/SecurityUtils.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/Seq.class b/mxdata_v-system/target/classes/com/alonginfo/utils/Seq.class new file mode 100644 index 0000000..fc32eca Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/Seq.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/SignUtil.class b/mxdata_v-system/target/classes/com/alonginfo/utils/SignUtil.class new file mode 100644 index 0000000..5d2db26 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/SignUtil.class differ diff --git a/mxdata_v-system/target/classes/com/alonginfo/utils/TimestampTypeAdapter.class b/mxdata_v-system/target/classes/com/alonginfo/utils/TimestampTypeAdapter.class new file mode 100644 index 0000000..3540d34 Binary files /dev/null and b/mxdata_v-system/target/classes/com/alonginfo/utils/TimestampTypeAdapter.class differ diff --git a/mxdata_v-system/target/classes/i18n/messages.properties b/mxdata_v-system/target/classes/i18n/messages.properties new file mode 100644 index 0000000..d63aa1f --- /dev/null +++ b/mxdata_v-system/target/classes/i18n/messages.properties @@ -0,0 +1,36 @@ +#错误消息 +not.null=* 必须填写 +user.jcaptcha.error=验证码错误 +user.jcaptcha.expire=验证码已失效 +user.not.exists=用户不存在/密码错误 +user.password.not.match=用户不存在/密码错误 +user.password.retry.limit.count=密码输入错误{0}次 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟 +user.password.delete=对不起,您的账号已被删除 +user.blocked=用户已封禁,请联系管理员 +role.blocked=角色已封禁,请联系管理员 +user.logout.success=退出成功 + +length.not.valid=长度必须在{min}到{max}个字符之间 + +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 +user.password.not.valid=* 5-50个字符 + +user.email.not.valid=邮箱格式错误 +user.mobile.phone.number.not.valid=手机号格式错误 +user.login.success=登录成功 +user.notfound=请重新登录 +user.forcelogout=管理员强制退出,请重新登录 +user.unknown.error=未知错误,请重新登录 + +##文件上传消息 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! +upload.filename.exceed.length=上传的文件名最长{0}个字符 + +##权限 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] diff --git a/mxdata_v-system/target/classes/logback.xml b/mxdata_v-system/target/classes/logback.xml new file mode 100644 index 0000000..9485201 --- /dev/null +++ b/mxdata_v-system/target/classes/logback.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/sys-info.log + + + + ${log.path}/sys-info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/sys-error.log + + + + ${log.path}/sys-error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + ${log.path}/sys-user.log + + + ${log.path}/sys-user.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/business/MxBusinessDataMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxBusinessDataMapper.xml new file mode 100644 index 0000000..4f02be0 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxBusinessDataMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE + FROM + ${params.tableName} + WHERE + ${params.tableKey} = #{params.keyValue} + + + + + UPDATE + ${params.tableName} + SET + + ${key} = #{value} + + WHERE + ${params.tableKey} = #{params.keyValue} + + + + + INSERT + INTO + ${params.tableName} + + ${key} + + VALUES + + #{value} + + + + + + + + DELETE FROM ${tableName} + + diff --git a/mxdata_v-system/target/classes/mybatis/business/MxComponentsMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxComponentsMapper.xml new file mode 100644 index 0000000..4bf44df --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxComponentsMapper.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select com_type_id,com_type_name,remark,create_date + from mx_components_type + + + select com_id,com_type_id,com_name,com_alias_name,remark,enabled,com_png_url,create_date + from mx_components + + + + + + insert into mx_components_type( + com_type_id, + com_type_name, + remark, + create_date + ) + values( + #{comTypeId}, + #{comTypeName}, + #{remark}, + sysdate() + ) + + + + + + delete from mx_components_type where com_type_id = #{comTypeId} + + + + + + update mx_components_type + + com_type_name = #{comTypeName}, + remark = #{remark}, + create_date = sysdate() + + where com_type_id = #{comTypeId} + + + + + + + + + + + insert into mx_components( + com_id, + com_type_id, + com_name, + com_alias_name, + remark, + enabled, + com_png_url, + create_date + ) + values( + #{comId}, + #{comTypeId}, + #{comName}, + #{comAliasName}, + #{remark}, + #{enabled}, + #{comPngUrl}, + sysdate() + ) + + + + delete from mx_components where com_id = #{comId} + + + + delete from mx_components where com_type_id = #{comTypeId} + + + + update mx_components + + com_type_id = #{comTypeId}, + com_name = #{comName}, + com_alias_name = #{comAliasName}, + remark = #{remark}, + enabled = #{enabled}, + com_png_url = #{comPngUrl}, + create_date = sysdate() + + where com_id = #{comId} + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/business/MxDataSetMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxDataSetMapper.xml new file mode 100644 index 0000000..6bbafb3 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxDataSetMapper.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select d_group_id, d_group_name,d_group_sort, create_time from mx_data_group order by d_group_sort + + + select DS_ID,DS_NAME,DATABASE_ID,DATA_SQL,d_group_id,has_param,code_get_id from mx_data_set + + + + + + + + insert into mx_data_group( + d_group_id, + d_group_name, + d_group_sort, + create_time + ) + values( + #{dGroupId}, + #{dGroupName}, + #{dGroupSort}, + sysdate() + ) + + + + + delete from mx_data_group where d_group_id = #{dGroupId} + + + + + update mx_data_group + + d_group_name = #{dGroupName}, + d_group_sort = #{dGroupSort}, + create_time = sysdate() + + where d_group_id = #{dGroupId} + + + + + + + + + + + + + + + + insert into mx_data_set( + ds_id, + ds_name, + database_id, + data_sql, + d_group_id, + has_param, + code_get_id, + create_time + ) + values( + #{dsId}, + #{dsName}, + #{databaseId}, + #{dataSql}, + #{dGroupId}, + #{hasParam}, + #{ajaxId}, + sysdate() + ) + + + + + insert into mx_data_set_key(KEY_ID,KEY_NAME,DS_ID) values(#{keyId},#{keyName},#{dsId}) + + + + + delete from mx_data_set where ds_id =#{dsId} + + + + delete from mx_data_set_key where ds_id =#{dsId} + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/business/MxDatabaseMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxDatabaseMapper.xml new file mode 100644 index 0000000..aca90dd --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxDatabaseMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + select id,alias_name,config_name,type,driver_class,username,password,url,create_date,is_open + from mx_database + + + + + + insert into mx_database( + id, + alias_name, + config_name, + type, + driver_class, + username, + password, + url, + is_open, + create_date + ) + values( + #{id}, + #{aliasName}, + #{configName}, + #{type}, + #{driverClass}, + #{username}, + #{password}, + #{url}, + #{isOpen}, + sysdate() + ) + + + + delete from mx_database where id = #{id} + + + + + update mx_database + + alias_name = #{aliasName}, + config_name = #{configName}, + type = #{type}, + driver_class = #{driverClass}, + username = #{username}, + password = #{password}, + url = #{url}, + is_open = #{isOpen}, + create_date = sysdate() + + where id = #{id} + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/business/MxGroupSettingMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxGroupSettingMapper.xml new file mode 100644 index 0000000..2752aab --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxGroupSettingMapper.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + select setting_id, setting_name, auto_switch, switch_animation, switch_time, description from mx_group_setting + + + + + + + + + + insert into mx_group_setting + + setting_id, + setting_name, + auto_switch, + switch_animation, + switch_time, + description, + + + #{settingId}, + #{settingName}, + #{autoSwitch}, + #{switchAnimation}, + #{switchTime}, + #{description}, + + + + + update mx_group_setting + + setting_name = #{settingName}, + auto_switch = #{autoSwitch}, + switch_animation = #{switchAnimation}, + switch_time = #{switchTime}, + description = #{description}, + + where setting_id = #{settingId} + + + + delete from mx_group_setting where setting_id = #{settingId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/business/MxIntroduceMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxIntroduceMapper.xml new file mode 100644 index 0000000..d608799 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxIntroduceMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + UPDATE mx_pages SET introduce = #{introduce} WHERE page_id = #{pageId} + + diff --git a/mxdata_v-system/target/classes/mybatis/business/MxPageGroupMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxPageGroupMapper.xml new file mode 100644 index 0000000..f4889c8 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxPageGroupMapper.xml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT + a.group_id, + a.group_name, + a.page_path, + a.setting_id, + a.description, + a.create_time, + b.setting_name, + b.auto_switch, + b.switch_animation, + b.switch_time, + b.description setting_description, + d.page_name , + d.page_id + + FROM + mx_page_group a + LEFT JOIN mx_group_setting b ON a.setting_id = b.setting_id + left join mx_page_mid_group c on a.group_id = c.group_id + left join mx_pages d on c.page_id=d.page_id + order by a.group_id , c.order_num + + + + + + + + + + + insert into mx_page_group + + group_id, + group_name, + page_path, + setting_id, + description, + create_time + + + #{groupId}, + #{groupName}, + #{pagePath}, + #{settingId}, + #{description}, + sysdate() + + + + + + update mx_page_group + + group_name = #{groupName}, + setting_id = #{settingId}, + description = #{description}, + create_time = sysdate() + + where group_id = #{groupId} + + + + + delete from mx_page_group where group_id = #{groupId} + + + + delete from mx_page_mid_group where group_id = #{groupId} + + + + delete from mx_page_mid_group where group_id = #{groupId} and page_id =#{themeId} + + + + + insert into mx_page_mid_group(group_id,page_id,order_num) + values + + (#{groupId},#{item.themeId},#{item.orderNum}) + + + + + + + + + + + + + + update mx_page_mid_group set order_num = #{orderNum} where group_id=#{groupId} and page_id=#{themeId} + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/business/MxQuartzMapper.xml b/mxdata_v-system/target/classes/mybatis/business/MxQuartzMapper.xml new file mode 100644 index 0000000..9e0382d --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/MxQuartzMapper.xml @@ -0,0 +1,90 @@ + + + + + job_id jobId, job_name jobName, job_group jobGroup, invoke_target invokeTarget, cron_expression cronExpression, + misfire_policy misfirePolicy, concurrent, status, create_by createBy, DATe_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') createTime, + update_by updateBy, DATe_FORMAT(update_time, '%Y-%m-%d %H:%i:%s') updateTime, remark + + + + + + + + + + + + UPDATE sys_job + + + job_name = #{jobName}, + + + job_group = #{jobGroup}, + + + invoke_target = #{invokeTarget}, + + + cron_expression = #{cronExpression}, + + + misfire_policy = #{misfirePolicy}, + + + concurrent = #{concurrent}, + + + status = #{status}, + + + remark = #{remark}, + + + update_by = #{updateBy}, + + update_time = now() + + WHERE job_id = #{jobId} + + + + + INSERT INTO sys_job + (job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, + status, create_by, create_time, update_by, update_time) + VALUES + (null, #{jobName}, #{jobGroup}, #{invokeTarget}, #{cronExpression}, #{misfirePolicy}, #{concurrent}, + #{status}, #{createBy}, now(), #{updateBy}, #{updateTime}) + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/business/YwMonthTransactionMapper.xml b/mxdata_v-system/target/classes/mybatis/business/YwMonthTransactionMapper.xml new file mode 100644 index 0000000..884c3b5 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/business/YwMonthTransactionMapper.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/engine/MxPagesMapper.xml b/mxdata_v-system/target/classes/mybatis/engine/MxPagesMapper.xml new file mode 100644 index 0000000..86c9956 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/engine/MxPagesMapper.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select page_id, page_name, pro_id, page_path, page_component, page_developCanvas, page_layout, is_own_chartTheme, + theme_id, page_publish,is_encrypt,password,create_time,create_by,remark + from mx_pages + + + + + + + + + + + + + + + insert into mx_pages ( + page_id, + page_name, + pro_id, + page_path, + page_component, + page_developCanvas, + page_layout, + is_own_chartTheme, + theme_id, + page_publish, + is_encrypt, + password, + remark, + create_by, + create_time + ) values ( + #{pageId}, + #{pageName}, + #{proId}, + #{pagePath}, + #{pageComponent}, + #{pageDevelopCanvas}, + #{pageLayout}, + #{isOwnChartTheme}, + #{themeId}, + #{pagePublish}, + #{isEncrypt}, + #{password}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + + update mx_pages + + page_name = #{pageName}, + page_path = #{pagePath}, + page_component = #{pageComponent}, + page_developCanvas = #{pageDevelopCanvas}, + page_layout = #{pageLayout}, + is_own_chartTheme = #{isOwnChartTheme}, + theme_id = #{themeId}, + page_publish = #{pagePublish}, + is_encrypt = #{isEncrypt}, + password = #{password}, + remark = #{remark}, + app_ctrl = #{appCtrl}, + + where page_id = #{pageId} + + + + + update mx_pages + + page_publish = #{pagePublish}, + is_encrypt = #{isEncrypt}, + password = #{password}, + + where page_id = #{pageId} + + + + + delete from mx_pages where page_id = #{pageId} + + + + + delete from mx_pages where pro_id in + + #{proId} + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/engine/MxProjectMapper.xml b/mxdata_v-system/target/classes/mybatis/engine/MxProjectMapper.xml new file mode 100644 index 0000000..b401141 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/engine/MxProjectMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + insert into mx_project ( + pro_id, + pro_name, + pro_state, + theme_id, + create_by, + remark, + create_time + ) values ( + #{proId}, + #{proName}, + #{proState}, + #{themeId}, + #{createBy}, + remark, + sysdate() + ) + + + + + + + + update mx_project + + pro_name = #{proName}, + theme_id = #{themeId}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + + where pro_id = #{proId} + + + + + delete from mx_project where pro_id in + + #{proId} + + + + + + update mx_project set pro_state = #{proState} where pro_id = #{proId} + + + + diff --git a/mxdata_v-system/target/classes/mybatis/engine/ThemeManagerMapper.xml b/mxdata_v-system/target/classes/mybatis/engine/ThemeManagerMapper.xml new file mode 100644 index 0000000..c62d2ac --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/engine/ThemeManagerMapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + insert into mx_theme_manager ( + theme_id, + theme_name, + json_text, + remark, + user_id, + create_date + ) values ( + #{themeId}, + #{themeName}, + #{jsonText}, + #{remark}, + #{userId}, + sysdate() + ) + + + + + + + + update mx_theme_manager + + theme_name = #{themeName}, + json_text = #{jsonText}, + remark = #{remark} + + where theme_id = #{themeId} + + + + + delete from mx_theme_manager where theme_id in + + #{themeId} + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/BsHggkGzzdMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/BsHggkGzzdMapper.xml new file mode 100644 index 0000000..2e834b4 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/BsHggkGzzdMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + data_id + ,data_x,data_y1, + data_y2,update_time + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/BsHggkGzzkMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/BsHggkGzzkMapper.xml new file mode 100644 index 0000000..15cf08c --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/BsHggkGzzkMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + data_id,data_x,data_y, + update_time + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/BsHggkLybhMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/BsHggkLybhMapper.xml new file mode 100644 index 0000000..9af9601 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/BsHggkLybhMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + data_id,data_x,data_y, + update_time + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/BuySaleDetailMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/BuySaleDetailMapper.xml new file mode 100644 index 0000000..40ff393 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/BuySaleDetailMapper.xml @@ -0,0 +1,38 @@ + + + + + + + INSERT INTO + task_buy_sale_detail + (detail_id, trade_seq_id, trade_time_part, trade_time_range, sale_units_names, + vendee_units_names, sale_participant_name, vendee_participant_name, confirm_energy, + confirm_time, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.tradeTimePart}, #{item.tradeTimeRange}, + #{item.saleUnitsNames}, #{item.vendeeUnitsNames}, #{item.saleParticipantName}, + #{item.vendeeParticipantName}, #{item.confirmEnergy}, #{item.confirmTime}, #{item.dataTime}) + + + + + + + + + DELETE FROM + task_buy_sale_detail + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/CarbonMonitorMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/CarbonMonitorMapper.xml new file mode 100644 index 0000000..2178072 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/CarbonMonitorMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/ClearEnergyAbsorptionMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/ClearEnergyAbsorptionMapper.xml new file mode 100644 index 0000000..956472a --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/ClearEnergyAbsorptionMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/DayAddThreeMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/DayAddThreeMapper.xml new file mode 100644 index 0000000..8cb4a0b --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/DayAddThreeMapper.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/DynamicDataPushMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/DynamicDataPushMapper.xml new file mode 100644 index 0000000..02a1b59 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/DynamicDataPushMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + INSERT INTO + task_trade_seq(trade_seq_id, trade_seq_caption, data_time) + VALUES + + (#{item.tradeSeqId}, #{item.tradeSeqCaption}, #{item.dataTime}) + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/EnergyCensusMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/EnergyCensusMapper.xml new file mode 100644 index 0000000..7c31d62 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/EnergyCensusMapper.xml @@ -0,0 +1,71 @@ + + + + + + INSERT INTO + task_energy_census + (data_id, trade_seq_id, group_names, sale_energy, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.groupNames}, #{item.saleEnergy}, #{item.dataTime}) + + + + + + DELETE FROM task_energy_census + + + + + + + + INSERT INTO + test_task_energy_census + (data_id, trade_seq_id, group_names, sale_energy, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.groupNames}, #{item.saleEnergy}, #{item.dataTime}) + + + + + + DELETE FROM test_task_energy_census + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/GenerationRightDataSyncMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/GenerationRightDataSyncMapper.xml new file mode 100644 index 0000000..e6a9bbc --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/GenerationRightDataSyncMapper.xml @@ -0,0 +1,64 @@ + + + + + + INSERT INTO job_ge_deal_organize + (data_id, power_count, power_count_per, deal_num, deal_num_per, deal_energy, deal_energy_per) + VALUES + (1, #{data.powerCount}, #{data.powerCountPer}, #{data.dealNum}, #{data.dealNumPer}, #{data.dealEnergy}, #{data.dealEnergyPer}) + ON DUPLICATE KEY UPDATE + power_count=#{data.powerCount}, power_count_per=#{data.powerCountPer}, deal_num=#{data.dealNum}, deal_num_per=#{data.dealNumPer}, + deal_energy=#{data.dealEnergy}, deal_energy_per=#{data.dealEnergyPer}, update_time=now() + + + + INSERT INTO job_ge_subject_join + (data_id, participant_count, vendee_participant_count, sale_participant_count) + VALUES + (1, #{data.participantCount}, #{data.vendeeParticipantCount}, #{data.saleParticipantCount}) + ON DUPLICATE KEY UPDATE + participant_count=#{data.participantCount}, vendee_participant_count=#{data.vendeeParticipantCount}, + sale_participant_count=#{data.saleParticipantCount}, update_time=now() + + + + DELETE FROM job_ge_buy_sale_order + + + + INSERT INTO job_ge_buy_sale_order + (type, sum_sale_energy, sale_participant_name, sum_vendee_energy, vendee_participant_name) + VALUES + + (#{item.type}, #{item.sumSaleEnergy}, #{item.saleParticipantname}, #{item.sumVendeeEnergy}, #{item.vendeeParticipantname}) + + + + + DELETE FROM job_ge_deal_energy_year + + + + INSERT INTO + job_ge_deal_energy_year + (year, energy, settlement) + VALUES + + (#{item.yearMonth}, #{item.energy}, #{item.settlement}) + + + + + DELETE FROM job_ge_deal_energy_year_month + + + + INSERT INTO job_ge_deal_energy_year_month + (`year_month`, energy, settlement) + VALUES + + (#{item.yearMonth}, #{item.energy}, #{item.settlement}) + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/GenerationRightMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/GenerationRightMapper.xml new file mode 100644 index 0000000..b470eb2 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/GenerationRightMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/GreenTradeMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/GreenTradeMapper.xml new file mode 100644 index 0000000..e9ec36a --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/GreenTradeMapper.xml @@ -0,0 +1,22 @@ + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/GridMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/GridMapper.xml new file mode 100644 index 0000000..c3186bb --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/GridMapper.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/MarketBuildDataSyncMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/MarketBuildDataSyncMapper.xml new file mode 100644 index 0000000..79f7095 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/MarketBuildDataSyncMapper.xml @@ -0,0 +1,30 @@ + + + + + + DELETE FROM job_mb_power_direct_deal + + + + INSERT INTO job_mb_power_direct_deal + (trade_year, sum_vendee_energy) + VALUES + + (#{item.tradeYear}, #{item.sumVendeeEnergy}) + + + + + DELETE FROM job_mb_every_type_subject + + + + INSERT INTO job_mb_every_type_subject + (year, power, sale, user) + VALUES + + (#{item.year}, #{item.power}, #{item.sale}, #{item.user}) + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/MarketBuildMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/MarketBuildMapper.xml new file mode 100644 index 0000000..0336e2a --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/MarketBuildMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/MarketSurveyDataSyncMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/MarketSurveyDataSyncMapper.xml new file mode 100644 index 0000000..78c6b1e --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/MarketSurveyDataSyncMapper.xml @@ -0,0 +1,25 @@ + + + + + + INSERT INTO job_ms_market_subject_ratio + (data_id, sale_count, user_count, power_count, sale, user, power) + VALUES + (1, #{data.saleCount}, #{data.userCount}, #{data.powerCount}, #{data.sale}, #{data.user}, #{data.power}) + ON DUPLICATE KEY UPDATE + sale_count=#{data.saleCount}, user_count=#{data.userCount}, power_count=#{data.powerCount}, + sale=#{data.sale}, user=#{data.user}, power=#{data.power}, update_time = now() + + + + INSERT INTO job_ms_market_subject_enterprise + (data_id, water_count, fire_count, wind_count, sun_count, other_count, water, fire, wind, sun, other) + VALUES + (1, #{data.waterCount}, #{data.fireCount}, #{data.windCount}, #{data.sunCount}, #{data.otherCount}, + #{data.water}, #{data.fire}, #{data.wind}, #{data.sun}, #{data.other}) + ON DUPLICATE KEY UPDATE + water_count=#{data.waterCount}, fire_count=#{data.fireCount}, wind_count=#{data.windCount}, sun_count=#{data.sunCount}, other_count = #{data.otherCount}, + water=#{data.water}, fire=#{data.fire}, wind=#{data.wind}, sun=#{data.sun}, other=#{data.other}, update_time = now() + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/MarketSurveyMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/MarketSurveyMapper.xml new file mode 100644 index 0000000..f9911f4 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/MarketSurveyMapper.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/MediumLongTermContractDataSyncMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/MediumLongTermContractDataSyncMapper.xml new file mode 100644 index 0000000..9b8c396 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/MediumLongTermContractDataSyncMapper.xml @@ -0,0 +1,30 @@ + + + + + + DELETE FROM job_mlt_contract_type_power + + + + INSERT INTO job_mlt_contract_type_power + (energy_type, sum_energy) + VALUES + + (#{item.energyType}, #{item.sumEnergy}) + + + + + DELETE FROM job_mlt_contract_supply_type + + + + INSERT INTO job_mlt_contract_supply_type + (trade_year, vendee_energy, sale_energy, energy_type) + VALUES + + (#{item.tradeYear}, #{item.sumVendeeEnergy}, #{item.sumSaleEnergy}, #{item.energyType}) + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/MediumLongTermContractMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/MediumLongTermContractMapper.xml new file mode 100644 index 0000000..483b358 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/MediumLongTermContractMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/NewEnergySurveyDataSyncMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/NewEnergySurveyDataSyncMapper.xml new file mode 100644 index 0000000..e6c6247 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/NewEnergySurveyDataSyncMapper.xml @@ -0,0 +1,17 @@ + + + + + + DELETE FROM job_ne_join_trend + + + + INSERT INTO job_ne_join_trend + (trade_year, sum_vendee_energy, sum_sale_energy, energy_type) + VALUES + + (#{item.tradeYear}, #{item.sumVendeeEnergy}, #{item.sumSaleEnergy}, #{item.energyType}) + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/NewEnergySurveyMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/NewEnergySurveyMapper.xml new file mode 100644 index 0000000..523506a --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/NewEnergySurveyMapper.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/PriceTrendMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/PriceTrendMapper.xml new file mode 100644 index 0000000..c928d81 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/PriceTrendMapper.xml @@ -0,0 +1,69 @@ + + + + + + INSERT INTO + task_price_trend + (data_id, trade_seq_id, report_time, peak_energy, flat_energy, + valley_energy, peak_avg_value, flat_avg_value, valley_avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.reportTime}, #{item.peakEnergy}, #{item.flatEnergy}, + #{item.valleyEnergy}, #{item.peakAvgValue}, #{item.flatAvgValue}, #{item.valleyAvgValue}, #{item.dataTime}) + + + + + + DELETE FROM + task_price_trend + + + + + + + + INSERT INTO + test_task_price_trend + (data_id, trade_seq_id, report_time, peak_energy, flat_energy, + valley_energy, peak_avg_value, flat_avg_value, valley_avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.reportTime}, #{item.peakEnergy}, #{item.flatEnergy}, + #{item.valleyEnergy}, #{item.peakAvgValue}, #{item.flatAvgValue}, #{item.valleyAvgValue}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_price_trend + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/PriceTrendReplayMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/PriceTrendReplayMapper.xml new file mode 100644 index 0000000..9d936db --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/PriceTrendReplayMapper.xml @@ -0,0 +1,60 @@ + + + + + + INSERT INTO + task_price_trend_replay + (data_id, trade_seq_id, count_energy, trade_time_range, time_division_nmae, avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.countEnergy}, #{item.tradeTimeRange}, #{item.timeDivisionNmae}, + #{item.avgValue}, #{item.dataTime}) + + + + + + DELETE FROM + task_price_trend_replay + + + + + + + INSERT INTO + test_task_price_trend_replay + (data_id, trade_seq_id, count_energy, trade_time_range, time_division_nmae, avg_value, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.countEnergy}, #{item.tradeTimeRange}, #{item.timeDivisionNmae}, + #{item.avgValue}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_price_trend_replay + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/ProvinceInnerDataSyncMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/ProvinceInnerDataSyncMapper.xml new file mode 100644 index 0000000..3462ee4 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/ProvinceInnerDataSyncMapper.xml @@ -0,0 +1,70 @@ + + + + + + DELETE FROM job_pi_deal_organize + + + + INSERT INTO job_pi_deal_organize + (trade_year, sb_num, jz_num, gp_num, d3_num, sb_energy, jz_energy, gp_energy, d3_energy) + VALUES + + (#{item.tradeYear}, #{item.sbNum}, #{item.jzNum}, #{item.gpNum}, #{item.d3Num}, + #{item.sbEnergy}, #{item.jzEnergy}, #{item.gpEnergy}, #{item.d3Energy}) + + + + + DELETE FROM job_pi_clean_energy_deal + + + + INSERT INTO job_pi_clean_energy_deal + (trade_year, energy_type, vendee, sale) + VALUES + + (#{item.tradeYear}, #{item.energyType}, #{item.vendee}, #{item.sale}) + + + + + DELETE FROM job_pi_subject_join + + + + INSERT INTO job_pi_subject_join + (trade_year, org_yield, org_sale, org_user, join_yield, join_sale, join_user) + VALUES + + (#{item.tradeYear}, #{item.orgYield}, #{item.orgSale}, #{item.orgUser}, #{item.joinYield}, #{item.joinSale}, #{item.joinUser}) + + + + + DELETE FROM job_pi_power_price_trend + + + + INSERT INTO job_pi_power_price_trend + (trade_month, vendee_energy, vendee_price, sale_energy, sale_price) + VALUES + + (#{item.tradeMonth}, #{item.vendeeEnergy}, #{item.vendeePrice}, #{item.saleEnergy}, #{item.salePrice}) + + + + + DELETE FROM job_pi_trade_survey WHERE trade_year = #{year} + + + + INSERT INTO job_pi_trade_survey + (trade_year, count_trade, sum_vendee_energy) + VALUES + + (#{item.tradeYear}, #{item.countTrade}, #{item.sumVendeeEnergy}) + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/ProvinceInnerMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/ProvinceInnerMapper.xml new file mode 100644 index 0000000..adb6253 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/ProvinceInnerMapper.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/ProvinceMiddleMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/ProvinceMiddleMapper.xml new file mode 100644 index 0000000..1d85a9f --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/ProvinceMiddleMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/RealTimeManyDayMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/RealTimeManyDayMapper.xml new file mode 100644 index 0000000..b6d0d5f --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/RealTimeManyDayMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + INSERT INTO task_many_day_real + (sum_energy, avg_price, create_time, time_range, data_time) + VALUES + + (#{item.sumEnergy}, #{item.avgPrice}, #{item.createTime}, #{item.timeRange}, DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:00')) + + + + + + DELETE FROM + task_many_day_real + + + + + + + + INSERT INTO test_task_many_day_real + (sum_energy, avg_price, create_time, time_range, data_time) + VALUES + + (#{item.sumEnergy}, #{item.avgPrice}, #{item.createTime}, #{item.timeRange}, DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:00')) + + + + + + DELETE FROM + test_task_many_day_real + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/ResourcesMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/ResourcesMapper.xml new file mode 100644 index 0000000..cc1d057 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/ResourcesMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/SgccAddressMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/SgccAddressMapper.xml new file mode 100644 index 0000000..eaf4874 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/SgccAddressMapper.xml @@ -0,0 +1,45 @@ + + + + + + INSERT INTO + sgcc_address + (id, sgcc_name, sgcc_address) + VALUES + (null, #{sgccName}, #{sgccAddress}) + + + + + + + + + + UPDATE sgcc_address + SET sgcc_name = #{sgccName}, sgcc_address = #{sgccAddress} + WHERE + id = #{id} + + + + DElETE FROM + sgcc_address + WHERE + id in + + #{item} + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/TradeNoticeMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/TradeNoticeMapper.xml new file mode 100644 index 0000000..b64d9b4 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/TradeNoticeMapper.xml @@ -0,0 +1,69 @@ + + + + + + INSERT INTO + task_trade_notice + (notice_id, trade_seq_id, begin_date, end_date, con_beg_date, con_end_date, band_num, tradetype_mode, + tradeseq_cycle, sale_num, vendee_num, pub_time, file, res_pub_time, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.beginDate}, #{item.endDate}, #{item.conBegDate}, #{item.conEndDate}, + #{item.bandNum}, #{item.tradetypeMode}, #{item.tradeseqCycle}, #{item.saleNum}, #{item.vendeeNum}, #{item.pubTime}, + #{item.file}, #{item.resPubTime}, #{item.dataTime}) + + + + + + DELETE FROM + task_trade_notice + + + + + + + + INSERT INTO + test_task_trade_notice + (notice_id, trade_seq_id, begin_date, end_date, con_beg_date, con_end_date, band_num, tradetype_mode, + tradeseq_cycle, sale_num, vendee_num, pub_time, file, res_pub_time, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.beginDate}, #{item.endDate}, #{item.conBegDate}, #{item.conEndDate}, + #{item.bandNum}, #{item.tradetypeMode}, #{item.tradeseqCycle}, #{item.saleNum}, #{item.vendeeNum}, #{item.pubTime}, + #{item.file}, #{item.resPubTime}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_trade_notice + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/TradeSeqMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/TradeSeqMapper.xml new file mode 100644 index 0000000..e8e262f --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/TradeSeqMapper.xml @@ -0,0 +1,105 @@ + + + + + + INSERT INTO + task_trade_seq(trade_seq_id, trade_seq_caption, sub_trade_type, trade_seq_type, creat_time, data_time) + VALUES + + (#{item.tradeSeqId}, #{item.tradeSeqCaption}, #{item.subTradetype}, #{item.tradeSeqType}, #{item.creatTime}, #{item.dataTime}) + + + + + + DELETE FROM + task_trade_seq + + + + + + + + + + INSERT INTO + test_task_trade_seq(trade_seq_id, trade_seq_caption, sub_trade_type, trade_seq_type, creat_time, data_time) + VALUES + + (#{item.tradeSeqId}, #{item.tradeSeqCaption}, #{item.subTradetype}, #{item.tradeSeqType}, #{item.creatTime}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_trade_seq + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/TradeSettleMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/TradeSettleMapper.xml new file mode 100644 index 0000000..1fd7486 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/TradeSettleMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/TradeStatusMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/TradeStatusMapper.xml new file mode 100644 index 0000000..dd1fb44 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/TradeStatusMapper.xml @@ -0,0 +1,75 @@ + + + + + + INSERT INTO + task_trade_status + (data_id, trade_seq_id, sale_suote_num, sale_result_num, sale_energy, + vendee_confim_num, vendee_num, vendee_energy, direct_result_num, retail_result_num, energy, avg_price, max_price, + min_price, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.saleSuoteNum}, #{item.saleResultNum}, #{item.saleEnergy}, + #{item.vendeeConfimNum}, #{item.vendeeNum}, #{item.vendeeEnergy}, #{item.directResultNum}, #{item.retailResultNum}, #{item.energy}, #{item.avgPrice}, #{item.maxPrice}, + #{item.minPrice}, #{item.dataTime}) + + + + + + DELETE FROM + task_trade_status + + + + + + + + INSERT INTO + test_task_trade_status + (data_id, trade_seq_id, sale_suote_num, sale_result_num, sale_energy, + vendee_confim_num, vendee_num, vendee_energy, direct_result_num, retail_result_num, energy, avg_price, max_price, + min_price, data_time) + VALUES + + (NULL, #{item.tradeSeqId}, #{item.saleSuoteNum}, #{item.saleResultNum}, #{item.saleEnergy}, + #{item.vendeeConfimNum}, #{item.vendeeNum}, #{item.vendeeEnergy}, #{item.directResultNum}, #{item.retailResultNum}, #{item.energy}, #{item.avgPrice}, #{item.maxPrice}, + #{item.minPrice}, #{item.dataTime}) + + + + + + DELETE FROM + test_task_trade_status + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/gansu/TradingCenterMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/TradingCenterMapper.xml new file mode 100644 index 0000000..80db511 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/TradingCenterMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/gansu/UploadNoticeMapper.xml b/mxdata_v-system/target/classes/mybatis/gansu/UploadNoticeMapper.xml new file mode 100644 index 0000000..611b31e --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/gansu/UploadNoticeMapper.xml @@ -0,0 +1,164 @@ + + + + + + + + INSERT INTO upload_notice_notes + + + upload_id, + + + trade_seq_id, + + + trade_seq_name, + + + upload_name, + + + upload_encode_name, + + + upload_path, + + + + + #{uuid}, + + + #{seqId}, + + + #{seqName}, + + + #{fileName}, + + + #{encodeName}, + + + #{visitPath}, + + + + + + + + + + DELETE + FROM upload_notice_notes + WHERE trade_seq_id = #{seqId} + + + + INSERT INTO upload_market_build + + + upload_id, + + + file_title, + + + image_real_name, + + + image_encode_name, + + + image_upload_path, + + + file_real_name, + + + file_encode_name, + + + file_upload_path, + + + + + #{uuid}, + + + #{fileTitle}, + + + #{imageName}, + + + #{imageEncodeName}, + + + #{imageVisitPath}, + + + #{noticeFileName}, + + + #{fileEncodeName}, + + + #{fileVisitPath}, + + + + + + + + DELETE + FROM upload_market_build + WHERE file_title = #{fileTitle} + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/monitor/SysLogininforMapper.xml b/mxdata_v-system/target/classes/mybatis/monitor/SysLogininforMapper.xml new file mode 100644 index 0000000..5949efd --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/monitor/SysLogininforMapper.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) + values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) + + + + + + delete from sys_logininfor where info_id in + + #{infoId} + + + + + truncate table sys_logininfor + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/monitor/SysOperLogMapper.xml b/mxdata_v-system/target/classes/mybatis/monitor/SysOperLogMapper.xml new file mode 100644 index 0000000..0aad2d9 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/monitor/SysOperLogMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time + from sys_oper_log + + + + insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time) + values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate()) + + + + + + delete from sys_oper_log where oper_id in + + #{operId} + + + + + + + truncate table sys_oper_log + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/mybatis-config.xml b/mxdata_v-system/target/classes/mybatis/mybatis-config.xml new file mode 100644 index 0000000..e8b52be --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/mybatis-config.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/mxdata_v-system/target/classes/mybatis/system/SysConfigMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysConfigMapper.xml new file mode 100644 index 0000000..1c0d2ed --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysConfigMapper.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark + from sys_config + + + + + + + and config_id = #{configId} + + + and config_key = #{configKey} + + + + + + + + + + + + insert into sys_config ( + config_name, + config_key, + config_value, + config_type, + create_by, + remark, + create_time + )values( + #{configName}, + #{configKey}, + #{configValue}, + #{configType}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + update sys_config + + config_name = #{configName}, + config_key = #{configKey}, + config_value = #{configValue}, + config_type = #{configType}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where config_id = #{configId} + + + + delete from sys_config where config_id = #{configId} + + + + delete from sys_config where config_id in + + #{configId} + + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysDeptMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysDeptMapper.xml new file mode 100644 index 0000000..cc025f0 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysDeptMapper.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time + from sys_dept d + + + + + + + + + + + + + + + + + + insert into sys_dept( + dept_id, + parent_id, + dept_name, + ancestors, + order_num, + leader, + phone, + email, + status, + create_by, + create_time + )values( + #{deptId}, + #{parentId}, + #{deptName}, + #{ancestors}, + #{orderNum}, + #{leader}, + #{phone}, + #{email}, + #{status}, + #{createBy}, + sysdate() + ) + + + + update sys_dept + + parent_id = #{parentId}, + dept_name = #{deptName}, + ancestors = #{ancestors}, + order_num = #{orderNum}, + leader = #{leader}, + phone = #{phone}, + email = #{email}, + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where dept_id = #{deptId} + + + + update sys_dept set ancestors = + + when #{item.deptId} then #{item.ancestors} + + where dept_id in + + #{item.deptId} + + + + + update sys_dept + + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where dept_id = #{deptId} + + + + update sys_dept set del_flag = '2' where dept_id = #{deptId} + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysDictDataMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysDictDataMapper.xml new file mode 100644 index 0000000..d215eb0 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysDictDataMapper.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark + from sys_dict_data + + + + + + + + + + + + + + delete from sys_dict_data where dict_code = #{dictCode} + + + + delete from sys_dict_data where dict_code in + + #{dictCode} + + + + + update sys_dict_data + + dict_sort = #{dictSort}, + dict_label = #{dictLabel}, + dict_value = #{dictValue}, + dict_type = #{dictType}, + css_class = #{cssClass}, + list_class = #{listClass}, + is_default = #{isDefault}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_code = #{dictCode} + + + + update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} + + + + insert into sys_dict_data( + dict_sort, + dict_label, + dict_value, + dict_type, + css_class, + list_class, + is_default, + status, + remark, + create_by, + create_time + )values( + #{dictSort}, + #{dictLabel}, + #{dictValue}, + #{dictType}, + #{cssClass}, + #{listClass}, + #{isDefault}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysDictTypeMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysDictTypeMapper.xml new file mode 100644 index 0000000..f8a389e --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysDictTypeMapper.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + select dict_id, dict_name, dict_type, status, create_by, create_time, remark + from sys_dict_type + + + + + + + + + + + + + + delete from sys_dict_type where dict_id = #{dictId} + + + + delete from sys_dict_type where dict_id in + + #{dictId} + + + + + update sys_dict_type + + dict_name = #{dictName}, + dict_type = #{dictType}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where dict_id = #{dictId} + + + + insert into sys_dict_type( + dict_name, + dict_type, + status, + remark, + create_by, + create_time + )values( + #{dictName}, + #{dictType}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysMenuMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysMenuMapper.xml new file mode 100644 index 0000000..ce559b4 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysMenuMapper.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select menu_id, menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, ifnull(perms,'') as perms, icon, create_time + from sys_menu + + + + + + + + + + + + + + + + + + + + + + + + update sys_menu + + menu_name = #{menuName}, + parent_id = #{parentId}, + order_num = #{orderNum}, + path = #{path}, + component = #{component}, + is_frame = #{isFrame}, + menu_type = #{menuType}, + visible = #{visible}, + perms = #{perms}, + icon = #{icon}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where menu_id = #{menuId} + + + + insert into sys_menu( + menu_id, + parent_id, + menu_name, + order_num, + path, + component, + is_frame, + menu_type, + visible, + perms, + icon, + remark, + create_by, + create_time + )values( + #{menuId}, + #{parentId}, + #{menuName}, + #{orderNum}, + #{path}, + #{component}, + #{isFrame}, + #{menuType}, + #{visible}, + #{perms}, + #{icon}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + delete from sys_menu where menu_id = #{menuId} + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysNoticeMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysNoticeMapper.xml new file mode 100644 index 0000000..4485288 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysNoticeMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark + from sys_notice + + + + + + + + insert into sys_notice ( + notice_title, + notice_type, + notice_content, + status, + remark, + create_by, + create_time + )values( + #{noticeTitle}, + #{noticeType}, + #{noticeContent}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + update sys_notice + + notice_title = #{noticeTitle}, + notice_type = #{noticeType}, + notice_content = #{noticeContent}, + status = #{status}, + update_by = #{updateBy}, + update_time = sysdate() + + where notice_id = #{noticeId} + + + + delete from sys_notice where notice_id = #{noticeId} + + + + delete from sys_notice where notice_id in + + #{noticeId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysPostMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysPostMapper.xml new file mode 100644 index 0000000..4745eab --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysPostMapper.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark + from sys_post + + + + + + + + + + + + + + + + + + update sys_post + + post_code = #{postCode}, + post_name = #{postName}, + post_sort = #{postSort}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where post_id = #{postId} + + + + insert into sys_post( + post_id, + post_code, + post_name, + post_sort, + status, + remark, + create_by, + create_time + )values( + #{postId}, + #{postCode}, + #{postName}, + #{postSort}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + delete from sys_post where post_id = #{postId} + + + + delete from sys_post where post_id in + + #{postId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysRoleDeptMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysRoleDeptMapper.xml new file mode 100644 index 0000000..3ee9dff --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysRoleDeptMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_role_dept where role_id=#{roleId} + + + + + + delete from sys_role_dept where role_id in + + #{roleId} + + + + + insert into sys_role_dept(role_id, dept_id) values + + (#{item.roleId},#{item.deptId}) + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysRoleMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysRoleMapper.xml new file mode 100644 index 0000000..3517be6 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysRoleMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, + r.status, r.del_flag, r.create_time, r.remark + from sys_role r + left join sys_user_role ur on ur.role_id = r.role_id + left join sys_user u on u.user_id = ur.user_id + left join sys_dept d on u.dept_id = d.dept_id + + + + + + + + + + + + + + + + + + + + insert into sys_role( + role_id, + role_name, + role_key, + role_sort, + data_scope, + status, + remark, + create_by, + create_time + )values( + #{roleId}, + #{roleName}, + #{roleKey}, + #{roleSort}, + #{dataScope}, + #{status}, + #{remark}, + #{createBy}, + sysdate() + ) + + + + update sys_role + + role_name = #{roleName}, + role_key = #{roleKey}, + role_sort = #{roleSort}, + data_scope = #{dataScope}, + status = #{status}, + remark = #{remark}, + update_by = #{updateBy}, + update_time = sysdate() + + where role_id = #{roleId} + + + + update sys_user set status = #{status} where user_id = #{userId} + + + + delete from sys_role where role_id = #{roleId} + + + + update sys_role set del_flag = '2' where role_id in + + #{roleId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysRoleMenuMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysRoleMenuMapper.xml new file mode 100644 index 0000000..4330d10 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysRoleMenuMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + delete from sys_role_menu where role_id=#{roleId} + + + + insert into sys_role_menu(role_id, menu_id) values + + (#{item.roleId},#{item.menuId}) + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysUserMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysUserMapper.xml new file mode 100644 index 0000000..1e6f1fa --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysUserMapper.xml @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, + d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status, + r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status + from sys_user u + left join sys_dept d on u.dept_id = d.dept_id + left join sys_user_role ur on u.user_id = ur.user_id + left join sys_role r on r.role_id = ur.role_id + + + + + + + + + + + + + + + + insert into sys_user( + user_id, + dept_id, + user_name, + nick_name, + email, + avatar, + phonenumber, + sex, + password, + status, + create_by, + remark, + create_time + )values( + #{userId}, + #{deptId}, + #{userName}, + #{nickName}, + #{email}, + #{avatar}, + #{phonenumber}, + #{sex}, + #{password}, + #{status}, + #{createBy}, + #{remark}, + sysdate() + ) + + + + update sys_user + + dept_id = #{deptId}, + user_name = #{userName}, + nick_name = #{nickName}, + email = #{email}, + phonenumber = #{phonenumber}, + sex = #{sex}, + avatar = #{avatar}, + password = #{password}, + status = #{status}, + login_ip = #{loginIp}, + login_date = #{loginDate}, + update_by = #{updateBy}, + remark = #{remark}, + update_time = sysdate() + + where user_id = #{userId} + + + + update sys_user set status = #{status} where user_id = #{userId} + + + + update sys_user set avatar = #{avatar} where user_name = #{userName} + + + + update sys_user set password = #{password} where user_name = #{userName} + + + + delete from sys_user where user_id = #{userId} + + + + update sys_user set del_flag = '2' where user_id in + + #{userId} + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysUserPostMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysUserPostMapper.xml new file mode 100644 index 0000000..1f11413 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysUserPostMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + delete from sys_user_post where user_id=#{userId} + + + + + + delete from sys_user_post where user_id in + + #{userId} + + + + + insert into sys_user_post(user_id, post_id) values + + (#{item.userId},#{item.postId}) + + + + \ No newline at end of file diff --git a/mxdata_v-system/target/classes/mybatis/system/SysUserRoleMapper.xml b/mxdata_v-system/target/classes/mybatis/system/SysUserRoleMapper.xml new file mode 100644 index 0000000..783e2c5 --- /dev/null +++ b/mxdata_v-system/target/classes/mybatis/system/SysUserRoleMapper.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + delete from sys_user_role where user_id=#{userId} + + + + + + delete from sys_user_role where user_id in + + #{userId} + + + + + insert into sys_user_role(user_id, role_id) values + + (#{item.userId},#{item.roleId}) + + + + + delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} + + + + delete from sys_user_role where role_id=#{roleId} and user_id in + + #{userId} + + + \ No newline at end of file diff --git a/mxdata_v-system/target/maven-archiver/pom.properties b/mxdata_v-system/target/maven-archiver/pom.properties new file mode 100644 index 0000000..db59b14 --- /dev/null +++ b/mxdata_v-system/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Tue Jun 04 15:11:45 CST 2024 +version=1.0 +groupId=com.alonginfo +artifactId=mxdata_v-system-gs diff --git a/mxdata_v-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/mxdata_v-system/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/mxdata_v-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..0ddfbfd --- /dev/null +++ b/mxdata_v-system/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,466 @@ +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketCountExecuteDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GridMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BilateralConsultResultVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BuySaleDetailDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/FocusListingController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/SysFile.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/factory/AsyncFactory.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/MxApplication.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictDataController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxComponentsService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/RouterVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearMonthDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/RSAUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysConfigServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserOnlineServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/BilateralConsultController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Cpu.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeSyncGet.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSet.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/Heguigk/HggkController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDatabaseServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/DataSetMenu.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/DynamicDataPushController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CountPowerByTypeDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MediumLongTermContractDataSyncImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/FocusBiddingUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OrganizeAndTypeVO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/RedisConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSettleDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/controller/BaseController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketsurvey/MarketSurveyServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysOperLog.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractDataSyncMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataInfo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeNotice.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/CarbonMonitorController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeMarketInfoServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/RealTimeManyDayDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/mltermcontract/MediumLongTermContractServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CostAndAvgDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/GreenTradeController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TransactionPowerController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/DataSourceType.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeELectricCalendarYearDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/focuslisting/FocusBiddingListingDealCommonServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/SgccAddressService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxPageGroupService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxIntroduceServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzk.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictTypeMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IGreenConsumer.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureTable.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysUserOnline.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallCapicatyPowerDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMenuMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxPageGroupMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeInfoController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysLogininforController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/AjaxResult.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxQuartzController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysLoginService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSizeDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provinceInner/ProvinceInnerServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/NewEnergySurveyController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxPageGroup.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/bilateraconsult/BilateralConsultServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeNoticeDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/newEnergy/INewEnergySurveyService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketsurvey/MarketSurveyTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/NewEnergySurveyDataSync.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysOperLogServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/clearenergy/IClearEnergyAbsorptionService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterprisePo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/BilateralConsultDataSync.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenTradeInfoDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/DataPushUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/StaffTeamDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserPostMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricAbsorptionDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUser.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SaleBuyEnterpriseOrderDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxIntroduceMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/InfoDisclosureController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/generation/GenerationRightTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/ShutdownManager.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ShareHoldingDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/YwMonthTransactionServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/green/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessType.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserOnlineService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallSituationDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransactionPowerVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxGroupSettingServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/RepeatSubmitInterceptor.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/DeliveryController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysUserRoleMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/UploadNoticeController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzkMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/bilateralconsult/BilateralConsultService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/generation/GenerationRightServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/ProvinceMiddleController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/bilateralconsult/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TransactionPowerServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysMenu.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketSurveyDataSyncImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/RegisterTrendVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/SecurityUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysLogininforMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxProject.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopContentDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataSourceAspect.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/tool/excludes/ExcludeController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradecenter/TradingCenterServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/redis/RedisCache.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableDataInfo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoVO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BuySaleDetail.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/clearenergy/ClearEnergyAbsorptionServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/marketbuild/MarketBuildTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSeq.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxQuartzService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictDataService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provincemiddle/IProvinceMiddleService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/DayAddThreeDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Jvm.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/manager/AsyncManager.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/DynamicDataPushTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/CacheConstants.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDeptServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/PageDataPush.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysRoleServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ApplicationConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Mem.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IThemeManagerService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDeptController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/DruidConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysOperlogController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableColumn.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/DBUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDataSetMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxPageGroupController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/YwMonthTransactionService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictData.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SgccAddress.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/SysUserOnlineController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketbuild/IMarketBuildService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/BaseEntity.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDept.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxComponentsMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysPostController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineTransportDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDatabase.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiSubjectJoinVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EveryTypeSubjectPo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/domain/SysLogininfor.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysMenuService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysNoticeService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ClearEnergyAbsorptionMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DayAddThreeNotice.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/LoginUser.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/OperatorType.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxProjectController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/uploadnotice/UploadNoticeServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TextBoxVO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxRedisController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/dayaddthree/DayAddThreeService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/carbon/CarbonMonitorServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excel.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FilterConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenSyndromeTradeByYearDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/grid/GridServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectJoinDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/ExcelUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/carbon/ICarbonMonitorService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataSetKey.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ResourcesMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/TransactionPowerService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataScope.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketSurveyDataSync.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/tool/FileUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserRole.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealOrganizeVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/common/EchartsCommonDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/YwMonthTransactionController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxShowDataSetService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/UserDetailsServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradeSettle/TradeSettleService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/InfoDisclosureServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinTradeDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearRationDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictDataServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysUserController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxPageGroupServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponents.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/DeliveryServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/PriceTrendReplayDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/filter/JwtAuthenticationTokenFilter.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxProjectServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/tradecenter/ITradingCenterService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleMapInfoVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSource.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/datasource/DynamicDataSourceContextHolder.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MxConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/enums/BusinessStatus.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleDept.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysUserServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/MxPagesServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/resources/IResourcesService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/marketbuild/MarketBuildServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDatabaseController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxComponentsType.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxBusinessDataMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrendReplay.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/common/CaptchaController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDataSetService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/common/CommonController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/focuslisting/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SignAuthFilter.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/uploadnotice/IUploadNoticeService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/CarbonMonitorMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxBusinessDataServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricCurrentYearDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/LogAspect.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/annotation/RepeatSubmit.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysPostService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/grid/IGridService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnterpriseChangesVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/SgccAddressDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeInfoService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeSeqDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/TimestampTypeAdapter.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/UploadNoticeMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/MxPagesController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysConfigService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxGroupSetting.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceInnerDataSyncMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GenerationRightDataSyncMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SupplyTypeDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysNoticeMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkLybhMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutProvinceDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/ThemeManager.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysMenuController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearInstallTrendDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ElectricTrendDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/GreenElectricDealVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ThemeManagerController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OverviewDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/MxServletInitializer.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearReduceGainDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxGroupSettingMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/EnergyCensusDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysConfigController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysOperLogService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/SgccAddressServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/properties/DruidProperties.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysConfigMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/ThemeManagerMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeElectricTypeDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/tradeSettle/TradeSettleServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MediumLongTermContractDataSync.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ResourcesConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysDictType.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketBuildDataSyncMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxComponentsServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LineCapacityDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IDeliveryService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/ProvinceInnerDataSync.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/MarketBuildDataSyncImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxBusinessDataService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxComponentsController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysNotice.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/impl/SysLogininforServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/provinceInner/ProvinceInnerTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketsurvey/MarketSurveyController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDeptMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/vo/MetaVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/OutsideDeliverDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysDictTypeServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/BsHggkGzzdMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxProjectMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/JsonUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxGroupSettingService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/mltermcontract/MediumLongTermContractController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/ProvinceInnerDataSyncImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysUserPost.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DirectDealPo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/resources/ResourcesServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/generation/IGenerationRightService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/carbon/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRole.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/GreenConsumerController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxIntroduceController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopOverviewDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxDatabaseService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/uploadnotice/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/impl/ThemeManagerServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysNoticeController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysRoleController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysRoleMenu.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxDataSetController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysDictDataMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysPostMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/CarbonMapTopContentDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectInfoDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/JoinEnergyTrendDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/EnergyCensus.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/SignUtil.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TransformerInfoVO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UseTrendCurrentYearDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/green/GreenTradeServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/FastJson2JsonRedisSerializer.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxDatabaseMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeStatus.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDeptService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/NewEnergySurveyDataSyncMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/PageDomain.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/provinceinner/IProvinceInnerService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PowerByYearDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ResourcesDevelopDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealOrganizeVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysDictTypeController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ThreadPoolConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/ITradeMarketInfoService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/mltermcontract/MediumLongTermContractTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxGroupSettingController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiPowerPriceTrendDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradeStatusDao.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxPagesService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradecenter/TradingCenterController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/impl/SameUrlDataInterceptor.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxQuartzServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/forward/IInfoDisclosureService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkLybh.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/MxQuartzMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/MarketBuildDataSync.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provinceinner/ProvinceInnerController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/resources/ResourcesController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/mltermcontract/IMediumLongTermContractService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/tool/swagger/TestController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/dayaddthree/DayAddThreeController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PrefectureInstallDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MediumLongTermContractMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/BilateralConsultDataSyncImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/generation/GenerationRightController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/Server.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/newenergy/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/forward/TradeMarketInfoController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/TokenService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/DealTrends.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/newenergy/NewEnergySurveyServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/clearenergy/ClearEnergyAbsorptionController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysRoleDeptMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/controller/ReleaseDataController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MarketBuildUploadVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/service/IMxProjectService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysUserService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysLoginController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ClearAbsorptionAnalysisDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/WebSocketController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/interceptor/SecurityProperties.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/tradeSettle/TradeSettleController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/FileUploadUtils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/marketsurvey/IMarketSurveyService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTextVO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysNoticeServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/GenerationRightDataSync.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/PermissionService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/provincemiddle/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/NewEnergySurveyDataSyncImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeVolumeCurrentDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysDictTypeService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxDataSetServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/exception/GlobalExceptionHandler.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/DataSource.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxTableInfo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/mapper/MxPagesMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/sync/impl/GenerationRightDataSyncImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/ProvinceMiddleMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/SubjectRatioPo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/MyBatisConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxBusinessDataController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TradeSettleDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/TreeSelect.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/GreenConsumerImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiDealSurveyDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/service/SysPermissionService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/green/IGreenTradeService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/ServerConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/TypePowerDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SecurityConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/utils/SM4Utils.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapInfoDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/package-info.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/MarketSurveyDataSyncMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/grid/GridController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/IMxIntroduceService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallStructureCount.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/service/ISysLogininforService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/GreenTradeMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/service/focuslisting/FocusBiddingListingDealCommonService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/UploadNoticeVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/domain/SysPost.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/DataScopeAspect.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/AjaxResult.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/forward/TradeInfoServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/controller/MxShowDataSetController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/service/impl/MxShowDataSetImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/MapTopCanvasDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PiCleanEnergyVo.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/IndustryEmissionDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Excels.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/controller/ServerController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/mapper/TradingCenterMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/LegalPersonDTO.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/ManyDayRealTime.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/controller/SysProfileController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/PriceTrend.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/config/SwaggerConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/domain/server/Sys.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/engine/domain/MxPages.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/mapper/SysMenuMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysPostServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/impl/SysMenuServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/BsHggkGzzd.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/provincemiddle/ProvinceMiddleServiceImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/aspectj/lang/annotation/Log.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/monitor/mapper/SysOperLogMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/AuthenticationEntryPointImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/controller/marketbuild/MarketBuildController.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/system/service/ISysRoleService.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/web/page/TableSupport.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/framework/security/handle/LogoutSuccessHandlerImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/domain/MxDataGroup.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/serviceimpl/dayaddthree/DayAddThreeDataReturnImpl.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/task/newenergy/NewEnergySurveyTask.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/business/mapper/YwMonthTransactionMapper.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/main/java/com/alonginfo/project/gansu/domain/InstallAndHoursDTO.java diff --git a/mxdata_v-system/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/mxdata_v-system/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-system/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/mxdata_v-system/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..6eee4f7 --- /dev/null +++ b/mxdata_v-system/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-system/src/test/java/com/alonginfo/Tmp.java diff --git a/mxdata_v-system/target/mxdata_v-system-gs.jar b/mxdata_v-system/target/mxdata_v-system-gs.jar new file mode 100644 index 0000000..e5234ee Binary files /dev/null and b/mxdata_v-system/target/mxdata_v-system-gs.jar differ diff --git a/mxdata_v-system/target/mxdata_v-system-gs.jar.original b/mxdata_v-system/target/mxdata_v-system-gs.jar.original new file mode 100644 index 0000000..58a1529 Binary files /dev/null and b/mxdata_v-system/target/mxdata_v-system-gs.jar.original differ diff --git a/mxdata_v-system/target/test-classes/com/alonginfo/Tmp.class b/mxdata_v-system/target/test-classes/com/alonginfo/Tmp.class new file mode 100644 index 0000000..eca77ac Binary files /dev/null and b/mxdata_v-system/target/test-classes/com/alonginfo/Tmp.class differ diff --git a/mxdata_v-websocket/mxdata_v-websocket.iml b/mxdata_v-websocket/mxdata_v-websocket.iml new file mode 100644 index 0000000..b62663a --- /dev/null +++ b/mxdata_v-websocket/mxdata_v-websocket.iml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mxdata_v-websocket/pom.xml b/mxdata_v-websocket/pom.xml new file mode 100644 index 0000000..f3866f2 --- /dev/null +++ b/mxdata_v-websocket/pom.xml @@ -0,0 +1,24 @@ + + + + mxdata_v + com.alonginfo + 1.0 + + 4.0.0 + + mxdata_v-websocket + + + + + org.springframework.boot + spring-boot-starter-websocket + + + + + + \ No newline at end of file diff --git a/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/config/WebSocketConfig.java b/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/config/WebSocketConfig.java new file mode 100644 index 0000000..9721a1e --- /dev/null +++ b/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/config/WebSocketConfig.java @@ -0,0 +1,20 @@ +package com.alonginfo.websocket.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.socket.server.standard.ServerEndpointExporter; + +/** + * @Description websocket 配置文件 + * @Author Yalon + * @Date 2020-03-05 10:44 + * @Version mxdata_v + */ +@Configuration +public class WebSocketConfig { + + @Bean + public ServerEndpointExporter serverEndpointExporter(){ + return new ServerEndpointExporter(); + } +} diff --git a/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/server/WebSocketServer.java b/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/server/WebSocketServer.java new file mode 100644 index 0000000..31d1f5c --- /dev/null +++ b/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/server/WebSocketServer.java @@ -0,0 +1,228 @@ +package com.alonginfo.websocket.server; + + +import com.alibaba.fastjson.JSONObject; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import javax.websocket.*; +import javax.websocket.server.ServerEndpoint; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.stream.Collectors; + +/** + * @Description websocket的实现类 + * @Author Yalon + * @Date 2020-03-05 14:47 + * @Version mxdata_v + */ + +@Component +@ServerEndpoint("/push/websocket") +@Slf4j +public class WebSocketServer { + + /** + * 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。 + */ + private static int onlineCount = 0; + + /** + * 全部在线会话 + */ + private static Map onlineSessions = new ConcurrentHashMap<>(); + + /** + * 连接建立成功调用的方法*/ + @OnOpen + public void onOpen(Session session) { + MySession mySession = new MySession(); + mySession.setSession(session); + //加入set中 + onlineSessions.put(session.getId(), mySession); + //在线数加1 + addOnlineCount(); + log.info("有新会话开始监听:{},当前在线会话为{}个", session.getId(), getOnlineCount()); + } + + /** + * 连接关闭调用的方法 + */ + @OnClose + public void onClose(Session session) { + //从set中删除 + onlineSessions.remove(session.getId()); + //在线数减1 + subOnlineCount(); + log.info("{}会话连接关闭!当前在线会话为{}", session.getId(), getOnlineCount()); + } + + /** + * 收到客户端消息后调用的方法 + * @param session 会话 + * @param jsonStr 这里约定传递的消息为JSON字符串 方便传递更多参数! + */ + @OnMessage + public void onMessage(Session session, String jsonStr) { + log.info("收到来自会话{}的消息:{}", session.getId(), jsonStr); + JSONObject jsonObject = JSONObject.parseObject(jsonStr); + String event = jsonObject.getString("event"); + JSONObject data = jsonObject.getJSONObject("data"); + + //5:轮播页面发送自己pagePath/groupName + if ("5".equals(event)) { + Map dataMap = onlineSessions.get(session.getId()).getData(); + dataMap.put("groupId",data.getString("groupId")); + dataMap.put("groupName",data.getString("groupName")); + } + + //实时页面数据传递 event = 6 + //realTimePageId: 双边协商:sb 集中竞价: jz 挂牌交易: gp D+3: d3 + //tradeId: 交易序列id + if ("6".equals(event)) { + Map dataMap = onlineSessions.get(session.getId()).getData(); + dataMap.put("realTimePageId", data.getString("realTimePageId")); + dataMap.put("tradeId", data.getString("tradeId")); + } + } + + /** + * + * @param session + * @param error + */ + @OnError + public void onError(Session session, Throwable error) { + log.error("websocket发生错误"); + error.printStackTrace(); + } + + /** + * 公共方法:发送所有在线主题分组 给user + */ + public List> getOnlineThemeGroups() { + List> data = new ArrayList<>(); + onlineSessions.forEach((key,mysession)->{ + if (mysession.getData().size() > 0) { + data.add(mysession.getData()); + } + }); + return data; + } + /** + * 公共方法:发送信息给所有人 + */ + public void sendMessageToAll(String jsonMsg) { + onlineSessions.forEach((id, session) -> { + try { + session.getSession().getBasicRemote().sendText(jsonMsg); + } catch (IOException e) { + e.printStackTrace(); + } + }); + log.info("推送消息到全部{}个会话,推送内容:{}", getOnlineCount(), jsonMsg); + } + + /** + * 公共方法:发送给指定主题ID + * @param groupId 主题分组ID + * @param jsonMsg 推送内容 + */ + public void sendMessageToAssignUser(String groupId , String jsonMsg) { + onlineSessions.forEach((sid, session) -> { + try { + if(groupId.equals(session.getData().get("groupId"))) { + session.getSession().getBasicRemote().sendText(jsonMsg); + } + } catch (IOException e) { + e.printStackTrace(); + } + }); + log.info("推送消息到主题ID为{}会话,推送内容:{}", groupId, jsonMsg); + } + + /** + * 公共方法: 发送给指定实时页面 + * @param pageId + * @param jsonMsg + */ + public void pushDataToRealTimePage(String pageId, String jsonMsg) { + onlineSessions.forEach((sid, session) -> { + try { + if (pageId.equals(session.getData().get("realTimePageId"))) { + session.getSession().getBasicRemote().sendText(jsonMsg); + } + }catch (Exception e) { + e.printStackTrace(); + } + }); + log.info("推送数据到实时页面, 页面ID: {}", pageId); + } + + /** + * 判断实时页面是否在线 + * @param pageId + */ + public boolean isOnlineForRealTimePage(String pageId) { + List realTimePageId = onlineSessions.entrySet().stream().map(m -> m.getValue().getData().get("realTimePageId")).collect(Collectors.toList()); + if (realTimePageId.contains(pageId)) { + return true; + } + return false; + } + + /** + * 通过pageId获取tradeId + * @param pageId + * @return + */ + public String getTradeIdByPageId(String pageId) { + String tradeId = onlineSessions.entrySet() + .stream() + .filter(m -> pageId.equals(m.getValue().getData().get("realTimePageId"))) + .map(i -> i.getValue().getData().get("tradeId")).findFirst().orElse(""); + return tradeId; + } + + /** + * 公共方法:发送信息给指定session + */ + public void sendMessageBySid(String jsonMsg, String sid) { + onlineSessions.forEach((id, session) -> { + if (id.equals(sid)) { + try { + session.getSession().getBasicRemote().sendText(jsonMsg); + log.info("推送消息到会话{},推送内容:{}", sid, jsonMsg); + } catch (IOException e) { + e.printStackTrace(); + } + } + }); + } + + private static synchronized int getOnlineCount() { + return onlineCount; + } + + private static synchronized void addOnlineCount() { + WebSocketServer.onlineCount++; + } + + private static synchronized void subOnlineCount() { + WebSocketServer.onlineCount--; + } + + // 存储session + @Data + class MySession{ + private Session session; + private Map data = new HashMap(); + } +} + diff --git a/mxdata_v-websocket/target/classes/com/alonginfo/websocket/config/WebSocketConfig.class b/mxdata_v-websocket/target/classes/com/alonginfo/websocket/config/WebSocketConfig.class new file mode 100644 index 0000000..b73e17c Binary files /dev/null and b/mxdata_v-websocket/target/classes/com/alonginfo/websocket/config/WebSocketConfig.class differ diff --git a/mxdata_v-websocket/target/classes/com/alonginfo/websocket/server/WebSocketServer$MySession.class b/mxdata_v-websocket/target/classes/com/alonginfo/websocket/server/WebSocketServer$MySession.class new file mode 100644 index 0000000..5cad436 Binary files /dev/null and b/mxdata_v-websocket/target/classes/com/alonginfo/websocket/server/WebSocketServer$MySession.class differ diff --git a/mxdata_v-websocket/target/classes/com/alonginfo/websocket/server/WebSocketServer.class b/mxdata_v-websocket/target/classes/com/alonginfo/websocket/server/WebSocketServer.class new file mode 100644 index 0000000..bae3d9b Binary files /dev/null and b/mxdata_v-websocket/target/classes/com/alonginfo/websocket/server/WebSocketServer.class differ diff --git a/mxdata_v-websocket/target/maven-archiver/pom.properties b/mxdata_v-websocket/target/maven-archiver/pom.properties new file mode 100644 index 0000000..43a3e08 --- /dev/null +++ b/mxdata_v-websocket/target/maven-archiver/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Tue Jun 04 15:11:33 CST 2024 +version=1.0 +groupId=com.alonginfo +artifactId=mxdata_v-websocket diff --git a/mxdata_v-websocket/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/mxdata_v-websocket/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-websocket/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/mxdata_v-websocket/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..2f7fd1e --- /dev/null +++ b/mxdata_v-websocket/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,2 @@ +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/config/WebSocketConfig.java +/Users/sunkexin/project2024/mx_datav_gs/mxdata_v-websocket/src/main/java/com/alonginfo/websocket/server/WebSocketServer.java diff --git a/mxdata_v-websocket/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/mxdata_v-websocket/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/mxdata_v-websocket/target/mxdata_v-websocket-1.0.jar b/mxdata_v-websocket/target/mxdata_v-websocket-1.0.jar new file mode 100644 index 0000000..50af953 Binary files /dev/null and b/mxdata_v-websocket/target/mxdata_v-websocket-1.0.jar differ diff --git a/mxdata_v.iml b/mxdata_v.iml new file mode 100644 index 0000000..8552a9d --- /dev/null +++ b/mxdata_v.iml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..9fc7a4a --- /dev/null +++ b/pom.xml @@ -0,0 +1,186 @@ + + + 4.0.0 + + com.alonginfo + mxdata_v + 1.0 + + Along可视化 + + + 1.0 + UTF-8 + UTF-8 + 1.8 + 1.3.2 + 1.2.5 + 2.0.0 + 1.3.2 + 1.2.47 + 1.1.14 + 1.19 + 2.3.2 + 2.9.2 + 1.2.5 + 2.5 + 1.3.3 + 3.9.1 + + + + + + org.springframework.boot + spring-boot-dependencies + 2.1.1.RELEASE + pom + import + + + + + + mxdata_v-common + mxdata_v-system + mxdata_v-websocket + mxdata_v-quzrtz + + pom + + + + + + mysql + mysql-connector-java + + + javax.servlet + javax.servlet-api + + + org.slf4j + slf4j-api + + + + com.alibaba + fastjson + ${fastjson.version} + + + + + commons-fileupload + commons-fileupload + ${commons.fileupload.version} + + + + + eu.bitwalker + UserAgentUtils + ${bitwalker.version} + + + + + org.apache.commons + commons-pool2 + + + + + com.alibaba + druid-spring-boot-starter + ${druid.version} + + + + + com.github.oshi + oshi-core + ${oshi.version} + + + + net.java.dev.jna + jna + + + + net.java.dev.jna + jna-platform + + + + com.github.pagehelper + pagehelper-spring-boot-starter + ${pagehelper.spring.boot.starter.version} + + + + + org.projectlombok + lombok + 1.18.8 + provided + + + + junit + junit + test + + + org.springframework.boot + spring-boot-starter-test + test + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + ${java.version} + ${java.version} + ${project.build.sourceEncoding} + + + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + false + + + + \ No newline at end of file