Compare commits

...

647 Commits

Author SHA1 Message Date
姜玉琦 5f6a91007c 提交代码 2025-06-27 16:56:19 +08:00
姜玉琦 577f9fe00d 提交代码 2025-06-21 16:02:52 +08:00
姜玉琦 621d160304 提交代码 2025-06-15 18:44:02 +08:00
姜玉琦 71cb6a0036 提交代码 2025-06-15 11:26:54 +08:00
姜玉琦 d32f40f420 提交代码 2025-06-14 13:53:44 +08:00
姜玉琦 eca2a2ee33 长安区项目 2025-06-07 18:24:31 +08:00
姜玉琦 f64bf8caa5 提交代码 2025-03-11 17:01:20 +08:00
lijun 93335e8adc 修复济工网参建项目没有统一社会信用代码引起的更新项目类型不正确问题 2025-03-08 14:19:55 +08:00
haha 17d5e6b873 修改济工网班组刷新类型不正确问题 2025-02-21 00:59:08 +08:00
haha 5106e36ae8 修复基坑监测管理 2025-01-01 13:45:10 +08:00
haha d4333ee497 修复服务返回为空 2025-01-01 00:32:09 +08:00
姜玉琦 58bad800a9 提交代码 2024-12-26 22:38:49 +08:00
lijun 77ce71f127 修改https服务请求证书不正确问题 2024-12-26 21:09:02 +08:00
姜玉琦 945c335c5c Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-12-26 00:29:40 +08:00
姜玉琦 f485b3a24c 提交代码 2024-12-26 00:29:32 +08:00
lijun 507fdc77c2 update code 2024-12-26 00:28:05 +08:00
姜玉琦 e55d2cd939 提交代码 2024-12-04 22:54:35 +08:00
姜玉琦 9d3cbc5237 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-12-04 21:57:18 +08:00
lijun 907e27c6a1 update code 2024-12-03 22:22:15 +08:00
lijun 9967de95ff update code 2024-12-03 22:10:57 +08:00
lijun bb1ccc5f75 修改CfgId获取逻辑 2024-12-02 22:45:36 +08:00
lijun 52b33369fe update code 2024-12-02 22:18:44 +08:00
lijun 38063da1ac update code 2024-11-25 22:15:30 +08:00
姜玉琦 6d14455417 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-11-22 00:40:31 +08:00
姜玉琦 7c4c765124 提交diamagnetic 2024-11-22 00:40:13 +08:00
lijun d89aed535d update code 2024-11-15 22:35:37 +08:00
lijun 00b199b034 劳务工资统计 2024-11-14 00:25:32 +08:00
lijun ddf8ffb418 update code 增加劳务工资管理功能 2024-11-13 22:08:39 +08:00
lijun cfb7c312bc update code 2024-11-10 23:48:52 +08:00
姜玉琦 752daf1d28 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-11-09 00:05:23 +08:00
姜玉琦 5023f645c9 提交代码 2024-11-09 00:05:16 +08:00
lijun 9a4f8fb373 update code 2024-10-30 22:13:47 +08:00
lijun 5546c225ea update code 2024-10-29 23:20:16 +08:00
lijun 9c1d0b36cf update code 2024-09-24 23:09:17 +08:00
姜玉琦 4bb2097e5c 修改时间格式化 2024-09-20 10:12:47 +08:00
姜玉琦 8477670166 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-09-13 00:16:43 +08:00
姜玉琦 9a9a5ffb92 提交代码 2024-09-13 00:16:36 +08:00
lijun 8415cba613 update code 2024-09-12 23:56:50 +08:00
lijun 8a885b2527 update code 2024-09-09 22:34:47 +08:00
lijun 4f59ca0038 修改Mapper文件 2024-09-07 22:18:40 +08:00
姜玉琦 10274861ca 提交代码 2024-09-06 13:52:19 +08:00
姜玉琦 217f4870f7 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-09-05 00:18:45 +08:00
姜玉琦 144d7cb859 提交代码 2024-09-05 00:16:25 +08:00
haha 498e0d7693 update code 2024-08-29 21:23:52 +08:00
haha d8ca3850b2 update code 2024-08-26 22:39:43 +08:00
haha ef50617d64 update code 2024-08-26 00:32:50 +08:00
haha 7df6458d57 基坑管理 2024-08-25 23:42:46 +08:00
haha ecf31c36e3 update code 2024-08-19 00:07:58 +08:00
haha 40616deade update code 2024-08-18 23:16:21 +08:00
haha 63218f6340 update code 2024-08-17 13:42:25 +08:00
haha 99c058db90 update code 2024-08-17 13:19:04 +08:00
haha bad6e18413 基坑监测大屏 2024-08-17 13:03:00 +08:00
姜玉琦 2cff3262c3 提交代码 2024-08-17 13:01:09 +08:00
姜玉琦 15be4236d1 提交代码 2024-08-14 23:31:29 +08:00
haha 4bfd46889c 增加基坑监测 2024-08-14 01:13:37 +08:00
姜玉琦 d926e43f93 提交代码 2024-08-13 22:38:48 +08:00
姜玉琦 0ff793ce80 提交代码 2024-08-13 22:21:12 +08:00
姜玉琦 78df575406 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-08-13 22:11:27 +08:00
姜玉琦 df2d132b1c 提交代码 2024-08-13 22:11:17 +08:00
haha 6fd4bb4cb0 基坑监测 2024-08-09 23:48:40 +08:00
姜玉琦 bb0f7c0a49 提交代码 2024-08-09 02:11:01 +08:00
姜玉琦 1a292837c9 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-08-08 00:33:35 +08:00
姜玉琦 64e3d335cf 提交代码 2024-08-08 00:33:25 +08:00
haha 6b593024ff udpate code 2024-08-06 23:26:23 +08:00
姜玉琦 3685314a3f 提交代码 2024-08-06 21:45:37 +08:00
姜玉琦 436d65f7be 提交代码 2024-07-31 23:59:35 +08:00
姜玉琦 a453a2a9a8 提交代码 2024-07-29 13:21:44 +08:00
haha 366ef273e9 update code 2024-07-24 00:43:20 +08:00
姜玉琦 355db93705 2024-07-23 00:19:35 +08:00
姜玉琦 264b81b661 提交代码 2024-07-08 00:21:37 +08:00
姜玉琦 719d5d555b Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
# Conflicts:
#	ruoyi-ui/src/views/project/projectChecking/index.vue
2024-07-07 01:00:36 +08:00
姜玉琦 f4d4b24d63 提交代码 2024-07-07 00:54:33 +08:00
haha 89e25def13 update code 2024-07-05 23:33:45 +08:00
haha 0915a8d283 update code 2024-07-04 23:54:11 +08:00
姜玉琦 1957fcde25 提交代码 2024-07-04 23:23:53 +08:00
姜玉琦 e6da0628fa 提交代码 2024-07-04 21:59:19 +08:00
姜玉琦 088d06e481 提交代码 2024-07-03 01:12:04 +08:00
姜玉琦 0c578efa80 提交代码 2024-07-03 00:17:09 +08:00
haha 64aa70ce9c update code 2024-07-02 23:42:34 +08:00
姜玉琦 c6cef388aa Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-07-02 00:20:13 +08:00
姜玉琦 606ceeec5e 提交代码 2024-07-02 00:20:03 +08:00
haha da60e4c4cd Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-07-02 00:17:00 +08:00
haha 9f246ff401 update code 2024-07-02 00:16:43 +08:00
姜玉琦 9dd0fa9b07 提交代码 2024-07-02 00:16:40 +08:00
姜玉琦 31ce33abc5 提交代码 2024-07-02 00:07:21 +08:00
姜玉琦 1e415b020c Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-07-01 23:57:31 +08:00
姜玉琦 ef013a1538 提交代码 2024-07-01 23:57:15 +08:00
haha d3c6158ef6 update code 2024-07-01 23:10:46 +08:00
haha 8ed539f272 update code 2024-06-26 23:57:44 +08:00
haha f7fa9a0217 update code 2024-06-22 00:53:40 +08:00
haha 0821f9a41b update code 2024-06-16 22:04:02 +08:00
haha 7172e929b5 update code 2024-06-12 22:45:37 +08:00
haha 03ee180175 update code 2024-06-11 23:54:41 +08:00
haha f43818ff7d update code 2024-06-11 23:33:06 +08:00
haha 895537a762 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-06-06 22:45:44 +08:00
haha 48041fecbb update code 2024-06-06 22:43:56 +08:00
姜玉琦 65d90a55e6 提交代码 2024-06-06 22:13:49 +08:00
姜玉琦 e97597db8e 提交代码 2024-06-04 00:12:18 +08:00
haha 77a813b926 update code 2024-05-28 00:20:42 +08:00
haha 512dbc3062 update code 2024-05-27 23:49:16 +08:00
haha b2fd820f2c update code 2024-05-27 00:29:03 +08:00
haha 8a517b86d1 update code 2024-05-26 00:35:42 +08:00
haha 1b1f60fd3a update code 2024-05-25 21:58:32 +08:00
haha 706c95a767 update code 2024-05-25 15:57:19 +08:00
haha e520f4dd45 update code 2024-05-25 15:32:33 +08:00
姜玉琦 3dc0328cbe 提交代码 2024-05-21 22:37:04 +08:00
姜玉琦 71524f2092 提交代码 2024-05-21 22:22:58 +08:00
姜玉琦 faa9c0110c 提交代码 2024-05-20 22:37:33 +08:00
姜玉琦 b3e68ed85b 提交代码 2024-05-19 09:59:22 +08:00
姜玉琦 342bed13f1 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-05-15 01:53:49 +08:00
姜玉琦 a537cf8542 提交代码 2024-05-15 01:53:20 +08:00
haha 076159a6d6 update code 2024-05-14 22:27:56 +08:00
haha d1d3aa20e3 update code 2024-05-14 22:05:11 +08:00
haha 717f630524 update code 2024-05-14 00:48:13 +08:00
haha 378d7b7e74 update code 2024-05-14 00:20:10 +08:00
haha 609379f507 update code 2024-05-13 23:58:23 +08:00
姜玉琦 ed4601e356 分包商改为分包单位 2024-05-13 22:13:31 +08:00
姜玉琦 d6262c7f4b 提交代码 2024-05-13 22:06:16 +08:00
姜玉琦 0e73b22ddd 提交代码 2024-05-10 22:57:10 +08:00
姜玉琦 ccbb9b8683 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
# Conflicts:
#	yanzhu-jh/src/main/resources/mapper/project/SurProjectAttendanceUserMapper.xml
2024-05-10 02:48:41 +08:00
姜玉琦 79faece817 提交代码 2024-05-10 02:42:43 +08:00
haha 19c540b97e update code 2024-05-09 22:02:20 +08:00
haha 3c6ec3fb1d update code 2024-05-09 00:26:18 +08:00
haha 547ddde5c5 update code 2024-05-08 23:29:47 +08:00
haha 71bca5dfed update code 2024-05-08 00:09:51 +08:00
haha 0703ac1fa3 update code 2024-05-07 22:38:42 +08:00
姜玉琦 2787535ef5 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-05-06 23:56:41 +08:00
姜玉琦 0f4d98f854 提交代码 2024-05-06 23:56:30 +08:00
haha a87456e66c update code 2024-05-06 23:54:42 +08:00
haha 88fb45eb50 update code 2024-05-06 23:50:49 +08:00
haha 984dbb03df update code 2024-05-06 23:20:56 +08:00
haha 41227985d8 update code 2024-05-06 23:20:47 +08:00
haha 398bf1f8c8 update code 2024-05-06 22:37:14 +08:00
姜玉琦 a6735b2f79 提交代码 2024-05-06 22:26:08 +08:00
姜玉琦 ec7a9dbb08 提交diamagnetic 2024-05-05 22:31:46 +08:00
姜玉琦 5ae9dd8387 提交代码 2024-05-05 21:42:27 +08:00
姜玉琦 95623ffc73 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-05-05 15:37:43 +08:00
姜玉琦 a77cfd4b41 提交代码 2024-05-05 15:37:31 +08:00
haha c63d824aaf update code 2024-05-04 00:57:31 +08:00
haha 9a3f8bfee8 update code 2024-05-03 20:56:28 +08:00
姜玉琦 1c107346dc 提交代码 2024-05-03 10:38:24 +08:00
姜玉琦 f0c9416033 提交代码 2024-05-03 07:36:47 +08:00
haha b6c4b380ab update code 2024-04-29 23:48:03 +08:00
姜玉琦 98009c0428 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-29 23:16:33 +08:00
姜玉琦 e0eef9ab44 提交代码 2024-04-29 23:15:32 +08:00
haha 4561bf0ece update code 2024-04-29 23:01:19 +08:00
haha 18d7c62c62 update code 2024-04-29 00:24:19 +08:00
姜玉琦 414794eee3 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-29 00:19:06 +08:00
姜玉琦 95d0df9c64 提交代码 2024-04-29 00:18:59 +08:00
haha 14ae81bc79 update code 2024-04-29 00:18:07 +08:00
haha 937078db0e update code 2024-04-28 00:46:33 +08:00
姜玉琦 72b976a06d 提交代码 2024-04-28 00:44:17 +08:00
姜玉琦 d6ce975a17 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-27 23:04:05 +08:00
姜玉琦 a55c3b2796 提交代码 2024-04-27 23:03:59 +08:00
haha 100e60262b 举牌验收添加上传附件功能 2024-04-26 23:28:29 +08:00
姜玉琦 4c985bc938 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-26 01:50:25 +08:00
姜玉琦 10e9122d80 提交代码 2024-04-26 01:50:07 +08:00
姜玉琦 a0abfe7d63 提交代码 2024-04-26 01:39:41 +08:00
haha fec95d36d4 update code 2024-04-26 00:08:04 +08:00
姜玉琦 4c9fdf7d79 提交代码 2024-04-26 00:00:20 +08:00
姜玉琦 6eba1c3319 提交代码 2024-04-25 23:59:04 +08:00
姜玉琦 08d0cc59b8 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-25 22:22:30 +08:00
姜玉琦 808bd00b14 提交代码 2024-04-25 22:22:23 +08:00
haha 0caa21dc18 update code 2024-04-25 21:57:25 +08:00
haha 8c4f6c2566 update code 2024-04-24 23:03:59 +08:00
姜玉琦 0dd90e3f7c Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-24 09:54:52 +08:00
姜玉琦 7be144b0da 提交diamagnetic 2024-04-24 09:54:41 +08:00
haha 2564638487 update code 2024-04-24 00:26:19 +08:00
haha 9cf1d824c7 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-22 23:00:38 +08:00
姜玉琦 68b30653a4 提交代码 2024-04-22 22:59:51 +08:00
haha 96816e8cc4 update code 2024-04-22 22:58:44 +08:00
姜玉琦 9a2890f78e Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-22 22:10:50 +08:00
姜玉琦 64a606452e 提交代码 2024-04-22 22:10:44 +08:00
haha 70a406f8c1 update code 2024-04-22 22:09:58 +08:00
姜玉琦 5561d11cb3 提交代码 2024-04-21 21:52:07 +08:00
姜玉琦 472477e385 提交 2024-04-21 21:45:46 +08:00
姜玉琦 43800049e6 提交代码 2024-04-21 21:35:47 +08:00
姜玉琦 50e93eb810 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-21 16:16:19 +08:00
姜玉琦 4edca70f3d 提交数据 2024-04-21 16:16:12 +08:00
haha 57b14f135e update code 2024-04-21 15:27:01 +08:00
haha 07ed3deb3d update code 2024-04-21 15:05:04 +08:00
姜玉琦 57fb2aeca4 提交代码 2024-04-21 14:01:12 +08:00
姜玉琦 65c562bdd8 提交代码 2024-04-21 13:42:36 +08:00
姜玉琦 895c8df662 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-21 13:07:40 +08:00
姜玉琦 17bd1141f2 提交代码 2024-04-21 13:07:30 +08:00
haha 7df7c1eb5a update code 2024-04-20 22:29:34 +08:00
姜玉琦 694b343fcb 提交代码 2024-04-20 16:19:35 +08:00
姜玉琦 7976f3018e 提交代码 2024-04-19 22:07:48 +08:00
姜玉琦 608eeaa964 提交代码 2024-04-19 12:48:34 +08:00
haha 3d20c2d291 update code 2024-04-19 00:21:14 +08:00
haha 11fac30ca2 update code 2024-04-18 23:28:34 +08:00
姜玉琦 470b29b69d Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-18 01:05:17 +08:00
姜玉琦 cc64d105e1 提交代码 2024-04-18 01:05:09 +08:00
haha c852080ed4 update code 2024-04-17 21:51:46 +08:00
姜玉琦 ebfd22a37b Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-17 02:18:42 +08:00
姜玉琦 817086dd2a 提交 2024-04-17 02:18:33 +08:00
haha cac64f79d5 update code 2024-04-17 00:32:01 +08:00
haha e62220744c update code 2024-04-16 00:22:29 +08:00
姜玉琦 7033395690 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-15 22:40:00 +08:00
姜玉琦 b60ad07a83 提交代码 2024-04-15 22:39:53 +08:00
haha 9cca67e0c0 update code 2024-04-15 21:10:17 +08:00
haha 469a6e7381 update code 2024-04-15 20:38:21 +08:00
姜玉琦 225c258af3 提交代码 2024-04-15 10:48:43 +08:00
姜玉琦 364d77134e 提交代码 2024-04-15 00:44:08 +08:00
姜玉琦 718ff531fc Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-14 23:55:40 +08:00
姜玉琦 fb1bb46ca1 提交代码 2024-04-14 23:54:57 +08:00
haha d1bfb36b3b update code 2024-04-14 23:52:47 +08:00
haha 2fa278a1a9 update code 2024-04-14 23:32:00 +08:00
haha 1f492bc77f update code 2024-04-14 23:25:20 +08:00
haha ea1a05658e update code 2024-04-14 22:29:50 +08:00
姜玉琦 ed2f1aba5f 提u叫 2024-04-14 22:14:32 +08:00
姜玉琦 d57b016f25 提交代码 2024-04-12 00:55:00 +08:00
姜玉琦 d5008959b0 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-11 02:25:50 +08:00
姜玉琦 83e7899ca5 提交 2024-04-11 02:25:25 +08:00
haha de015b4a24 update code 2024-04-11 01:23:16 +08:00
haha eecdfb9d2c update code 2024-04-11 00:26:45 +08:00
haha 42d9d37e17 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-11 00:18:53 +08:00
haha a32336c77d update code 2024-04-11 00:18:16 +08:00
姜玉琦 0c3bd22fea 提交代码 2024-04-10 23:16:24 +08:00
haha f4ae458d92 update code 2024-04-10 22:55:33 +08:00
姜玉琦 a9f5df0eb5 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-10 11:57:20 +08:00
姜玉琦 208fe7f81f 提交整改 2024-04-10 11:57:13 +08:00
haha eb5bc695d0 update code 2024-04-10 00:12:56 +08:00
姜玉琦 ed1d3cfb75 提交代码 2024-04-09 23:13:01 +08:00
haha 2c67e41fee update code 2024-04-09 22:40:11 +08:00
haha e7a6e0309f update code 2024-04-09 22:22:23 +08:00
haha b7369b07cc update code 2024-04-09 21:48:00 +08:00
姜玉琦 675007d23b 提交diamond 2024-04-09 21:46:26 +08:00
姜玉琦 f8833cd1fd Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-09 00:57:40 +08:00
姜玉琦 265a7abb1a 提交代码 2024-04-09 00:57:32 +08:00
haha 61cac97d84 update code 2024-04-09 00:27:00 +08:00
haha 1d4bb33bda Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-09 00:01:47 +08:00
haha eebd27dfb5 update code 2024-04-09 00:01:26 +08:00
姜玉琦 06d152aaeb Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-08 23:34:56 +08:00
haha 527aa28a0b update code 2024-04-08 23:34:32 +08:00
姜玉琦 8810677ca7 提交代码 2024-04-08 23:34:22 +08:00
姜玉琦 963d86f209 提交代码 2024-04-08 11:33:58 +08:00
haha be19c476b5 update code 2024-04-08 02:08:28 +08:00
haha 73690ae5c2 update code 2024-04-08 01:54:00 +08:00
姜玉琦 c067dacc84 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-07 21:38:48 +08:00
姜玉琦 172adad75a 提交代码 2024-04-07 21:38:43 +08:00
haha 26316752c1 update code 2024-04-07 21:18:24 +08:00
姜玉琦 e9c16e7964 提交代码 2024-04-07 00:51:44 +08:00
haha d4e38dc40f update code 2024-04-07 00:07:56 +08:00
haha da63db6425 update code 2024-04-06 23:41:04 +08:00
haha f4bb8d22df update code 2024-04-06 23:25:16 +08:00
姜玉琦 ec8cf4060c 提交diamagnetic 2024-04-06 22:51:35 +08:00
haha 9b3feddcfb update code 2024-04-06 21:21:55 +08:00
姜玉琦 194d6214c6 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-06 17:59:18 +08:00
姜玉琦 f8e82414ad 提交代码 2024-04-06 17:59:11 +08:00
haha e21756cd24 update code 2024-04-06 17:39:54 +08:00
haha 645944e305 update code 2024-04-06 16:14:18 +08:00
haha e20b36b1e7 update code 2024-04-06 15:34:26 +08:00
姜玉琦 d525dcd0a6 提交代码 2024-04-06 13:55:01 +08:00
姜玉琦 1dc7cdf4f3 提交代码 2024-04-06 01:31:14 +08:00
姜玉琦 6e84af4b01 提交 2024-04-05 19:26:28 +08:00
姜玉琦 cbec808a2e 提交代码 2024-04-05 19:25:29 +08:00
姜玉琦 cf74666de8 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-04-03 01:47:09 +08:00
姜玉琦 8b751cd807 提交代码 2024-04-03 01:47:02 +08:00
haha 46a9633e89 update code 2024-04-01 23:37:58 +08:00
haha 049d84a73b update code 2024-04-01 22:37:40 +08:00
姜玉琦 f974e753d1 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-31 23:42:08 +08:00
姜玉琦 ea6ee3af97 提交代码 2024-03-31 23:42:01 +08:00
haha fb02b1a244 update code 2024-03-31 23:40:18 +08:00
姜玉琦 3ceb360237 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-31 23:32:09 +08:00
姜玉琦 f57eb151db 提交代码 2024-03-31 23:32:00 +08:00
haha 18285da559 update code 2024-03-31 23:02:00 +08:00
haha 8bd551dce8 update code 2024-03-30 22:20:24 +08:00
haha 47bc7fe61a update code 2024-03-30 00:04:23 +08:00
haha ff87c12d35 update code 2024-03-29 00:19:44 +08:00
姜玉琦 6d76c84442 1 2024-03-28 23:29:23 +08:00
姜玉琦 10ee8994c2 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-28 23:20:41 +08:00
姜玉琦 8b06d3e889 提交代码 2024-03-28 23:20:28 +08:00
haha 8a49d3f250 update code 2024-03-28 22:02:25 +08:00
姜玉琦 b21bbf095d Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-28 13:24:57 +08:00
姜玉琦 5531f0d1d7 提交 2024-03-28 13:24:41 +08:00
姜玉琦 bea64274ab 提交代码 2024-03-28 13:24:22 +08:00
姜玉琦 8a761e00a3 提交代码 2024-03-28 13:23:56 +08:00
姜玉琦 9fc9b9e3b2 提交代码 2024-03-28 13:23:41 +08:00
haha 936d499927 update code 2024-03-28 00:10:50 +08:00
haha 9c7a500916 update code 2024-03-26 02:05:09 +08:00
haha e2524e4bdf update code 2024-03-26 01:44:19 +08:00
姜玉琦 8edb022406 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-26 01:13:28 +08:00
姜玉琦 be10111f98 提交代码 2024-03-26 01:13:20 +08:00
haha 1be2c0e05c update code 2024-03-26 01:13:02 +08:00
haha 745f2ee510 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-26 01:06:17 +08:00
haha a88422a963 update code 2024-03-26 01:05:54 +08:00
姜玉琦 cdcefab554 提交代码 2024-03-26 00:51:10 +08:00
haha 4b9a42c288 update code 2024-03-25 23:43:54 +08:00
姜玉琦 74b3ae5d72 提交代码 2024-03-25 23:39:09 +08:00
haha 0afd1137bb update code 2024-03-24 23:44:10 +08:00
姜玉琦 05b4938827 提交代码 2024-03-24 23:39:57 +08:00
姜玉琦 77c2a74c25 提交代码 2024-03-24 20:09:34 +08:00
姜玉琦 668912e91c Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-24 01:38:50 +08:00
姜玉琦 841a42159e 提交代码 2024-03-24 01:38:42 +08:00
haha cb0cb1fce7 update code 2024-03-23 22:51:05 +08:00
haha 41a8a5179d update code 2024-03-23 18:32:18 +08:00
haha 0240c1a2a1 update code 2024-03-23 09:30:31 +08:00
姜玉琦 5c90be5110 提交代码 2024-03-23 03:30:53 +08:00
姜玉琦 04004b10ee Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-23 03:15:13 +08:00
姜玉琦 1693ba2efc 提交代码 2024-03-23 03:15:07 +08:00
haha d67247be37 update code 2024-03-23 03:02:33 +08:00
姜玉琦 2a2d4c42b4 提交哦 2024-03-23 02:47:08 +08:00
姜玉琦 25aa45ba70 提交代码 2024-03-23 02:44:12 +08:00
姜玉琦 b44d75bf37 提交代码 2024-03-23 02:42:31 +08:00
姜玉琦 0f8e5522cd Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-23 02:29:57 +08:00
姜玉琦 56c53fb4ab 提交代码 2024-03-23 02:29:51 +08:00
haha 4627b967c0 update code 2024-03-23 02:28:39 +08:00
haha b5110ca8e6 update code 2024-03-23 02:17:39 +08:00
haha 9bade2237e update code 2024-03-23 01:33:04 +08:00
haha ce59957910 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-23 01:27:34 +08:00
haha 32b5398830 update code 2024-03-23 01:27:13 +08:00
姜玉琦 5e6933cc3d 提交代码 2024-03-23 01:02:55 +08:00
姜玉琦 f5205e4dba Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-23 00:59:15 +08:00
姜玉琦 6c2eb7ee27 体哦 2024-03-23 00:59:08 +08:00
haha ae8e44db92 update code 2024-03-23 00:57:06 +08:00
姜玉琦 be9b9b3846 提交代码 2024-03-23 00:26:46 +08:00
haha 007804ab37 update code 2024-03-23 00:22:47 +08:00
姜玉琦 d5fbe11cc9 提交代码 2024-03-23 00:17:15 +08:00
姜玉琦 378f6da4a3 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev
# Conflicts:
#	yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectAttendanceDataServiceImpl.java
2024-03-23 00:14:22 +08:00
姜玉琦 8427bd6235 提交代码 2024-03-23 00:11:55 +08:00
haha e5d1c14842 update code 2024-03-22 23:44:12 +08:00
haha 5978c46fc0 update code 2024-03-22 22:44:32 +08:00
haha 6edebbef77 update code 2024-03-22 22:00:33 +08:00
haha 17d7b923e2 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-22 21:59:10 +08:00
姜玉琦 b679930530 提交 2024-03-22 01:23:53 +08:00
姜玉琦 ad4692ea79 提交 2024-03-22 01:09:31 +08:00
haha 6886d5b521 update code 2024-03-22 00:25:31 +08:00
姜玉琦 cf1bbc65a8 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-21 23:12:02 +08:00
姜玉琦 391d800ea9 提交代码 2024-03-21 23:11:55 +08:00
haha 346b3e1443 update code 2024-03-21 23:09:58 +08:00
haha 978434df1f update code 2024-03-20 23:38:25 +08:00
姜玉琦 98c5d7f979 提交代码 2024-03-19 23:24:37 +08:00
姜玉琦 509eb22d28 提交代码 2024-03-18 22:48:55 +08:00
姜玉琦 1b8fb5fac3 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-17 17:00:20 +08:00
姜玉琦 10aa8b23a7 提交代码 2024-03-17 17:00:12 +08:00
haha e1e82f7796 update code 2024-03-16 15:29:07 +08:00
haha 9f80befa1a update code 华筑考勤无效数据不入库 2024-03-16 14:39:54 +08:00
haha 6afbc7d937 update code 2024-03-16 00:02:59 +08:00
haha 6ed84b9dad 增加济工考勤 2024-03-15 23:25:37 +08:00
haha 09de575360 update code 2024-03-14 23:11:14 +08:00
haha 9566d0e9c6 update code 2024-03-14 22:36:26 +08:00
姜玉琦 82c0269d22 提交代码 2024-03-14 22:29:50 +08:00
姜玉琦 7b40942bcc 提交代码 2024-03-14 13:51:55 +08:00
姜玉琦 ca690cb5e6 提交代码 2024-03-12 14:10:18 +08:00
姜玉琦 9b73add815 提交代码 2024-03-11 00:56:19 +08:00
姜玉琦 aaab711287 提交 2024-03-09 19:49:30 +08:00
haha 684c088d56 update code 2024-03-06 22:43:19 +08:00
haha 37543aea5b update code 2024-03-04 00:20:08 +08:00
姜玉琦 feb864da4a 提交代码 2024-03-03 23:34:45 +08:00
姜玉琦 c9743faf84 提交代码 2024-03-03 12:11:51 +08:00
姜玉琦 90b00afa66 vue config 2024-03-03 12:10:46 +08:00
姜玉琦 3c4e606e6b Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-03-02 18:25:39 +08:00
姜玉琦 14b465cc44 提交代码 2024-03-02 18:25:31 +08:00
haha c6e886cd40 update code 2024-03-01 23:34:15 +08:00
姜玉琦 aa9ad12c7d 提交代码 2024-02-17 14:19:29 +08:00
姜玉琦 e3933ca4d9 提交代码 2024-02-17 13:37:47 +08:00
haha 62a7807720 update code 2024-02-01 23:05:24 +08:00
haha 88326fad41 update code 2024-01-31 22:44:45 +08:00
姜玉琦 e0cea68644 提交代码 2024-01-29 13:34:50 +08:00
haha 017d41b96c update code 2024-01-26 22:45:20 +08:00
haha 85b8ed616a update code 2024-01-25 22:51:56 +08:00
姜玉琦 b6a04edec9 提交 2024-01-22 11:14:43 +08:00
姜玉琦 de2042e0b9 提交代码 2024-01-22 10:28:43 +08:00
姜玉琦 ca300ff472 提交代码 2024-01-22 02:47:42 +08:00
姜玉琦 f845d6e42f 提交代码 2024-01-21 22:47:57 +08:00
姜玉琦 64b66015aa 提交代码 2024-01-21 20:09:16 +08:00
姜玉琦 136ed49630 提交 2024-01-21 16:58:30 +08:00
姜玉琦 15fe949a59 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-01-21 16:50:58 +08:00
姜玉琦 76014fbd94 提交代码 2024-01-21 16:50:44 +08:00
haha 67b00fba13 update code 2024-01-21 16:24:09 +08:00
姜玉琦 c7d542a769 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-01-20 21:06:20 +08:00
姜玉琦 cc1e20f77d 提交 2024-01-20 21:05:20 +08:00
haha 7e62fc42fc update code 2024-01-19 23:38:45 +08:00
haha fd1ea49ae0 update code 2024-01-19 00:22:29 +08:00
haha c5193f0c10 update code 2024-01-17 23:58:43 +08:00
haha f0ddfdc118 update code 2024-01-16 22:54:21 +08:00
haha 003921c7b3 update code 2024-01-16 21:39:51 +08:00
haha 6135cba522 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-01-14 23:18:55 +08:00
haha d3a510731d update code 2024-01-14 23:18:41 +08:00
姜玉琦 e36473eb05 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-01-14 22:09:33 +08:00
姜玉琦 51a9d61137 提交代码 2024-01-14 22:09:27 +08:00
haha 5570eb7be7 update code 2024-01-14 22:03:38 +08:00
姜玉琦 df08d716a7 提交代码 2024-01-14 21:24:01 +08:00
姜玉琦 785794a948 提交代码 2024-01-14 17:20:14 +08:00
姜玉琦 c8230c6b54 提交代码 2024-01-14 17:17:31 +08:00
姜玉琦 567fd3f237 提交代码 2024-01-14 17:14:34 +08:00
姜玉琦 d49091a697 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2024-01-14 02:34:33 +08:00
姜玉琦 287d860c8f 提交代码 2024-01-14 02:34:07 +08:00
haha 5dc0224f96 update code 2024-01-13 23:38:14 +08:00
姜玉琦 de7301d3d2 提交代码 2024-01-13 22:51:34 +08:00
姜玉琦 7065aa0648 提交代码 2024-01-13 22:30:30 +08:00
姜玉琦 b529cf5946 提交代码 2024-01-13 19:53:42 +08:00
haha 93b207a1dc update code 2024-01-13 00:03:25 +08:00
haha d8edf04fa7 update code 2024-01-12 00:31:02 +08:00
haha fa8140c80c update code 2024-01-11 23:11:51 +08:00
姜玉琦 c94a1b5cd8 提交代码 2024-01-10 15:03:15 +08:00
haha fc09fb5097 update code 2024-01-09 22:52:47 +08:00
姜玉琦 b09d0cecf0 提交大 2024-01-01 20:09:27 +08:00
姜玉琦 d8d8ed75d5 提交代码 2024-01-01 20:03:12 +08:00
姜玉琦 d0f5ff6bba 提交代码 2024-01-01 19:59:54 +08:00
haha ec8dab461b 大屏工程管理修改 2023-12-28 23:34:54 +08:00
姜玉琦 b4e546c58f 提交代码 2023-12-25 00:54:33 +08:00
姜玉琦 d6a7af16d9 提交代码 2023-12-25 00:54:07 +08:00
姜玉琦 b713df6815 提交代码 2023-12-25 00:53:36 +08:00
姜玉琦 4ab19823f0 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-12-22 23:36:08 +08:00
姜玉琦 b7844e3d3f 提交代码 2023-12-22 23:36:01 +08:00
haha cfc468ac1f update code 2023-12-13 22:14:10 +08:00
姜玉琦 287f532189 提交代码 2023-12-13 02:36:04 +08:00
姜玉琦 e85796bf6d Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-12-01 23:00:41 +08:00
姜玉琦 7b5b18bbd3 提交代码 2023-12-01 23:00:35 +08:00
haha fb247b77df update code 2023-11-29 21:19:47 +08:00
姜玉琦 a4683015f7 修改bug 2023-11-27 13:42:20 +08:00
姜玉琦 e546f71cce 代码提交 2023-11-26 11:58:55 +08:00
姜玉琦 dbb809777c 提交代码 2023-11-21 00:05:42 +08:00
姜玉琦 8139308f82 提交代码 2023-11-19 23:49:35 +08:00
姜玉琦 866062f79f Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-11-11 10:12:13 +08:00
姜玉琦 75b93ff7f0 提交 2023-11-11 10:12:04 +08:00
haha 53bb1fbc34 update code 2023-11-10 22:01:29 +08:00
姜玉琦 004cb4b139 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-11-09 00:51:28 +08:00
姜玉琦 62b7a8bdd2 代码提交 2023-11-09 00:51:12 +08:00
haha e26ec84349 update code 2023-11-06 23:16:06 +08:00
haha 423d77a86c update code 2023-11-06 00:02:19 +08:00
姜玉琦 c470afad2a 提交 2023-11-05 23:58:38 +08:00
姜玉琦 52c2259345 提交代码 2023-11-05 23:57:42 +08:00
姜玉琦 5763cd2855 提交代码 2023-11-02 23:04:34 +08:00
姜玉琦 2a70bae606 提交代码 2023-11-02 23:04:14 +08:00
姜玉琦 60f8ab935f 提交代码 2023-10-27 00:44:12 +08:00
姜玉琦 26bd6af26d 提交代码 2023-10-27 00:43:37 +08:00
姜玉琦 26d2d694b7 提交代码 2023-10-23 23:09:54 +08:00
姜玉琦 b9fc0025b2 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-23 01:35:09 +08:00
姜玉琦 31bb5ef630 提交代码 2023-10-23 01:35:04 +08:00
haha 0fe04687f7 update code 2023-10-22 23:45:32 +08:00
姜玉琦 c52ea9d74e Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-20 17:55:58 +08:00
姜玉琦 b1efceb675 提交代码 2023-10-20 17:55:52 +08:00
haha 36a64089b8 update code 2023-10-18 22:43:43 +08:00
姜玉琦 2a8ee698d8 提交代码 2023-10-18 01:00:46 +08:00
姜玉琦 467a91a440 提交代码 2023-10-18 00:47:45 +08:00
姜玉琦 8d5d3ce124 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-17 02:22:23 +08:00
姜玉琦 daa7a1ee35 提交代码 2023-10-17 02:22:05 +08:00
haha 10c34adf17 update code 2023-10-16 23:52:32 +08:00
haha 190e6b8bc5 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-16 19:44:58 +08:00
haha 7a4f736b2d update code 2023-10-16 19:44:43 +08:00
姜玉琦 08a0575e4a 提交代码 2023-10-16 01:01:23 +08:00
姜玉琦 8af61d5b99 提交代码 2023-10-16 00:36:24 +08:00
姜玉琦 cab52bcc01 提交代码 2023-10-16 00:00:25 +08:00
haha 3564e8926d Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-15 20:36:39 +08:00
haha 995b7e88d6 update code 2023-10-15 20:35:48 +08:00
姜玉琦 a384c08c10 提交代码 2023-10-15 15:43:34 +08:00
haha c1159de712 update code 2023-10-15 00:26:07 +08:00
haha 624707bd1e update code 2023-10-14 19:51:45 +08:00
姜玉琦 056dbef838 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-14 18:28:38 +08:00
姜玉琦 defe0080fa 提交代码 2023-10-14 18:28:33 +08:00
haha 88c34f9260 Merge branch 'dev-login' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-13 23:58:48 +08:00
姜玉琦 ded2d46796 提交了 2023-10-13 23:57:52 +08:00
姜玉琦 4fa4c19b62 提交代码 2023-10-13 04:00:58 +08:00
haha 7abdf61454 update code 2023-10-12 23:34:17 +08:00
姜玉琦 d7e13004b2 提交代码 2023-10-12 03:53:40 +08:00
haha 334cfae105 update code 2023-10-11 23:48:11 +08:00
haha 5fd792ded5 update code 2023-10-11 23:24:45 +08:00
haha 0036578c0e update code 2023-10-07 21:59:57 +08:00
姜玉琦 180ff53331 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-10-07 01:31:38 +08:00
姜玉琦 b9e62739ea 提交代码 2023-10-07 01:31:27 +08:00
haha 96163b4c9e update code 2023-10-07 00:48:44 +08:00
haha 1b0eb695d9 update code 2023-10-04 21:54:50 +08:00
haha 672638af84 update code 2023-10-01 19:45:32 +08:00
haha 56be8f69c9 update code 2023-09-30 23:03:37 +08:00
haha f2dce819a3 update code 2023-09-29 23:31:21 +08:00
姜玉琦 b899f57109 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-29 01:08:32 +08:00
姜玉琦 910b277071 提交代码 2023-09-29 01:08:26 +08:00
haha 20a142626e update code 2023-09-29 00:24:15 +08:00
haha c281a11886 update code 2023-09-27 00:37:24 +08:00
姜玉琦 ac05a76efe 提交代码 2023-09-28 00:36:36 +08:00
haha 88d671d50b update code 2023-09-27 00:09:47 +08:00
姜玉琦 a251af1189 提交代码 2023-09-26 23:51:32 +08:00
姜玉琦 09b0a22862 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-26 23:49:03 +08:00
姜玉琦 5278145ffd 提交代码 2023-09-26 23:48:57 +08:00
haha 3ab35b0d15 update code 2023-09-26 00:01:20 +08:00
haha e0f32fb7df update code 2023-09-25 00:32:36 +08:00
姜玉琦 eba10b7cb7 提交代码 2023-09-24 23:23:41 +08:00
姜玉琦 02e676c6a7 提交代码 2023-09-24 21:47:06 +08:00
haha 97a20c7350 update code 2023-09-24 18:35:52 +08:00
姜玉琦 1d87ebfad3 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-24 16:36:20 +08:00
姜玉琦 a9467e2ad0 提交代码 2023-09-24 16:36:02 +08:00
haha 438f7f8075 update code 2023-09-23 22:42:11 +08:00
haha 7a1613d92b update code 2023-09-23 20:15:30 +08:00
姜玉琦 89fc3a7891 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-23 20:13:02 +08:00
姜玉琦 6914d9f362 提交代码 2023-09-23 20:12:49 +08:00
haha 1cb5bc95c4 update code 2023-09-23 16:30:45 +08:00
姜玉琦 5a83cc3f54 提交代码 2023-09-23 16:18:58 +08:00
姜玉琦 b70e4662d3 优化项目审批 2023-09-23 11:30:21 +08:00
姜玉琦 a485269f95 提交代码 2023-09-23 01:34:04 +08:00
姜玉琦 3532bc3f04 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-22 13:05:48 +08:00
姜玉琦 bf2eeb79b0 提交代码,优化表格斑马纹 2023-09-22 13:05:42 +08:00
haha 2241d0290d update code 2023-09-22 00:32:08 +08:00
姜玉琦 b842ee2035 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-21 23:17:26 +08:00
姜玉琦 024956fc84 提交代码 2023-09-21 23:17:15 +08:00
haha d569b2af29 update code 2023-09-20 23:37:11 +08:00
姜玉琦 b0b3259c99 提交代码 2023-09-20 23:03:04 +08:00
姜玉琦 9d617720df 优化代码 2023-09-20 22:28:55 +08:00
姜玉琦 3803bb90f6 sql归档 2023-09-17 22:54:36 +08:00
姜玉琦 7e905fe6cc 提交 2023-09-17 18:10:15 +08:00
姜玉琦 ff9f1492bc 优化带啊 2023-09-17 18:09:50 +08:00
姜玉琦 4bb491435b Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-17 02:07:22 +08:00
姜玉琦 84416591b6 提交代码 2023-09-17 02:07:01 +08:00
haha 713e55768f update code 2023-09-16 00:09:12 +08:00
haha 64f878f661 update code 2023-09-15 00:22:38 +08:00
haha 4f74fb35f7 update code 2023-09-14 00:58:30 +08:00
姜玉琦 7bd6985565 提交代码 2023-09-13 01:12:19 +08:00
姜玉琦 750c6eec1d 提交代码 2023-09-12 13:02:30 +08:00
姜玉琦 71b3c744ea 提交审批撤回操作 2023-09-12 12:41:50 +08:00
姜玉琦 a2581d63e9 提交代码 2023-09-12 01:52:30 +08:00
haha bca6a3aafd update code 2023-09-11 00:19:49 +08:00
姜玉琦 3e026402b3 提交代码 2023-09-10 21:58:13 +08:00
姜玉琦 4aa6dd07a3 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-10 18:30:50 +08:00
姜玉琦 0ea4f88136 提交代码 2023-09-10 18:30:44 +08:00
haha 76fcef9140 update code 2023-09-10 15:44:04 +08:00
姜玉琦 44196a636b 提交代码 2023-09-10 13:50:44 +08:00
haha e43e9e0225 update code 2023-09-10 00:57:28 +08:00
姜玉琦 e3dc2d1153 提交 2023-09-09 23:08:29 +08:00
姜玉琦 17f902fa9d 提交代码 2023-09-09 23:00:32 +08:00
姜玉琦 5ee96b1837 提交代码 2023-09-09 22:34:56 +08:00
姜玉琦 cd4eae7450 提交代码 2023-09-09 22:33:42 +08:00
姜玉琦 1490c32d5e 提交代码 2023-09-09 01:38:44 +08:00
姜玉琦 4cc7bb0b4f Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-09 01:37:18 +08:00
姜玉琦 c73c50feef 提交代码 2023-09-09 01:37:10 +08:00
haha c8c4bd334a update code 2023-09-08 23:42:40 +08:00
haha 5db1b3227b update code 2023-09-07 23:50:10 +08:00
姜玉琦 c135996e8d Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-07 23:40:35 +08:00
姜玉琦 ff40abd034 提交 2023-09-07 23:40:27 +08:00
姜玉琦 bb9a471566 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-07 23:05:57 +08:00
姜玉琦 9b73771165 提交代码 2023-09-07 22:14:27 +08:00
haha a3c282cdd0 update code 2023-09-06 00:38:10 +08:00
haha f303e78e4a update code 2023-09-05 22:49:23 +08:00
haha 342d7cc256 update code 2023-09-05 01:13:26 +08:00
姜玉琦 0f0ab5dc80 提交代码 2023-09-05 00:45:48 +08:00
haha 5e1c11b9a4 update code 2023-09-04 01:00:54 +08:00
姜玉琦 4606c0876c 提交 2023-09-04 00:04:35 +08:00
姜玉琦 5d0eecd128 提交 2023-09-03 23:27:00 +08:00
姜玉琦 7a8ab8829e 提交代码 2023-09-03 14:08:02 +08:00
姜玉琦 2cd263f9cc 提交代码 2023-09-01 17:31:26 +08:00
姜玉琦 86a8a6a93c Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-09-01 02:28:19 +08:00
姜玉琦 33dbca81b8 提交代码 2023-09-01 02:28:11 +08:00
haha 9ceceb6f77 update code 2023-08-31 23:57:18 +08:00
姜玉琦 340e2fdcd4 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-30 23:59:34 +08:00
姜玉琦 8e0c4fa43f 提交代码 2023-08-30 23:59:28 +08:00
haha 2cef960a30 update code 2023-08-30 00:45:08 +08:00
姜玉琦 e70d2f8744 提交代码 2023-08-29 21:48:25 +08:00
姜玉琦 1446bc8d56 修改bug 2023-08-29 11:06:50 +08:00
姜玉琦 b2faaa9aba 提交代码 2023-08-29 00:50:19 +08:00
姜玉琦 b1f8540003 提交代码 2023-08-28 22:36:11 +08:00
姜玉琦 ae19c41891 提交 2023-08-28 01:11:41 +08:00
姜玉琦 577d3b57ec Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-27 22:25:19 +08:00
姜玉琦 db245cdc98 提交代码 2023-08-27 22:25:14 +08:00
haha 4e0dc26ff0 update code 2023-08-27 22:20:13 +08:00
haha 6aa8452c2d update code 2023-08-27 17:53:55 +08:00
姜玉琦 9409e1a253 提交 2023-08-27 15:43:21 +08:00
姜玉琦 497054c1ec Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-27 14:38:58 +08:00
姜玉琦 a67ae18186 提交代码 2023-08-27 14:38:51 +08:00
haha cc54fc35c4 update code 2023-08-27 13:50:15 +08:00
姜玉琦 df83d6f43b Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-27 13:19:00 +08:00
姜玉琦 d428df51fc 小程序代码简化 2023-08-27 13:18:54 +08:00
haha 5b7550a72f update code 2023-08-27 11:00:00 +08:00
姜玉琦 4f0181d7db Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-27 00:19:25 +08:00
haha 1323d08aa8 update code 2023-08-26 23:35:59 +08:00
姜玉琦 6db214839c 提交代码 2023-08-26 22:21:25 +08:00
姜玉琦 f31d243dcf Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-26 18:08:37 +08:00
姜玉琦 6b505a3ca5 提交代码 2023-08-26 18:08:24 +08:00
姜玉琦 24290c9970 提交代码 2023-08-26 11:49:53 +08:00
haha 593f427c94 update code 2023-08-26 01:22:51 +08:00
姜玉琦 821326d1b2 提交代码 2023-08-26 00:36:14 +08:00
姜玉琦 dfd9ae0c62 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-25 23:22:40 +08:00
姜玉琦 8bafba890b 提交代码 2023-08-25 23:22:29 +08:00
haha 530c96e094 update code 2023-08-25 00:36:39 +08:00
姜玉琦 8f9df2d47a 提交代码 2023-08-25 00:31:29 +08:00
姜玉琦 acd4584add 提交代码 2023-08-24 23:14:36 +08:00
姜玉琦 7def0238af 提交代码 2023-08-24 22:19:33 +08:00
姜玉琦 e3e1c2fc2b 提交代码 2023-08-24 18:43:05 +08:00
姜玉琦 4648c5950a Merge remote-tracking branch 'origin/dev' into dev 2023-08-24 10:00:17 +08:00
haha 2f13947a84 update code 2023-08-24 00:12:35 +08:00
姜玉琦 c598059e02 提交代码 2023-08-23 11:38:02 +08:00
haha 4ed6580320 update code 2023-08-23 00:03:39 +08:00
姜玉琦 75223b9f64 提交代码 2023-08-22 23:54:20 +08:00
姜玉琦 27db4819ba 提交代码 2023-08-22 18:09:51 +08:00
姜玉琦 9ac4cb4e03 提交代码 2023-08-22 14:03:08 +08:00
haha 7600c2344a update code 2023-08-22 00:58:57 +08:00
姜玉琦 6fc92e0414 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-21 18:56:47 +08:00
姜玉琦 a2e1638296 提交代码 2023-08-21 18:56:42 +08:00
haha de74e00c22 update code 2023-08-21 00:25:45 +08:00
haha 6f69e562b8 update code 2023-08-20 23:11:24 +08:00
haha 5adf247503 update code 2023-08-20 23:02:34 +08:00
haha cf3be26cdc update code 2023-08-20 21:00:18 +08:00
haha 03f27873fe update code 2023-08-20 19:11:56 +08:00
姜玉琦 5457761b77 时间格式修改 2023-08-20 17:16:54 +08:00
姜玉琦 fd2b3b66f5 提交 2023-08-20 16:45:07 +08:00
姜玉琦 ff14675b64 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-20 15:46:47 +08:00
姜玉琦 1909a4d9eb 提交代码 2023-08-20 15:46:42 +08:00
haha da1f438d89 update code 2023-08-20 12:49:48 +08:00
haha b9613287b6 update code 2023-08-20 00:26:36 +08:00
姜玉琦 81bbfcf91b 提交代码 2023-08-19 21:48:26 +08:00
姜玉琦 22d552c5f0 优化代码 2023-08-19 21:31:51 +08:00
姜玉琦 c601c709e6 提交代码 2023-08-19 17:53:12 +08:00
姜玉琦 5210d86ae1 提交代码 2023-08-19 13:22:52 +08:00
姜玉琦 08bf19fc38 优化代码 2023-08-18 17:59:01 +08:00
姜玉琦 fb0a2d81bf 提交代码 2023-08-18 00:59:10 +08:00
姜玉琦 10b6f70376 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-18 00:37:13 +08:00
姜玉琦 8a8b1519f1 提交代码 2023-08-18 00:37:07 +08:00
haha 5df7e47467 update 增加项目计划导入导出 2023-08-18 00:18:13 +08:00
姜玉琦 46dc8626f3 提交 2023-08-18 00:18:03 +08:00
姜玉琦 116cc8a419 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-17 23:40:11 +08:00
姜玉琦 a8494d1bd3 提交代码 2023-08-17 23:40:05 +08:00
haha e49e3fe4ed update code 2023-08-17 22:47:17 +08:00
姜玉琦 7353c8a0e2 提交代码 2023-08-17 19:48:02 +08:00
姜玉琦 2a70b01a3f 提交代码 2023-08-17 19:39:33 +08:00
姜玉琦 de8a16c52a 提交代码 2023-08-17 15:51:00 +08:00
姜玉琦 925d808a97 提交代码 2023-08-16 23:46:36 +08:00
haha a536bf2856 update code 2023-08-16 23:41:57 +08:00
姜玉琦 8e05388032 提交代码 2023-08-16 23:38:05 +08:00
姜玉琦 7f26ccc344 提交代码 2023-08-16 22:38:46 +08:00
姜玉琦 722633ea2e 提交代码 2023-08-16 20:41:11 +08:00
姜玉琦 f24b2e3a77 提交代码 2023-08-16 11:51:45 +08:00
haha c692101bfc update code 2023-08-16 01:19:42 +08:00
haha 723c28b1c6 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-16 01:19:31 +08:00
姜玉琦 8fff6522d9 在册人员相关功能 2023-08-16 01:14:54 +08:00
haha 6a4ebb885b Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-16 00:47:22 +08:00
姜玉琦 2896fc4e41 优化代码 2023-08-15 23:58:34 +08:00
haha b2caeb3999 update code 2023-08-15 23:20:07 +08:00
姜玉琦 d8460bad45 提交小程序代码 2023-08-15 18:23:46 +08:00
姜玉琦 91def538e9 提交代码 2023-08-15 17:48:34 +08:00
姜玉琦 87ed3ecc23 提交一下 2023-08-15 14:02:16 +08:00
haha 12ee91f333 update code 2023-08-15 00:48:20 +08:00
姜玉琦 bc4c05de4f 提交代码 2023-08-14 22:52:08 +08:00
姜玉琦 58f9a98b3a 提交代码 2023-08-14 10:50:16 +08:00
haha e1f524ef20 update code 2023-08-14 00:02:33 +08:00
haha cee46f8bfd update code 2023-08-14 00:02:18 +08:00
姜玉琦 deef604213 提交代码 2023-08-13 22:10:41 +08:00
haha a0a16fa72d update code 2023-08-13 12:31:20 +08:00
姜玉琦 3e85b7e7b3 提交代码 2023-08-12 21:32:43 +08:00
姜玉琦 ce13a2840b Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-12 18:55:28 +08:00
姜玉琦 388cfb1d6a 修改bug 2023-08-12 18:55:18 +08:00
haha 5f51a7514e update code 2023-08-12 14:54:37 +08:00
haha c1030cfbdd update code 2023-08-12 14:16:24 +08:00
姜玉琦 4d0f4ee14b 提交代码 2023-08-12 12:18:39 +08:00
姜玉琦 2214d298e5 提交代码 2023-08-12 01:05:09 +08:00
姜玉琦 5f2fa46633 Merge branch 'dev' of http://62.234.3.186:3000/sxyanzhu/jhprjv2 into dev 2023-08-11 22:15:33 +08:00
姜玉琦 80e80848d8 提交代码 2023-08-11 22:15:18 +08:00
haha e370203b13 update code 2023-08-10 23:37:19 +08:00
1149 changed files with 163246 additions and 29949 deletions

1
bin/clean 100755
View File

@ -0,0 +1 @@
mvn clean

1
bin/package 100755
View File

@ -0,0 +1 @@
mvn clean package -Dmaven.test.skip=true

14
bin/run 100755
View File

@ -0,0 +1,14 @@
@echo off
echo.
echo [信息] 运行Web工程。
echo.
cd %~dp0
cd ../ruoyi-admin/target
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -jar %JAVA_OPTS% ruoyi-admin.jar
cd bin
pause

13
pom.xml
View File

@ -10,7 +10,7 @@
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>北跨泾河-产发工程数字管理平台</description>
<description>长安区数字工程监管系统</description>
<properties>
<ruoyi.version>3.8.6</ruoyi.version>
@ -31,8 +31,9 @@
<velocity.version>2.3</velocity.version>
<jwt.version>0.9.1</jwt.version>
<flowable.version>6.7.2</flowable.version>
<hutool.version>5.8.20</hutool.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
@ -107,7 +108,6 @@
<artifactId>velocity-engine-core</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- collections工具类 -->
<dependency>
<groupId>commons-collections</groupId>
@ -194,6 +194,12 @@
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<version>1.18.30</version>
</dependency>
</dependencies>
</dependencyManagement>
@ -206,6 +212,7 @@
<module>ruoyi-generator</module>
<module>ruoyi-common</module>
<module>ruoyi-flowable</module>
<module>yanzhu-deviceApi</module>
<module>yanzhu-bigscreen</module>
<module>yanzhu-jh</module>
</modules>

View File

@ -78,6 +78,12 @@
<artifactId>ruoyi-flowable</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>

View File

@ -1,5 +1,6 @@
package com.ruoyi;
import com.ruoyi.common.utils.file.FileUploadUtils;
import org.mybatis.spring.annotation.MapperScan;;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -31,5 +32,6 @@ public class RuoYiApplication
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
//FileUploadUtils.minPath("/data/uploadPath/upload/");
}
}

View File

@ -0,0 +1,78 @@
package com.ruoyi.api.base;
import com.ruoyi.common.utils.AuthRsaUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sign.Md5Utils;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
/**
* token
*
* @author: JiangYuQi
* @date: 2024/01/13 10:17
*/
@Data
@Slf4j
public class PubTokenReqVo {
/**
* AppId
*/
@NotBlank(message = "AppId不能为空")
@Size(min = 1, max = 64, message = "AppId格式异常")
private String appId;
/**
*
* RSA( + )
*/
@NotBlank(message = "签名不能为空")
private String sign;
/**
*
*/
@NotNull(message = "时间戳不能为空")
private Long timestamp;
/**
*
*
* @author: JiangYuQi
* @date: 2024/01/13 10:17
*/
public Boolean getLoginSign(String privateKey) {
boolean signFlag = false;
try {
System.out.println("appId=>>>"+appId);
System.out.println("privateKey=>>>"+privateKey);
System.out.println("timestamp=>>>"+timestamp);
String key = Md5Utils.hash(appId + privateKey + timestamp);
System.out.println("key=>>>"+key);
System.out.println("sign=>>>"+sign);
if (StringUtils.equals(sign, key)) {
signFlag = true;
}
} catch (Exception e) {
log.error(e.getMessage());
}
return signFlag;
}
/**
* [3]
*/
public Boolean checkTimestamp() {
boolean timestampFlag = false;
long timePoor = Math.abs(timestamp - System.currentTimeMillis());
if (timePoor < 1000 * 60 * 3) {
timestampFlag = true;
}
return timestampFlag;
}
}

View File

@ -0,0 +1,72 @@
package com.ruoyi.api.base;
import com.ruoyi.common.utils.AuthRsaUtils;
import com.ruoyi.common.utils.StringUtils;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
/**
* token
*
* @author: JiangYuQi
* @date: 2024/01/13 10:17
*/
@Data
@Slf4j
public class TokenReqVo {
/**
* AppId
*/
@NotBlank(message = "AppId不能为空")
@Size(min = 1, max = 64, message = "AppId格式异常")
private String appId;
/**
*
* RSA( + )
*/
@NotBlank(message = "签名不能为空")
private String sign;
/**
*
*/
@NotNull(message = "时间戳不能为空")
private Long timestamp;
/**
*
*
* @author: JiangYuQi
* @date: 2024/01/13 10:17
*/
public Boolean getLoginSign(String privateKey) {
boolean signFlag = false;
try {
String decryptByPrivateKey = AuthRsaUtils.decryptByPrivateKey(privateKey,sign);
if (StringUtils.equals(appId + timestamp, decryptByPrivateKey)) {
signFlag = true;
}
} catch (Exception e) {
log.error(e.getMessage());
}
return signFlag;
}
/**
* [3]
*/
public Boolean checkTimestamp() {
boolean timestampFlag = true;
/**long timePoor = Math.abs(timestamp - System.currentTimeMillis());
if (timePoor < 1000 * 60 * 3) {
timestampFlag = true;
}*/
return timestampFlag;
}
}

View File

@ -0,0 +1,199 @@
package com.ruoyi.api.labour.controller;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.api.base.PubTokenReqVo;
import com.ruoyi.api.labour.domain.AiBoxApiReqVo;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.RateLimiter;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.*;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sign.Md5Utils;
import com.ruoyi.framework.web.service.SysLoginService;
import com.ruoyi.system.domain.SysApplyConfig;
import com.ruoyi.system.service.ISysUserService;
import com.yanzhu.jh.video.domain.DevAiProjectData;
import com.yanzhu.jh.video.service.IDevAiProjectDataService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* AiAPIController
*
* @author JiangYuQi
* @date 2024-01-13
*/
@Slf4j
@RestController
@RequestMapping("/api/aiboxs")
public class AiBoxApiController extends BaseController {
@Autowired
private RedisCache redisCache;
@Autowired
private ISysUserService userService;
@Autowired
private SysLoginService loginService;
@Autowired
private IDevAiProjectDataService devAiProjectDataService;
/**
* token
* [6010IP]
* @param req
* @author JiangYuQi
* @date 2024-01-13
*/
@Anonymous
@ApiOperation(value = "获取TOKEN")
@RateLimiter(count = 10, limitType = LimitType.IP)
@PostMapping("/v1/getToken")
public AjaxResult getToken(@Validated @RequestBody PubTokenReqVo req) {
SysApplyConfig sysApplyConfig = redisCache.getCacheObject(CacheConstants.YANZHU_SYSTEM_CONFIG+req.getAppId());
if(sysApplyConfig==null){
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(),HttpStatusEnum.ERROR.getCode());
}
if(StringUtils.equals(ShiFouEnum.SHI.getCode(),sysApplyConfig.getIsDel())){
throw new ServiceException(HttpStatusEnum.DISABLE.getInfo(),HttpStatusEnum.DISABLE.getCode());
}
if(!Objects.equals(ApplyCfgTypeEnum.AIBOXS.getCode(),sysApplyConfig.getCfgType())){
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(),HttpStatusEnum.ERROR.getCode());
}
if(!req.checkTimestamp()){
throw new ServiceException(HttpStatusEnum.SINGET_TIMEOUT.getInfo(),HttpStatusEnum.SINGET_TIMEOUT.getCode());
}
AjaxResult ajax = AjaxResult.success();
String Authorization = "";
if (req.getLoginSign(sysApplyConfig.getPublicKey())) {
String key = "api.aiboxs.getToken:"+req.getAppId();
String obj = redisCache.getCacheObject(key);
if(StringUtils.isNotEmpty(obj)){
ajax.put("Authorization", obj);
}else{
Authorization = this.getAppIdLoginToken(req.getAppId(),sysApplyConfig);
ajax.put("Authorization", Authorization);
redisCache.setCacheObject(key,Authorization,30, TimeUnit.MINUTES);
}
} else {
throw new ServiceException(HttpStatusEnum.SINGET_ERROR.getInfo(),HttpStatusEnum.SINGET_ERROR.getCode());
}
return ajax;
}
/**
* appId
*
* @param appId
* @return token
*/
private String getAppIdLoginToken(String appId,SysApplyConfig sysApplyConfig) {
// 查询用户是否存在,不存在则保存
SysUser sysUser = userService.selectUserByUserName(appId);
String password = Convert.toStr(System.currentTimeMillis());
if (sysUser == null) {
sysUser = new SysUser();
sysUser.setDeptId(sysApplyConfig.getDeptId());
sysUser.setUserName(Convert.toStr(sysApplyConfig.getAppId()));
sysUser.setNickName(Convert.toStr(sysApplyConfig.getAppId()));
sysUser.setUserType(UserTypeEnum.APPLY.getCode());
sysUser.setStatus("0");
sysUser.setCreateBy("AppId登录创建用户");
sysUser.setPassword(SecurityUtils.encryptPassword(password));
userService.insertUser(sysUser);
} else {
sysUser.setPassword(SecurityUtils.encryptPassword(password));
sysUser.setUpdateBy("AppId登录更新用户密码");
userService.updateUser(sysUser);
}
return loginService.unifiedLogin(appId, password);
}
/**
*
* [6010IP]
* @param req
* @author JiangYuQi
* @date 2024-01-13
*/
@ApiOperation(value = "获取视频预警信息")
@RateLimiter(time = 10, limitType = LimitType.IP)
@GetMapping("/v1/list")
public TableDataInfo list(AiBoxApiReqVo req) {
SysApplyConfig sysApplyConfig = redisCache.getCacheObject(CacheConstants.YANZHU_SYSTEM_CONFIG+super.getUsername());
if(StringUtils.equals(ShiFouEnum.SHI.getCode(),sysApplyConfig.getIsDel())){
throw new ServiceException(HttpStatusEnum.DISABLE.getInfo(),HttpStatusEnum.DISABLE.getCode());
}
if(!Objects.equals(ApplyCfgTypeEnum.AIBOXS.getCode(),sysApplyConfig.getCfgType())){
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(),HttpStatusEnum.ERROR.getCode());
}
DevAiProjectData query = new DevAiProjectData();
query.setDeptId(sysApplyConfig.getDeptId());
query.setProjectId(sysApplyConfig.getProjectId());
Map<String, Object> params = new HashMap<>();
if(Objects.nonNull(req.getBeginTimestamp()) && Objects.nonNull(req.getEndTimestamp())){
Date beginTime = new Date(req.getBeginTimestamp());
params.put("beginTime",beginTime);
Date endTime = new Date(req.getEndTimestamp());
params.put("endTime",endTime);
}else{
if(Objects.nonNull(req.getBeginTimestamp())){
Date beginTime = new Date(req.getBeginTimestamp());
params.put("beginDate",beginTime);
}
if(Objects.nonNull(req.getEndTimestamp())){
Date endTime = new Date(req.getEndTimestamp());
params.put("endDate",endTime);
}
}
query.setParams(params);
startPage();
List<DevAiProjectData> list = devAiProjectDataService.selectDevAiProjectDataList(query);
for(DevAiProjectData item:list){
item.setImageUrl(RuoYiConfig.getProjectUrl()+item.getImageUrl());
item.setMinImage(item.getImageUrl()+".min.jpg");
}
return getDataTable(list);
}
private static final String baseUrl = "http://localhost:8090/jhapi";
public static void main(String[] args) {
String appId = "jhcf17140956314490N6VSHsPjx008";
String AppSecret = "xx+UsVJ9cIJ8PTWpWU5GcNx+x+chJBQIDAQAB";
Long time = System.currentTimeMillis();
String sign = Md5Utils.hash(appId+AppSecret+time);
System.out.println(time);
System.out.println(sign);
String url = baseUrl + "/api/aiboxs/v1/getToken";
Map<String, Object> body = new HashMap<>();
body.put("appId",appId);
body.put("sign",sign);
body.put("timestamp",time);
String result = HttpUtil.post(url, body);
JSONObject jsonObject = JSONObject.parseObject(result);
if(jsonObject.getInteger("code")==200){
// 获取到存入redis设置30分钟有效期
String token = jsonObject.getString("Authorization");
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,21 @@
package com.ruoyi.api.labour.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
/**
* API
*
* @author: JiangYuQi
* @date: 2024/01/13 12:21
*/
@Data
@Slf4j
public class AiBoxApiReqVo extends BaseEntity {
private Long beginTimestamp;
private Long endTimestamp;
}

View File

@ -0,0 +1,74 @@
package com.ruoyi.api.labour.domain;
import com.ruoyi.common.utils.AuthRsaUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sign.Md5Utils;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
*
*
* @author: JiangYuQi
* @date: 2024/01/13 12:21
*/
@Data
@Slf4j
public class LabourSignetVo {
/**
*
* RSA(dataMd5 + )
*/
@NotBlank(message = "签名不能为空")
private String sign;
/**
*
*/
@NotBlank(message = "推送数据不能为空")
private String data;
/**
*
*/
@NotNull(message = "时间戳不能为空")
private Long timestamp;
/**
*
*
* @author: JiangYuQi
* @date: 2024/01/13 10:17
*/
public Boolean getDataSign(String privateKey) {
boolean signFlag = false;
try {
String decryptByPrivateKey = AuthRsaUtils.decryptByPrivateKey(privateKey,sign);
String privateDataStr = Md5Utils.hash(data) + timestamp;
log.info("签名值...{}",privateDataStr);
log.info("解密值...{}",decryptByPrivateKey);
if (StringUtils.equals(privateDataStr, decryptByPrivateKey)) {
signFlag = true;
}
} catch (Exception e) {
log.error(e.getMessage());
}
return signFlag;
}
/**
* [30]
*/
public Boolean checkTimestamp() {
boolean timestampFlag = true;
/**long timePoor = Math.abs(timestamp - System.currentTimeMillis());
if (timePoor < 1000 * 60 * 30) {
timestampFlag = true;
}*/
return timestampFlag;
}
}

View File

@ -0,0 +1,150 @@
package com.ruoyi.web.controller.system;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.ApplyCfgTypeEnum;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.ShiFouEnum;
import com.ruoyi.common.utils.NoUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysApplyConfig;
import com.ruoyi.system.service.ISysApplyConfigService;
import com.yanzhu.jh.project.domain.SurProjectAttendanceCfg;
import com.yanzhu.jh.project.service.ISurProjectAttendanceCfgService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
* Controller
*
* @author JiangYuQi
* @date 2024-01-13
*/
@RestController
@RequestMapping("/system/applyConfig")
public class SysApplyConfigController extends BaseController
{
private static final String vendorsCode = "yanzhu";
@Autowired
private ISysApplyConfigService sysApplyConfigService;
@Autowired
private ISurProjectAttendanceCfgService surProjectAttendanceCfgService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:applyConfig:list')")
@GetMapping("/list")
public TableDataInfo list(SysApplyConfig sysApplyConfig)
{
startPage();
List<SysApplyConfig> list = sysApplyConfigService.selectSysApplyConfigList(sysApplyConfig);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:applyConfig:export')")
@Log(title = "系统应用注册", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysApplyConfig sysApplyConfig)
{
List<SysApplyConfig> list = sysApplyConfigService.selectSysApplyConfigList(sysApplyConfig);
ExcelUtil<SysApplyConfig> util = new ExcelUtil<SysApplyConfig>(SysApplyConfig.class);
util.exportExcel(response, list, "系统应用注册数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:applyConfig:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sysApplyConfigService.selectSysApplyConfigById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:applyConfig:add')")
@Log(title = "系统应用注册", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysApplyConfig sysApplyConfig)
{
if(ApplyCfgTypeEnum.LABOUR.getCode().equals(sysApplyConfig.getCfgType())){
SurProjectAttendanceCfg surProjectAttendanceCfg = new SurProjectAttendanceCfg();
surProjectAttendanceCfg.setProjectId(sysApplyConfig.getProjectId());
surProjectAttendanceCfg.setSubDeptId(sysApplyConfig.getDeptId());
surProjectAttendanceCfg.setVendorsCode(vendorsCode);
surProjectAttendanceCfg.setEnabled(sysApplyConfig.getIsDel().equals(ShiFouEnum.FOU.getCode())?ShiFouEnum.SHI.getLongCode():ShiFouEnum.FOU.getLongCode());
surProjectAttendanceCfg.setState(ShiFouEnum.FOU.getLongCode());
int res = surProjectAttendanceCfgService.insertSurProjectAttendanceCfg(surProjectAttendanceCfg);
if(res>0){
// 同步将信息保存到sur_project_attendance_cfg
sysApplyConfig.setCfgId(surProjectAttendanceCfg.getId());
}
}
return toAjax(sysApplyConfigService.insertSysApplyConfig(sysApplyConfig));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:applyConfig:edit')")
@Log(title = "系统应用注册", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysApplyConfig sysApplyConfig)
{
if(ApplyCfgTypeEnum.LABOUR.getCode().equals(sysApplyConfig.getCfgType())){
SurProjectAttendanceCfg surProjectAttendanceCfg = new SurProjectAttendanceCfg();
surProjectAttendanceCfg.setId(sysApplyConfig.getCfgId());
surProjectAttendanceCfg.setEnabled(sysApplyConfig.getIsDel().equals(ShiFouEnum.FOU.getCode())?ShiFouEnum.SHI.getLongCode():ShiFouEnum.FOU.getLongCode());
surProjectAttendanceCfgService.updateSurProjectAttendanceCfg(surProjectAttendanceCfg);
}
return toAjax(sysApplyConfigService.updateSysApplyConfig(sysApplyConfig));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:applyConfig:remove')")
@Log(title = "系统应用注册", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
List<Long> cfgIds = new ArrayList<>();
for(Long id:ids){
SysApplyConfig sysApplyConfig = sysApplyConfigService.selectSysApplyConfigById(id);
if(ApplyCfgTypeEnum.LABOUR.getCode().equals(sysApplyConfig.getCfgType())){
cfgIds.add(sysApplyConfig.getCfgId());
}
}
if(CollectionUtils.isNotEmpty(cfgIds)){
surProjectAttendanceCfgService.deleteSurProjectAttendanceCfgByIds(cfgIds.stream().toArray(Long[]::new));
}
return toAjax(sysApplyConfigService.deleteSysApplyConfigByIds(ids));
}
/**
* AppId
*/
@PreAuthorize("@ss.hasPermi('system:applyConfig:add')")
@GetMapping("/createAppId")
public AjaxResult createAppId()
{
return success(NoUtils.createAppId());
}
}

View File

@ -1,7 +1,11 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.system.domain.vo.AlertUserPassVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -17,6 +21,8 @@ import com.ruoyi.framework.web.service.SysLoginService;
import com.ruoyi.framework.web.service.SysPermissionService;
import com.ruoyi.system.service.ISysMenuService;
import javax.validation.Valid;
/**
*
*
@ -56,7 +62,7 @@ public class SysLoginController
*
* @return
*/
@GetMapping("getInfo")
@GetMapping("/getInfo")
public AjaxResult getInfo()
{
SysUser user = SecurityUtils.getLoginUser().getUser();
@ -65,6 +71,14 @@ public class SysLoginController
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(user);
AjaxResult ajax = AjaxResult.success();
List<SysRole> list= user.getRoles();
long roleId= list.get(0).getRoleId();
for(SysRole role :list){
if(role.getRoleId()<roleId){
roleId=role.getRoleId();
}
}
ajax.put("roleId",roleId);
ajax.put("user", user);
ajax.put("roles", roles);
ajax.put("permissions", permissions);
@ -76,7 +90,7 @@ public class SysLoginController
*
* @return
*/
@GetMapping("getRouters")
@GetMapping("/getRouters")
public AjaxResult getRouters()
{
Long userId = SecurityUtils.getUserId();

View File

@ -1,8 +1,13 @@
package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.system.domain.vo.AlertUserPassVo;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@ -248,4 +253,26 @@ public class SysUserController extends BaseController
{
return success(deptService.selectDeptTreeList(dept));
}
/**
*
* @param data
* @return
*/
@Anonymous
@PostMapping("/v1/sendPhoneMessage")
public AjaxResult sendPhoneMessage(@RequestBody Map<String,String> data){
return userService.sendPhoneMessage(data.get("phoneNumber"));
}
/**
* &token
* @param alertUserPassVo
* @return
*/
@Anonymous
@PostMapping(value = "/v1/codeUpdatePwd")
public AjaxResult codeUpdatePwd(@RequestBody @Valid AlertUserPassVo alertUserPassVo){
return userService.updataUserPassWord(alertUserPassVo);
}
}

View File

@ -113,7 +113,7 @@ public class SwaggerConfig
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:北跨泾河-产发工程数字管理平台_接口文档")
.title("标题:长安区数字工程监管系统_接口文档")
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息

View File

@ -1,3 +1,46 @@
# 项目相关配置
ruoyi:
# 名称
name: RuoYi
# 版本
version: 3.8.6
# 版权年份
copyrightYear: 2023
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: D:/data2/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 服务回调地址
projectUrl: http://106.55.153.13:8888
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8088
servlet:
# 应用的访问路径
context-path: /jhapi
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# 连接数满后的排队数默认为100
accept-count: 1000
threads:
# tomcat最大线程数默认为200
max: 800
# Tomcat启动初始化的线程数默认值10
min-spare: 100
#微信公众号配置
wechat:
mpAppId: wxe6fd9ad863ac09bf
mpAppSecret: ed08e7f6f42a40fc9fa0ebbc1bc6a1db
wxAppId: wx9997d071b4996f23
wxAppSecret: 5bcc9ca17b31133d93a025871fc5021d
# 数据源配置
spring:
datasource:
@ -6,9 +49,9 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://cd-cynosdbmysql-grp-9rqrhxsm.sql.tencentcdb.com:27981/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
url: jdbc:mysql://106.55.153.13:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
username: root
password: Sxyanzhu@cf
password: sxyz@uqw8qmash!<76j
# 从库数据源
slave:
# 从数据源开关/默认关闭
@ -58,4 +101,26 @@ spring:
merge-sql: true
wall:
config:
multi-statement-allow: true
multi-statement-allow: true
# redis 配置
redis:
# 地址
host: 127.0.0.1
# 端口默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password: 123456
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms

View File

@ -0,0 +1,134 @@
# 项目相关配置
ruoyi:
# 名称
name: RuoYi
# 版本
version: 3.8.6
# 版权年份
copyrightYear: 2023
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: /data/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 服务回调地址
projectUrl: http://106.55.153.13:8888
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8088
servlet:
# 应用的访问路径
context-path: /jhapi
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# 连接数满后的排队数默认为100
accept-count: 1000
threads:
# tomcat最大线程数默认为200
max: 800
# Tomcat启动初始化的线程数默认值10
min-spare: 100
#微信公众号配置
wechat:
mpAppId: wxe6fd9ad863ac09bf
mpAppSecret: ed08e7f6f42a40fc9fa0ebbc1bc6a1db
wxAppId: wx9997d071b4996f23
wxAppSecret: 5bcc9ca17b31133d93a025871fc5021d
# 日志配置
logging:
level:
com.ruoyi: info
com.yanzhu.jh: info
org.springframework: error
org.flowable: error
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
url: jdbc:mysql://127.0.0.1:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
username: root
password: sxyz@uqw8qmash!<76j
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 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: ruoyi
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# redis 配置
redis:
# 地址
host: 127.0.0.1
# 端口默认为6379
port: 6379
# 数据库索引
database: 1
# 密码
password:
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms

View File

@ -0,0 +1,125 @@
# 项目相关配置
ruoyi:
# 名称
name: RuoYi
# 版本
version: 3.8.6
# 版权年份
copyrightYear: 2023
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: /data/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 服务回调地址
projectUrl: http://106.55.153.13:8888
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8088
servlet:
# 应用的访问路径
context-path: /jhapi
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# 连接数满后的排队数默认为100
accept-count: 1000
threads:
# tomcat最大线程数默认为200
max: 800
# Tomcat启动初始化的线程数默认值10
min-spare: 100
#微信公众号配置
wechat:
mpAppId: #wxe6fd9ad863ac09bf
mpAppSecret: #ed08e7f6f42a40fc9fa0ebbc1bc6a1db
wxAppId: #wx9997d071b4996f23
wxAppSecret: #5bcc9ca17b31133d93a025871fc5021d
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
url: jdbc:mysql://106.55.153.13:3306/yanzhu_jh?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
username: root
password: sxyz@uqw8qmash!<76j
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 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: ruoyi
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# redis 配置
redis:
# 地址
host: 127.0.0.1
# 端口默认为6379
port: 6379
# 数据库索引
database: 1
# 密码
password: 123456
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms

View File

@ -1,45 +1,10 @@
# 项目相关配置
ruoyi:
# 名称
name: RuoYi
# 版本
version: 3.8.6
# 版权年份
copyrightYear: 2023
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: /data/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8090
servlet:
# 应用的访问路径
context-path: /jhapi
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# 连接数满后的排队数默认为100
accept-count: 1000
threads:
# tomcat最大线程数默认为200
max: 800
# Tomcat启动初始化的线程数默认值10
min-spare: 100
# 日志配置
logging:
level:
com.ruoyi: debug
com.yanzhu.jh: debug
org.springframework: warn
org.flowable: debug
# 用户配置
user:
password:
@ -50,46 +15,28 @@ user:
# Spring配置
spring:
# 微信资源验证访问
web:
resources:
static-locations: classpath:/wxstatic/
# 资源信息
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: druid
active: prod
# 文件上传
servlet:
multipart:
# 单个文件大小
max-file-size: 10MB
max-file-size: 200MB
# 设置总上传的文件大小
max-request-size: 20MB
max-request-size: 500MB
# 服务模块
devtools:
restart:
# 热部署开关
enabled: true
# redis 配置
redis:
# 地址
host: 127.0.0.1
# 端口默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password: 123456
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# token配置
token:
@ -127,9 +74,9 @@ xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice
excludes: /system/notice,/common/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
urlPatterns: /system/*,/monitor/*,/tool/*,/api/*,/flow/*
# flowable相关表
flowable:

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property name="log.path" value="/Users/2y/zhj/logs" />
<property name="log.path" value="/usr/local/xaqjgwh/log/ruoyi-admin" />
<!-- 彩色日志 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>

View File

@ -0,0 +1 @@
CIDdpE5WbJ0acBKs

View File

@ -0,0 +1 @@
29aef62cd1316f1635063c5b86a3ffee

View File

@ -29,6 +29,11 @@
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<!-- spring security 安全认证 -->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -137,7 +142,13 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-http</artifactId>
<version>5.3.3</version>
<version>${hutool.version}</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>
<version>${hutool.version}</version>
</dependency>
<dependency>
@ -146,6 +157,24 @@
<version>7.2.12</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>2.7.0</version>
</dependency>
</dependencies>
</project>

View File

@ -53,6 +53,9 @@ public @interface Excel
*/
public int scale() default -1;
public boolean isLink() default false;
public String linkText() default "";
/**
* BigDecimal :BigDecimal.ROUND_HALF_EVEN
*/

View File

@ -48,4 +48,9 @@ public @interface Log
*
*/
public String[] excludeParamNames() default {};
/**
*
*/
public String nickname() default "";
}

View File

@ -33,6 +33,11 @@ public class RuoYiConfig
/** 验证码类型 */
private static String captchaType;
/**
*
*/
private static String projectUrl;
public String getName()
{
return name;
@ -101,6 +106,14 @@ public class RuoYiConfig
RuoYiConfig.captchaType = captchaType;
}
public static String getProjectUrl() {
return projectUrl;
}
public void setProjectUrl(String projectUrl) {
RuoYiConfig.projectUrl = projectUrl;
}
/**
*
*/

View File

@ -0,0 +1,91 @@
package com.ruoyi.common.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* ////////////////////////////////////////////////////////////////////
* // _ooOoo_
* // o8888888o
* // 88" . "88
* // (| ^_^ |)
* // O\ = /O
* // ____/`---'\____
* // .' \\| |// `.
* // / \\||| : |||// \
* // / _||||| -:- |||||- \
* // | | \\\ - /// | |
* // | \_| ''\---/'' | |
* // \ .-\__ `-` ___/-. /
* // ___`. .' /--.--\ `. . ___
* // ."" '< `.___\_<|>_/___.' >'"".
* // | | : `- \`.;`\ _ /`;.`/ - ` : | |
* // \ \ `-. \_ __\ /__ _/ .-` / /
* // ========`-.____`-.___\_____/___.-`____.-'========
* // `=---='
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* // 佛祖保佑 永无BUG 永不修改
* ////////////////////////////////////////////////////////////////////
*
* @ClassName SmsConfig
* @Description TODO
* @Author QiangZi
* @DateTime 2022/3/31 18:15
* @Version 1.0
*/
@Component
@PropertySource(value = "classpath:message.properties",encoding = "UTF-8")
@ConfigurationProperties(prefix = "sms.jiuwei")
public class SmsConfig {
/**
* url
**/
private String url;
/**
*
*/
private String username;
/**
*
*/
private String password;
/**
* ID
*/
private String productid;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
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 getProductid() {
return productid;
}
public void setProductid(String productid) {
this.productid = productid;
}
}

View File

@ -0,0 +1,92 @@
package com.ruoyi.common.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* Created by tao.
* Date: 2023/3/21 15:02
* :
*/
@Component
@ConfigurationProperties(prefix = "wechat")
public class WechatAccountConfig {
/**
* id
*/
private static String mpAppId;
/**
*
*/
private static String mpAppSecret;
/**
* Token
*/
private static String myToken;
/**
* AccessToken
*/
private static String myAccessToken;
/**
* AppId
*/
private static String wxAppId;
/**
* Secret
*/
private static String wxAppSecret;
public static String getMpAppId() {
return mpAppId;
}
public void setMpAppId(String mpAppId) {
WechatAccountConfig.mpAppId = mpAppId;
}
public static String getMpAppSecret() {
return mpAppSecret;
}
public void setMpAppSecret(String mpAppSecret) {
WechatAccountConfig.mpAppSecret = mpAppSecret;
}
public static String getMyToken() {
return myToken;
}
public void setMyToken(String myToken) {
WechatAccountConfig.myToken = myToken;
}
public static String getMyAccessToken() {
return myAccessToken;
}
public void setMyAccessToken(String myAccessToken) {
WechatAccountConfig.myAccessToken = myAccessToken;
}
public static String getWxAppId() {
return wxAppId;
}
public void setWxAppId(String wxAppId) {
WechatAccountConfig.wxAppId = wxAppId;
}
public static String getWxAppSecret() {
return wxAppSecret;
}
public void setWxAppSecret(String wxAppSecret) {
WechatAccountConfig.wxAppSecret = wxAppSecret;
}
}

View File

@ -0,0 +1,54 @@
package com.ruoyi.common.config;
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
/**
* Created by tao.
* Date: 2023/3/21 15:00
* :
*/
@Component
public class WechatMpConfig {
@Autowired
private WechatAccountConfig accountConfig;
/**
* @author tao
* @date Created in 2021/3/12 10:15
* @param:
* @return WxMpService
* wxMpConfigStorage, WxMpService
*/
@Bean
public WxMpService wxMpService() {
WxMpService wxMpService = new WxMpServiceImpl();
wxMpService.setWxMpConfigStorage(wxMpConfigStorage());
return wxMpService;
}
/**
* @author tao
* @date Created in 2021/3/12 10:20
* @param:
* @return WxMpConfigStorage
* AppIdAppSecretWxMpConfigStorage
*/
@Bean
public WxMpConfigStorage wxMpConfigStorage() {
WxMpInMemoryConfigStorage wxMpConfigStorage = new WxMpInMemoryConfigStorage();
wxMpConfigStorage.setAppId(accountConfig.getMpAppId());
wxMpConfigStorage.setSecret(accountConfig.getMpAppSecret());
wxMpConfigStorage.setToken(accountConfig.getMyToken());
wxMpConfigStorage.setAccessToken(accountConfig.getMyAccessToken());
return wxMpConfigStorage;
}
}

View File

@ -0,0 +1,14 @@
package com.ruoyi.common.constant;
/**
*
*
* @author ruoyi
*/
public class ApiConstants {
/**
* IOTHOST&&
*/
public static final String IOT_SD_HOST = "https://api.e.v1.i-sada.net";
}

View File

@ -41,4 +41,59 @@ public class CacheConstants
* redis key
*/
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
/**
* yanzhu redis key
*/
public static final String YANZHU_SYSTEM_CONFIG = "yanzhu_system_config:";
/**
* yanzhu redis key
*/
public static final String YANZHU_DEVICE_TOWER = "device.tower_cfg:";
/**
* yanzhu redis key
*/
public static final String YANZHU_DEVICE_AI = "device.aibox_cfg:";
/**
* redis key
*/
public static final String WX_MPMESSAGE_KEY = "wx.mpmessage.key::";
/**
* openId
*/
public static final String WX_MPMESSAGE_OPENID = "wx.mpmessage.openId::";
/**
*
*/
public static final String WX_MPMESSAGE_UNAME = "wx.mpmessage.uname::";
/**
*
*/
public static final String WX_MPMESSAGE_PNAME = "wx.mpmessage.pname::";
/**
*
*/
public static final String WX_MPMESSAGE_DNAME = "wx.mpmessage.dname::";
/**
*
*/
public static final String WX_MPMESSAGE_P_SUP = "wx.mpmessage.p.sup::";
/**
*
*/
public static final String WX_MPMESSAGE_P_MAG = "wx.mpmessage.p.mag::";
/**
*
*/
public static final String WX_MPMESSAGE_P_ORG = "wx.mpmessage.p.org::";
}

View File

@ -133,7 +133,7 @@ public class Constants
/**
* 访
*/
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi","com.yanzhu.jh"};
/**
*

View File

@ -21,6 +21,11 @@ import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.sql.SqlUtil;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
/**
* web
@ -56,6 +61,14 @@ public class BaseController
PageUtils.startPage();
}
/**
*
*/
protected void startPage(Integer pageNum, Integer pageSize)
{
PageUtils.startPage(pageNum,pageSize);
}
/**
*
*/
@ -91,6 +104,45 @@ public class BaseController
return rspData;
}
/**
* CookieBIDS,b.,
* @return
*/
protected List<Long> getProjectIds(){
String ids=getCookie("__ids__");
List<Long> list=new ArrayList<>();
if(StringUtils.isNotEmpty(ids)){
String[] tmps= ids.split(",");
for(String s:tmps){
if(s.length()>0){
try{
list.add(Long.parseLong(s));
}catch (Exception e){
}
}
}
}
return list;
}
protected HttpServletRequest getRequest(){
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
return servletRequestAttributes.getRequest();
}
protected String getCookie(String key){
Cookie[] cookies =getRequest().getCookies();
if(cookies!=null && cookies.length>0){
for(Cookie cookie :cookies){
if(cookie.getName().toLowerCase().equals(key.toLowerCase())){
return cookie.getValue();
}
}
}
return "";
}
/**
*
*/

View File

@ -3,10 +3,16 @@ package com.ruoyi.common.core.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* Entity
@ -17,6 +23,24 @@ public class BaseEntity implements Serializable
{
private static final long serialVersionUID = 1L;
public List<Long> getPrjIds() {
return prjIds;
}
public void setPrjIds(List<Long> prjIds) {
this.prjIds = prjIds;
}
/**
* ID,B b.,
*/
private List<Long> prjIds;
/**
*
*/
private String proType;
/** 搜索值 */
@JsonIgnore
private String searchValue;
@ -42,6 +66,9 @@ public class BaseEntity implements Serializable
private String nowRole;
private String nowDept;
private String nowUser;
private String nowUserName;
private String projectDeptId;
private String comment;
/** 请求参数 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ -139,6 +166,30 @@ public class BaseEntity implements Serializable
this.activeName = activeName;
}
public String getNowUserName() {
return nowUserName;
}
public void setNowUserName(String nowUserName) {
this.nowUserName = nowUserName;
}
public String getProjectDeptId() {
return projectDeptId;
}
public void setProjectDeptId(String projectDeptId) {
this.projectDeptId = projectDeptId;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
public Map<String, Object> getParams()
{
if (params == null)
@ -152,4 +203,22 @@ public class BaseEntity implements Serializable
{
this.params = params;
}
public String getProType() {
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
if(servletRequestAttributes==null){
return "";
}
RequestContextHolder.setRequestAttributes(servletRequestAttributes,true);
HttpServletRequest request = servletRequestAttributes.getRequest();
String str= request.getHeader("proType");
if("0".equals(str)){
str="";
}
return str;
}
public void setProType(String proType) {
this.proType = proType;
}
}

View File

@ -37,6 +37,9 @@ public class SysUser extends BaseEntity
@Excel(name = "用户名称")
private String nickName;
/** 用户类型 */
private String userType;
/** 用户邮箱 */
@Excel(name = "用户邮箱")
private String email;
@ -297,6 +300,14 @@ public class SysUser extends BaseEntity
this.roleId = roleId;
}
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -27,6 +27,11 @@ public class LoginBody
*/
private String uuid;
/**
* ID
*/
private String openId;
public String getUsername()
{
return username;
@ -66,4 +71,12 @@ public class LoginBody
{
this.uuid = uuid;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
}

View File

@ -1,24 +1,25 @@
package com.ruoyi.common.enums;
/**
*
*
*
* @author ruoyi
*/
public enum SysStatusEnum {
public enum ApplyCfgTypeEnum {
OK(0L, "正常"), DISABLE(1L, "停用"), DELETED(2L, "删除");
LABOUR("1", "劳务人员信息接入"),
AIBOXS("2", "视频智能预警接入");
private final Long code;
private final String code;
private final String info;
SysStatusEnum(Long code, String info)
ApplyCfgTypeEnum(String code, String info)
{
this.code = code;
this.info = info;
}
public Long getCode()
public String getCode()
{
return code;
}

View File

@ -0,0 +1,39 @@
package com.ruoyi.common.enums;
public enum DeptTypeEnum {
JTGS("1", "泾河产业发展集团"),
ZGS("11", "发展集团子公司"),
JLDW("4", "监理单位"),
ZBDW("2", "总包单位"),
FBDW("3", "分包单位"),
JTGSTYPE("3", "泾河产业发展集团"),
ZGSTYPE("4", "发展集团子公司"),
JFDBTYPE("5", "甲方代表"),
JLDWTYPE("6", "监理单位"),
ZBDWTYPE("7", "总包单位"),
FBDWTYPE("8", "分包单位"),
COMFLAG("1","子公司标识");
private final String code;
private final String info;
DeptTypeEnum(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -0,0 +1,36 @@
package com.ruoyi.common.enums;
/**
* Http
*
* @author JiangYuQi
*/
public enum HttpStatusEnum {
ERROR(11110, "AppId不存在或已被删除"),
DISABLE(11112, "AppId已被停用"),
SINGET_ERROR(11113, "签名值不正确"),
SINGET_TIMEOUT(11114, "签名数据已过期"),
SINGET_EXCEPTION(11115, "签名数据解密异常"),
DARA_EXCEPTION(11116, "数据解析异常");
private final Integer code;
private final String info;
HttpStatusEnum(Integer code, String info)
{
this.code = code;
this.info = info;
}
public Integer getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -0,0 +1,51 @@
package com.ruoyi.common.enums;
/**
*
*
* @author JiangYuQi
*/
public enum MessageTypeEnum {
AQYHZG("10", "安全隐患整改"),
ZLYHZG("20", "质量隐患整改"),
CSCLSP("30", "实测实量审批"),
JPYSSP("40", "举牌验收审批"),
CLFYSP("50", "材料封样审批"),
QYFSSP("60", "取样复试审批"),
GCSPCSBL("70", "办理工程审批超时提醒"),
GCSPCSCS("80", "抄送工程审批超时提醒"),
YHZGCSGZ("90", "隐患整改超时通知"),
YHFJCSGZ("100", "隐患复检超时通知"),
LZYJSP("110", "劳资预警审批"),
LZYJCSTZ("120", "劳资预警审批超时"),
GCGNJY("130", "工程功能检验审批");
//工作流审批由ProcDefKey组成
private final String code;
private final String name;
MessageTypeEnum(String code, String name)
{
this.code = code;
this.name = name;
}
public String getCode()
{
return code;
}
public String getName()
{
return name;
}
public static String getYHPCLX(Long infoType){
if(infoType==0){
return MessageTypeEnum.AQYHZG.code;
}else{
return MessageTypeEnum.ZLYHZG.code;
}
}
}

View File

@ -0,0 +1,62 @@
package com.ruoyi.common.enums;
/**
*
*/
public enum PublicStateEnum {
YES("Y", "YES"),
NO("N", "NO"),
OK("0", "正常"),
DISABLE("1", "停用"),
DELETED("2", "删除"),
HG("1","合格"),
BHG("2","不合格"),
USERTYPE_JFJL("21", "甲方经理"),
/**********************************项目验收***************************************/
PROJECT_CHECK_TYPE_JPYS("1", "举牌验收"),
PROJECT_CHECK_POSITION_TYPE("1", "默认工序部位类型"),
/**********************************项目验收***************************************/
/**********************************审批相关***************************************/
AUDIT_TYPE_QYFS("1", "取样复试"),
AUDIT_TYPE_CLFY("4", "材料封样"),
AUDIT_TYPE_JPYS("3", "举牌验收"),
AUDIT_TYPE_SCSL("2", "实测实量"),
AUDIT_TYPE_GCGNJY("5", "工程功能检验"),
AUDITINFO_DSH("1", "待审核"),
AUDITINFO_SHBH("3", "审核驳回"),
AUDITINFO_SHTG("4", "审核通过"),
/**********************************审批相关***************************************/
/**********************************视频设备***************************************/
VIDEO_ONLINE("1", "在线"),
VIDEO_OFFLINE("2", "离线"),
VIDEO_UNKNOWN("3", "未知"),
/**********************************视频设备***************************************/
/**********************************材料进场取样复试***************************************/
CHECK_STATE_SJ("1", "送检中"),
/**********************************材料进场取样复试***************************************/
COMZGS("1","子公司状态标识");
private final String code;
private final String info;
PublicStateEnum(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -0,0 +1,38 @@
package com.ruoyi.common.enums;
import com.ruoyi.common.core.text.Convert;
/**
*
*
* @author JiangYuQi
*/
public enum ShiFouEnum {
FOU("0", "否"), SHI("1", "是");
private final String code;
private final String info;
ShiFouEnum(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
public Long getLongCode()
{
return Convert.toLong(code);
}
}

View File

@ -1,5 +1,7 @@
package com.ruoyi.common.enums;
import com.ruoyi.common.core.text.Convert;
public enum SysRoleEnum {
ADMIN("1", "admin"),
@ -9,6 +11,9 @@ public enum SysRoleEnum {
JLDW("5", "监理单位"),
ZBDW("6", "总包单位"),
FBDW("7", "分包单位"),
JLDWGR("15", "监理单位"),
ZBDWGR("16", "总包单位"),
FBDWGR("17", "分包单位"),
COMMON("99", "普通角色");
private final String code;
@ -25,6 +30,11 @@ public enum SysRoleEnum {
return code;
}
public Long getLongCode()
{
return Convert.toLong(code);
}
public String getInfo()
{
return info;

View File

@ -0,0 +1,37 @@
package com.ruoyi.common.enums;
/**
*
*
* @author JiangYuQi
*/
public enum TemplateMessageEnum {
SERVER_ERROR("_YCnCRtgbtFNNg_78koc8nbFl2gWjeaWFHXV7WV1if8","服务异常通知"),
TROUBLE_SUBMIT("f3saBGJCnUAjXHw1KooxEQOOiKEHlQxLIK-sPDgoL_E", "隐患整改通知"),
TROUBLE_HANDLE("6mGOWPXS3l5a5fzXd9GIV9_IkEfZmeJ_6G2P_SQkWnU", "隐患处理完成通知"),
ROUBLE_EXPIRED_ZG("f3saBGJCnUAjXHw1KooxESpSdHMrh5liznpsbWZV8oA", "隐患整改超时通知"),
ROUBLE_EXPIRED_FJ("f3saBGJCnUAjXHw1KooxESpSdHMrh5liznpsbWZV8oA", "隐患复检超时通知"),
APPLY_DEFAULT("KY7oAHgqFxUSaE3ByxFJfv_0U3LnSWfgUCwV-CZyEdo", "系统流程审批提醒"),
APPLY_EXPIRED_MY("MUAXGjyaNE-maYn6XSNycRfZfPtdVTxubqlT8lHcYqw", "办理流程审批超时提醒"),
APPLY_EXPIRED_COPY("MUAXGjyaNE-maYn6XSNyceRFN9h8nfIjKvyZTOLnKDE", "抄送流程审批超时提醒");
private final String id;
private final String name;
TemplateMessageEnum(String id, String name)
{
this.id = id;
this.name = name;
}
public String getId()
{
return id;
}
public String getName()
{
return name;
}
}

View File

@ -0,0 +1,30 @@
package com.ruoyi.common.enums;
/**
*
* @author JiangYuQi
*/
public enum UserTypeEnum {
SYSTEM("00","系统用户"),
APPLY("99","应用用户");
private final String code;
private final String info;
UserTypeEnum(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -1,18 +1,18 @@
package com.ruoyi.common.enums;
/**
*
*
*
*
* @author ruoyi
*/
public enum UserStatus
{
OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除");
public enum VendorsCodeEnum {
YANZHU("yanzhu", "研筑");
private final String code;
private final String info;
UserStatus(String code, String info)
VendorsCodeEnum(String code, String info)
{
this.code = code;
this.info = info;
@ -27,4 +27,5 @@ public enum UserStatus
{
return info;
}
}

View File

@ -0,0 +1,34 @@
package com.ruoyi.common.enums;
/**
*
* @author ruoyi
*/
public enum WorkJournalismEnum {
DFB("1", "待发布"),
YFB("2", "已发布"),
YCH("3", "已撤回"),
YZD("1", "已置顶"),
BZD("0", "不置顶");
private final String code;
private final String info;
WorkJournalismEnum(String code, String info)
{
this.code = code;
this.info = info;
}
public String getCode()
{
return code;
}
public String getInfo()
{
return info;
}
}

View File

@ -0,0 +1,206 @@
/*
* Copyright (c) 2016-2021. 西 All rights reserved.
*/
package com.ruoyi.common.utils;
import com.alibaba.fastjson.JSON;
import com.ruoyi.common.utils.sign.Md5Utils;
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.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* RSA
**/
public class AuthRsaUtils {
// Rsa 私钥
public static String privateKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMwgEvQL6w3ahkRoKxxzyBoSNe/zsX8aCaXhdyMWZZrDzFDS9/AbNjrB0bp5MwtbQVXcZJLGzaWxUmeuOQc0CeoWgwafdEdweesiUCbj4Au3xLitDVMiCrO5qy5XKRSQa6dMNjMARw5tORnvRlOiPypDBEKSyR+BtQiLDhelepLZAgMBAAECgYBO9nleft3G1inqfIFw2DkoHLNQx2x6RpBE4xs7L4bOf7+h5HqVH3Gy+Rcwk4HzerGjjUY6oT0cQ6QlB3h4GOFcQq/fN79eOKd8KwgPq+e0l/dFXDI4TAJJ61nY40zwl/KlzdRRKF4KIrM8YmA74YhjG92p6KyxBdx8QMM7NkshIQJBAP+5AXa35n/9aoENfCGr5IDoCIqOUoaOEoNGQ+DcvEW2Z443gHZ6B4QLZcMhtvn+7YQHXXjUhAw4A23dIG83ZvsCQQDMWL5lvbETU6iXhhfbF08LHqI0g83QIYckvt1ndMcTgDKR3b+T6CUJCI2VHR3kOrJ77jcIHd65nP0QRXG+ZdU7AkEAnYml4zNL5xGBaVubW0sADIHlsSYYpRglQ4YoDwEtY20Jws1icJqgwrIa0OmWRdDNFgdLiEKzzqs7QZV2g82HvQJAZLgA8Ei09J+xYy3WqEguz35D2Lp2QPWllLj2i72FOdlgE4FGofIz/uXWUv7M8ubzfh4FxdxjIP19xf1UeNHcbQJBAN53AtJB671xNU+4WBfC/hX/L45Y+kc2zkxFXDFopdbIXzoVoC2pA9urze2B8+azWWTPfqv6i620SSflHEvls2Q=";
// Rsa 公钥
public static String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMIBL0C+sN2oZEaCscc8gaEjXv87F/Ggml4XcjFmWaw8xQ0vfwGzY6wdG6eTMLW0FV3GSSxs2lsVJnrjkHNAnqFoMGn3RHcHnrIlAm4+ALt8S4rQ1TIgqzuasuVykUkGunTDYzAEcObTkZ70ZToj8qQwRCkskfgbUIiw4XpXqS2QIDAQAB";
/**
*
*
* @param text
* @return
*/
public static String decryptByPrivateKey(String text) throws Exception {
return decryptByPrivateKey(privateKey, text);
}
/**
*
*
* @param publicKeyString
* @param text
* @return
*/
public static String decryptByPublicKey(String publicKeyString, String text) throws Exception {
X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, publicKey);
byte[] result = cipher.doFinal(Base64.decodeBase64(text));
return new String(result);
}
/**
*
*
* @param privateKeyString
* @param text
* @return
*/
public static String encryptByPrivateKey(String privateKeyString, String text) throws Exception {
PKCS8EncodedKeySpec pkcs8EncodedKeySpec = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
byte[] result = cipher.doFinal(text.getBytes());
return Base64.encodeBase64String(result);
}
/**
*
*
* @param privateKeyString
* @param text
* @return
*/
public static String decryptByPrivateKey(String privateKeyString, String text) throws Exception {
PKCS8EncodedKeySpec pkcs8EncodedKeySpec5 = new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PrivateKey privateKey = keyFactory.generatePrivate(pkcs8EncodedKeySpec5);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, privateKey);
byte[] result = cipher.doFinal(Base64.decodeBase64(text));
return new String(result);
}
/**
*
*
* @param publicKeyString
* @param text
* @return
*/
public static String encryptByPublicKey(String publicKeyString, String text) throws Exception {
X509EncodedKeySpec x509EncodedKeySpec2 = new X509EncodedKeySpec(Base64.decodeBase64(publicKeyString));
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey publicKey = keyFactory.generatePublic(x509EncodedKeySpec2);
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
byte[] result = cipher.doFinal(text.getBytes());
return Base64.encodeBase64String(result);
}
/**
* RSA
*
* @return
*/
public static RsaKeyPair generateKeyPair() throws NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(1024);
KeyPair keyPair = keyPairGenerator.generateKeyPair();
RSAPublicKey rsaPublicKey = (RSAPublicKey) keyPair.getPublic();
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) keyPair.getPrivate();
String publicKeyString = Base64.encodeBase64String(rsaPublicKey.getEncoded());
String privateKeyString = Base64.encodeBase64String(rsaPrivateKey.getEncoded());
return new RsaKeyPair(publicKeyString, privateKeyString);
}
/**
* RSA
*/
public static class RsaKeyPair {
private final String publicKey;
private final String privateKey;
public RsaKeyPair(String publicKey, String privateKey) {
this.publicKey = publicKey;
this.privateKey = privateKey;
}
public String getPublicKey() {
return publicKey;
}
public String getPrivateKey() {
return privateKey;
}
}
public static void main(String[] args) {
// try {
// RsaKeyPair rsaKeyPair = generateKeyPair();
// System.out.println("私钥:" + rsaKeyPair.getPrivateKey());
// System.out.println("公钥:" + rsaKeyPair.getPublicKey());
// } catch (NoSuchAlgorithmException e) {
// throw new RuntimeException(e);
// }
try {
//String timestamp = String.valueOf(System.currentTimeMillis());
String timestamp = "1705165273935";
//String str = "jhcf170515993052073qrDFKJmk001" + timestamp;
// Map<String,Object> map = new HashMap<>();
// map.put("serverid","123");
// map.put("companyName","测试名称");
// String str = JSON.toJSONString(map);
List<Object> list = new ArrayList<>();
Map<String,Object> map1 = new HashMap<>();
map1.put("serverid","1231");
map1.put("companyName","测试名称1");
list.add(map1);
Map<String,Object> map2 = new HashMap<>();
map2.put("serverid","1232");
map2.put("companyName","测试名称2");
list.add(map2);
Map<String,Object> map3 = new HashMap<>();
map3.put("serverid","1233");
map3.put("companyName","测试名称3");
list.add(map3);
Map<String,Object> map4 = new HashMap<>();
map4.put("serverid","1234");
map4.put("companyName","测试名称4");
list.add(map4);
String str = JSON.toJSONString(list);
System.out.println("明文信息:" + str);
str = Md5Utils.hash(str)+timestamp;
// 公钥加密->私钥解密
String encryptByPublicKeyStr = encryptByPublicKey(publicKey, str);
System.out.println("公钥加密:" + encryptByPublicKeyStr);
String decryptByPrivateKeyStr = decryptByPrivateKey(privateKey, encryptByPublicKeyStr);
System.out.println("私钥解密:" + decryptByPrivateKeyStr);
System.out.println("***********************************");
// 私钥加密->公钥解密
String encryptByPrivateKeyStr = encryptByPrivateKey(privateKey, str);
System.out.println("私钥加密:" + encryptByPrivateKeyStr);
String decryptByPublicKeyStr = decryptByPublicKey(publicKey, encryptByPrivateKeyStr);
System.out.println("公钥解密:" + decryptByPublicKeyStr);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

View File

@ -8,7 +8,10 @@ import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import org.apache.commons.lang3.time.DateFormatUtils;
/**
@ -26,6 +29,8 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
public static String YYYY_MM_DD_HH_MM = "yyyy-MM-dd HH:mm";
public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
private static String[] parsePatterns = {
@ -188,4 +193,30 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
return Date.from(zdt.toInstant());
}
public static Date[] getCurrentWeekDate() {
Calendar calendar = Calendar.getInstance();
calendar.setTimeZone(TimeZone.getTimeZone("GMT+8"));
//start of the week
if (calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
calendar.add(Calendar.DAY_OF_YEAR, -1);
}
calendar.add(Calendar.DAY_OF_WEEK, -(calendar.get(Calendar.DAY_OF_WEEK) - 2));
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
//String startTime = conversion(calendar.getTimeInMillis());
Date dtStart=calendar.getTime();
//end of the week
calendar.add(Calendar.DAY_OF_WEEK, 6);
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
//String endTime = conversion(calendar.getTimeInMillis());
Date dtEnd=calendar.getTime();
return new Date[]{dtStart,dtEnd};
}
}

View File

@ -0,0 +1,242 @@
package com.ruoyi.common.utils;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
public class ExcelUtils {
/**
*
* @param wb
* @return
*/
public static CellStyle createTitleCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setAlignment(HorizontalAlignment.CENTER);//水平居中
cellStyle.setVerticalAlignment(VerticalAlignment.BOTTOM);//居于底部
//cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
// cellStyle.setFillForegroundColor(IndexedColors.GREY_40_PERCENT.getIndex());//背景颜色
Font headerFont1 = wb.createFont(); // 创建字体样式
headerFont1.setBold(true); //字体加粗
headerFont1.setFontName("宋体"); // 设置字体类型
headerFont1.setFontHeightInPoints((short) 15); // 设置字体大小
cellStyle.setFont(headerFont1); // 为标题样式设置字体样式
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle createHeadCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setWrapText(true);// 设置自动换行
// cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景颜色
cellStyle.setAlignment(HorizontalAlignment.CENTER); //水平居中
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); //垂直对齐
//cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
// cellStyle.setBottomBorderColor(IndexedColors.BLACK.index);
cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
cellStyle.setBorderLeft(BorderStyle.THIN); //左边框
cellStyle.setBorderRight(BorderStyle.THIN); //右边框
cellStyle.setBorderTop(BorderStyle.THIN); //上边框
Font headerFont = wb.createFont(); // 创建字体样式
// headerFont.setBold(true); //字体加粗
headerFont.setFontName("宋体"); // 设置字体类型
headerFont.setFontHeightInPoints((short) 10); // 设置字体大小
cellStyle.setFont(headerFont); // 为标题样式设置字体样式
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle createContentCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中
cellStyle.setAlignment(HorizontalAlignment.CENTER);// 水平居中
cellStyle.setWrapText(true);// 设置自动换行
cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
cellStyle.setBorderLeft(BorderStyle.THIN); //左边框
cellStyle.setBorderRight(BorderStyle.THIN); //右边框
cellStyle.setBorderTop(BorderStyle.THIN); //上边框
// 生成12号字体
Font font = wb.createFont();
font.setColor((short)8);
font.setFontHeightInPoints((short) 10);
cellStyle.setFont(font);
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle createContentRightCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中
cellStyle.setAlignment(HorizontalAlignment.RIGHT);// 水平居中
cellStyle.setWrapText(true);// 设置自动换行
cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
cellStyle.setBorderLeft(BorderStyle.THIN); //左边框
cellStyle.setBorderRight(BorderStyle.THIN); //右边框
cellStyle.setBorderTop(BorderStyle.THIN); //上边框
// 生成12号字体
Font font = wb.createFont();
font.setColor((short)8);
font.setFontHeightInPoints((short) 10);
cellStyle.setFont(font);
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle createContentWeightCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中
cellStyle.setAlignment(HorizontalAlignment.LEFT);// 水平居中
cellStyle.setWrapText(true);// 设置自动换行
cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
cellStyle.setBorderLeft(BorderStyle.THIN); //左边框
cellStyle.setBorderRight(BorderStyle.THIN); //右边框
cellStyle.setBorderTop(BorderStyle.THIN); //上边框
// 生成12号字体
Font font = wb.createFont();
font.setColor((short)8);
font.setBold(true); //字体加粗
font.setFontHeightInPoints((short) 10);
cellStyle.setFont(font);
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle createContentWeightRightCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中
cellStyle.setAlignment(HorizontalAlignment.RIGHT);// 水平居中
cellStyle.setWrapText(true);// 设置自动换行
cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
cellStyle.setBorderLeft(BorderStyle.THIN); //左边框
cellStyle.setBorderRight(BorderStyle.THIN); //右边框
cellStyle.setBorderTop(BorderStyle.THIN); //上边框
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景颜色
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
// 生成12号字体
Font font = wb.createFont();
font.setColor((short)8);
font.setBold(true); //字体加粗
font.setFontHeightInPoints((short) 10);
cellStyle.setFont(font);
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle createContentWeightCenterCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中
cellStyle.setAlignment(HorizontalAlignment.CENTER);// 水平居中
cellStyle.setWrapText(true);// 设置自动换行
cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
cellStyle.setBorderLeft(BorderStyle.THIN); //左边框
cellStyle.setBorderRight(BorderStyle.THIN); //右边框
cellStyle.setBorderTop(BorderStyle.THIN); //上边框
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景颜色
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
// 生成12号字体
Font font = wb.createFont();
font.setColor((short)8);
font.setBold(true); //字体加粗
font.setFontHeightInPoints((short) 10);
cellStyle.setFont(font);
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle createContentNoBorderCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中
cellStyle.setAlignment(HorizontalAlignment.LEFT);// 水平居中
cellStyle.setWrapText(true);// 设置自动换行
// 生成12号字体
Font font = wb.createFont();
font.setColor((short)8);
font.setFontHeightInPoints((short) 10);
cellStyle.setFont(font);
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle myCreateContentCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中
cellStyle.setAlignment(HorizontalAlignment.CENTER);// 水平居中
cellStyle.setWrapText(true);// 设置自动换行
cellStyle.setBorderBottom(BorderStyle.THIN); //下边框
cellStyle.setBorderLeft(BorderStyle.THIN); //左边框
cellStyle.setBorderRight(BorderStyle.THIN); //右边框
cellStyle.setBorderTop(BorderStyle.THIN); //上边框
cellStyle.setFillBackgroundColor(IndexedColors.YELLOW.getIndex());
cellStyle.setFillForegroundColor(IndexedColors.YELLOW.getIndex());//背景颜色
// 生成12号字体
Font font = wb.createFont();
font.setColor((short)8);
font.setFontHeightInPoints((short) 10);
cellStyle.setFont(font);
return cellStyle;
}
/**
*
* @param wb
* @return
*/
public static CellStyle myCreateTitleCellStyle(SXSSFWorkbook wb) {
CellStyle cellStyle = wb.createCellStyle();
cellStyle.setAlignment(HorizontalAlignment.CENTER);//水平居中
cellStyle.setVerticalAlignment(VerticalAlignment.BOTTOM);//居于底部
cellStyle.setFillForegroundColor(IndexedColors.YELLOW.getIndex());//背景颜色
cellStyle.setFillBackgroundColor(IndexedColors.YELLOW.getIndex());
Font headerFont1 = wb.createFont(); // 创建字体样式
headerFont1.setBold(true); //字体加粗
headerFont1.setFontName("宋体"); // 设置字体类型
headerFont1.setFontHeightInPoints((short) 15); // 设置字体大小
cellStyle.setFont(headerFont1); // 为标题样式设置字体样式
return cellStyle;
}
}

View File

@ -0,0 +1,33 @@
package com.ruoyi.common.utils;
/**
*
*
* @author JiangYuQi
* @date 2023-11-07
*/
public class NoUtils {
private static final String PREFIX = "jhcf";
private static int COUNTER = 0;
/**
* appId
*
* @author JiangYuQi
* @date 2023-11-07
*/
public static String createAppId() {
long timestamp = System.currentTimeMillis();
String sequencePart = String.format("%03d", getContractNextSequence());
return PREFIX + timestamp+ StringUtils.randomString(10) + sequencePart;
}
private static synchronized int getContractNextSequence() {
if (COUNTER >= 999) {
COUNTER = 0;
}
return ++COUNTER;
}
}

View File

@ -1,12 +1,16 @@
package com.ruoyi.common.utils;
import com.ruoyi.common.core.domain.entity.SysRole;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.exception.ServiceException;
import java.util.List;
/**
*
*
@ -21,7 +25,7 @@ public class SecurityUtils
{
try
{
return getLoginUser().getUserId();
return getLoginUser().getUserId();
}
catch (Exception e)
{
@ -29,6 +33,24 @@ public class SecurityUtils
}
}
public static long getRoleId(){
try
{
List<SysRole> list= getLoginUser().getUser().getRoles();
long roleId= list.get(0).getRoleId();
for(SysRole role :list){
if(role.getRoleId()<roleId){
roleId=role.getRoleId();
}
}
return roleId;
}
catch (Exception e)
{
return 0;
}
}
/**
* ID
**/
@ -51,7 +73,8 @@ public class SecurityUtils
{
try
{
return getLoginUser().getUsername();
LoginUser loginUser=getLoginUser();
return loginUser!=null?loginUser.getUsername():null;
}
catch (Exception e)
{
@ -66,7 +89,11 @@ public class SecurityUtils
{
try
{
return (LoginUser) getAuthentication().getPrincipal();
Authentication auth=getAuthentication();
if(auth!=null) {
return (LoginUser) auth.getPrincipal();
}
return null;
}
catch (Exception e)
{
@ -79,7 +106,8 @@ public class SecurityUtils
*/
public static Authentication getAuthentication()
{
return SecurityContextHolder.getContext().getAuthentication();
SecurityContext ctx=SecurityContextHolder.getContext();
return ctx!=null? SecurityContextHolder.getContext().getAuthentication():null;
}
/**
@ -117,4 +145,17 @@ public class SecurityUtils
{
return userId != null && 1L == userId;
}
/**
*
* @return role
*/
public Long getUserFirstRole(){
return getLoginUser().getUser().getRoles().stream().mapToLong(r->r.getRoleId()).min().getAsLong();
}
public static boolean isUserB() {
long roleId=getRoleId();
return 5==roleId || 6==roleId || 7==roleId || 99==roleId || 15==roleId || 16==roleId || 17==roleId;
}
}

View File

@ -0,0 +1,88 @@
package com.ruoyi.common.utils;
import com.ruoyi.common.config.SmsConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
/**
* ////////////////////////////////////////////////////////////////////
* // _ooOoo_
* // o8888888o
* // 88" . "88
* // (| ^_^ |)
* // O\ = /O
* // ____/`---'\____
* // .' \\| |// `.
* // / \\||| : |||// \
* // / _||||| -:- |||||- \
* // | | \\\ - /// | |
* // | \_| ''\---/'' | |
* // \ .-\__ `-` ___/-. /
* // ___`. .' /--.--\ `. . ___
* // ."" '< `.___\_<|>_/___.' >'"".
* // | | : `- \`.;`\ _ /`;.`/ - ` : | |
* // \ \ `-. \_ __\ /__ _/ .-` / /
* // ========`-.____`-.___\_____/___.-`____.-'========
* // `=---='
* // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* // 佛祖保佑 永无BUG 永不修改
* ////////////////////////////////////////////////////////////////////
*
* @ClassName SMSUtils
* @Description
* @Author QiangZi
* @DateTime 2022/3/10 17:51
* @Version 1.0
*/
@Component
public class SmsUtils {
private static SmsConfig smsConfig;
/**
* @param phoneNumber
* @param message
* @return boolean
* @throws
* @Author QiangZi
* @Description
* @Date 2022/3/10 17:53
**/
public static boolean sendMsg(String phoneNumber, String message) {
boolean result = false;
try {
StringBuffer sb = new StringBuffer(smsConfig.getUrl());
sb.append("?username=").append(smsConfig.getUsername());
sb.append("&password=").append(smsConfig.getPassword());
sb.append("&productid=").append(smsConfig.getProductid());
sb.append("&mobile=" + phoneNumber);
//sb.append("&dstime="+URLEncoder.encode("2015-01-01 14:41:00", "utf-8"));
sb.append("&content=" + URLEncoder.encode(message, "utf-8"));
URL url = new URL(sb.toString());
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");//or set POST
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inputline = in.readLine();
System.out.println("SEND_MSG_XSMS===" + inputline);
String code = inputline.split(",")[0];
result = code.equals("1");
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
@Autowired
public void setSmsConfig(SmsConfig smsConfig) {
SmsUtils.smsConfig = smsConfig;
}
}

View File

@ -1,11 +1,7 @@
package com.ruoyi.common.utils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import org.springframework.util.AntPathMatcher;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.text.StrFormatter;
@ -144,6 +140,17 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
return !isNull(object);
}
/**
* *
*
* @param object Object
* @return true false
*/
public static boolean isNotEmpty(Object object)
{
return !isNull(object) && !"".equals(object);
}
/**
* * Java
*
@ -163,6 +170,28 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
return (str == null ? "" : str.trim());
}
/**
*
*
* @param obj1 1
* @param obj2 2
* @return value
*/
public static boolean eqObj(Object obj1, Object obj2)
{
if(obj1==null && obj2==null){
return true;
}else{
if(obj1==null){
return false;
}
if(obj2==null){
return false;
}
return obj1.toString().equals(obj2.toString());
}
}
/**
*
*
@ -611,4 +640,27 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
}
return sb.toString();
}
private static final String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";
/**
*
*
* @param length
* @return
*/
public static String randomString(int length) {
if (length < 1) {
length = 1;
}
StringBuilder sb = new StringBuilder();
Random random = new Random();
for (int i = 0; i < length; i++) {
int randomIndex = random.nextInt(CHARACTERS.length());
char randomChar = CHARACTERS.charAt(randomIndex);
sb.append(randomChar);
}
String randomString = sb.toString();
return randomString;
}
}

View File

@ -1,9 +1,16 @@
package com.ruoyi.common.utils.file;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Base64;
import java.util.List;
import java.util.Objects;
import cn.hutool.core.img.ImgUtil;
import cn.hutool.core.io.FileUtil;
import org.apache.commons.io.FilenameUtils;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.config.RuoYiConfig;
@ -25,12 +32,17 @@ public class FileUploadUtils
/**
* 50M
*/
public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
public static final long DEFAULT_MAX_SIZE = 200 * 1024 * 1024;
/**
* 1M
*/
public static final long API_PROFILE_MAX_SIZE = 1 * 1024 * 1024;
/**
* 100
*/
public static final int DEFAULT_FILE_NAME_LENGTH = 100;
public static final int DEFAULT_FILE_NAME_LENGTH = 200;
/**
*
@ -86,6 +98,30 @@ public class FileUploadUtils
}
}
/**
*
*
* @param baseDir
* @param file []
* @return
* @throws IOException
*/
public static final String uploadImages(String baseDir, MultipartFile file) throws IOException
{
try
{
if (file.getSize() > API_PROFILE_MAX_SIZE)
{
throw new FileSizeLimitExceededException(1);
}
return upload(baseDir, file, MimeTypeUtils.IMAGE_EXTENSION);
}
catch (Exception e)
{
throw new IOException(e.getMessage(), e);
}
}
/**
*
*
@ -114,16 +150,69 @@ public class FileUploadUtils
String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath();
file.transferTo(Paths.get(absPath));
makeMiniImage(absPath);
return getPathFileName(baseDir, fileName);
}
private static void makeMiniImage(String absPath) {
try {
String ext = FileUtils.getFileExt(absPath).toLowerCase();
String exts = Arrays.toString(new String[]{"jpg", "jpeg", "png", "bmp"});
if (exts.contains(ext)) {
if (new File(absPath).exists()) {
int w = ImgUtil.read(FileUtil.file(absPath)).getWidth();
if(w>2000) {
ImgUtil.scale(FileUtil.file(absPath),
FileUtil.file(absPath), (float) (2000.0 / w));
}
ImgUtil.scale(FileUtil.file(absPath),
FileUtil.file(absPath + ".1000.jpg"), (float) (1000.0 / w));
ImgUtil.scale(FileUtil.file(absPath),
FileUtil.file(absPath + ".min.jpg"), (float) (300.0 / w));
}
}
}catch (Exception ex){
ex.printStackTrace();
}
}
public static void minPath(String path){
List<File> list= FileUtil.loopFiles(path);
for(File f :list){
String p=f.getAbsolutePath().toLowerCase();
if(p.endsWith(".min.jpg")||p.endsWith(".1000.jpg")){
continue;
}
System.out.println(f.getAbsolutePath());
makeMiniImage(f.getAbsolutePath());
}
}
/**
*
*/
public static final String extractFilename(MultipartFile file)
{
return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(),
FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file));
FilenameUtils.getBaseName(getYzFilename(file.getOriginalFilename())), Seq.getId(Seq.uploadSeqType), getExtension(file));
}
/**
*
* @param fileName
* @return
*/
public static final String getYzFilename(String fileName){
// 定义正则表达式,匹配除了字母和数字以外的任何字符
String regex = "[#%\\[\\]&',;=?$()]";
// 使用指定的替换字符替换非法字符
String replacedString = fileName.replaceAll(regex,"").replaceAll("__","");
return replacedString;
}
public static void main(String[] args) {
String s = " 3#、6#楼塔吊单位及人员资质报审____________________[asd]20240621095052A847.pdf";
System.out.println(getYzFilename(s));
}
public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException

View File

@ -104,6 +104,27 @@ public class FileUtils
return FileUploadUtils.getPathFileName(uploadDir, pathName);
}
public static String writeBytes(byte[] data, String uploadDir,String fileName) throws IOException
{
FileOutputStream fos = null;
String pathName = "";
try
{
String extension = getFileExtendName(data);
pathName = DateUtils.datePath() + "/" + fileName;
File file = FileUploadUtils.getAbsoluteFile(uploadDir, pathName);
if(file.exists()){
file.delete();
}
fos = new FileOutputStream(file);
fos.write(data);
}
finally
{
IOUtils.close(fos);
}
return FileUploadUtils.getPathFileName(uploadDir, pathName);
}
/**
*
*

View File

@ -17,7 +17,7 @@ public class MimeTypeUtils
public static final String IMAGE_GIF = "image/gif";
public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" };
public static final String[] IMAGE_EXTENSION = { "jpg", "jpeg", "png" };
public static final String[] FLASH_EXTENSION = { "swf", "flv" };

View File

@ -0,0 +1,33 @@
package com.ruoyi.common.utils.file;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.Base64;
/**
* JiangYuQi
*/
public class MultipartFileUtils {
/**
* Base64
* @param
* @return
*/
public static MultipartFile base64ToMultipartFile(String base64) throws IOException {
String[] parts = base64.split(",");
if(parts.length>1){
String contentType = parts[0].split(";")[0].split(":")[1];
byte[] bytes = Base64.getDecoder().decode(parts[1]);
return new MockMultipartFile("file","file."+contentType.split("/")[1], contentType, bytes);
}else{
//默认格式为jpeg
String contentType = "image/jpeg";
byte[] bytes = Base64.getDecoder().decode(base64);
return new MockMultipartFile("file", "file"+contentType.split("/")[1], contentType, bytes);
}
}
}

View File

@ -0,0 +1,522 @@
package com.ruoyi.common.utils.http;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.http.Consts;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
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.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* HttpClient
*
* @author: xingxixingzhe
* @date: 2023/9/25 14:18
*/
@Slf4j
public class HttpClientUtil {
public static final String HTTP_CHARSET = "utf-8";
private static final String CONTENTTYPE = "Content-Type";
/**
* get
*
* @param url
* @param headers null
* @return String
*/
public static String doGet(String url, Map<String, String> headers) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request param info : {}", url);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpGet get = new HttpGet(url);
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
get.addHeader(key, headers.get(key));
});
}
response = httpClient.execute(get);
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response info : {}", result);
return result;
} catch (IOException e) {
log.error("get链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("get关闭response失败" + e.getMessage());
}
return null;
}
/**
* get
*
* @param url
* @param headers null
* @param paramMap
* @return String
*/
public static String doGetQueryParams(String url, Map<String, String> headers, Map<String, Object> paramMap) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
StringBuilder urlTemp = new StringBuilder(url);
if (null != paramMap && paramMap.size() > 0) {
int index = 0;
for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
if (index == 0) {
urlTemp.append("?").append(entry.getKey()).append("=").append(entry.getValue());
} else {
urlTemp.append("&").append(entry.getKey()).append("=").append(entry.getValue());
}
index++;
}
}
url = urlTemp.toString();
log.info("request param info : {}", url);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpGet get = new HttpGet(url);
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
get.addHeader(key, headers.get(key));
});
}
response = httpClient.execute(get);
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response info : {}", result);
return result;
} catch (IOException e) {
log.error("get链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("get关闭response失败" + e.getMessage());
}
return null;
}
/**
* get
*
* @param url
* @param headers null
* @param downloadPath
* @return String
*/
public static String doGetDownloadSaveLocal(String url, Map<String, String> headers, String downloadPath) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request param info : {}", url);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpGet get = new HttpGet(url);
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
get.addHeader(key, headers.get(key));
});
}
response = httpClient.execute(get);
// 获取下载文件流
InputStream inputStream = response.getEntity().getContent();
// 获取下载文件的文件名,此处的 File-Name 头信息,需要在服务端进行自定义
Header header = response.getFirstHeader("Content-Disposition");
String fileName = header.getValue();
fileName = StringUtils.substringAfter(fileName, "=");
fileName = System.currentTimeMillis() + fileName;
log.info("下载的文件名称:" + fileName);
File file = new File(downloadPath + fileName);
file.getParentFile().mkdirs();
FileOutputStream fileOut = new FileOutputStream(file);
byte[] buffer = new byte[2048];
int ch = 0;
while ((ch = inputStream.read(buffer)) != -1) {
fileOut.write(buffer, 0, ch);
}
inputStream.close();
fileOut.flush();
fileOut.close();
return file.getPath();
} catch (IOException e) {
log.error("get链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("get关闭response失败" + e.getMessage());
}
return null;
}
/**
* get
*
* @param url
* @param headers null
* @param connectTimeout
* @param connectionRequestTimeout
* @param socketTimeout
* @return String
*/
public static String doGet(String url, Map<String, String> headers,
int connectTimeout, int connectionRequestTimeout, int socketTimeout) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request param info : {}", url);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpGet get = new HttpGet(url);
get.setConfig(RequestConfig.custom()
.setConnectTimeout(connectTimeout)
.setConnectionRequestTimeout(connectionRequestTimeout)
.setSocketTimeout(socketTimeout).build());
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
get.addHeader(key, headers.get(key));
});
}
response = httpClient.execute(get);
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response info : {}", result);
return result;
} catch (IOException e) {
log.error("get链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("get关闭response失败" + e.getMessage());
}
return null;
}
/**
* post bodyjson
*
* @param url
* @param headers null
* @param body json
* @param connectTimeout
* @param connectionRequestTimeout
* @param socketTimeout
* @return String
* @author: lll
* @date: 20221121 14:11:49
*/
public static String doPost(String url, Map<String, String> headers, String body,
int connectTimeout, int connectionRequestTimeout, int socketTimeout) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request param info : {}", body);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpPost post = new HttpPost(url);
post.setConfig(RequestConfig.custom()
.setConnectTimeout(connectTimeout)
.setConnectionRequestTimeout(connectionRequestTimeout)
.setSocketTimeout(socketTimeout)
.build());
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
post.addHeader(key, headers.get(key));
});
}
post.addHeader(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
// 封装请求体
if (StringUtils.isNotBlank(body)) {
// 请求体主要封装在HttpEntity中
post.setEntity(new StringEntity(body, Charset.forName(HTTP_CHARSET)));
}
response = httpClient.execute(post);
// 处理响应
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response info : {}", result);
return result;
} catch (IOException e) {
log.error("post链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("post关闭response失败" + e.getMessage());
}
return null;
}
/**
* post bodyjson
*
* @param url
* @param headers null
* @param body json
* @return String
*/
public static String doPost(String url, Map<String, String> headers, String body) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request header url : {}", url);
log.info("request param body : {}", body);
log.info("request header headers : {}", headers);
try {
try {
// 创建HttpPost对象
HttpPost post = new HttpPost(url);
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
post.addHeader(key, headers.get(key));
});
}
post.addHeader(HTTP.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
// 封装请求体
if (StringUtils.isNotBlank(body)) {
// 请求体主要封装在HttpEntity中
post.setEntity(new StringEntity(body, Charset.forName(HTTP_CHARSET)));
}
response = httpClient.execute(post);
// 处理响应
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response result : {}", result);
return result;
} catch (IOException e) {
log.error("post链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("post关闭response失败" + e.getMessage());
}
return null;
}
/**
* post bodyform
* <p>
* post bodyjson
*
* @param url
* @param headers null
* @param body form
* @return String
*/
public static String doPost(String url, Map<String, String> headers, Map<String, Object> body,
int connectTimeout, int connectionRequestTimeout, int socketTimeout) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request param info : {}", body);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpPost post = new HttpPost(url);
post.setConfig(RequestConfig.custom().setConnectTimeout(connectTimeout).setConnectionRequestTimeout(connectionRequestTimeout).setSocketTimeout(socketTimeout).build());
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
post.addHeader(key, headers.get(key));
});
}
// 封装请求体
List<NameValuePair> nvpList = new ArrayList<>();
for (String name : body.keySet()) {
String value = String.valueOf(body.get(name));
nvpList.add(new BasicNameValuePair(name, value));
}
post.setEntity(new UrlEncodedFormEntity(nvpList));
response = httpClient.execute(post);
// 处理响应
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response info : {}", result);
return result;
} catch (IOException e) {
log.error("post链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("post关闭response失败" + e.getMessage());
}
return null;
}
/**
* post bodyform
* <p>
*
* @param url
* @param headers null
* @param body json
* @return String
*/
public static String doPost(String url, Map<String, String> headers, Map<String, Object> body) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request param info : {}", body);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpPost post = new HttpPost(url);
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
post.addHeader(key, headers.get(key));
});
}
// 封装请求体
List<NameValuePair> nvpList = new ArrayList<>();
for (String name : body.keySet()) {
String value = String.valueOf(body.get(name));
nvpList.add(new BasicNameValuePair(name, value));
}
post.setEntity(new UrlEncodedFormEntity(nvpList,HTTP_CHARSET));
response = httpClient.execute(post);
// 处理响应
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response info : {}", result);
return result;
} catch (IOException e) {
log.error("post链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("post关闭response失败" + e.getMessage());
}
return null;
}
/**
* delete
*
* @param url
* @param headers null
* @return String
*/
public static String doDelete(String url, Map<String, String> headers) {
// 创建HttpClient对象
CloseableHttpClient httpClient = HttpClients.createDefault();
// 创建HttpResponse对象
CloseableHttpResponse response = null;
log.info("request param info : {}", url);
log.info("request header info : {}", headers);
try {
try {
// 创建HttpPost对象
HttpDelete delete = new HttpDelete(url);
// 封装请求头
if (null != headers) {
headers.keySet().forEach(key -> {
delete.addHeader(key, headers.get(key));
});
}
response = httpClient.execute(delete);
String result = EntityUtils.toString(response.getEntity(), Charset.forName(HTTP_CHARSET));
log.info("response info : {}", result);
return result;
} catch (IOException e) {
log.error("delete链接失败" + e.getMessage());
} finally {
// 释放连接
if (response != null) {
response.close();
}
}
} catch (IOException e) {
log.error("delete关闭response失败" + e.getMessage());
}
return null;
}
}

View File

@ -27,45 +27,15 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.RegExUtils;
import org.apache.commons.lang3.reflect.FieldUtils;
import org.apache.poi.hssf.usermodel.HSSFClientAnchor;
import org.apache.poi.hssf.usermodel.HSSFPicture;
import org.apache.poi.hssf.usermodel.HSSFPictureData;
import org.apache.poi.hssf.usermodel.HSSFShape;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.common.usermodel.HyperlinkType;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ooxml.POIXMLDocumentPart;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.ClientAnchor;
import org.apache.poi.ss.usermodel.DataValidation;
import org.apache.poi.ss.usermodel.DataValidationConstraint;
import org.apache.poi.ss.usermodel.DataValidationHelper;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.usermodel.Drawing;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.Font;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.usermodel.Name;
import org.apache.poi.ss.usermodel.PictureData;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.CellRangeAddressList;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
import org.apache.poi.xssf.usermodel.XSSFDataValidation;
import org.apache.poi.xssf.usermodel.XSSFDrawing;
import org.apache.poi.xssf.usermodel.XSSFPicture;
import org.apache.poi.xssf.usermodel.XSSFShape;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.poi.xssf.usermodel.*;
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -1016,6 +986,7 @@ public class ExcelUtil<T>
{
// 创建cell
cell = row.createCell(column);
if (isSubListValue(vo) && getListCellValue(vo).size() > 1 && attr.needMerge())
{
CellRangeAddress cellAddress = new CellRangeAddress(subMergedFirstRowNum, subMergedLastRowNum, column, column);
@ -1059,7 +1030,20 @@ public class ExcelUtil<T>
// 设置列类型
setCellVo(value, attr, cell);
}
if(attr.isLink()){
CreationHelper createHelper= row.getSheet().getWorkbook().getCreationHelper();
XSSFHyperlink link = (XSSFHyperlink) createHelper.createHyperlink(HyperlinkType.URL);
link.setAddress((String) value);
cell.setHyperlink(link);
if( StringUtils.isNotEmpty (attr.linkText())){
cell.setCellValue(attr.linkText());
}else{
cell.setCellValue(value.toString());
}
}
addStatisticsData(column, Convert.toStr(value), attr);
}
}
catch (Exception e)

View File

@ -2,6 +2,10 @@ package com.ruoyi.common.utils.sign;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.List;
import java.util.Objects;
import com.ruoyi.common.core.text.Convert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -32,6 +36,23 @@ public class Md5Utils
return null;
}
private static byte[] md5(byte[] bytes)
{
MessageDigest algorithm;
try
{
algorithm = MessageDigest.getInstance("MD5");
algorithm.update(bytes);
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)
@ -52,6 +73,36 @@ public class Md5Utils
return buf.toString();
}
public static String hash(byte[] uploadBytes)
{
try
{
return new String(toHex(md5(uploadBytes)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
}
catch (Exception e)
{
log.error("not supported charset...{}", e);
return null;
}
}
public static String hash(List<Long> objs)
{
if(objs==null){
return null;
}
String s = objs.toString();
try
{
return new String(toHex(md5(s)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8);
}
catch (Exception e)
{
log.error("not supported charset...{}", e);
return s;
}
}
public static String hash(String s)
{
try
@ -64,4 +115,12 @@ public class Md5Utils
return s;
}
}
public static String yzMd5(String s){
String tmp="HelloYanzhu"+s+"陕西研筑";
tmp=hash(tmp);
tmp=tmp.substring(3,15)+"yanzhu"+tmp.substring(20)+"研筑陕西";
tmp=hash(tmp);
return "sxyz"+tmp.substring(21,tmp.length()-3)+tmp.substring(3,14);
}
}

View File

@ -0,0 +1,356 @@
package com.ruoyi.common.utils.sign;
import javax.crypto.Cipher;
import java.io.ByteArrayOutputStream;
import java.nio.charset.StandardCharsets;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
/**
* @description: Rsa
* @author: JiangYuQi
* @date: 2024/1/13 15:14
*/
public final class RSAUtil {
private RSAUtil() {}
private static final String RSA = "RSA";
private static final String SIGN_ALGORITHMS = "SHA1WithRSA";
private static final Base64.Decoder DECODER = Base64.getDecoder();
private static final Base64.Encoder ENCODER = Base64.getEncoder();
public static void main(String[] args) throws NoSuchAlgorithmException {
// 生成密钥对
KeyPair keyPair = getKeyPair();
// 公匙
String publicKey = getPublicKeyBase64(keyPair);
System.out.println("公匙 -> " + publicKey);
// 私匙
String privateKey = getPrivateKeyBase64(keyPair);
System.out.println("私匙 -> " + privateKey);
// 明文
String plaintext = "hello world!";
System.out.println("明文 -> " + plaintext);
// 密文base64公匙加密
String ciphertext = publicKeyEncrypt(plaintext, publicKey);
System.out.println("密文base64 -> " + ciphertext);
// 解密后明文(私匙解密)
String decryptString = privateKeyDecrypt(ciphertext, privateKey);
System.out.println("解密后明文 -> " + decryptString);
// 数字签名
// String sign = sign(ciphertext, privateKey);
// System.out.println("数字签名 -> " + decryptString);
// // 验证签名
// boolean pass = verify(ciphertext, sign, publicKey);
// System.out.println("验证签名 -> " + pass);
}
/**
*
*
* @return
* @throws Exception
*/
public static KeyPair getKeyPair() throws NoSuchAlgorithmException {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(RSA);
keyPairGenerator.initialize(1024);
return keyPairGenerator.generateKeyPair();
}
/**
* (Base64)
*
* @param keyPair
* @return
*/
public static String getPublicKeyBase64(KeyPair keyPair) {
PublicKey publicKey = keyPair.getPublic();
byte[] bytes = publicKey.getEncoded();
// 先用base64编码再转换为字符串
return new String(ENCODER.encode(bytes), StandardCharsets.UTF_8);
}
/**
* (Base64)
*
* @param keyPair
* @return
*/
public static String getPrivateKeyBase64(KeyPair keyPair) {
PrivateKey privateKey = keyPair.getPrivate();
byte[] bytes = privateKey.getEncoded();
// 先用base64编码再转换为字符串
return new String(ENCODER.encode(bytes), StandardCharsets.UTF_8);
}
/**
* Base64PublicKey
*
* @param publicKeyBase64 base64
* @return
*/
public static PublicKey getPublicKey(String publicKeyBase64) throws NoSuchAlgorithmException, InvalidKeySpecException {
byte[] keyBytes = DECODER.decode(publicKeyBase64);
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(RSA);
return keyFactory.generatePublic(keySpec);
}
/**
* Base64PrivateKey
*
* @param privateKeyBase64 base64
* @return
* @throws Exception
*/
public static PrivateKey getPrivateKey(String privateKeyBase64) throws NoSuchAlgorithmException, InvalidKeySpecException {
byte[] keyBytes = DECODER.decode((privateKeyBase64));
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance(RSA);
return keyFactory.generatePrivate(keySpec);
}
/**
*
*
* @param plaintext
* @param publicKeyBase64 base64
* @return base64
*/
public static String publicKeyEncrypt(String plaintext, String publicKeyBase64) {
try {
// 获取明文字节数组
byte[] bytes = plaintext.getBytes(StandardCharsets.UTF_8);
Cipher cipher = Cipher.getInstance(RSA);
// 编码前设定编码方式及密钥
PublicKey publicKey = getPublicKey(publicKeyBase64);
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
int keyBit = getKeySize(publicKey);
int inputLen = bytes.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
int step = keyBit / 8 - 11;
for (int i = 0; inputLen - offSet > 0; offSet = i * step) {
byte[] cache;
if (inputLen - offSet > step) {
cache = cipher.doFinal(bytes, offSet, step);
} else {
cache = cipher.doFinal(bytes, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
++i;
}
// 密文字节数组
byte[] ciphertextBytes = out.toByteArray();
out.close();
// 返回密文字节数组base64编码后的字符串
return new String(ENCODER.encode(ciphertextBytes), StandardCharsets.UTF_8);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
*
*
* @param ciphertext
* @param publicKeyBase64 base64
* @return
*/
public static String publicKeyDecrypt(String ciphertext, String publicKeyBase64) {
try {
// 密文base64解码字节数组
byte[] bytes = DECODER.decode(ciphertext.getBytes(StandardCharsets.UTF_8));
Cipher cipher = Cipher.getInstance(RSA);
PublicKey publicKey = getPublicKey(publicKeyBase64);
cipher.init(Cipher.DECRYPT_MODE, publicKey);
int keyBit = getKeySize(publicKey);
int inputLen = bytes.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
int step = keyBit / 8;
for (int i = 0; inputLen - offSet > 0; offSet = i * step) {
byte[] cache;
if (inputLen - offSet > step) {
cache = cipher.doFinal(bytes, offSet, step);
} else {
cache = cipher.doFinal(bytes, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
++i;
}
// 明文字节数组
byte[] plaintextBytes = out.toByteArray();
out.close();
return new String(plaintextBytes, StandardCharsets.UTF_8);
} catch (Exception e) {
return null;
}
}
/**
*
*
* @param plaintext
* @param privateKeyBase64 base64
* @return
*/
public static String privateKeyEncrypt(String plaintext, String privateKeyBase64) {
try {
// 获取明文字节数组
byte[] bytes = plaintext.getBytes(StandardCharsets.UTF_8);
Cipher cipher = Cipher.getInstance(RSA);
// 编码前设定编码方式及密钥
PrivateKey privateKey = getPrivateKey(privateKeyBase64);
cipher.init(Cipher.ENCRYPT_MODE, privateKey);
int keyBit = getKeySize(privateKey);
int inputLen = bytes.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
int step = keyBit / 8 - 11;
for (int i = 0; inputLen - offSet > 0; offSet = i * step) {
byte[] cache;
if (inputLen - offSet > step) {
cache = cipher.doFinal(bytes, offSet, step);
} else {
cache = cipher.doFinal(bytes, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
++i;
}
// 密文字节数组
byte[] ciphertextBytes = out.toByteArray();
out.close();
// 返回密文字节数组base64编码后的字符串
return new String(ENCODER.encode(ciphertextBytes), StandardCharsets.UTF_8);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
*
*
* @param ciphertext
* @param privateKeyBase64 base64
* @return
*/
public static String privateKeyDecrypt(String ciphertext, String privateKeyBase64) {
try {
// 密文base64解码字节数组
byte[] bytes = DECODER.decode(ciphertext.getBytes(StandardCharsets.UTF_8));
Cipher cipher = Cipher.getInstance(RSA);
PrivateKey privateKey = getPrivateKey(privateKeyBase64);
cipher.init(Cipher.DECRYPT_MODE, privateKey);
int keyBit = getKeySize(privateKey);
int inputLen = bytes.length;
ByteArrayOutputStream out = new ByteArrayOutputStream();
int offSet = 0;
int step = keyBit / 8;
for (int i = 0; inputLen - offSet > 0; offSet = i * step) {
byte[] cache;
if (inputLen - offSet > step) {
cache = cipher.doFinal(bytes, offSet, step);
} else {
cache = cipher.doFinal(bytes, offSet, inputLen - offSet);
}
out.write(cache, 0, cache.length);
++i;
}
// 明文字节数组
byte[] plaintextBytes = out.toByteArray();
out.close();
return new String(plaintextBytes, StandardCharsets.UTF_8);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
/**
* 使
*
* @param ciphertext
* @param privateKeyBase64 Base64
* @return base64
*/
public static String sign(String ciphertext, String privateKeyBase64) {
try {
// 密文字节数组
byte[] ciphertextBytes = DECODER.decode(ciphertext.getBytes(StandardCharsets.UTF_8));
PrivateKey privateKey = getPrivateKey(privateKeyBase64);
Signature signature = Signature.getInstance(SIGN_ALGORITHMS);
signature.initSign(privateKey);
signature.update(ciphertextBytes);
byte[] signed = signature.sign();
return new String(ENCODER.encode(signed), StandardCharsets.UTF_8);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* 使
*
* @param ciphertext
* @param sign
* @param publicKeyBase64 base64
* @return
*/
public static boolean verify(String ciphertext, String sign, String publicKeyBase64) {
try {
// 密文base64解码字节数组
byte[] ciphertextBytes = DECODER.decode(ciphertext.getBytes(StandardCharsets.UTF_8));
// 签名base64解码字节数组
byte[] signBytes = DECODER.decode(sign.getBytes(StandardCharsets.UTF_8));
PublicKey publicKey = getPublicKey(publicKeyBase64);
Signature signature = Signature.getInstance(SIGN_ALGORITHMS);
signature.initVerify(publicKey);
signature.update(ciphertextBytes);
return signature.verify(signBytes);
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
/**
*
*
* @param publicKey
* @return
*/
public static int getKeySize(PublicKey publicKey) {
RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey;
return rsaPublicKey.getModulus().bitLength();
}
/**
*
*
* @param privateKey
* @return
*/
public static int getKeySize(PrivateKey privateKey) {
RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey;
return rsaPrivateKey.getModulus().bitLength();
}
}

View File

@ -0,0 +1,5 @@
# sms短信平台配置 企信通--九维
sms.jiuwei.url=http://123.206.19.78:9001/sendXSms.do
sms.jiuwei.username=gwzdyjc
sms.jiuwei.password=308517
sms.jiuwei.productid=621215

View File

@ -84,13 +84,4 @@
</dependencies>
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
</project>

View File

@ -16,8 +16,8 @@ public enum FlowComment {
REJECT("3", "驳回意见"),
DELEGATE("4", "委派意见"),
ASSIGN("5", "转办意见"),
STOP("6", "终止流程");
STOP("6", "终止流程"),
REVOKE("7", "撤回");
/**
*
*/

View File

@ -0,0 +1,41 @@
package com.ruoyi.flowable.config;
import com.ruoyi.flowable.listener.GlobalEventListener;
import lombok.RequiredArgsConstructor;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher;
import org.flowable.spring.SpringProcessEngineConfiguration;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.ContextRefreshedEvent;
/**
* Flowable
*
* @author JiangYuQi
*/
@Configuration
@RequiredArgsConstructor
public class FlowableGlobalListenerConfig implements ApplicationListener<ContextRefreshedEvent> {
private final SpringProcessEngineConfiguration configuration;
private final GlobalEventListener globalEventListener;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
FlowableEventDispatcher dispatcher = configuration.getEventDispatcher();
/**
* -
* PROCESS_CREATED
* TASK_CREATED
* TASK_COMPLETED
* PROCESS_COMPLETED
*
*/
dispatcher.addEventListener(globalEventListener,FlowableEngineEventType.TASK_CREATED);
dispatcher.addEventListener(globalEventListener,FlowableEngineEventType.PROCESS_COMPLETED);
}
}

View File

@ -1,95 +1,95 @@
//package com.ruoyi.flowable.config;
//
//import com.sun.prism.paint.Color;
//import org.flowable.bpmn.model.AssociationDirection;
//import org.flowable.image.impl.DefaultProcessDiagramCanvas;
//
//import java.awt.*;
//import java.awt.geom.Line2D;
//import java.awt.geom.RoundRectangle2D;
//
///**
// * @author Tony
// * @date 2021-04-03
// */
//public class MyDefaultProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
// //设置高亮线的颜色 这里我设置成绿色
// protected static Color HIGHLIGHT_SEQUENCEFLOW_COLOR = Color.GREEN;
//
// public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
// super(width, height, minX, minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
// }
//
// public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType) {
// super(width, height, minX, minY, imageType);
// }
//
//
// /**
// * 画线颜色设置
// */
// @Override
// public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType,
// AssociationDirection associationDirection, boolean highLighted, double scaleFactor) {
//
// Paint originalPaint = g.getPaint();
// Stroke originalStroke = g.getStroke();
//
// g.setPaint(CONNECTION_COLOR);
// if (connectionType.equals("association")) {
// g.setStroke(ASSOCIATION_STROKE);
// } else if (highLighted) {
// //设置线的颜色
// g.setPaint(originalPaint);
// g.setStroke(HIGHLIGHT_FLOW_STROKE);
// }
//
// for (int i = 1; i < xPoints.length; i++) {
// Integer sourceX = xPoints[i - 1];
// Integer sourceY = yPoints[i - 1];
// Integer targetX = xPoints[i];
// Integer targetY = yPoints[i];
// Line2D.Double line = new Line2D.Double(sourceX, sourceY, targetX, targetY);
// g.draw(line);
// }
//
// if (isDefault) {
// Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
// drawDefaultSequenceFlowIndicator(line, scaleFactor);
// }
//
// if (conditional) {
// Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
// drawConditionalSequenceFlowIndicator(line, scaleFactor);
// }
//
// if (associationDirection == AssociationDirection.ONE || associationDirection == AssociationDirection.BOTH) {
// Line2D.Double line = new Line2D.Double(xPoints[xPoints.length - 2], yPoints[xPoints.length - 2], xPoints[xPoints.length - 1], yPoints[xPoints.length - 1]);
// drawArrowHead(line, scaleFactor);
// }
// if (associationDirection == AssociationDirection.BOTH) {
// Line2D.Double line = new Line2D.Double(xPoints[1], yPoints[1], xPoints[0], yPoints[0]);
// drawArrowHead(line, scaleFactor);
// }
// g.setPaint(originalPaint);
// g.setStroke(originalStroke);
// }
//
// /**
// * 高亮节点设置
// */
// @Override
// public void drawHighLight(int x, int y, int width, int height) {
// Paint originalPaint = g.getPaint();
// Stroke originalStroke = g.getStroke();
// //设置高亮节点的颜色
// g.setPaint(HIGHLIGHT_COLOR);
// g.setStroke(THICK_TASK_BORDER_STROKE);
//
// RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
// g.draw(rect);
//
// g.setPaint(originalPaint);
// g.setStroke(originalStroke);
// }
//}
package com.ruoyi.flowable.config;
import org.flowable.bpmn.model.AssociationDirection;
import org.flowable.image.impl.DefaultProcessDiagramCanvas;
import java.awt.*;
import java.awt.geom.Line2D;
import java.awt.geom.RoundRectangle2D;
/**
* @author Tony
* @date 2021-04-03
*/
public class MyDefaultProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
//设置高亮线的颜色 这里我设置成绿色
protected static Color HIGHLIGHT_SEQUENCEFLOW_COLOR = Color.GREEN;
public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
super(width, height, minX, minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
}
public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType) {
super(width, height, minX, minY, imageType);
}
/**
* 线
*/
@Override
public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType,
AssociationDirection associationDirection, boolean highLighted, double scaleFactor) {
Paint originalPaint = g.getPaint();
Stroke originalStroke = g.getStroke();
g.setPaint(CONNECTION_COLOR);
if (connectionType.equals("association")) {
g.setStroke(ASSOCIATION_STROKE);
} else if (highLighted) {
//设置线的颜色
g.setPaint(originalPaint);
g.setStroke(HIGHLIGHT_FLOW_STROKE);
}
for (int i = 1; i < xPoints.length; i++) {
Integer sourceX = xPoints[i - 1];
Integer sourceY = yPoints[i - 1];
Integer targetX = xPoints[i];
Integer targetY = yPoints[i];
Line2D.Double line = new Line2D.Double(sourceX, sourceY, targetX, targetY);
g.draw(line);
}
if (isDefault) {
Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
drawDefaultSequenceFlowIndicator(line, scaleFactor);
}
if (conditional) {
Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
drawConditionalSequenceFlowIndicator(line, scaleFactor);
}
if (associationDirection == AssociationDirection.ONE || associationDirection == AssociationDirection.BOTH) {
Line2D.Double line = new Line2D.Double(xPoints[xPoints.length - 2], yPoints[xPoints.length - 2], xPoints[xPoints.length - 1], yPoints[xPoints.length - 1]);
drawArrowHead(line, scaleFactor);
}
if (associationDirection == AssociationDirection.BOTH) {
Line2D.Double line = new Line2D.Double(xPoints[1], yPoints[1], xPoints[0], yPoints[0]);
drawArrowHead(line, scaleFactor);
}
g.setPaint(originalPaint);
g.setStroke(originalStroke);
}
/**
*
*/
@Override
public void drawHighLight(int x, int y, int width, int height) {
Paint originalPaint = g.getPaint();
Stroke originalStroke = g.getStroke();
//设置高亮节点的颜色
g.setPaint(HIGHLIGHT_COLOR);
g.setStroke(THICK_TASK_BORDER_STROKE);
RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
g.draw(rect);
g.setPaint(originalPaint);
g.setStroke(originalStroke);
}
}

View File

@ -0,0 +1,126 @@
package com.ruoyi.flowable.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.SysRoleEnum;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
import com.ruoyi.system.domain.FlowTaskEntity;
import com.ruoyi.system.service.ISysDeptService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.stream.Collectors;
/**
* <p>
*
* </p>
*
* @author JiangYuQi
* @date 2021-04-03
*/
@Slf4j
@Api(tags = "流程定义")
@RestController
@RequestMapping("/flowable/businessKey")
public class FlowBusinessKeyController extends BaseController {
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private IFlowBusinessKeyService flowBusinessKeyService;
/**
*
* @param flowTaskEntity
* @return
*/
@GetMapping(value = "/allList")
public TableDataInfo allList(FlowTaskEntity flowTaskEntity) {
startPage();
flowTaskEntity.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(flowTaskEntity.getNowRole())){
flowTaskEntity.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
flowTaskEntity.setNowDept(Convert.toStr(getDeptId()));
}
flowTaskEntity.setNowUser(Convert.toStr(getUserId()));
return getDataTable(flowBusinessKeyService.selectAllFlowTaskByParams(flowTaskEntity));
}
/**
*
* @param flowTaskEntity
* @return
*/
@GetMapping(value = "/queryCount")
public AjaxResult queryCount(FlowTaskEntity flowTaskEntity) {
flowTaskEntity.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(flowTaskEntity.getNowRole())){
flowTaskEntity.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
flowTaskEntity.setNowDept(Convert.toStr(getDeptId()));
}
flowTaskEntity.setNowUser(Convert.toStr(getUserId()));
return success(flowBusinessKeyService.quueryCount(flowTaskEntity));
}
/**
* Id
* @param procInsId
* @return
*/
@GetMapping(value = "/findCommentByProcInsId")
public AjaxResult findCommentByProcInsId(String procInsId) {
return success(flowBusinessKeyService.selectCommentByProcInsId(procInsId));
}
/**
* Id
* @param procInsId
* @return
*/
@GetMapping(value = "/findFormDatasByProcInsId")
public AjaxResult findFormDatasByProcInsId(String procInsId) {
return success(flowBusinessKeyService.selectFormDatasByProcInsId(procInsId));
}
/**
*
* @param flowTaskEntity
* @return
*/
@GetMapping(value = "/myAwaitFlowTaskList")
public TableDataInfo myAwaitFlowTaskList(FlowTaskEntity flowTaskEntity) {
startPage();
flowTaskEntity.setNowRole(Convert.toStr(getUserFirstRole()));
if(SysRoleEnum.ZGS.getCode().equals(flowTaskEntity.getNowRole())){
flowTaskEntity.setNowDept(Convert.toStr(sysDeptService.getZGSDeptId(getDeptId())));
}else{
flowTaskEntity.setNowDept(Convert.toStr(getDeptId()));
}
flowTaskEntity.setNowUser(Convert.toStr(SecurityUtils.getUserId()));
flowTaskEntity.setRoleIds(SecurityUtils.getLoginUser().getUser().getRoles().stream().map(role -> role.getRoleId()).collect(Collectors.toList()));
return getDataTable(flowBusinessKeyService.selectMyAwaitFlowTask(flowTaskEntity));
}
/**
*
* @param flowTaskEntity
* @return
*/
@GetMapping(value = "/myFinishedFlowTaskList")
public TableDataInfo myFinishedFlowTaskList(FlowTaskEntity flowTaskEntity) {
startPage();
flowTaskEntity.setNowUser(Convert.toStr(SecurityUtils.getUserId()));
return getDataTable(flowBusinessKeyService.selectMyFinishedFlowTask(flowTaskEntity));
}
}

View File

@ -1,10 +1,13 @@
package com.ruoyi.flowable.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.flowable.domain.dto.FlowSaveXmlVo;
import com.ruoyi.flowable.domain.vo.ProcKeyRole;
import com.ruoyi.flowable.service.IFlowDefinitionService;
import com.ruoyi.system.domain.FlowProcDefDto;
import com.ruoyi.system.domain.SysExpression;
@ -60,8 +63,19 @@ public class FlowDefinitionController extends BaseController {
@ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class)
public AjaxResult list(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNum,
@ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize,
@ApiParam(value = "发起角色", required = false) @RequestParam(required = false) String roleId,
@ApiParam(value = "流程类型", required = false) @RequestParam(required = false) String category,
@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) {
return AjaxResult.success(flowDefinitionService.list(name, pageNum, pageSize));
return AjaxResult.success(flowDefinitionService.list(roleId, category, name, pageNum, pageSize));
}
@GetMapping(value = "/myList")
@ApiOperation(value = "流程定义列表", response = FlowProcDefDto.class)
public AjaxResult myList(@ApiParam(value = "当前页码", required = true) @RequestParam Integer pageNum,
@ApiParam(value = "每页条数", required = true) @RequestParam Integer pageSize,
@ApiParam(value = "流程类型", required = false) @RequestParam(required = false) String category,
@ApiParam(value = "流程名称", required = false) @RequestParam(required = false) String name) {
return AjaxResult.success(flowDefinitionService.myList(getUsername(), category, name, pageNum, pageSize));
}
@ -129,7 +143,6 @@ public class FlowDefinitionController extends BaseController {
}
@ApiOperation(value = "保存流程设计器内的xml文件")
@PostMapping("/save")
public AjaxResult save(@RequestBody FlowSaveXmlVo vo) {
@ -153,15 +166,32 @@ public class FlowDefinitionController extends BaseController {
return AjaxResult.success("导入成功");
}
@ApiOperation(value = "发起流程")
@Log(title = "发起流程", businessType = BusinessType.INSERT)
@PostMapping("/start/{procDefId}")
public AjaxResult start(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
return flowDefinitionService.startProcessInstanceById(procDefId, variables);
SysUser sysUser = getLoginUser().getUser();
return flowDefinitionService.startProcessInstanceById(procDefId, sysUser.getUserId().toString(), sysUser.getNickName(), variables);
}
@ApiOperation(value = "流程发起角色配置")
@Log(title = "流程发起角色配置", businessType = BusinessType.UPDATE)
@PostMapping("/updateProcKeyByRoleId")
public AjaxResult updateProcKeyByRoleId(@RequestBody ProcKeyRole procKeyRole) {
flowDefinitionService.updateProcKeyByRoleId(procKeyRole.getRoleId(),procKeyRole.getKeys());
return success();
}
@ApiOperation(value = "流程发起排序设置")
@Log(title = "流程发起排序设置", businessType = BusinessType.UPDATE)
@PostMapping("/updateProcKeyRoleSort")
public AjaxResult updateProcKeyRoleSort(@RequestBody ProcKeyRole procKeyRole) {
flowDefinitionService.updateProcKeyRoleSort(procKeyRole);
return success();
}
@ApiOperation(value = "激活或挂起流程定义")
@PutMapping(value = "/updateState")
public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,

View File

@ -1,7 +1,8 @@
package com.ruoyi.flowable.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.flowable.domain.vo.FlowTaskVo;
import com.ruoyi.flowable.service.IFlowInstanceService;
import io.swagger.annotations.Api;
@ -36,7 +37,6 @@ public class FlowInstanceController {
}
@ApiOperation(value = "激活或挂起流程实例")
@PostMapping(value = "/updateState")
public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
@ -53,6 +53,7 @@ public class FlowInstanceController {
}
@ApiOperation(value = "删除流程实例")
@Log(title = "删除流程", businessType = BusinessType.INSERT)
@DeleteMapping(value = "/delete/{instanceIds}")
public AjaxResult delete(@ApiParam(value = "流程实例ID", required = true) @PathVariable String[] instanceIds,
@ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {

View File

@ -1,6 +1,8 @@
package com.ruoyi.flowable.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.flowable.domain.dto.FlowTaskDto;
import com.ruoyi.flowable.domain.vo.FlowQueryVo;
import com.ruoyi.flowable.domain.vo.FlowTaskVo;
@ -41,12 +43,14 @@ public class FlowTaskController {
}
@ApiOperation(value = "取消申请", response = FlowTaskDto.class)
@Log(title = "终止申请", businessType = BusinessType.UPDATE)
@PostMapping(value = "/stopProcess")
public AjaxResult stopProcess(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.stopProcess(flowTaskVo);
}
@ApiOperation(value = "撤回流程", response = FlowTaskDto.class)
@Log(title = "撤回流程", businessType = BusinessType.UPDATE)
@PostMapping(value = "/revokeProcess")
public AjaxResult revokeProcess(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.revokeProcess(flowTaskVo);
@ -85,12 +89,14 @@ public class FlowTaskController {
}
@ApiOperation(value = "审批任务")
@Log(title = "审批流程", businessType = BusinessType.UPDATE)
@PostMapping(value = "/complete")
public AjaxResult complete(@RequestBody FlowTaskVo flowTaskVo) {
return flowTaskService.complete(flowTaskVo);
}
@ApiOperation(value = "驳回任务")
@Log(title = "驳回流程", businessType = BusinessType.UPDATE)
@PostMapping(value = "/reject")
public AjaxResult taskReject(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.taskReject(flowTaskVo);
@ -98,6 +104,7 @@ public class FlowTaskController {
}
@ApiOperation(value = "退回任务")
@Log(title = "退回流程", businessType = BusinessType.UPDATE)
@PostMapping(value = "/return")
public AjaxResult taskReturn(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.taskReturn(flowTaskVo);
@ -111,6 +118,7 @@ public class FlowTaskController {
}
@ApiOperation(value = "删除任务")
@Log(title = "删除流程", businessType = BusinessType.UPDATE)
@DeleteMapping(value = "/delete")
public AjaxResult delete(@RequestBody FlowTaskVo flowTaskVo) {
flowTaskService.deleteTask(flowTaskVo);

View File

@ -32,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/flowable/form")
public class SysFormController extends BaseController {
@Autowired
private ISysFormService SysFormService;
@ -105,10 +106,10 @@ public class SysFormController extends BaseController {
return toAjax(SysFormService.deleteSysFormByIds(formIds));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('flowable:form:edit')")
@Log(title = "流程表单", businessType = BusinessType.INSERT)
@PostMapping("/addDeployForm")
public AjaxResult addDeployForm(@RequestBody SysDeployForm sysDeployForm) {

View File

@ -1,7 +1,6 @@
package com.ruoyi.flowable.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
@ -9,8 +8,6 @@ import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* <p><p>
@ -23,6 +20,9 @@ import java.util.Map;
@ApiModel("工作流任务相关-返回参数")
public class FlowTaskDto implements Serializable {
@ApiModelProperty("业务名称")
private String businessKeyName;
@ApiModelProperty("任务编号")
private String taskId;

View File

@ -0,0 +1,44 @@
package com.ruoyi.flowable.domain.enums;
/**
*
*
* @author Xuan xuan
* @date 2021/4/19
*/
public enum FlowComment {
/**
*
*/
NORMAL("1", "正常"),
REBACK("2", "退回"),
REJECT("3", "驳回"),
DELEGATE("4", "委派"),
TRANSFER("5", "转办"),
STOP("6", "终止"),
REVOKE("7", "撤回");
/**
*
*/
private final String type;
/**
*
*/
private final String remark;
FlowComment(String type, String remark) {
this.type = type;
this.remark = remark;
}
public String getType() {
return type;
}
public String getRemark() {
return remark;
}
}

View File

@ -0,0 +1,33 @@
package com.ruoyi.flowable.domain.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author KonBAI
* @createTime 2022/6/28 9:51
*/
@Getter
@AllArgsConstructor
public enum FormType {
/**
*
*/
PROCESS(0),
/**
*
*/
EXTERNAL(1),
/**
*
*/
INDEPENDENT(2);
/**
*
*/
private final Integer type;
}

View File

@ -0,0 +1,44 @@
package com.ruoyi.flowable.domain.enums;
import com.ruoyi.common.utils.StringUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author konbai
* @since 2023/3/9 00:45
*/
@Getter
@AllArgsConstructor
public enum ProcessStatus {
/**
*
*/
RUNNING("running"),
/**
*
*/
TERMINATED("terminated"),
/**
*
*/
COMPLETED("completed"),
/**
*
*/
CANCELED("canceled");
private final String status;
public static ProcessStatus getProcessStatus(String str) {
if (StringUtils.isNotBlank(str)) {
for (ProcessStatus value : values()) {
if (StringUtils.equalsIgnoreCase(str, value.getStatus())) {
return value;
}
}
}
return null;
}
}

View File

@ -20,6 +20,9 @@ public class FlowQueryVo {
@ApiModelProperty("流程名称")
private String name;
@ApiModelProperty("流程类别")
private String category;
@ApiModelProperty("开始时间")
private String startTime;

View File

@ -0,0 +1,50 @@
package com.ruoyi.flowable.domain.vo;
import java.io.Serializable;
import java.util.List;
public class ProcKeyRole implements Serializable
{
private static final long serialVersionUID = 1L;
private String roleId;
private String key;
private String sort;
private List<String> keys;
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public List<String> getKeys() {
return keys;
}
public void setKeys(List<String> keys) {
this.keys = keys;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
}

View File

@ -0,0 +1,63 @@
package com.ruoyi.flowable.domain.vo;
import java.io.Serializable;
import java.util.Map;
/**
*
*
* @author JiangYuQi
* @date 2020-07-07
*/
public class StartTaskVO implements Serializable
{
private static final long serialVersionUID = 1L;
//流程实例ID
private String procDefId;
private String userId;
private String userName;
private String nickName;
private Map<String, Object> variables;
public String getProcDefId() {
return procDefId;
}
public void setProcDefId(String procDefId) {
this.procDefId = procDefId;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public Map<String, Object> getVariables() {
return variables;
}
public void setVariables(Map<String, Object> variables) {
this.variables = variables;
}
}

View File

@ -0,0 +1,373 @@
package com.ruoyi.flowable.flow;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.Process;
import org.flowable.bpmn.model.*;
import org.flowable.common.engine.impl.util.io.StringStreamSource;
import java.util.*;
/**
* @author KonBAI
* @createTime 2022/3/26 19:04
*/
public class ModelUtils {
private static final BpmnXMLConverter bpmnXMLConverter = new BpmnXMLConverter();
/**
* xmlbpmnModel
*
* @param xml xml
* @return bpmnModel
*/
public static BpmnModel getBpmnModel(String xml) {
return bpmnXMLConverter.convertToBpmnModel(new StringStreamSource(xml), false, false);
}
/**
* bpmnModelxml
*
* @deprecated bpmn 线
* @param bpmnModel bpmnModel
* @return xml
*/
@Deprecated
public static String getBpmnXmlStr(BpmnModel bpmnModel) {
return StrUtil.utf8Str(getBpmnXml(bpmnModel));
}
/**
* bpmnModelxml
*
* @deprecated bpmn 线
* @param bpmnModel bpmnModel
* @return xml
*/
@Deprecated
public static byte[] getBpmnXml(BpmnModel bpmnModel) {
return bpmnXMLConverter.convertToXML(bpmnModel);
}
/**
* 线
*
* @param source
* @return 线
*/
public static List<SequenceFlow> getElementIncomingFlows(FlowElement source) {
List<SequenceFlow> sequenceFlows = new ArrayList<>();
if (source instanceof FlowNode) {
sequenceFlows = ((FlowNode) source).getIncomingFlows();
}
return sequenceFlows;
}
/**
* 线
*
* @param source
* @return 线
*/
public static List<SequenceFlow> getElementOutgoingFlows(FlowElement source) {
List<SequenceFlow> sequenceFlows = new ArrayList<>();
if (source instanceof FlowNode) {
sequenceFlows = ((FlowNode) source).getOutgoingFlows();
}
return sequenceFlows;
}
/**
*
*
* @param model bpmnModel
* @return null
*/
public static StartEvent getStartEvent(BpmnModel model) {
Process process = model.getMainProcess();
FlowElement startElement = process.getInitialFlowElement();
if (startElement instanceof StartEvent) {
return (StartEvent) startElement;
}
return getStartEvent(process.getFlowElements());
}
/**
*
*
* @param flowElements
* @return null
*/
public static StartEvent getStartEvent(Collection<FlowElement> flowElements) {
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof StartEvent) {
return (StartEvent) flowElement;
}
}
return null;
}
/**
*
*
* @param model bpmnModel
* @return null
*/
public static EndEvent getEndEvent(BpmnModel model) {
Process process = model.getMainProcess();
return getEndEvent(process.getFlowElements());
}
/**
*
*
* @param flowElements
* @return null
*/
public static EndEvent getEndEvent(Collection<FlowElement> flowElements) {
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof EndEvent) {
return (EndEvent) flowElement;
}
}
return null;
}
public static UserTask getUserTaskByKey(BpmnModel model, String taskKey) {
Process process = model.getMainProcess();
FlowElement flowElement = process.getFlowElement(taskKey);
if (flowElement instanceof UserTask) {
return (UserTask) flowElement;
}
return null;
}
/**
*
*
* @param model bpmnModel
* @param flowElementId ID
* @return
*/
public static FlowElement getFlowElementById(BpmnModel model, String flowElementId) {
Process process = model.getMainProcess();
return process.getFlowElement(flowElementId);
}
/**
* Key
*
* @param flowElement
* @return Key
*/
public static String getFormKey(FlowElement flowElement) {
if (flowElement != null) {
if (flowElement instanceof StartEvent) {
return ((StartEvent) flowElement).getFormKey();
} else if (flowElement instanceof UserTask) {
return ((UserTask) flowElement).getFormKey();
}
}
return null;
}
/**
*
* @param model bpmnModel
* @param name
* @return
*/
public static String getStartEventAttributeValue(BpmnModel model, String name) {
StartEvent startEvent = getStartEvent(model);
return getElementAttributeValue(startEvent, name);
}
/**
*
* @param model bpmnModel
* @param name
* @return
*/
public static String getEndEventAttributeValue(BpmnModel model, String name) {
EndEvent endEvent = getEndEvent(model);
return getElementAttributeValue(endEvent, name);
}
/**
*
* @param model bpmnModel
* @param taskKey Key
* @param name
* @return
*/
public static String getUserTaskAttributeValue(BpmnModel model, String taskKey, String name) {
UserTask userTask = getUserTaskByKey(model, taskKey);
return getElementAttributeValue(userTask, name);
}
/**
*
* @param baseElement
* @param name
* @return
*/
public static String getElementAttributeValue(BaseElement baseElement, String name) {
if (baseElement != null) {
List<ExtensionAttribute> attributes = baseElement.getAttributes().get(name);
if (attributes != null && !attributes.isEmpty()) {
attributes.iterator().next().getValue();
Iterator<ExtensionAttribute> attrIterator = attributes.iterator();
if(attrIterator.hasNext()) {
ExtensionAttribute attribute = attrIterator.next();
return attribute.getValue();
}
}
}
return null;
}
public static boolean isMultiInstance(BpmnModel model, String taskKey) {
UserTask userTask = getUserTaskByKey(model, taskKey);
if (ObjectUtil.isNotNull(userTask)) {
return userTask.hasMultiInstanceLoopCharacteristics();
}
return false;
}
/**
*
*
* @param model bpmnModel
* @return
*/
public static Collection<UserTask> getAllUserTaskEvent(BpmnModel model) {
Process process = model.getMainProcess();
Collection<FlowElement> flowElements = process.getFlowElements();
return getAllUserTaskEvent(flowElements, null);
}
/**
*
* @param flowElements
* @param allElements
* @return
*/
public static Collection<UserTask> getAllUserTaskEvent(Collection<FlowElement> flowElements, Collection<UserTask> allElements) {
allElements = allElements == null ? new ArrayList<>() : allElements;
for (FlowElement flowElement : flowElements) {
if (flowElement instanceof UserTask) {
allElements.add((UserTask) flowElement);
}
if (flowElement instanceof SubProcess) {
// 继续深入子流程,进一步获取子流程
allElements = getAllUserTaskEvent(((SubProcess) flowElement).getFlowElements(), allElements);
}
}
return allElements;
}
/**
*
* @param source
* @return
*/
public static List<UserTask> findNextUserTasks(FlowElement source) {
return findNextUserTasks(source, null, null);
}
/**
*
* @param source
* @param hasSequenceFlow 线 ID线
* @param userTaskList
* @return
*/
public static List<UserTask> findNextUserTasks(FlowElement source, Set<String> hasSequenceFlow, List<UserTask> userTaskList) {
hasSequenceFlow = Optional.ofNullable(hasSequenceFlow).orElse(new HashSet<>());
userTaskList = Optional.ofNullable(userTaskList).orElse(new ArrayList<>());
// 获取出口连线
List<SequenceFlow> sequenceFlows = getElementOutgoingFlows(source);
if (!sequenceFlows.isEmpty()) {
for (SequenceFlow sequenceFlow : sequenceFlows) {
// 如果发现连线重复,说明循环了,跳过这个循环
if (hasSequenceFlow.contains(sequenceFlow.getId())) {
continue;
}
// 添加已经走过的连线
hasSequenceFlow.add(sequenceFlow.getId());
FlowElement targetFlowElement = sequenceFlow.getTargetFlowElement();
if (targetFlowElement instanceof UserTask) {
// 若节点为用户任务,加入到结果列表中
userTaskList.add((UserTask) targetFlowElement);
} else {
// 若节点非用户任务,继续递归查找下一个节点
findNextUserTasks(targetFlowElement, hasSequenceFlow, userTaskList);
}
}
}
return userTaskList;
}
/**
*
* 退
* @param source
* @param target
* @param visitedElements 线 ID线
* @return
*/
public static boolean isSequentialReachable(FlowElement source, FlowElement target, Set<String> visitedElements) {
visitedElements = visitedElements == null ? new HashSet<>() : visitedElements;
if (source instanceof StartEvent && isInEventSubprocess(source)) {
return false;
}
// 根据类型,获取入口连线
List<SequenceFlow> sequenceFlows = getElementIncomingFlows(source);
if (sequenceFlows != null && sequenceFlows.size() > 0) {
// 循环找到目标元素
for (SequenceFlow sequenceFlow: sequenceFlows) {
// 如果发现连线重复,说明循环了,跳过这个循环
if (visitedElements.contains(sequenceFlow.getId())) {
continue;
}
// 添加已经走过的连线
visitedElements.add(sequenceFlow.getId());
FlowElement sourceFlowElement = sequenceFlow.getSourceFlowElement();
// 这条线路存在目标节点,这条线路完成,进入下个线路
if (target.getId().equals(sourceFlowElement.getId())) {
continue;
}
// 如果目标节点为并行网关,则不继续
if (sourceFlowElement instanceof ParallelGateway) {
return false;
}
// 否则就继续迭代
boolean isSequential = isSequentialReachable(sourceFlowElement, target, visitedElements);
if (!isSequential) {
return false;
}
}
}
return true;
}
protected static boolean isInEventSubprocess(FlowElement flowElement) {
FlowElementsContainer flowElementsContainer = flowElement.getParentContainer();
while (flowElementsContainer != null) {
if (flowElementsContainer instanceof EventSubProcess) {
return true;
}
if (flowElementsContainer instanceof FlowElement) {
flowElementsContainer = ((FlowElement) flowElementsContainer).getParentContainer();
} else {
flowElementsContainer = null;
}
}
return false;
}
}

View File

@ -22,11 +22,7 @@ public class FlowTaskListener implements TaskListener{
@Override
public void notify(DelegateTask delegateTask) {
log.info("任务监听器:{}", delegateTask);
// TODO 获取事件类型 delegateTask.getEventName(),可以通过监听器给任务执行人发送相应的通知消息
log.info("任务监听器:{}", delegateTask.getEventName(),delegateTask.getId());
}
}

View File

@ -0,0 +1,317 @@
package com.ruoyi.flowable.listener;
import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.config.WechatAccountConfig;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.TemplateMessageEnum;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.flowable.flow.FindNextNodeUtil;
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
import com.ruoyi.system.domain.SysUserOpenid;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.mapper.SysUserOpenidMapper;
import com.ruoyi.system.service.ISysConfigService;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateData;
import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage;
import org.apache.commons.collections4.CollectionUtils;
import org.flowable.bpmn.model.UserTask;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.identitylink.api.IdentityLink;
import org.flowable.task.api.Task;
import org.flowable.task.service.impl.persistence.entity.TaskEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* Flowable
*
* @author JiangYuQi
*/
@Slf4j
@Component
public class GlobalEventListener extends AbstractFlowableEngineEventListener {
@Autowired
private RedisCache redisCache;
@Autowired
private ISysConfigService configService;
@Autowired
private TaskService taskService;
@Autowired
private WxMpService wxMpService;
@Autowired
private SysDeptMapper sysDeptMapper;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private RuntimeService runtimeService;
@Autowired
private RepositoryService repositoryService;
@Autowired
private SysUserOpenidMapper sysUserOpenidMapper;
@Autowired
private IFlowBusinessKeyService flowBusinessKeyService;
@Override
protected void processCompleted(FlowableEngineEntityEvent event) {
log.info("任务流程审批完成...{}",event.getProcessInstanceId());
super.processCompleted(event);
List<WxMpTemplateMessage> list = new ArrayList<>();
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(event.getProcessInstanceId()).singleResult();
String startUserId = processInstance.getStartUserId();
SysUser sysUser = sysUserMapper.selectUserById(Convert.toLong(startUserId));
Map<String, Object> map = flowBusinessKeyService.selectLastCommentByProcInsId(processInstance.getId());
String nodeName = "工程审批";
if(map!=null){
nodeName += Convert.toStr(map.get("commentResult"),"");
}
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(sysUser.getPhonenumber()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(Convert.toLong(processInstance.getBusinessKey()))));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", nodeName));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,processInstance.getStartTime())));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", sysUser.getNickName()+"["+this.getMsgDepName(sysUser.getDeptId())+"]"));
list.add(templateMessage);
this.send(list,processInstance.getProcessDefinitionKey());
}
@Override
protected void taskCreated(FlowableEngineEntityEvent event) {
log.info("创建任务节点...{}",event.getProcessInstanceId());
super.taskCreated(event);
List<WxMpTemplateMessage> list = new ArrayList<>();
TaskEntity taskEntity = (TaskEntity)event.getEntity();
List<IdentityLink> idList = taskService.getIdentityLinksForTask(taskEntity.getId());
if (CollectionUtils.isNotEmpty(idList)) {
List<String> candidateUsers = new ArrayList<>();
List<String> candidateGroups = new ArrayList<>();
idList.forEach(identityLink -> {
if (StringUtils.isNotBlank(identityLink.getUserId())) {
candidateUsers.add(identityLink.getUserId());
}
if (StringUtils.isNotBlank(identityLink.getGroupId())) {
candidateGroups.add(identityLink.getGroupId());
}
});
log.info("查询任务节点...{}",String.join(",",candidateUsers),String.join(",",candidateGroups));
if(StringUtils.isNotEmpty(candidateUsers) || StringUtils.isNotEmpty(candidateGroups)){
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(taskEntity.getProcessInstanceId()).singleResult();
List<SysUser> sysUserList = flowBusinessKeyService.findFlowTaskUsers(processInstance.getBusinessKey(),candidateUsers,candidateGroups);
Map<String, Object> map = flowBusinessKeyService.selectLastCommentByProcInsId(processInstance.getId());
String nodeName = "待"+taskEntity.getName();
if(map!=null && "驳回".equals(map.get("commentResult"))){
nodeName += "工程审批驳回,请重新提交或审批";
}
if(StringUtils.isNotEmpty(sysUserList)){
String startUserId = processInstance.getStartUserId();
SysUser sysUser = sysUserMapper.selectUserById(Convert.toLong(startUserId));
for(SysUser taskUser:sysUserList){
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(taskUser.getPhonenumber()))
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pages/project_flowable/await/index?category="+taskEntity.getCategory()+"&barProId="+processInstance.getBusinessKey()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(Convert.toLong(processInstance.getBusinessKey()))));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", nodeName));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,processInstance.getStartTime())));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", sysUser.getNickName()+"["+this.getMsgDepName(sysUser.getDeptId())+"]"));
list.add(templateMessage);
}
this.send(list,processInstance.getProcessDefinitionKey());
}
}
}
}
/**
* [使...使]
* @param event
*/
@Override
protected void taskCompleted(FlowableEngineEntityEvent event) {
log.info("任务节点审批通过...{}",event.getProcessInstanceId());
super.taskCompleted(event);
List<WxMpTemplateMessage> list = new ArrayList<>();
TaskEntity taskEntity = (TaskEntity)event.getEntity();
Task task = taskService.createTaskQuery().taskId(taskEntity.getId()).singleResult();
// 查询任务...
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(taskEntity.getProcessInstanceId()).singleResult();
String startUserId = processInstance.getStartUserId();
SysUser sysUser = sysUserMapper.selectUserById(Convert.toLong(startUserId));
if (Objects.nonNull(task)) {
// Step 2. 获取当前流程所有流程变量(网关节点时需要校验表达式)
Map<String, Object> variables = taskEntity.getVariables();
UserTask nextUserTask = FindNextNodeUtil.getNextUserTasks(repositoryService, task, variables).get(0);
List<SysUser> sysUserList = flowBusinessKeyService.findFlowTaskUsers(processInstance.getBusinessKey(),nextUserTask.getCandidateUsers(),nextUserTask.getCandidateGroups());
if(StringUtils.isNotEmpty(sysUserList)){
for(SysUser taskUser:sysUserList){
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(taskUser.getPhonenumber()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(Convert.toLong(processInstance.getBusinessKey()))));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", "待"+nextUserTask.getName()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,processInstance.getStartTime())));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", sysUser.getNickName()+"["+this.getMsgDepName(sysUser.getDeptId())+"]"));
list.add(templateMessage);
}
this.send(list,processInstance.getProcessDefinitionKey());
}
}
}
/**
*
* @param depId
* @return
*/
private String getMsgDepName(Long depId){
String name = Convert.toStr(redisCache.getCacheObject(CacheConstants.WX_MPMESSAGE_DNAME +depId));
if(StringUtils.isNotEmpty(name)){
return name;
}else{
SysDept sysDept = sysDeptMapper.selectDeptById(depId);
//项目名称截取&&超过20字符微信限制并抛出异常
String depName = sysDept.getDeptName();
if(depName.length()>13){
depName = sysDept.getDeptName().substring(0,13);
}
//设置30分钟有效期
redisCache.setCacheObject(CacheConstants.WX_MPMESSAGE_DNAME +depId,depName,30, TimeUnit.MINUTES);
return depName;
}
}
/**
*
* @param proId
* @return
*/
private String getMsgProName(Long proId){
String name = Convert.toStr(redisCache.getCacheObject(CacheConstants.WX_MPMESSAGE_PNAME +proId));
if(StringUtils.isNotEmpty(name)){
return name;
}else{
Map<String, Object> proMap = flowBusinessKeyService.selectSurProjectById(proId);
//项目名称截取&&超过20字符微信限制并抛出异常
String proName = Convert.toStr(proMap.get("projectName"));
if(proName.length()>20){
proName = proName.substring(0,20);
}
//设置30分钟有效期
redisCache.setCacheObject(CacheConstants.WX_MPMESSAGE_PNAME +proId,proName,30, TimeUnit.MINUTES);
return proName;
}
}
/**
*
* @param userName
* @return
*/
private String getMsgId(String userName){
String openIds = Convert.toStr(redisCache.getCacheObject(CacheConstants.WX_MPMESSAGE_OPENID +userName));
if(StringUtils.isNotEmpty(openIds)){
return openIds;
}else{
List<SysUserOpenid> list = sysUserOpenidMapper.findSysUserOpenidsByUser(userName);
if(StringUtils.isNotEmpty(list)){
List<SysUserOpenid> ids = list.stream().filter(u -> StringUtils.isNotBlank(u.getMsgOpenId())).collect(Collectors.toList());
if(StringUtils.isNotEmpty(ids)){
List<String> strs = ids.stream().map(SysUserOpenid :: getMsgOpenId).collect(Collectors.toList());
openIds = String.join(",",strs);
}
}
//设置30分钟有效期
redisCache.setCacheObject(CacheConstants.WX_MPMESSAGE_OPENID +userName,openIds,30, TimeUnit.MINUTES);
return openIds;
}
}
/**
*
*/
private boolean wxSwitch = false;
/**
*
* @param lsit
*/
private void send(List<WxMpTemplateMessage> lsit, String messageType){
try {
wxSwitch = Convert.toBool(configService.selectConfigByKey("sys.wx.message"),false);
if(wxSwitch && StringUtils.isNotEmpty(lsit)){
for(WxMpTemplateMessage message:lsit){
if(StringUtils.isNotEmpty(message.getToUser())){
String[] toUsers = message.getToUser().split(",");
for(String toUser:toUsers){
//判断短时间内是否已发送相同类型的消息
String key = CacheConstants.WX_MPMESSAGE_KEY +toUser+"-"+messageType;
if(Convert.toBool(redisCache.getCacheObject(key),true)){
//多个登录账号时批量发送
message.setToUser(toUser);
wxMpService.getTemplateMsgService().sendTemplateMsg(message);
//5分钟内不推送相同类型的消息
redisCache.setCacheObject(key,false,5, TimeUnit.MINUTES);
}
}
}
}
}
}catch (Exception e){
log.info("出错了...{}",e.getMessage());
try {
JSONObject jsonObject = JSONObject.parseObject(e.getMessage());
if(Objects.equals(jsonObject.getString("errcode"),"40164")){
String ip = jsonObject.getString("errmsg").split("ipv6")[0].split(" ")[2];
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser("oM5rN6Wb8UyBLuTAFNGjnZCeQs1U")
.templateId(TemplateMessageEnum.SERVER_ERROR.getId())
.build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("character_string7", "IP>"+ip));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time6", DateUtils.dateTimeNow()));
wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage);
}
}catch (Exception ex){
ex.printStackTrace();
}
}
}
}

View File

@ -0,0 +1,130 @@
package com.ruoyi.flowable.service;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.FlowTaskEntity;
import java.util.List;
import java.util.Map;
/**
* @author JiangYuQi
* @date 2021-04-03 14:41
*/
public interface IFlowBusinessKeyService {
/**
*
* @param flowTaskEntity
* @return
*/
public List<FlowTaskEntity> selectAllFlowTaskByParams(FlowTaskEntity flowTaskEntity);
/**
*
* @param procInsId
* @return
*/
public FlowTaskEntity findFlowTaskByProcInsId(String procInsId);
/**
*
* @param proId
* @return
*/
public Map<String,Object> selectSurProjectById(Long proId);
/**
*
* @param flowTaskEntity
* @return
*/
public Map<String,Object> quueryCount(FlowTaskEntity flowTaskEntity);
/**
* Id
* @param procInsId
* @return
*/
public List<Map<String, Object>> selectCommentByProcInsId(String procInsId);
/**
* Id
* @param procInsId
* @return
*/
public Map<String, Object> selectLastCommentByProcInsId(String procInsId);
/**
* Id
* @param procInsId
* @return
*/
public Map<String, Object> selectFormDatasByProcInsId(String procInsId);
/**
*
* @param flowTaskEntity
* @return
*/
public List<Map<String, Object>> selectMyAwaitFlowTask(FlowTaskEntity flowTaskEntity);
/**
*
* @param flowTaskEntity
* @return
*/
public List<Map<String, Object>> findAwaitCountGroupByCategory(FlowTaskEntity flowTaskEntity);
/**
*
* @param flowTaskEntity
* @return
*/
public List<Map<String, Object>> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity);
public List<FlowTaskEntity> groupByCategory(FlowTaskEntity where);
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where);
public List<FlowTaskEntity> listByUnit(FlowTaskEntity where);
public List<FlowTaskEntity> listByState(FlowTaskEntity where);
public List<FlowTaskEntity> groupByUnitTotal(FlowTaskEntity where);
public List<FlowTaskEntity> groupByUnitFinish(FlowTaskEntity where);
public List<FlowTaskEntity> groupByProject(long deptId,String proType);
/**
*
* @param flowTaskEntity
* @return
*/
public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity);
public List<FlowTaskEntity> listByCategory(FlowTaskEntity where);
/**
*
* @param businessKey
* @param candidateUsers
* @param candidateGroups
* @return
*/
public List<SysUser> findFlowTaskUsers(String businessKey, List<String> candidateUsers, List<String> candidateGroups);
/**
* -
* @param where
* @return
*/
public List<FlowTaskEntity> groupFlowBySubDeptType(FlowTaskEntity where);
/**
* -
* @param where
* @return
*/
public List<FlowTaskEntity> listFlowBySubDeptType(FlowTaskEntity where);
}

View File

@ -2,10 +2,14 @@ package com.ruoyi.flowable.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.flowable.domain.vo.ProcKeyRole;
import com.ruoyi.system.domain.FlowProcDefDto;
import org.flowable.bpmn.model.FlowElement;
import org.flowable.bpmn.model.UserTask;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
/**
@ -16,15 +20,29 @@ public interface IFlowDefinitionService {
boolean exist(String processDefinitionKey);
/**
*
*
* @param roleId
* @param category
* @param name
* @param pageNum
* @param pageSize
* @return
*/
Page<FlowProcDefDto> list(String name,Integer pageNum, Integer pageSize);
Page<FlowProcDefDto> list(String roleId, String category, String name, Integer pageNum, Integer pageSize);
/**
*
*
* @param username
* @param category
* @param name
* @param pageNum
* @param pageSize
* @return
*/
Page<FlowProcDefDto> myList(String username, String category,String name,Integer pageNum, Integer pageSize);
/**
*
@ -51,8 +69,7 @@ public interface IFlowDefinitionService {
* @return
*/
AjaxResult startProcessInstanceById(String procDefId, Map<String, Object> variables);
AjaxResult startProcessInstanceById(String procDefId, String userId, String nickName, Map<String, Object> variables);
/**
*
@ -77,4 +94,33 @@ public interface IFlowDefinitionService {
* @return
*/
InputStream readImage(String deployId);
/**
*
* @param deployId
* @return
*/
public List<FlowElement> readNodes(String deployId);
/**
*
* @param roleId
* @param keys
* @return
*/
public void updateProcKeyByRoleId(String roleId,List<String> keys);
/**
*
* @param procKeyRole
* @return
*/
public void updateProcKeyRoleSort(ProcKeyRole procKeyRole);
/**
*
* @param deployId
* @return
*/
public List<UserTask> findFlowNodes(String deployId);
}

View File

@ -0,0 +1,225 @@
package com.ruoyi.flowable.service.impl;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
import com.ruoyi.system.domain.FlowTaskEntity;
import com.ruoyi.system.mapper.FlowBusinessKeyMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
/**
*
*
* @author Tony
* @date 2021-04-03
*/
@Service
@Slf4j
public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
@Resource
private FlowBusinessKeyMapper flowBusinessKeyMapper;
/**
*
* @param flowTaskEntity
* @return
*/
@Override
public List<FlowTaskEntity> selectAllFlowTaskByParams(FlowTaskEntity flowTaskEntity) {
return flowBusinessKeyMapper.selectAllFlowTaskByParams(flowTaskEntity);
}
/**
*
* @param procInsId
* @return
*/
@Override
public FlowTaskEntity findFlowTaskByProcInsId(String procInsId) {
return flowBusinessKeyMapper.findFlowTaskByProcInsId(procInsId);
}
/**
*
* @param proId
* @return
*/
@Override
public Map<String,Object> selectSurProjectById(Long proId) {
return flowBusinessKeyMapper.selectSurProjectById(proId);
}
/**
*
* @param flowTaskEntity
* @return
*/
@Override
public Map<String,Object> quueryCount(FlowTaskEntity flowTaskEntity) {
flowTaskEntity.setActiveName("await");
int awaitSize = flowBusinessKeyMapper.selectAllFlowTaskByParams(flowTaskEntity).size();
flowTaskEntity.setActiveName("finished");
int finishedSize = flowBusinessKeyMapper.selectAllFlowTaskByParams(flowTaskEntity).size();
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("await",awaitSize);
dataMap.put("finished",finishedSize);
return dataMap;
}
/**
* Id
* @param procInsId
* @return
*/
@Override
public List<Map<String, Object>> selectCommentByProcInsId(String procInsId) {
return flowBusinessKeyMapper.selectCommentByProcInsId(procInsId);
}
/**
* Id
* @param procInsId
* @return
*/
@Override
public Map<String, Object> selectLastCommentByProcInsId(String procInsId){
return flowBusinessKeyMapper.selectLastCommentByProcInsId(procInsId);
}
/**
* Id
* @param procInsId
* @return
*/
@Override
public Map<String, Object> selectFormDatasByProcInsId(String procInsId) {
Map<String, Object> dataMap = new HashMap<>();
List<Map<String, Object>> list = flowBusinessKeyMapper.selectFormDatasByProcInsId(procInsId);
Iterator<Map<String, Object>> it = list.iterator();
while (it.hasNext()) {
Map<String, Object> map = it.next();
dataMap.put(Convert.toStr(map.get("name")), map.get("text"));
}
return dataMap;
}
/**
*
* @param flowTaskEntity
* @return
*/
@Override
public List<Map<String, Object>> selectMyAwaitFlowTask(FlowTaskEntity flowTaskEntity){
return flowBusinessKeyMapper.selectMyAwaitFlowTask(flowTaskEntity);
}
/**
*
* @param flowTaskEntity
* @return
*/
@Override
public List<Map<String, Object>> findAwaitCountGroupByCategory(FlowTaskEntity flowTaskEntity){
return flowBusinessKeyMapper.findAwaitCountGroupByCategory(flowTaskEntity);
}
/**
*
* @param flowTaskEntity
* @return
*/
@Override
public List<Map<String, Object>> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity) {
return flowBusinessKeyMapper.selectMyFinishedFlowTask(flowTaskEntity);
}
@Override
public List<FlowTaskEntity> groupByCategory(FlowTaskEntity where) {
return flowBusinessKeyMapper.groupByCategory(where);
}
@Override
public List<FlowTaskEntity> groupByUnit(FlowTaskEntity where) {
return flowBusinessKeyMapper.groupByUnit(where);
}
@Override
public List<FlowTaskEntity> listByUnit(FlowTaskEntity where) {
return flowBusinessKeyMapper.listByUnit(where);
}
@Override
public List<FlowTaskEntity> listByState(FlowTaskEntity where) {
return flowBusinessKeyMapper.listByState(where);
}
@Override
public List<FlowTaskEntity> groupByUnitTotal(FlowTaskEntity where) {
return flowBusinessKeyMapper.groupByUnitTotal(where);
}
@Override
public List<FlowTaskEntity> groupByUnitFinish(FlowTaskEntity where) {
return flowBusinessKeyMapper.groupByUnitFinish(where);
}
@Override
public List<FlowTaskEntity> groupByProject(long deptId,String proType) {
return flowBusinessKeyMapper.groupByProject(deptId,proType);
}
/**
*
* @param flowTaskEntity
* @return
*/
@Override
public List<FlowTaskEntity> findSafetyWorkList(FlowTaskEntity flowTaskEntity) {
return flowBusinessKeyMapper.findSafetyWorkList(flowTaskEntity);
}
@Override
public List<FlowTaskEntity> listByCategory(FlowTaskEntity where) {
return flowBusinessKeyMapper.listByCategory(where);
}
/**
*
* @param businessKey
* @param candidateUsers
* @param candidateGroups
* @return
*/
@Override
public List<SysUser> findFlowTaskUsers(String businessKey, List<String> candidateUsers, List<String> candidateGroups){
if(StringUtils.isNotEmpty(candidateGroups) && candidateGroups.contains("47")){
return flowBusinessKeyMapper.findFlowTaskDeptUsers(businessKey,candidateUsers,candidateGroups);
}else{
return flowBusinessKeyMapper.findFlowTaskUsers(businessKey,candidateUsers,candidateGroups);
}
}
/**
* -
* @param where
* @return
*/
@Override
public List<FlowTaskEntity> groupFlowBySubDeptType(FlowTaskEntity where) {
return flowBusinessKeyMapper.groupFlowBySubDeptType(where);
}
/**
* -
* @param where
* @return
*/
@Override
public List<FlowTaskEntity> listFlowBySubDeptType(FlowTaskEntity where) {
return flowBusinessKeyMapper.listFlowBySubDeptType(where);
}
}

View File

@ -3,32 +3,39 @@ package com.ruoyi.flowable.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.flowable.common.constant.ProcessConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.flowable.common.enums.FlowComment;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.flowable.domain.vo.ProcKeyRole;
import com.ruoyi.flowable.service.IFlowBusinessKeyService;
import com.ruoyi.system.domain.FlowProcDefDto;
import com.ruoyi.flowable.factory.FlowServiceFactory;
import com.ruoyi.flowable.service.IFlowDefinitionService;
import com.ruoyi.flowable.service.ISysDeployFormService;
import com.ruoyi.system.domain.FlowTaskEntity;
import com.ruoyi.system.domain.SysForm;
import com.ruoyi.system.mapper.FlowBusinessKeyMapper;
import com.ruoyi.system.mapper.FlowDeployMapper;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.bpmn.model.FlowElement;
import org.flowable.bpmn.model.UserTask;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.repository.ProcessDefinitionQuery;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.image.impl.DefaultProcessDiagramGenerator;
import org.flowable.task.api.Task;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.IOException;
@ -61,6 +68,9 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
@Resource
private FlowDeployMapper flowDeployMapper;
@Autowired
private FlowBusinessKeyMapper flowBusinessKeyMapper;
private static final String BPMN_FILE_SUFFIX = ".bpmn";
@Override
@ -75,52 +85,57 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
/**
*
*
* @param roleId
* @param category
* @param name
* @param pageNum
* @param pageSize
* @return
*/
@Override
public Page<FlowProcDefDto> list(String name, Integer pageNum, Integer pageSize) {
public Page<FlowProcDefDto> list(String roleId, String category, String name, Integer pageNum, Integer pageSize) {
Page<FlowProcDefDto> page = new Page<>();
// // 流程定义列表数据查询
// final ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();
// if (StringUtils.isNotEmpty(name)) {
// processDefinitionQuery.processDefinitionNameLike(name);
// }
//// processDefinitionQuery.orderByProcessDefinitionKey().asc();
// page.setTotal(processDefinitionQuery.count());
// List<ProcessDefinition> processDefinitionList = processDefinitionQuery.listPage(pageSize * (pageNum - 1), pageSize);
//
// List<FlowProcDefDto> dataList = new ArrayList<>();
// for (ProcessDefinition processDefinition : processDefinitionList) {
// String deploymentId = processDefinition.getDeploymentId();
// Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
// FlowProcDefDto reProcDef = new FlowProcDefDto();
// BeanUtils.copyProperties(processDefinition, reProcDef);
// SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(deploymentId);
// if (Objects.nonNull(sysForm)) {
// reProcDef.setFormName(sysForm.getFormName());
// reProcDef.setFormId(sysForm.getFormId());
// }
// // 流程定义时间
// reProcDef.setDeploymentTime(deployment.getDeploymentTime());
// dataList.add(reProcDef);
// }
PageHelper.startPage(pageNum, pageSize);
final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(name);
final List<FlowProcDefDto> dataList = flowDeployMapper.selectDeployList(roleId,category,name);
// 加载挂表单
for (FlowProcDefDto procDef : dataList) {
SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
if (Objects.nonNull(sysForm)) {
procDef.setFormName(sysForm.getFormName());
procDef.setFormId(sysForm.getFormId());
}
}
//for (FlowProcDefDto procDef : dataList) {
// SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
// if (Objects.nonNull(sysForm)) {
// procDef.setFormName(sysForm.getFormName());
// procDef.setFormId(sysForm.getFormId());
// }
//}
page.setTotal(new PageInfo(dataList).getTotal());
page.setRecords(dataList);
return page;
}
/**
*
*
* @param category
* @param name
* @param pageNum
* @param pageSize
* @return
*/
@Override
public Page<FlowProcDefDto> myList(String username, String category, String name, Integer pageNum, Integer pageSize) {
Page<FlowProcDefDto> page = new Page<>();
PageHelper.startPage(pageNum, pageSize);
final List<FlowProcDefDto> dataList = flowDeployMapper.selectMyDeployList(username, category ,name);
// 加载挂表单
//for (FlowProcDefDto procDef : dataList) {
// SysForm sysForm = sysDeployFormService.selectSysDeployFormByDeployId(procDef.getDeploymentId());
// if (Objects.nonNull(sysForm)) {
// procDef.setFormName(sysForm.getFormName());
// procDef.setFormId(sysForm.getFormId());
// }
//}
page.setTotal(new PageInfo(dataList).getTotal());
page.setRecords(dataList);
return page;
}
/**
*
@ -180,6 +195,42 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
}
/**
*
* @param deployId
* @return
*/
@Override
public List<FlowElement> readNodes(String deployId) {
List<FlowElement> list = new ArrayList<>();
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
//获得图片流
DefaultProcessDiagramGenerator diagramGenerator = new DefaultProcessDiagramGenerator();
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinition.getId());
Collection<FlowElement> flowElements = bpmnModel.getProcesses().get(0).getFlowElements();
if(flowElements.size()>0){
for(FlowElement fe:flowElements){
list.add(fe);
}
}
//输出为节点描述
return list;
}
/**
*
* @param deployId
* @return
*/
@Override
public List<UserTask> findFlowNodes(String deployId){
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
//获得图片流
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinition.getId());
List<UserTask> list = bpmnModel.getProcesses().get(0).findFlowElementsOfType(UserTask.class);
return list;
}
/**
* ID
*
@ -188,30 +239,45 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
* @return
*/
@Override
public AjaxResult startProcessInstanceById(String procDefId, Map<String, Object> variables) {
@Transactional
public AjaxResult startProcessInstanceById(String procDefId, String userId, String nickName, Map<String, Object> variables) {
try {
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(procDefId)
.latestVersion().singleResult();
if (Objects.nonNull(processDefinition) && processDefinition.isSuspended()) {
return AjaxResult.error("流程已被挂起,请先激活流程");
return AjaxResult.error("流程已被挂起,请联系管理员先激活流程");
}
/*try {
//分包单位资质审批需要验证是否已经提交过相关审批
if(Objects.equals("9",processDefinition.getCategory())){
FlowTaskEntity flowTaskEntity = new FlowTaskEntity();
flowTaskEntity.setBusinessKey(Convert.toStr(variables.get("businessKey")));
flowTaskEntity.setProcDefKey(processDefinition.getKey());
flowTaskEntity.setStartDeptName(SecurityUtils.getLoginUser().getUser().getDept().getDeptName());
List<FlowTaskEntity> list = flowBusinessKeyMapper.selectAllFlowTaskByParams(flowTaskEntity);
if(StringUtils.isNotEmpty(list)){
return AjaxResult.error("当前单位已提交过分包单位资质审批,请勿重复提交");
}
}
}catch (Exception e){
e.printStackTrace();
}*/
// 设置流程发起人Id到流程中
SysUser sysUser = SecurityUtils.getLoginUser().getUser();
identityService.setAuthenticatedUserId(sysUser.getUserId().toString());
variables.put(ProcessConstants.PROCESS_INITIATOR, sysUser.getUserId());
runtimeService.startProcessInstanceById(procDefId, variables);
// 流程发起时 跳过发起人节点
// SysUser sysUser = SecurityUtils.getLoginUser().getUser();
// identityService.setAuthenticatedUserId(sysUser.getUserId().toString());
// variables.put(ProcessConstants.PROCESS_INITIATOR, "");
// ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDefId, variables);
// // 给第一步申请人节点设置任务执行人和意见
// Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).singleResult();
// if (Objects.nonNull(task)) {
// taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.NORMAL.getType(), sysUser.getNickName() + "发起流程申请");
//// taskService.setAssignee(task.getId(), sysUser.getUserId().toString());
// taskService.complete(task.getId(), variables);
// }
identityService.setAuthenticatedUserId(userId);
variables.put(ProcessConstants.PROCESS_INITIATOR, userId);
ProcessInstance processInstance;
if(variables.get("businessKey")!=null){
processInstance = runtimeService.startProcessInstanceById(procDefId, Convert.toStr(variables.get("businessKey")),variables);
}else{
processInstance = runtimeService.startProcessInstanceById(procDefId, variables);
}
// 给第一步申请人节点设置任务执行人和意见
Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).singleResult();
if (Objects.nonNull(task)) {
taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.NORMAL.getType(), nickName + "发起流程申请");
taskService.setAssignee(task.getId(), Convert.toStr(userId));
taskService.complete(task.getId(), variables);
}
return AjaxResult.success("流程启动成功");
} catch (Exception e) {
e.printStackTrace();
@ -251,5 +317,35 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
repositoryService.deleteDeployment(deployId, true);
}
/**
*
* @param roleId
* @param keys
* @return
*/
@Override
public void updateProcKeyByRoleId(String roleId,List<String> keys) {
//根据角色删除原有流程定义
flowDeployMapper.deleteDeployByRoleId(roleId);
if(keys.size()>0){
List<Map<String, Object>> list = new ArrayList<>();
for(int i=0;i<keys.size();i++){
Map<String, Object> map = new HashMap<>();
map.put("key",keys.get(i));
map.put("roleId",roleId);
list.add(map);
}
flowDeployMapper.batchDeployRoleRole(list);
}
}
/**
*
* @param procKeyRole
* @return
*/
public void updateProcKeyRoleSort(ProcKeyRole procKeyRole) {
flowDeployMapper.updateProcKeyRoleSort(procKeyRole.getRoleId(),procKeyRole.getKey(),procKeyRole.getSort());
}
}

View File

@ -9,12 +9,9 @@ import com.ruoyi.flowable.service.IFlowInstanceService;
import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.api.FlowableObjectNotFoundException;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.task.api.Task;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

View File

@ -1,12 +1,12 @@
package com.ruoyi.flowable.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.TypeReference;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.flowable.common.constant.ProcessConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysRole;
@ -24,10 +24,12 @@ import com.ruoyi.flowable.factory.FlowServiceFactory;
import com.ruoyi.flowable.flow.CustomProcessDiagramGenerator;
import com.ruoyi.flowable.flow.FindNextNodeUtil;
import com.ruoyi.flowable.flow.FlowableUtils;
import com.ruoyi.flowable.flow.ModelUtils;
import com.ruoyi.flowable.service.IFlowTaskService;
import com.ruoyi.flowable.service.ISysDeployFormService;
import com.ruoyi.flowable.service.ISysFormService;
import com.ruoyi.system.domain.SysForm;
import com.ruoyi.system.mapper.FlowBusinessKeyMapper;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
import lombok.extern.slf4j.Slf4j;
@ -44,7 +46,6 @@ import org.flowable.engine.history.HistoricActivityInstance;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.history.HistoricProcessInstanceQuery;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.runtime.ActivityInstance;
import org.flowable.engine.runtime.Execution;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.engine.task.Comment;
@ -86,6 +87,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
private ISysDeployFormService sysInstanceFormService;
@Resource
private ISysFormService sysFormService;
@Resource
private FlowBusinessKeyMapper flowBusinessKeyMapper;
/**
*
@ -103,9 +106,12 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.DELEGATE.getType(), taskVo.getComment());
taskService.resolveTask(taskVo.getTaskId(), taskVo.getVariables());
} else {
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), taskVo.getComment());
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
taskService.setAssignee(taskVo.getTaskId(), userId.toString());
if(StringUtils.isNotEmpty(taskVo.getComment())){
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), taskVo.getComment());
}else{
taskService.addComment(taskVo.getTaskId(), taskVo.getInstanceId(), FlowComment.NORMAL.getType(), taskVo.getAssignee()+"重新提交流程申请!!");
}
taskService.setAssignee(taskVo.getTaskId(), taskVo.getUserId());
taskService.complete(taskVo.getTaskId(), taskVo.getVariables());
}
return AjaxResult.success();
@ -182,7 +188,6 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
}
// 目的获取所有需要被跳转的节点 currentIds
// 取其中一个父级任务,因为后续要么存在公共网关,要么就是串行公共线路
UserTask oneUserTask = parentUserTaskList.get(0);
@ -210,8 +215,9 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
}));
// 设置驳回意见
currentTaskIds.forEach(item -> taskService.addComment(item, task.getProcessInstanceId(), FlowComment.REJECT.getType(), flowTaskVo.getComment()));
currentTaskIds.forEach(item ->
taskService.addComment(item, task.getProcessInstanceId(), FlowComment.REJECT.getType(), flowTaskVo.getComment()));
taskService.setAssignee(flowTaskVo.getTaskId(), flowTaskVo.getUserId());
try {
// 如果父级任务多于 1 个,说明当前节点不是并行节点,原因为不考虑多对多情况
if (targetIds.size() > 1) {
@ -299,6 +305,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}));
// 设置回退意见
currentTaskIds.forEach(currentTaskId -> taskService.addComment(currentTaskId, task.getProcessInstanceId(), FlowComment.REBACK.getType(), flowTaskVo.getComment()));
taskService.setAssignee(flowTaskVo.getTaskId(), flowTaskVo.getUserId());
try {
// 1 对 1 或 多 对 1 情况currentIds 当前要跳转的节点列表(1或多)targetKey 跳转到的节点(1)
@ -521,58 +528,59 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
List<HistoricProcessInstance> historicProcessInstances = historicProcessInstanceQuery.listPage(queryVo.getPageSize() * (queryVo.getPageNum() - 1), queryVo.getPageSize());
page.setTotal(historicProcessInstanceQuery.count());
List<FlowTaskDto> flowList = new ArrayList<>();
for (HistoricProcessInstance hisIns : historicProcessInstances) {
FlowTaskDto flowTask = new FlowTaskDto();
flowTask.setCreateTime(hisIns.getStartTime());
flowTask.setFinishTime(hisIns.getEndTime());
flowTask.setProcInsId(hisIns.getId());
// 计算耗时
if (Objects.nonNull(hisIns.getEndTime())) {
long time = hisIns.getEndTime().getTime() - hisIns.getStartTime().getTime();
flowTask.setDuration(getDate(time));
} else {
long time = System.currentTimeMillis() - hisIns.getStartTime().getTime();
flowTask.setDuration(getDate(time));
}
// 流程定义信息
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
.processDefinitionId(hisIns.getProcessDefinitionId())
.singleResult();
flowTask.setDeployId(pd.getDeploymentId());
flowTask.setProcDefName(pd.getName());
flowTask.setProcDefVersion(pd.getVersion());
flowTask.setCategory(pd.getCategory());
flowTask.setProcDefVersion(pd.getVersion());
// 当前所处流程
List<Task> taskList = taskService.createTaskQuery().processInstanceId(hisIns.getId()).list();
if (CollectionUtils.isNotEmpty(taskList)) {
flowTask.setTaskId(taskList.get(0).getId());
flowTask.setTaskName(taskList.get(0).getName());
if (StringUtils.isNotBlank(taskList.get(0).getAssignee())) {
// 当前任务节点办理人信息
SysUser sysUser = sysUserService.selectUserById(Long.parseLong(taskList.get(0).getAssignee()));
if (Objects.nonNull(sysUser)) {
flowTask.setAssigneeId(sysUser.getUserId());
flowTask.setAssigneeName(sysUser.getNickName());
flowTask.setAssigneeDeptName(Objects.nonNull(sysUser.getDept()) ? sysUser.getDept().getDeptName() : "");
}
}
} else {
List<HistoricTaskInstance> historicTaskInstance = historyService.createHistoricTaskInstanceQuery().processInstanceId(hisIns.getId()).orderByHistoricTaskInstanceEndTime().desc().list();
flowTask.setTaskId(historicTaskInstance.get(0).getId());
flowTask.setTaskName(historicTaskInstance.get(0).getName());
if (StringUtils.isNotBlank(historicTaskInstance.get(0).getAssignee())) {
// 当前任务节点办理人信息
SysUser sysUser = sysUserService.selectUserById(Long.parseLong(historicTaskInstance.get(0).getAssignee()));
if (Objects.nonNull(sysUser)) {
flowTask.setAssigneeId(sysUser.getUserId());
flowTask.setAssigneeName(sysUser.getNickName());
flowTask.setAssigneeDeptName(Objects.nonNull(sysUser.getDept()) ? sysUser.getDept().getDeptName() : "");
if(CollectionUtils.isNotEmpty(historicProcessInstances)){
for (HistoricProcessInstance hisIns : historicProcessInstances) {
FlowTaskDto flowTask = new FlowTaskDto();
flowTask.setCreateTime(hisIns.getStartTime());
flowTask.setFinishTime(hisIns.getEndTime());
flowTask.setProcInsId(hisIns.getId());
// 计算耗时
if (Objects.nonNull(hisIns.getEndTime())) {
long time = hisIns.getEndTime().getTime() - hisIns.getStartTime().getTime();
flowTask.setDuration(getDate(time));
} else {
long time = System.currentTimeMillis() - hisIns.getStartTime().getTime();
flowTask.setDuration(getDate(time));
}
// 流程定义信息
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
.processDefinitionId(hisIns.getProcessDefinitionId())
.singleResult();
flowTask.setDeployId(pd.getDeploymentId());
flowTask.setProcDefName(pd.getName());
flowTask.setProcDefVersion(pd.getVersion());
flowTask.setCategory(pd.getCategory());
flowTask.setProcDefVersion(pd.getVersion());
// 当前所处流程
List<Task> taskList = taskService.createTaskQuery().processInstanceId(hisIns.getId()).list();
if (CollectionUtils.isNotEmpty(taskList)) {
flowTask.setTaskId(taskList.get(0).getId());
flowTask.setTaskName(taskList.get(0).getName());
if (StringUtils.isNotBlank(taskList.get(0).getAssignee())) {
// 当前任务节点办理人信息
SysUser sysUser = sysUserService.selectUserById(Long.parseLong(taskList.get(0).getAssignee()));
if (Objects.nonNull(sysUser)) {
flowTask.setAssigneeId(sysUser.getUserId());
flowTask.setAssigneeName(sysUser.getNickName());
flowTask.setAssigneeDeptName(Objects.nonNull(sysUser.getDept()) ? sysUser.getDept().getDeptName() : "");
}
}
} else {
List<HistoricTaskInstance> historicTaskInstance = historyService.createHistoricTaskInstanceQuery().processInstanceId(hisIns.getId()).orderByHistoricTaskInstanceEndTime().desc().list();
flowTask.setTaskId(historicTaskInstance.get(0).getId());
flowTask.setTaskName(historicTaskInstance.get(0).getName());
if (StringUtils.isNotBlank(historicTaskInstance.get(0).getAssignee())) {
// 当前任务节点办理人信息
SysUser sysUser = sysUserService.selectUserById(Long.parseLong(historicTaskInstance.get(0).getAssignee()));
if (Objects.nonNull(sysUser)) {
flowTask.setAssigneeId(sysUser.getUserId());
flowTask.setAssigneeName(sysUser.getNickName());
flowTask.setAssigneeDeptName(Objects.nonNull(sysUser.getDept()) ? sysUser.getDept().getDeptName() : "");
}
}
}
flowList.add(flowTask);
}
flowList.add(flowTask);
}
page.setRecords(flowList);
return AjaxResult.success(page);
@ -601,11 +609,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
List<EndEvent> endNodes = process.findFlowElementsOfType(EndEvent.class, false);
if (CollectionUtils.isNotEmpty(endNodes)) {
// TODO 取消流程为什么要设置流程发起人?
// SysUser loginUser = SecurityUtils.getLoginUser().getUser();
// Authentication.setAuthenticatedUserId(loginUser.getUserId().toString());
// taskService.addComment(task.getId(), processInstance.getProcessInstanceId(), FlowComment.STOP.getType(),
// StringUtils.isBlank(flowTaskVo.getComment()) ? "取消申请" : flowTaskVo.getComment());
Authentication.setAuthenticatedUserId(flowTaskVo.getUserId());
taskService.addComment(task.get(0).getId(), processInstance.getProcessInstanceId(), FlowComment.STOP.getType(),
StringUtils.isBlank(flowTaskVo.getComment()) ? "取消申请" : flowTaskVo.getComment());
taskService.setAssignee(task.get(0).getId(), flowTaskVo.getUserId());
// 获取当前流程最后一个节点
String endId = endNodes.get(0).getId();
List<Execution> executions = runtimeService.createExecutionQuery()
@ -617,66 +624,75 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
.moveExecutionsToSingleActivityId(executionIds, endId).changeState();
}
}
return AjaxResult.success();
}
/**
*
*
*
* @param flowTaskVo
* @return
* @param flowTaskVo
*/
@Override
@Transactional()
public AjaxResult revokeProcess(FlowTaskVo flowTaskVo) {
Task task = taskService.createTaskQuery().processInstanceId(flowTaskVo.getInstanceId()).singleResult();
if (task == null) {
throw new CustomException("流程未启动或已执行完成,无法撤回");
String procInsId = flowTaskVo.getInstanceId();
String taskId = flowTaskVo.getTaskId();
// 校验流程是否结束
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
.processInstanceId(procInsId)
.active()
.singleResult();
if(ObjectUtil.isNull(processInstance)) {
throw new RuntimeException("流程已结束或已挂起,无法执行撤回操作");
}
// 获取待撤回任务实例
HistoricTaskInstance currTaskIns = historyService.createHistoricTaskInstanceQuery()
.taskId(taskId)
.taskAssignee(flowTaskVo.getUserId())
.singleResult();
if (ObjectUtil.isNull(currTaskIns)) {
throw new RuntimeException("当前任务无法执行撤回操作或不存在。");
}
// 获取 bpmn 模型
BpmnModel bpmnModel = repositoryService.getBpmnModel(currTaskIns.getProcessDefinitionId());
UserTask currUserTask = ModelUtils.getUserTaskByKey(bpmnModel, currTaskIns.getTaskDefinitionKey());
// 查找下一级用户任务列表
List<UserTask> nextUserTaskList = ModelUtils.findNextUserTasks(currUserTask);
List<String> nextUserTaskKeys = nextUserTaskList.stream().map(UserTask::getId).collect(Collectors.toList());
SysUser loginUser = SecurityUtils.getLoginUser().getUser();
List<HistoricTaskInstance> htiList = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(task.getProcessInstanceId())
.orderByTaskCreateTime()
.asc()
// 获取当前节点之后已完成的流程历史节点
List<HistoricTaskInstance> finishedTaskInsList = historyService.createHistoricTaskInstanceQuery()
.processInstanceId(procInsId)
.taskCreatedAfter(currTaskIns.getEndTime())
.finished()
.list();
String myTaskId = null;
HistoricTaskInstance myTask = null;
for (HistoricTaskInstance hti : htiList) {
if (loginUser.getUserId().toString().equals(hti.getAssignee())) {
myTaskId = hti.getId();
myTask = hti;
break;
for (HistoricTaskInstance finishedTaskInstance : finishedTaskInsList) {
// 检查已完成流程历史节点是否存在下一级中
if (CollUtil.contains(nextUserTaskKeys, finishedTaskInstance.getTaskDefinitionKey())) {
throw new RuntimeException("下一流程已处理,无法执行撤回操作");
}
}
if (null == myTaskId) {
throw new CustomException("该任务非当前用户提交,无法撤回");
}
String processDefinitionId = myTask.getProcessDefinitionId();
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId);
//变量
// Map<String, VariableInstance> variables = runtimeService.getVariableInstances(currentTask.getExecutionId());
String myActivityId = null;
List<HistoricActivityInstance> haiList = historyService.createHistoricActivityInstanceQuery()
.executionId(myTask.getExecutionId()).finished().list();
for (HistoricActivityInstance hai : haiList) {
if (myTaskId.equals(hai.getTaskId())) {
myActivityId = hai.getActivityId();
break;
// 获取所有激活的任务节点,找到需要撤回的任务
List<Task> activateTaskList = taskService.createTaskQuery().processInstanceId(procInsId).list();
List<String> revokeExecutionIds = new ArrayList<>();
for (Task task : activateTaskList) {
// 检查激活的任务节点是否存在下一级中,如果存在,则加入到需要撤回的节点
if (CollUtil.contains(nextUserTaskKeys, task.getTaskDefinitionKey())) {
// 添加撤回审批信息
taskService.setAssignee(task.getId(), flowTaskVo.getUserId());
taskService.addComment(task.getId(), task.getProcessInstanceId(), FlowComment.REVOKE.getType(), flowTaskVo.getAssignee() + "撤回流程审批");
revokeExecutionIds.add(task.getExecutionId());
}
}
FlowNode myFlowNode = (FlowNode) bpmnModel.getMainProcess().getFlowElement(myActivityId);
Execution execution = runtimeService.createExecutionQuery().executionId(task.getExecutionId()).singleResult();
String activityId = execution.getActivityId();
FlowNode flowNode = (FlowNode) bpmnModel.getMainProcess().getFlowElement(activityId);
//记录原活动方向
List<SequenceFlow> oriSequenceFlows = new ArrayList<>(flowNode.getOutgoingFlows());
try {
runtimeService.createChangeActivityStateBuilder()
.processInstanceId(procInsId)
.moveExecutionsToSingleActivityId(revokeExecutionIds, currTaskIns.getTaskDefinitionKey()).changeState();
} catch (FlowableObjectNotFoundException e) {
throw new RuntimeException("未找到流程实例,流程可能已发生变化");
} catch (FlowableException e) {
throw new RuntimeException("执行撤回操作失败");
}
return AjaxResult.success();
}
@ -879,13 +895,13 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
map.put("flowList", hisFlowList);
}
// 第一次申请获取初始化表单
if (StringUtils.isNotBlank(deployId)) {
SysForm sysForm = sysInstanceFormService.selectSysDeployFormByDeployId(deployId);
if (Objects.isNull(sysForm)) {
return AjaxResult.error("请先配置流程表单");
}
map.put("formData", JSONObject.parseObject(sysForm.getFormContent()));
}
// if (StringUtils.isNotBlank(deployId)) {
// SysForm sysForm = sysInstanceFormService.selectSysDeployFormByDeployId(deployId);
// if (Objects.isNull(sysForm)) {
// return AjaxResult.error("请先配置流程表单");
// }
// map.put("formData", JSONObject.parseObject(sysForm.getFormContent()));
// }
return AjaxResult.success(map);
}
@ -1119,36 +1135,39 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
public AjaxResult flowXmlAndNode(String procInsId, String deployId) {
try {
List<FlowViewerDto> flowViewerList = new ArrayList<>();
// 获取已经完成的节点
List<HistoricActivityInstance> listFinished = historyService.createHistoricActivityInstanceQuery()
.processInstanceId(procInsId)
.finished()
.list();
if(StringUtils.isNotEmpty(procInsId)){
// 获取已经完成的节点
List<HistoricActivityInstance> listFinished = historyService.createHistoricActivityInstanceQuery()
.processInstanceId(procInsId)
.finished()
.list();
// 保存已经完成的流程节点编号
listFinished.forEach(s -> {
FlowViewerDto flowViewerDto = new FlowViewerDto();
flowViewerDto.setKey(s.getActivityId());
flowViewerDto.setCompleted(true);
flowViewerList.add(flowViewerDto);
});
// 保存已经完成的流程节点编号
listFinished.forEach(s -> {
FlowViewerDto flowViewerDto = new FlowViewerDto();
flowViewerDto.setKey(s.getActivityId());
flowViewerDto.setCompleted(true);
flowViewerList.add(flowViewerDto);
});
// 获取代办节点
List<HistoricActivityInstance> listUnFinished = historyService.createHistoricActivityInstanceQuery()
.processInstanceId(procInsId)
.unfinished()
.list();
// 获取代办节点
List<HistoricActivityInstance> listUnFinished = historyService.createHistoricActivityInstanceQuery()
.processInstanceId(procInsId)
.unfinished()
.list();
// 保存需要代办的节点编号
listUnFinished.forEach(s -> {
FlowViewerDto flowViewerDto = new FlowViewerDto();
flowViewerDto.setKey(s.getActivityId());
flowViewerDto.setCompleted(false);
flowViewerList.add(flowViewerDto);
});
// 保存需要代办的节点编号
listUnFinished.forEach(s -> {
FlowViewerDto flowViewerDto = new FlowViewerDto();
flowViewerDto.setKey(s.getActivityId());
flowViewerDto.setCompleted(false);
flowViewerList.add(flowViewerDto);
});
}
Map<String, Object> result = new HashMap();
// xmlData 数据
ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployId).singleResult();
InputStream inputStream = repositoryService.getResourceAsStream(definition.getDeploymentId(), definition.getResourceName());
String xmlData = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
result.put("nodeData", flowViewerList);

View File

@ -2,6 +2,7 @@ package com.ruoyi.framework.aspectj;
import java.util.Collection;
import java.util.Map;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.ArrayUtils;
@ -84,7 +85,11 @@ public class LogAspect
try
{
// 获取当前的用户
LoginUser loginUser = SecurityUtils.getLoginUser();
LoginUser loginUser = null;
if(!SecurityUtils.getAuthentication().getPrincipal().equals("anonymousUser")) {
loginUser = SecurityUtils.getLoginUser();
}
// *========数据库日志=========*//
SysOperLog operLog = new SysOperLog();
@ -96,6 +101,9 @@ public class LogAspect
if (loginUser != null)
{
operLog.setOperName(loginUser.getUsername());
/*********************getAuthentication未获取用户信息时从RequestURI中获取操作人信息***************************/
}else if(ServletUtils.getRequest().getHeader("Username")!=null){
operLog.setOperName(ServletUtils.getRequest().getHeader("Username"));
}
if (e != null)

View File

@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage", "/weixin/**","/bgscreen/**","/publics/**").permitAll()
.antMatchers("/login","/wechat/**", "/common/**", "/register", "/captchaImage","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
// 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/img/**", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

View File

@ -1,11 +1,16 @@
package com.ruoyi.framework.web.service;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.stereotype.Component;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.constant.Constants;
@ -37,6 +42,8 @@ import com.ruoyi.system.service.ISysUserService;
@Component
public class SysLoginService
{
private static final Logger log = LoggerFactory.getLogger(SysLoginService.class);
@Autowired
private TokenService tokenService;
@ -100,6 +107,107 @@ public class SysLoginService
return tokenService.createToken(loginUser);
}
/**
*
*
* @param username
* @param password
* @param code
* @param uuid
* @return
*/
public String wxLogin(String username, String password, String code, String uuid, String openId)
{
// 验证码校验
validateCaptcha(username, code, uuid);
// 登录前置校验
loginPreCheck(username, password);
// 用户验证
Authentication authentication = null;
try
{
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
AuthenticationContextHolder.setContext(authenticationToken);
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
authentication = authenticationManager.authenticate(authenticationToken);
}
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 ServiceException(e.getMessage());
}
}
finally
{
AuthenticationContextHolder.clearContext();
}
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
recordLoginInfo(loginUser.getUserId());
// 生成token
return tokenService.createWxToken(loginUser,openId);
}
@Autowired
private SysPermissionService permissionService;
/**
*
*
* @param username
* @param openId openId
* @return
*/
public String wxLogin(String username,String openId)
{
log.info("【"+username+"】免密登录...openId==>{}",openId);
SysUser user = userService.selectUserByUserName(username);
LoginUser loginUser = new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user));
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
recordLoginInfo(loginUser.getUserId());
// 生成token
return tokenService.createWxToken(loginUser,openId);
}
/**
*
*
* @param username
* @param password
*/
public String unifiedLogin(String username, String password) {
// 用户验证
Authentication authentication = null;
try {
UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, password);
AuthenticationContextHolder.setContext(authenticationToken);
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
authentication = authenticationManager.authenticate(authenticationToken);
} 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 ServiceException(e.getMessage());
}
} finally {
AuthenticationContextHolder.clearContext();
}
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
LoginUser loginUser = (LoginUser)authentication.getPrincipal();
recordLoginInfo(loginUser.getUserId());
return tokenService.createToken(loginUser);
}
/**
*
*

View File

@ -1,6 +1,9 @@
package com.ruoyi.framework.web.service;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.core.Authentication;
@ -28,6 +31,8 @@ public class SysPasswordService
@Autowired
private RedisCache redisCache;
public static final String defaultNoSecurityPassWord = "??????????????????????";
@Value(value = "${user.password.maxRetryCount}")
private int maxRetryCount;
@ -65,7 +70,7 @@ public class SysPasswordService
throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime);
}
if (!matches(user, password))
if (!Objects.equals(password,defaultNoSecurityPassWord) && !matches(user, password))
{
retryCount = retryCount + 1;
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,

View File

@ -80,7 +80,7 @@ public class SysRegisterService
boolean regFlag = userService.registerUser(sysUser);
if (!regFlag)
{
msg = "注册失败,请联系系统理人员";
msg = "注册失败,请联系系统理人员";
}
else
{

View File

@ -100,6 +100,23 @@ public class TokenService
}
}
/**
*
*/
public String delLoginUser(HttpServletRequest request)
{
String token = this.getToken(request);
if (StringUtils.isNotEmpty(token))
{
Claims claims = parseToken(token);
String openId = (String) claims.get(Constants.LOGIN_USER_KEY);
String userKey = getTokenKey(openId);
redisCache.deleteObject(userKey);
return openId;
}
return null;
}
/**
*
*
@ -118,6 +135,23 @@ public class TokenService
return createToken(claims);
}
/**
*
*
* @param loginUser
* @return
*/
public String createWxToken(LoginUser loginUser,String openId)
{
loginUser.setToken(openId);
setUserAgent(loginUser);
refreshToken(loginUser);
Map<String, Object> claims = new HashMap<>();
claims.put(Constants.LOGIN_USER_KEY, openId);
return createToken(claims);
}
/**
* 20
*
@ -148,6 +182,25 @@ public class TokenService
redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES);
}
/**
*
*
* @param token token
*/
public void refreshMobileToken(String token)
{
Claims claims = parseToken(token);
// 解析对应的权限以及用户信息
String uuid = (String) claims.get(Constants.LOGIN_USER_KEY);
String userKey = getTokenKey(uuid);
LoginUser user = redisCache.getCacheObject(userKey);
user.setLoginTime(System.currentTimeMillis());
int mobileExpireTime = expireTime * 3650 * 60 ;
user.setExpireTime(user.getLoginTime() + mobileExpireTime * MILLIS_MINUTE);
// 根据uuid将loginUser缓存
redisCache.setCacheObject(userKey, user, mobileExpireTime, TimeUnit.HOURS);
}
/**
*
*

View File

@ -1,5 +1,6 @@
package com.ruoyi.framework.web.service;
import com.ruoyi.common.enums.PublicStateEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -9,7 +10,6 @@ import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.enums.UserStatus;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysUserService;
@ -42,12 +42,12 @@ public class UserDetailsServiceImpl implements UserDetailsService
log.info("登录用户:{} 不存在.", username);
throw new ServiceException("登录用户:" + username + " 不存在");
}
else if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
else if (PublicStateEnum.DELETED.getCode().equals(user.getDelFlag()))
{
log.info("登录用户:{} 已被删除.", username);
throw new ServiceException("对不起,您的账号:" + username + " 已被删除");
}
else if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
else if (PublicStateEnum.DISABLE.getCode().equals(user.getStatus()))
{
log.info("登录用户:{} 已被停用.", username);
throw new ServiceException("对不起,您的账号:" + username + " 已停用");

View File

@ -35,6 +35,15 @@
<artifactId>ruoyi-common</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-system</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,440 @@
package com.ruoyi.quartz.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* -- dev_pitmonit_southsmos_alarm
*
* @author ruoyi
* @date 2024-08-08
*/
public class DevPitmonitSouthsmosAlarm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 配置ID */
@Excel(name = "配置ID")
private Long cfgId;
/** 服务端ID */
@Excel(name = "服务端ID")
private Long srvId;
/** 该条报警信息的一个描述 */
@Excel(name = "该条报警信息的一个描述")
private String alarmInfo;
/** 产生报警的来源,格式:点名-监测分项名 */
@Excel(name = "产生报警的来源,格式:点名-监测分项名")
private String alarmSource;
/** 次产生报警的时间(暂时没用上) */
@Excel(name = "次产生报警的时间", readConverterExp = "次产生报警的时间(暂时没用上)")
private Date gmtAlarm;
/** 报警时间,如果数据回落至正常范围或被处理,则报警结束 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "报警时间,如果数据回落至正常范围或被处理,则报警结束", width = 30, dateFormat = "yyyy-MM-dd")
private Date gmtAlarmOver;
/** 开始后第一次产生报警的时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "开始后第一次产生报警的时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date gmtAlarmStart;
/** 数据库记录创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "数据库记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date gmtCreate;
/** 报警更新时间,该报警每产生一次都会更新该时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "报警更新时间,该报警每产生一次都会更新该时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date gmtModified;
/** 报警所处最高级别1超预警2超报警3超控制 */
@Excel(name = "报警所处最高级别1超预警2超报警3超控制")
private Long level;
/** 监测项id */
@Excel(name = "监测项id")
private Long meId;
/** 监测项名称 */
@Excel(name = "监测项名称")
private String meName;
/** 监测分项id */
@Excel(name = "监测分项id")
private Long monitorItemId;
/** 报警产生次数,如果报警来源一样,类型一样,则认为是同一条报警,多次产生也只会累加次数 */
@Excel(name = "报警产生次数,如果报警来源一样,类型一样,则认为是同一条报警,多次产生也只会累加次数")
private Long numbers;
/** 报警处理结果 */
@Excel(name = "报警处理结果")
private String result;
/** 处理图片地址 */
@Excel(name = "处理图片地址")
private String resultUrl;
/** 报警测点id */
@Excel(name = "报警测点id")
private Long spId;
/** 报警测点名 */
@Excel(name = "报警测点名")
private String spName;
/** 处理人 */
@Excel(name = "处理人")
private String staff;
/** 处理电话 */
@Excel(name = "处理电话")
private String staffPhone;
/** 报警状态:实时、历史,处理过的报警信息将变为历史,不再返回 */
@Excel(name = "报警状态:实时、历史,处理过的报警信息将变为历史,不再返回")
private String status;
/** 报警工程id */
@Excel(name = "报警工程id")
private Long structureId;
/** 报警工程名 */
@Excel(name = "报警工程名")
private String structureName;
/** 该警最高级别设置的阈值 */
@Excel(name = "该警最高级别设置的阈值")
private String threshold;
/** 类型:数据异常、设备异常,数据报警都是数据异常 */
@Excel(name = "类型:数据异常、设备异常,数据报警都是数据异常")
private String type;
/** 判断的标准:测量值、单次变化量、累计变化量、变化速率 */
@Excel(name = "判断的标准:测量值、单次变化量、累计变化量、变化速率")
private String variety;
/** 状态 */
@Excel(name = "状态")
private Long state;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long isDel;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCfgId(Long cfgId)
{
this.cfgId = cfgId;
}
public Long getCfgId()
{
return cfgId;
}
public void setSrvId(Long srvId)
{
this.srvId = srvId;
}
public Long getSrvId()
{
return srvId;
}
public void setAlarmInfo(String alarmInfo)
{
this.alarmInfo = alarmInfo;
}
public String getAlarmInfo()
{
return alarmInfo;
}
public void setAlarmSource(String alarmSource)
{
this.alarmSource = alarmSource;
}
public String getAlarmSource()
{
return alarmSource;
}
public void setGmtAlarm(Date gmtAlarm)
{
this.gmtAlarm = gmtAlarm;
}
public Date getGmtAlarm()
{
return gmtAlarm;
}
public void setGmtAlarmOver(Date gmtAlarmOver)
{
this.gmtAlarmOver = gmtAlarmOver;
}
public Date getGmtAlarmOver()
{
return gmtAlarmOver;
}
public void setGmtAlarmStart(Date gmtAlarmStart)
{
this.gmtAlarmStart = gmtAlarmStart;
}
public Date getGmtAlarmStart()
{
return gmtAlarmStart;
}
public void setGmtCreate(Date gmtCreate)
{
this.gmtCreate = gmtCreate;
}
public Date getGmtCreate()
{
return gmtCreate;
}
public void setGmtModified(Date gmtModified)
{
this.gmtModified = gmtModified;
}
public Date getGmtModified()
{
return gmtModified;
}
public void setLevel(Long level)
{
this.level = level;
}
public Long getLevel()
{
return level;
}
public void setMeId(Long meId)
{
this.meId = meId;
}
public Long getMeId()
{
return meId;
}
public void setMeName(String meName)
{
this.meName = meName;
}
public String getMeName()
{
return meName;
}
public void setMonitorItemId(Long monitorItemId)
{
this.monitorItemId = monitorItemId;
}
public Long getMonitorItemId()
{
return monitorItemId;
}
public void setNumbers(Long numbers)
{
this.numbers = numbers;
}
public Long getNumbers()
{
return numbers;
}
public void setResult(String result)
{
this.result = result;
}
public String getResult()
{
return result;
}
public void setResultUrl(String resultUrl)
{
this.resultUrl = resultUrl;
}
public String getResultUrl()
{
return resultUrl;
}
public void setSpId(Long spId)
{
this.spId = spId;
}
public Long getSpId()
{
return spId;
}
public void setSpName(String spName)
{
this.spName = spName;
}
public String getSpName()
{
return spName;
}
public void setStaff(String staff)
{
this.staff = staff;
}
public String getStaff()
{
return staff;
}
public void setStaffPhone(String staffPhone)
{
this.staffPhone = staffPhone;
}
public String getStaffPhone()
{
return staffPhone;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setStructureId(Long structureId)
{
this.structureId = structureId;
}
public Long getStructureId()
{
return structureId;
}
public void setStructureName(String structureName)
{
this.structureName = structureName;
}
public String getStructureName()
{
return structureName;
}
public void setThreshold(String threshold)
{
this.threshold = threshold;
}
public String getThreshold()
{
return threshold;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setVariety(String variety)
{
this.variety = variety;
}
public String getVariety()
{
return variety;
}
public void setState(Long state)
{
this.state = state;
}
public Long getState()
{
return state;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("cfgId", getCfgId())
.append("srvId", getSrvId())
.append("alarmInfo", getAlarmInfo())
.append("alarmSource", getAlarmSource())
.append("gmtAlarm", getGmtAlarm())
.append("gmtAlarmOver", getGmtAlarmOver())
.append("gmtAlarmStart", getGmtAlarmStart())
.append("gmtCreate", getGmtCreate())
.append("gmtModified", getGmtModified())
.append("level", getLevel())
.append("meId", getMeId())
.append("meName", getMeName())
.append("monitorItemId", getMonitorItemId())
.append("numbers", getNumbers())
.append("result", getResult())
.append("resultUrl", getResultUrl())
.append("spId", getSpId())
.append("spName", getSpName())
.append("staff", getStaff())
.append("staffPhone", getStaffPhone())
.append("status", getStatus())
.append("structureId", getStructureId())
.append("structureName", getStructureName())
.append("threshold", getThreshold())
.append("type", getType())
.append("variety", getVariety())
.append("state", getState())
.append("remark", getRemark())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,288 @@
package com.ruoyi.quartz.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* -- dev_pitmonit_southsmos_data
*
* @author ruoyi
* @date 2024-08-09
*/
public class DevPitmonitSouthsmosData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 配置ID */
@Excel(name = "配置ID")
private Long cfgId;
/** 数据类型:horizontal-水平位移(x,y),presureWallsideSoil-围护墙侧向土压力,waterLevel-地下水位 */
@Excel(name = "数据类型:horizontal-水平位移(x,y),presureWallsideSoil-围护墙侧向土压力,waterLevel-地下水位")
private String dataType;
/** 服务端dataId */
@Excel(name = "服务端dataId")
private Long dataId;
/** 测点Id */
@Excel(name = "测点Id")
private Long spId;
/** 测点名 */
@Excel(name = "测点名")
private String spName;
/** 收集时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "收集时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date collectTime;
/** 变化速率(X) */
@Excel(name = "变化速率(X)")
private BigDecimal changeRate;
/** 变化速率(Y) */
@Excel(name = "变化速率(Y)")
private BigDecimal changeRate2;
/** */
@Excel(name = "")
private BigDecimal displace;
/** */
@Excel(name = "")
private BigDecimal displace2;
/** 累计变化量单位为m(X) */
@Excel(name = "累计变化量单位为m(X)")
private BigDecimal totalize;
/** 累计变化量单位为m(Y) */
@Excel(name = "累计变化量单位为m(Y)")
private BigDecimal totalize2;
/** 单次变化量单位为m(X) */
@Excel(name = "单次变化量单位为m(X)")
private BigDecimal variation;
/** 单次变化量单位为m(Y) */
@Excel(name = "单次变化量单位为m(Y)")
private BigDecimal variation2;
/** 状态 */
@Excel(name = "状态")
private Long state;
/** */
@Excel(name = "")
private Long isDel;
public void convertToHorizontal(JSONObject o) {
changeRate=o.getBigDecimal("changeRateX");
changeRate2=o.getBigDecimal("changeRateY");
displace=o.getBigDecimal("displaceX");
displace2=o.getBigDecimal("displaceY");
totalize=o.getBigDecimal("totalizeX");
totalize2=o.getBigDecimal("totalizeY");
variation=o.getBigDecimal("variationX");
variation2=o.getBigDecimal("variationY");
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCfgId(Long cfgId)
{
this.cfgId = cfgId;
}
public Long getCfgId()
{
return cfgId;
}
public void setDataType(String dataType)
{
this.dataType = dataType;
}
public String getDataType()
{
return dataType;
}
public void setDataId(Long dataId)
{
this.dataId = dataId;
}
public Long getDataId()
{
return dataId;
}
public void setSpId(Long spId)
{
this.spId = spId;
}
public Long getSpId()
{
return spId;
}
public void setSpName(String spName)
{
this.spName = spName;
}
public String getSpName()
{
return spName;
}
public void setCollectTime(Date collectTime)
{
this.collectTime = collectTime;
}
public Date getCollectTime()
{
return collectTime;
}
public void setChangeRate(BigDecimal changeRate)
{
this.changeRate = changeRate;
}
public BigDecimal getChangeRate()
{
return changeRate;
}
public void setChangeRate2(BigDecimal changeRate2)
{
this.changeRate2 = changeRate2;
}
public BigDecimal getChangeRate2()
{
return changeRate2;
}
public void setDisplace(BigDecimal displace)
{
this.displace = displace;
}
public BigDecimal getDisplace()
{
return displace;
}
public void setDisplace2(BigDecimal displace2)
{
this.displace2 = displace2;
}
public BigDecimal getDisplace2()
{
return displace2;
}
public void setTotalize(BigDecimal totalize)
{
this.totalize = totalize;
}
public BigDecimal getTotalize()
{
return totalize;
}
public void setTotalize2(BigDecimal totalize2)
{
this.totalize2 = totalize2;
}
public BigDecimal getTotalize2()
{
return totalize2;
}
public void setVariation(BigDecimal variation)
{
this.variation = variation;
}
public BigDecimal getVariation()
{
return variation;
}
public void setVariation2(BigDecimal variation2)
{
this.variation2 = variation2;
}
public BigDecimal getVariation2()
{
return variation2;
}
public void setState(Long state)
{
this.state = state;
}
public Long getState()
{
return state;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("cfgId", getCfgId())
.append("dataType", getDataType())
.append("dataId", getDataId())
.append("spId", getSpId())
.append("spName", getSpName())
.append("collectTime", getCollectTime())
.append("changeRate", getChangeRate())
.append("changeRate2", getChangeRate2())
.append("displace", getDisplace())
.append("displace2", getDisplace2())
.append("totalize", getTotalize())
.append("totalize2", getTotalize2())
.append("variation", getVariation())
.append("variation2", getVariation2())
.append("state", getState())
.append("remark", getRemark())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
//围护墙侧向土压力
public void convertToPresureWallsideSoil(JSONObject jsonObject) {
}
//地下水位
public void convertToWaterLevel(JSONObject jsonObject) {
}
}

View File

@ -0,0 +1,112 @@
package com.ruoyi.quartz.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* --- dev_pitmonit_southsmos_dev_sp
*
* @author ruoyi
* @date 2024-08-11
*/
public class DevPitmonitSouthsmosDevSp extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 配置ID */
@Excel(name = "配置ID")
private Long cfgId;
/** 设备ID */
@Excel(name = "设备ID")
private Long devId;
/** 测点ID */
@Excel(name = "测点ID")
private Long spId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long state;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long isDel;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCfgId(Long cfgId)
{
this.cfgId = cfgId;
}
public Long getCfgId()
{
return cfgId;
}
public void setDevId(Long devId)
{
this.devId = devId;
}
public Long getDevId()
{
return devId;
}
public void setSpId(Long spId)
{
this.spId = spId;
}
public Long getSpId()
{
return spId;
}
public void setState(Long state)
{
this.state = state;
}
public Long getState()
{
return state;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("cfgId", getCfgId())
.append("devId", getDevId())
.append("spId", getSpId())
.append("state", getState())
.append("remark", getRemark())
.append("isDel", getIsDel())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

Some files were not shown because too many files have changed in this diff Show More