Compare commits

...

746 Commits

Author SHA1 Message Date
wangxy ef2a3921b0 feat:已绑定添加标识
7 months ago
wangxy bb8bdb54cc feat:已绑定添加标识
7 months ago
wangxy 8c3ccba236 feat:ueky拔出退出登录
7 months ago
wangxy e4a2441f50 feat:ueky拔出退出登录
7 months ago
wangxy 576ace34db feat:ueky拔出退出登录
7 months ago
wangxy 055bc7d942 feat:用户绑定
7 months ago
wangxy 99b1fefcd5 feat:登录ukey改造
7 months ago
wangxy 9028d9dc54 feat:人员管理修改
7 months ago
wangxy 069641def4 feat:自查自评导出
7 months ago
wangxy b4d83a922c feat:自查自评导出
7 months ago
wangxy 15a87dac28 feat:人大金仓数据库迁移
7 months ago
wangxy b76890d3af feat:自查自评导出
8 months ago
dshclm f65eba6ef3 涉密会议统计导出
1 year ago
wangxy 9714b5aafa Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 9ac71b8a8e feat:庆阳会议导出
1 year ago
dshclm 638af18da6 涉密会议统计导出
1 year ago
wangxy 64d8e25b46 feat:庆阳会议导出
1 year ago
wangxy f40ad17b72 feat:庆阳定密管理添加数据权限
1 year ago
wangxy 72de2d6e2b feat:庆阳定密管理添加数据权限
1 year ago
wangxy f270465424 feat:庆阳审计管理添加数据权限
1 year ago
wangxy ad01333ab7 feat:用户添加校验
1 year ago
wangxy cca18b50c5 feat:用户添加校验
1 year ago
wangxy 765fe6f253 feat:用户添加校验
1 year ago
dshclm 9089e411c7 修改在禁用状态下按钮显示不清晰问题
1 year ago
wangxy 5e995925d4 feat:用户审核状态检测
1 year ago
wangxy 7e56b809c9 feat:用户角色分配修改
1 year ago
dshclm 32e809101d 提交修改
1 year ago
wangxy 2b02d0750f feat:用户角色分配修改
1 year ago
wangxy 65034371b2 feat:修改菜单树
1 year ago
wangxy c740939740 feat:修改菜单树
1 year ago
wangxy 370ea0078f feat:修改
1 year ago
wangxy 6c85bcb3cc feat:修改
1 year ago
dshclm ad29ddd3e3 提交修改
1 year ago
dshclm 2320d32573 提交修改
1 year ago
dshclm a9f78f95ee 提交修改
1 year ago
dshclm 806d2c7874 修改市州
1 year ago
wangxy 6903aea622 feat:修改
1 year ago
wangxy 9345434ed9 feat:修改
1 year ago
wangxy a037a6e1a8 feat:修改
1 year ago
wangxy cac97361bc feat:修改
1 year ago
wangxy aa2b1d94bd feat:修改
1 year ago
dshclm 5595375ddc 提交修改
1 year ago
dshclm ab34941c60 提交修改
1 year ago
dshclm 82982a4f1c 提交修改
1 year ago
dshclm 5d13e64510 提交修改
1 year ago
dshclm 6901fe3084 提交修改
1 year ago
dshclm 2af62ddb98 提交修改
1 year ago
dshclm 47c7e41102 提交修改
1 year ago
wangxy 9828f46c63 feat:维修商
1 year ago
wangxy 5299b29042 feat:维修商
1 year ago
wangxy 34cdc548e5 feat:维修商
1 year ago
wangxy bc59e4f794 feat:维修商
1 year ago
20918 3f5ebb4d1f 维修商
1 year ago
wangxy 835e13d88c feat:离职
1 year ago
wangxy ca1a44f21d feat:自查自评
1 year ago
wangxy 02e40de7e1 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy a1b1aeb71c feat:自查自评
1 year ago
dshclm b6f52f1dfd 提交修改
1 year ago
20918 74df40997e 人员离职
1 year ago
20918 8ed98775f7 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 fb67c1c58e 权限
1 year ago
wangxy 33e5960620 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 23f8db7845 feat:密品权限
1 year ago
20918 95465fac0e Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 12c5cde399 权限
1 year ago
dshclm a17d5a578f 提交修改
1 year ago
wangxy de3008f934 feat:密品权限
1 year ago
wangxy 2dda0ad325 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 6d809f6a59 feat:载体部门权限
1 year ago
20918 0bf9870a44 文档
1 year ago
dshclm b0534e06ec 提交修改
1 year ago
wangxy 36a30b7b22 feat:提示修改
1 year ago
wangxy ef40c243ea feat:提示修改
1 year ago
dshclm 7236090158 彩页
1 year ago
wangxy 541cd21e1d Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy e82d86cf9c feat:文档更新
1 year ago
dshclm 8ff020f4a9 彩页
1 year ago
wangxy 99a438ae56 feat:文档更新
1 year ago
wangxy 7a3ac01f43 feat:文档更新
1 year ago
wangxy 28b6fa6c69 feat:文档更新
1 year ago
wangxy ce4c920af0 feat:文档更新
1 year ago
wangxy 618cc4e92b feat:文档更新
1 year ago
wangxy 7172fe3e19 feat:成绩最高分
1 year ago
dshclm 991bb95fec 定密事项管理
1 year ago
20918 b5eb3377ce Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 c045bcc341 定密管理
1 year ago
dshclm d1c6121905 提交修改
1 year ago
dshclm dd3c4ef377 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm d268223d6f 提交修改
1 year ago
wangxy 835eff09f8 feat:成绩最高分
1 year ago
dshclm 0eb3fd999f 提交修改
1 year ago
wangxy 687c9ab90d fix:自查、文件url
1 year ago
dshclm d0a6303571 提交修改
1 year ago
wangxy 3c5375027b fix:自查、文件url
1 year ago
wangxy 342a545932 fix:自查、文件url
1 year ago
dshclm 8e9fd70eea 材料上传
1 year ago
dshclm 7f4af28066 材料上传
1 year ago
dshclm 9fb4d78021 提交修改
1 year ago
wangxy 276a6fdd44 fix:自查、文件url
1 year ago
wangxy a78f187833 fix:统计近线上会议
1 year ago
wangxy e47df2984e fix:统计近线上会议
1 year ago
wangxy 5338a189d9 fix:统计近线上会议
1 year ago
dshclm 6b2e0972e1 提交修改
1 year ago
wangxy 210a1960a7 fix:统计近线上会议
1 year ago
wangxy 554761b5c7 fix:统计近线上会议
1 year ago
wangxy 9f2a7ccac9 fix:统计近6个月最高得分占比
1 year ago
wangxy 55dcf9509c fix:统计近6个月最高得分占比
1 year ago
wangxy 60ed625d1d fix:统计近6个月最高得分占比
1 year ago
wangxy 276d5ddc40 fix:样式修改
1 year ago
wangxy 3de8be47b0 fix:样式修改
1 year ago
dshclm f5e5a5c02e 提交修改
1 year ago
dshclm 3884f9aaf2 提交修改
1 year ago
wangxy b73a0dd561 fix:近6个月统计涉密网络统计
1 year ago
wangxy 81578304ee fix:近6个月统计涉密网络统计
1 year ago
wangxy 7948040960 fix:近6个月统计涉密网络统计
1 year ago
wangxy dc213af076 fix:近6个月统计涉密网络统计
1 year ago
wangxy ac6afc2520 fix:近6个月统计涉密网络统计
1 year ago
wangxy 03210cbac0 fix:近6个月统计涉密网络统计
1 year ago
wangxy 9e95130f43 fix:近6个月统计涉密网络统计
1 year ago
wangxy ab3e95e996 fix:近6个月统计涉密网络统计
1 year ago
dshclm e58c32ee1b 提交修改
1 year ago
dshclm 3130d26780 提交修改
1 year ago
dshclm 728a2f5b11 提交修改
1 year ago
dshclm 48ecae4d9d 提交修改
1 year ago
dshclm b11303b7b3 提交修改
1 year ago
wangxy 0949e40fe1 fix:近6个月统计涉密网络统计
1 year ago
wangxy 0fad5f8c9e Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy dd4bac3ede fix:近6个月统计涉密网络统计
1 year ago
dshclm edb143b5bd 提交修改
1 year ago
wangxy 0c12619c3d fix:近6个月统计涉密网络统计
1 year ago
dshclm b5e58808da 提交修改
1 year ago
dshclm b9a0ed5747 提交修改
1 year ago
dshclm dbc662f7c3 提交修改
1 year ago
dshclm a2d6736bd1 提交修改
1 year ago
wangxy 8c49954890 fix:6个月已登记统计
1 year ago
dshclm de8aa6d615 提交修改
1 year ago
dshclm 0fecc2f8f1 提交修改
1 year ago
wangxy c488c730e1 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 678aac05a5 fix:6个月已登记统计
1 year ago
dshclm 9ef3a6df5e 提交修改
1 year ago
20918 9e7aa8a447 会议统计
1 year ago
wangxy 4673b2f987 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 344544fb59 fix:近6个月考试未通过统计
1 year ago
dshclm 0fcc6a4a2a Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm d2872b4b72 提交修改
1 year ago
20918 dc6b92f544 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm cf80fe2eec 涉密会议统计
1 year ago
20918 7f55cb5a62 会议统计
1 year ago
dshclm 6e948b6e10 提交修改
1 year ago
20918 1fa42859fb Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 36964d1308 会议统计
1 year ago
wangxy 7b92302e61 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 7c908b27ea fix:检查近6个月统计
1 year ago
dshclm ca85f1b36d 提交修改
1 year ago
wangxy be7e112e5f fix:检查近6个月统计
1 year ago
dshclm 4706f1c438 提交修改
1 year ago
20918 08342e48fa 提交
1 year ago
dshclm 0f19a91fad 提交修改
1 year ago
wangxy 1a84339de2 fix:检查近6个月统计
1 year ago
wangxy 5cd9cd9010 fix:检查近6个月统计
1 year ago
wangxy 4bbc20243e fix:检查近6个月统计
1 year ago
dshclm 31160c4df0 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm 94fa68a2e5 提交修改
1 year ago
wangxy 9b43552904 fix:上级下发载体导出添加
1 year ago
dshclm c0699926d7 提交修改
1 year ago
dshclm 4ef4370755 提交修改
1 year ago
dshclm f240606b12 自查自评
1 year ago
wangxy 37218618f0 fix:上级下发载体导出添加
1 year ago
wangxy ee45648ae2 fix:上级下发载体导出添加
1 year ago
wangxy d1dd4c94cf fix:查询子项
1 year ago
wangxy 6a36a3e803 fix:查询子项
1 year ago
wangxy 7c09284ee1 fix:查询子项
1 year ago
wangxy 283cf3f4f5 fix:查询子项
1 year ago
wangxy e487823d6c fix:查询子项
1 year ago
wangxy 192577d01a fix:查询子项
1 year ago
wangxy 3ac20bb54b fix:载体下发销毁接口提交
1 year ago
wangxy 4737aa3b6b fix:载体下发销毁接口提交
1 year ago
wangxy 24a675f77b fix:载体下发销毁接口提交
1 year ago
wangxy 929cb84c54 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 2085f372ba fix:载体下发销毁接口提交
1 year ago
dshclm a50db5b284 提交修改
1 year ago
dshclm 0af65c5e0b 提交修改
1 year ago
dshclm 408c6db955 提交修改
1 year ago
dshclm 954aa71313 提交
1 year ago
dshclm 9e9cebf019 提交
1 year ago
wangxy 6286db120d Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 6b3ee36346 fix:载体下发销毁接口提交
1 year ago
dshclm e55a9ef800 保存
1 year ago
dshclm ad496f468f 使用
1 year ago
wangxy 39ddc98a11 fix:载体下发销毁接口提交
1 year ago
wangxy 1e494dc0cf fix:载体下发销毁接口提交
1 year ago
wangxy b7e9eb6b4f fix:载体下发销毁接口提交
1 year ago
wangxy ed8dd36f70 fix:载体下发销毁接口提交
1 year ago
dshclm e6af1f97bc 提交修改
1 year ago
wangxy 00ee8c4001 fix:载体下发销毁接口提交
1 year ago
wangxy e7b8a9d4c4 fix:载体下发销毁接口提交
1 year ago
wangxy 98f6e6652d fix:载体下发登记接口提交
1 year ago
wangxy 70d985ccca fix:载体下发登记接口提交
1 year ago
wangxy c8f7aff9ee fix:载体下发登记接口提交
1 year ago
wangxy a3b99e41f2 fix:载体下发登记接口提交
1 year ago
wangxy c8eef70fd7 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 4a160c1b67 fix:载体下发登记
1 year ago
dshclm 6bb7bef583 提交修改
1 year ago
dshclm bff99a6b82 提交修改
1 year ago
dshclm e1c10c06fd 提交修改
1 year ago
dshclm c1d6d95bbb 提交修改
1 year ago
wangxy a738d3cf8d fix:涉密场所变更
1 year ago
wangxy 4f53768e7c Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 39d4667172 fix:涉密场所变更
1 year ago
wangxy 07da6d3dfc fix:涉密场所变更
1 year ago
20918 1398bc4af7 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 bbea28540b 过程文档
1 year ago
wangxy 8848e08e14 fix:涉密场所添加字段
1 year ago
wangxy 13e8a74e0e fix:涉密场所添加字段
1 year ago
wangxy 023692a12e fix:材料上传
1 year ago
dshclm 8637018bce 提交修改
1 year ago
dshclm 3e8f70044a 密品管理:维修、销毁添加旁站人员
1 year ago
wangxy 435b5cefb0 fix:密品维护旁站人员
1 year ago
dshclm 5dff6f2764 国家秘密载体管理:维修、销毁添加旁站人员
1 year ago
dshclm 19c8933aa7 国家秘密载体管理:维修、销毁添加旁站人员
1 year ago
wangxy adfc899802 fix:维护旁站人员
1 year ago
dshclm 99be19adde 提交修改
1 year ago
wangxy 82a4f9e2f7 fix:数据备份
1 year ago
wangxy 23386b3f9b fix:数据备份
1 year ago
wangxy b5f6a8d5ba fix:数据备份
1 year ago
wangxy c81902e905 fix:数据备份
1 year ago
dshclm 0c1fff6f97 提交修改
1 year ago
wangxy 809f43576b fix:sonarLint修复
1 year ago
dshclm 8b6dc157d9 提交修改
1 year ago
wangxy 4a467a7638 fix:sonarLint修复
1 year ago
wangxy eaf1c3853e fix:导入用户密码设置
1 year ago
wangxy 1fb11c3f96 fix:载体维修修改
1 year ago
dshclm 28ce6f9588 人员培训修改提交
1 year ago
wangxy eeeebc8d62 fix:载体维修修改
1 year ago
wangxy 0ceb1571ce fix:载体维修修改
1 year ago
dshclm a7ce128620 提交修改
1 year ago
wangxy 58a5703167 fix:载体维修修改
1 year ago
wangxy e64d45013d fix:载体维修修改
1 year ago
dshclm 200bb7fe96 提交修改placeholder
1 year ago
dshclm 79fb9661d1 提交修改
1 year ago
dshclm 3bcb5936b5 国家秘密载体统计打印修改日期显示问题
1 year ago
dshclm 76eaf20f80 涉密产品统计修改
1 year ago
dshclm d5cc1c6f2c 涉密产品统计打印修改
1 year ago
dshclm 599e6e9592 涉密产品统计打印修改
1 year ago
wangxy 15803077c6 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 87f8d00de5 fix:载体维修修改
1 year ago
dshclm 82cdc29cbf 人员记录查询
1 year ago
dshclm 090e552374 人员记录查询
1 year ago
wangxy c3909964c3 fix:载体维修修改
1 year ago
dshclm d7016d863f 涉密产品统计打印修改
1 year ago
dshclm 617148f7db 国家秘密载体统计打印修改
1 year ago
wangxy e3dee997d5 fix:添加时间字段
1 year ago
wangxy 47f55b94f0 fix:添加时间字段
1 year ago
wangxy 92051fa83a fix:查询人员统计提交
1 year ago
wangxy 913abf4f84 fix:查询人员统计提交
1 year ago
20918 92a352f090 载体保存
1 year ago
20918 c0138d8162 载体保存
1 year ago
wangxy c538b2a9d0 fix:查询人员记录提交
1 year ago
wangxy 6cfefd00ef Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 60bd0daa3b fix:查询人员记录提交
1 year ago
dshclm ea002d5ab3 提交修改
1 year ago
wangxy 83a1625818 fix:查询人员记录提交
1 year ago
wangxy 7fe42aa6b7 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy d61726b2e5 fix:查询人员记录提交
1 year ago
dshclm 61ab5285f3 提交修改
1 year ago
20918 e6f8c83357 载体保存
1 year ago
dshclm 1e519104ea 国家秘密载体
1 year ago
dshclm 677a74641d 国家秘密载体使用
1 year ago
dshclm b6b97f5fc8 国家秘密载体收发
1 year ago
dshclm 8554de17a9 国家秘密载体制作
1 year ago
wangxy 4d060476ff fix:载体统计提交
1 year ago
wangxy 063bdf6973 fix:查询人员记录提交
1 year ago
wangxy 42dcdcd776 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy c7cfaf1adb fix:查询人员记录提交
1 year ago
dshclm 24341d23c4 国家秘密载体制作
1 year ago
wangxy f2da5b2fd0 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy c80c2b572a fix:查询人员记录提交
1 year ago
20918 07f52bd4f9 载体保存维修销毁
1 year ago
20918 eaf201ab95 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 e3478b1303 载体
1 year ago
wangxy 4312cd627e fix:载体实体提交
1 year ago
wangxy ba0282804d fix:载体实体提交
1 year ago
wangxy 87c55747a3 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy d533c3a92e fix:载体实体提交
1 year ago
dshclm f97dd1f7f4 提交修改
1 year ago
wangxy 7092374f2c fix:密品设备维修提交
1 year ago
wangxy f245e365bd Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 77315846fb fix:密品设备维修提交
1 year ago
dshclm c7f29a2e30 提交修改
1 year ago
dshclm 008cfbb6d6 提交修改
1 year ago
dshclm f87f993b52 提交修改
1 year ago
wangxy 7c97636a33 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 7ed58826ae fix:密品设备维修提交
1 year ago
dshclm 9097f4962f 涉密密品销毁
1 year ago
wangxy 407e6597d8 fix:密品设备维修提交
1 year ago
20918 3892cd1645 人员离职离岗
1 year ago
wangxy 8214d52d8f Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 08be98b447 fix:密品设备维修提交
1 year ago
dshclm 0a2e0eacaa 涉密密品维修、报废
1 year ago
dshclm c5cec46159 涉密设备登记
1 year ago
20918 9e528dfb08 涉密设备销毁
1 year ago
wangxy c3ab1cd781 fix:密品设备维修提交
1 year ago
20918 1f4487437f 涉密设备管理
1 year ago
wangxy e23e00d964 fix:密品设备维修提交
1 year ago
wangxy 8bbf54d40b fix:密品设备维修提交
1 year ago
wangxy 22fe44f96b fix:密品设备维修提交
1 year ago
20918 f07738b070 载体管理
1 year ago
wangxy 8ee024d8d8 fix:添加密品类型提交
1 year ago
wangxy 24724875d0 fix:多余代码提交
1 year ago
wangxy cf9ed148e4 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 665257494c fix:多余代码提交
1 year ago
20918 81accefa4f 载体管理
1 year ago
wangxy 5e6906e313 fix:维修提交
1 year ago
wangxy ad9443c7e1 fix:检查结果接口提交
1 year ago
wangxy 7107927f99 fix:检查结果接口提交
1 year ago
wangxy 2c70ccab9f fix:检查结果接口提交
1 year ago
dshclm db5d94bf55 检查结果管理打印
1 year ago
dshclm cba8c23bc2 检查结果管理打印
1 year ago
wangxy 237caea3fb fix:检查结果接口提交
1 year ago
wangxy 3d019781e2 fix:检查结果接口提交
1 year ago
dshclm 64dee56212 检查结果管理
1 year ago
dshclm 573e359e1d Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm 9beac3699b 检查报告管理自查
1 year ago
wangxy f3616858ce fix:检查结果接口提交
1 year ago
dshclm f4579ac6ee 检查报告管理自查
1 year ago
dshclm 579fb9bb70 检查报告管理详情
1 year ago
dshclm 1beefbdede 检查报告管理添加、修改
1 year ago
wangxy 8e547690bb fix:检查详情接口提交
1 year ago
wangxy eb4763f3f2 fix:检查详情接口提交
1 year ago
wangxy 530cde393f fix:检查统计接口修改提交
1 year ago
wangxy 1a6efcb1ce fix:检查统计接口修改提交
1 year ago
wangxy be5f47e305 fix:检查报告导出接口提交
1 year ago
wangxy 7f7c9e3315 fix:检查报告导出接口提交
1 year ago
wangxy 4a9d0397c6 fix:检查报告导出接口提交
1 year ago
wangxy dc1edae898 fix:检查报告导出接口提交
1 year ago
wangxy 8445b512c0 fix:检查报告导出接口提交
1 year ago
wangxy 7efcdd20a8 fix:检查报告导出接口提交
1 year ago
wangxy a40b009eda fix:检查报告导出接口提交
1 year ago
wangxy 4f98d90312 fix:检查报告导出接口提交
1 year ago
wangxy aa51d18d92 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 03eea11b46 fix:检查报告接口提交
1 year ago
20918 751baf45c2 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 6209b29141 资产--密品
1 year ago
dshclm ed2654c934 文本框添加长度校验
1 year ago
dshclm edc8bbafff 提交修改
1 year ago
wangxy ad601b1d3b fix:场所出入登记接口提交
1 year ago
wangxy 0e73d4f524 fix:场所出入登记接口提交
1 year ago
wangxy d1fec54d3e fix:场所出入登记接口提交
1 year ago
dshclm 739269d4d2 失泄密案件登记
1 year ago
dshclm 8fd0e04e62 失泄密案件登记
1 year ago
dshclm 071f93da4d 失泄密案件登记
1 year ago
wangxy d03f99bdcc fix:场所出入登记接口提交
1 year ago
wangxy 16d8658544 fix:场所出入登记接口提交
1 year ago
wangxy 7f4cd784a0 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy a699c18036 fix:场所出入登记接口提交
1 year ago
dshclm 81bf215217 场所出入登记修改
1 year ago
dshclm 7711bbce58 场所出入登记修改
1 year ago
dshclm b07e86ddb4 场所出入登记
1 year ago
dshclm f466bb840d 场所出入登记
1 year ago
dshclm b9df9c72e1 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm d8b26e61cf 场所出入登记
1 year ago
wangxy 91287873c0 fix:场所出入登记接口提交
1 year ago
wangxy c0fc0690be fix:场所出入登记接口提交
1 year ago
wangxy 625fcb48cc fix:场所出入登记接口提交
1 year ago
wangxy cd9ae65803 fix:场所出入登记接口提交
1 year ago
20918 bebfc1da70 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 83307d0b32 案件登记
1 year ago
dshclm 7e7629f16f Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm 3803921722 涉密场所登记
1 year ago
wangxy 79b9770096 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 9db4fc8ab0 fix:场所出入登记接口提交
1 year ago
dshclm 61ed3ae428 涉密场所登记
1 year ago
wangxy 6b0c197638 fix:场所接口提交
1 year ago
wangxy 92781f6c05 fix:场所接口提交
1 year ago
wangxy daa19e41bc fix:场所、案件实体、controller提交
1 year ago
wangxy ae65ff8e0d fix:载体统计
1 year ago
wangxy 5d83cc3b37 fix:载体统计
1 year ago
dshclm f862b287a9 提交修改
1 year ago
dshclm 7dd5285ea9 删除考试明细确定按钮
1 year ago
wangxy 27c559794f fix:载体统计
1 year ago
dshclm f5bb50b39c 涉密载体统计
1 year ago
dshclm 3478bd8c91 涉密载体统计
1 year ago
wangxy ffbb1112d0 fix:载体统计
1 year ago
wangxy 7292e66cd1 fix:载体统计
1 year ago
20918 1467ecd3bd 载体字段名称修改
1 year ago
wangxy c6792a34d1 fix:检查通知统计
1 year ago
wangxy 54b0d062de Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 13462b32fc fix:检查通知统计
1 year ago
20918 af996c8462 涉密载体
1 year ago
20918 8b010b756d Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 a6235985d0 涉密载体
1 year ago
dshclm aa84c31ae4 涉密网络统计
1 year ago
dshclm 756c1b0590 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm a019487ff1 涉密网络统计
1 year ago
20918 6f523956a3 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 dabd6eda64 检查结果类型统计
1 year ago
dshclm 41bbfe3ccc 涉密网络统计
1 year ago
wangxy 4b6435cc31 fix:检查通知统计
1 year ago
20918 37340e9cb3 涉密检查
1 year ago
20918 6a9a7fe8ba 涉密检查
1 year ago
wangxy 1dddcf6290 fix:涉密资产统计
1 year ago
wangxy 539d225f45 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 4b8a75694d fix:涉密资产统计
1 year ago
dshclm e82050343d 涉密资产统计、提交修改
1 year ago
wangxy f2aba24437 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 72dc1197eb fix:涉密资产统计
1 year ago
20918 d2ab48e75c 涉密网络删除bug
1 year ago
20918 bc25237365 资产状态数据
1 year ago
wangxy dddb503889 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 97a3789ae5 fix:涉密资产统计
1 year ago
dshclm b3423c6796 涉密培训统计
1 year ago
dshclm 96e146befe 涉密人员统计
1 year ago
dshclm 7e46b8113d 涉密人员统计
1 year ago
dshclm 05e7e59076 涉密人员统计
1 year ago
20918 f91bb1ca5b Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 7d323d2fc8 培训统计数据
1 year ago
wangxy 1c3d76917d fix:涉密程度统计
1 year ago
wangxy 8fea070430 fix:人员统计
1 year ago
wangxy e48da47064 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 5e4fa7de3d fix:人员统计
1 year ago
dshclm b67555a322 考试统计
1 year ago
dshclm 4c3093aa92 考试统计
1 year ago
wangxy 87b98e8959 fix:考试总数
1 year ago
wangxy 001e240b3b fix:考试总数
1 year ago
wangxy 8db276a4aa fix:考试总数
1 year ago
wangxy 9090ec8dc4 fix:考试添加导出
1 year ago
wangxy 1e1f39a899 fix:会议详情文件下载
1 year ago
wangxy 10b50bf45c fix:会议详情文件下载
1 year ago
wangxy 074e1865f0 fix:会议详情文件下载
1 year ago
wangxy b9a6103109 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy ad3ebf8f0c fix:会议详情
1 year ago
dshclm d8d6e57add 涉密会议登记
1 year ago
wangxy 8fac5179cd fix:会议后台接口提交
1 year ago
wangxy 2a2ef88116 fix:会议后台接口提交
1 year ago
wangxy 5ab3256d7a Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy f517006d07 fix:会议后台接口提交
1 year ago
20918 c6f6387fba 资产报废
1 year ago
wangxy 74197a779d fix:会议后台接口提交
1 year ago
wangxy 7cb2ce4044 fix:会议后台接口提交
1 year ago
dshclm cc9a4f7e1c Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm a4a654d4c9 提交修改
1 year ago
wangxy 277dd0efbb fix:会议后台接口提交
1 year ago
wangxy 4419de2aff Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy d5859bbe96 fix:会议后台接口提交
1 year ago
20918 07cae683ee 资产报废
1 year ago
wangxy d28b2cbbdd Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy d1cd49e702 fix:会议实体提交
1 year ago
dshclm 2e73628273 提交修改
1 year ago
dshclm 62fdb9599f 集成echarts图表
1 year ago
20918 d90f59e88a 人员申报
1 year ago
20918 e6392dc1e7 人员申报
1 year ago
dshclm 335b25b8cf 提交修改
1 year ago
dshclm aed15582dc 提交修改
1 year ago
wangxy fb7f9646c0 feat:问题修改
1 year ago
wangxy a0fb5f0de2 feat:问题修改
1 year ago
wangxy 42941277f8 feat:问题修改
1 year ago
wangxy d357c36fa3 feat:问题修改
1 year ago
wangxy 4d52a7a07e feat:问题修改
1 year ago
wangxy 4b85a64a22 feat:问题修改
1 year ago
wangxy 9e7eea461c feat:问题修改
1 year ago
wangxy 53c730bb16 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 64f5c6c27a feat:问题修改
1 year ago
dshclm 1b5d51fe3d 提交修改
1 year ago
20918 f762c87c25 检查--自查
1 year ago
wangxy 2e7238bb85 feat:生成账号
1 year ago
wangxy dac586df8a feat:生成账号
1 year ago
dshclm 8455fc91c8 提交修改
1 year ago
dshclm 4402880ed9 提交修改
1 year ago
wangxy 601c2b5bad feat:生成账号
1 year ago
wangxy b6409a775e feat:用户列表修改
1 year ago
wangxy a3d87335b9 feat:用户列表修改
1 year ago
wangxy 5db5edd590 feat:身份账号
1 year ago
dshclm 34eabf6c70 提交修改
1 year ago
dshclm 874cd8271c 提交修改
1 year ago
wangxy d6c3f0d0c7 feat:身份账号
1 year ago
wangxy 57820549a9 feat:修改样式
1 year ago
wangxy 04cd53c66c feat:修改样式
1 year ago
wangxy 1d62531370 feat:修改样式
1 year ago
wangxy 6c7a79efb9 feat:修改样式
1 year ago
wangxy de4a249f57 feat:修改样式
1 year ago
wangxy d970f6bf9c feat:修改样式
1 year ago
wangxy e760bf914f feat:修改样式
1 year ago
dshclm 24b4c262fe Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm 122d456226 首页修改
1 year ago
wangxy bc7f3dbefd feat:查询保密法
1 year ago
wangxy 5d00634717 feat:查询保密法
1 year ago
wangxy 54e1698286 feat:导入区划转中文
1 year ago
wangxy eec62a3ac7 feat:导入区划转中文
1 year ago
wangxy 03e0e83733 feat:导入区划转中文
1 year ago
wangxy 19fd01fbbd feat:导入区划转中文
1 year ago
wangxy 092da780ed feat:导入区划转中文
1 year ago
wangxy 3d9c0817e5 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 117e464cff feat:导入区划转中文
1 year ago
20918 f43eea565d Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 e097d46a8f 人员统计导出去除
1 year ago
wangxy 8d5930d64f Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 1932d5b242 feat:导入区划转中文
1 year ago
dshclm 8e37154043 试题导入样式修改
1 year ago
wangxy 830cce03a7 feat:导入区划转中文
1 year ago
wangxy 9a41767818 feat:导入区划转中文
1 year ago
wangxy 21f11260f2 feat:导入区划转中文
1 year ago
wangxy cb5c22b79f feat:导入区划转中文
1 year ago
wangxy 487841a862 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy d0ad3d6b86 feat:导入区划转中文
1 year ago
dshclm 6d581fd090 修改成绩详情
1 year ago
wangxy f0dd18b904 feat:导入流释放
1 year ago
wangxy b877447925 feat:导入流释放
1 year ago
20918 048646f936 首页内容变更
1 year ago
dshclm 6c7fa0719d 首页
1 year ago
wangxy e5d81c0c8d feat:导入流释放
1 year ago
20918 4a68b74362 首页内容变更
1 year ago
20918 89c527c529 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
20918 6f53f50fcf 首页内容变更
1 year ago
dshclm 05f73e6a36 首页
1 year ago
20918 5415b4ec1c 首页内容变更
1 year ago
dshclm 5edc348bbb 试题导入非空判断
1 year ago
dshclm f424b2ff00 首页
1 year ago
dshclm 50c81a2b6f 试题管理导入
1 year ago
wangxy 24ec8b6b56 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 5d2a33f696 feat:导入流释放
1 year ago
20918 12a72c0b1b 首页内容变更
1 year ago
dshclm 41a8fb12b0 考试错题详情,判断和多选没有正确显示问题
1 year ago
wangxy dea8c91986 feat:页面错位
1 year ago
dshclm 5863205a33 试题导入、模板下载
1 year ago
wangxy 02a05d3a41 feat:页面错位
1 year ago
wangxy b4a879552a feat:页面错位
1 year ago
wangxy b43b2b7ab9 feat:编码规范性修改
1 year ago
wangxy c7fe77d22b feat:编码规范性修改
1 year ago
wangxy 7ba573bbe4 feat:编码规范性修改
1 year ago
wangxy 92e2fc8efd feat:编码规范性修改
1 year ago
wangxy 413f297b96 feat:编码规范性修改
1 year ago
wangxy 0b7f812ae0 feat:首页系统名称修改
1 year ago
wangxy 19cd7a4de7 feat:分页问题修改
1 year ago
wangxy 8954df8583 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 48a06c07e6 feat:分页问题修改
1 year ago
dshclm c8f165dd7d 试题导入、模板下载
1 year ago
wangxy d7fe67930d feat:分页问题修改
1 year ago
dshclm 9cc35b4945 试题导入、模板下载
1 year ago
wangxy 164a8f6cc3 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 07d8440a1e feat:分页问题修改
1 year ago
20918 eae820b616 变更
1 year ago
wangxy d5e0e97838 feat:分页问题修改
1 year ago
wangxy d89d49d4e4 feat:分页问题修改
1 year ago
wangxy d22fc6270c Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 0287f73a12 feat:分页问题修改
1 year ago
dshclm d3f5fb9551 样式修改
1 year ago
wangxy 9a549f4fc8 feat:分页问题修改
1 year ago
wangxy 5ecc0db092 feat:分页问题修改
1 year ago
20918 0a2c5b49a6 人员添加字符
1 year ago
wangxy 833ae3ac7e Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 7bdd2687a0 feat:分页问题修改
1 year ago
dshclm 1311d36649 修改
1 year ago
wangxy ee73a6a096 feat:错题删除
1 year ago
wangxy cd6421233a feat:错题删除
1 year ago
dshclm a7af1c8d5a 我的成绩、错题训练、题目详情
1 year ago
wangxy 2311b9a6f6 feat:错题删除
1 year ago
wangxy 6ecf14c818 feat:错题删除
1 year ago
wangxy 4b6f7e38ad feat:错题删除
1 year ago
wangxy ce51c6195f feat:错题列表
1 year ago
wangxy 105a3fea80 feat:错题列表
1 year ago
wangxy 5892979b10 feat:错题列表
1 year ago
wangxy 8744687b1d feat:错题列表
1 year ago
wangxy c24feeb695 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
wangxy 5295a5ac81 feat:错题列表
1 year ago
dshclm 5170935566 考试管理添加,新增部门树选择
1 year ago
wangxy 325dbefbcb feat:错题列表
1 year ago
wangxy 0984ff24f3 feat:我的成绩
1 year ago
wangxy 563d0b2720 feat:添加判断
1 year ago
wangxy 992ce097ff feat:添加判断
1 year ago
dshclm 344980827a Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm 1552e20259 在线考试和考试结果
1 year ago
wangxy 5541e4336d feat:添加判断
1 year ago
wangxy 06d162d5a4 feat:添加判断
1 year ago
wangxy 2a045a24a9 feat:添加判断
1 year ago
wangxy a7551a80dc feat:添加判断
1 year ago
wangxy ee4181f1eb feat:添加判断
1 year ago
wangxy 4afe249ce4 feat:添加判断
1 year ago
wangxy 9be922fe16 feat:修改查询随机题库sql
1 year ago
dshclm 576c35be9d 去考试
1 year ago
wangxy 3574f207e1 feat:修改查询随机题库sql
1 year ago
wangxy 6348642a70 feat:修改查询随机题库sql
1 year ago
wangxy e093d88d36 feat:考试详情
1 year ago
wangxy e59a9a66f0 feat:考试详情
1 year ago
wangxy 3adf3b4727 feat:考试详情
1 year ago
wangxy 4d0a96e740 feat:考试详情
1 year ago
wangxy 41b21c0f8d feat:考试详情
1 year ago
wangxy 9e92e4c733 feat:考试详情
1 year ago
wangxy 451f6dc581 feat:考试详情
1 year ago
wangxy 5ee67b9bca feat:考试详情
1 year ago
wangxy 672eb4b7bc feat:考试详情
1 year ago
wangxy d797a3b19b feat:考试详情
1 year ago
dshclm 70236a8c4b Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm b8062046d1 考试管理-编辑、添加id重复问题
1 year ago
wangxy d49db93602 feat:考试详情
1 year ago
dshclm 2a0c19eb9a Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm 748c833971 考试管理-编辑、添加
1 year ago
wangxy ba5745bcd3 feat:考试详情
1 year ago
wangxy eee6e39bab feat:考试详情
1 year ago
wangxy 305fc3c8f4 feat:考试详情
1 year ago
wangxy e9cc876e68 feat:考试详情
1 year ago
wangxy 5c4da3771e feat:考试详情
1 year ago
wangxy 8a28a5893d feat:考试详情
1 year ago
wangxy 1a26433c5f feat:部门
1 year ago
wangxy 9f97dd981d feat:部门
1 year ago
wangxy f8d0cc5374 feat:部门
1 year ago
wangxy 3d8031a20c feat:考试详情
1 year ago
wangxy 7a15fd22ad feat:去考试
1 year ago
wangxy 402e0092a1 feat:去考试
1 year ago
wangxy 7c65d1c4d5 feat:去考试
1 year ago
wangxy afb66453a1 feat:去考试
1 year ago
wangxy dc3c8fa7e6 feat:启用
1 year ago
dshclm f5cedc3967 Merge remote-tracking branch 'origin/new-exam' into new-exam
1 year ago
dshclm 30a36615ae 试题管理-编辑、添加
1 year ago
wangxy af41f1f0b1 feat:mapper修改
1 year ago
wangxy a9abf06f9e feat:在线考试接口
1 year ago
dshclm 648c6a8510 试题管理-编辑
1 year ago
wangxy c953778be0 feat:在线考试接口
1 year ago
wangxy 4cdb6bdb33 feat:在线考试接口
1 year ago
dshclm e2b77eb8d4 试题管理-添加
1 year ago
wangxy 191bcb228e feat:在线考试接口
1 year ago
wangxy 571dcb9903 feat:在线考试接口
1 year ago
wangxy d5c1594f11 feat:在线考试接口
1 year ago
wangxy f930e5b3de feat:考试管理
1 year ago
wangxy a1402ee403 feat:考试管理
1 year ago
wangxy 075c66e24f feat:考试管理
1 year ago
wangxy 2a17e23ae4 feat:考试管理
1 year ago
wangxy d646686a17 feat:考试管理
1 year ago
wangxy 9793b0d792 feat:考试管理
1 year ago
wangxy b722c63d85 feat:考试管理
1 year ago
wangxy 534adbc85c feat:试题管理列表
1 year ago
wangxy 7914c2950e feat:试题管理列表
1 year ago
wangxy 27f1ee8047 feat:试题管理列表
1 year ago
wangxy 60190571a7 feat:新题库管理
1 year ago
wangxy b2546c0234 feat:新题库管理
1 year ago
wangxy 6ab3257f09 feat:新题库管理
1 year ago
dshclm f1c92fed2c 修改使用单位填写方式为选择框
1 year ago
wangxy 67900670d9 Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
wangxy b04c5d3c5a feat:日志提示修改
1 year ago
dshclm 1815c24122 集成vue+elementui
1 year ago
wangxy 1016ac379b feat:日志提示修改
1 year ago
wangxy 96e1ec7a21 feat:题库导出问题bug修改
1 year ago
wangxy edf5cb0ad0 feat:题库导出问题bug修改
1 year ago
wangxy e251e40415 feat:题库导出问题bug修改
1 year ago
wangxy 677dc1dccb feat:题库导出问题bug修改
1 year ago
wangxy cf3a842b69 feat:题库导出问题bug修改
1 year ago
wangxy c1c875873d feat:资产导出问题bug修改
1 year ago
wangxy a363bf09fc feat:资产导出问题bug修改
1 year ago
wangxy 2156881388 feat:资产导出问题bug修改
1 year ago
wangxy 962ab8194a feat:资产导出问题bug修改
1 year ago
wangxy e7e275486f feat:导出问题bug修改
1 year ago
wangxy dc6ef723af feat:导出问题bug修改
1 year ago
wangxy f0faad3fd5 feat:导出问题bug修改
1 year ago
wangxy ce4d70e260 feat:导出问题bug修改
1 year ago
wangxy d8f1f1b49c feat:导出问题bug修改
1 year ago
wangxy 56efe97dfc feat:导出问题bug修改
1 year ago
wangxy c988b20f4b feat:导出问题bug修改
1 year ago
wangxy e3d6ee3672 feat:导出问题bug修改
1 year ago
wangxy 57bc7cec14 feat:导出问题bug修改
1 year ago
wangxy 015f521af7 feat:涉密问题bug修改
1 year ago
wangxy 548bb40cfb feat:涉密问题bug修改
1 year ago
wangxy 067dd41f3c feat:检查通知bug修改
1 year ago
wangxy 39a2942828 feat:检查通知bug修改
1 year ago
wangxy 02b5ef906b feat:资产变更bug修改
1 year ago
wangxy a2ad24e3c3 feat:资产登记bug修改
1 year ago
wangxy 0a2219475d feat:资产登记bug修改
1 year ago
wangxy 630dc1cb24 feat:资产登记bug修改
1 year ago
dshclm 91d5b7be13 Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
dshclm fbb1189509 文件下发添加:收文单位未选择时显示的文本
1 year ago
wangxy 7d8ac427de Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
wangxy fe93f7d555 feat:资产登记bug修改
1 year ago
dshclm 8153abe6b9 保密考试系统样式修改
1 year ago
wangxy 1108ba1606 feat:资产登记bug修改
1 year ago
wangxy f442f28a6c feat:资产登记bug修改
1 year ago
wangxy fc78243ddb feat:资产变更
1 year ago
wangxy 6a2de62d27 feat:人员离职
1 year ago
wangxy 28b111d2f5 feat:人员离职
1 year ago
wangxy 0fa0417598 feat:通知
1 year ago
wangxy 05faa5c20e feat:通知
1 year ago
wangxy 933d12e69f feat:通知
1 year ago
wangxy bb046e4c9e feat:维修商页面调整
1 year ago
wangxy f7b2720f41 feat:维修商页面调整
1 year ago
wangxy ebb6798512 feat:维修商页面调整
1 year ago
wangxy 9765071f9a feat:维修商页面调整
1 year ago
wangxy 6d88d5f2e2 feat:维修商页面调整
1 year ago
wangxy 951cce818e feat:维修商页面调整
1 year ago
wangxy 2099077837 feat:维修商页面调整
1 year ago
wangxy 6d97965476 feat:维修商页面调整
1 year ago
dshclm 28383bd6ae Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
dshclm 1bc7697ea9 涉密人员审核列表查询
1 year ago
wangxy 280f3d6c5f Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
wangxy ecdf97582b feat:维修商页面调整
1 year ago
dshclm 1c3af23c92 Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
dshclm 45c2108c16 保密考试系统,检测页面切换,强制提交
1 year ago
wangxy 5e7e29bfd2 Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
wangxy 15a0eea5a4 feat:培训审核页面调整
1 year ago
dshclm 9118852662 保密考试系统,检测页面切换,强制提交
1 year ago
wangxy cfa02431d9 feat:编码规范性修改
1 year ago
wangxy 0db2d9f706 feat:编码规范性修改
1 year ago
dshclm dddd99d102 提交修改
1 year ago
dshclm c12da9555b 提交修改
1 year ago
dshclm 474147ce22 Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
dshclm 7e70e8aaa7 提交修改
1 year ago
wangxy 2aa8b93934 feat:编码规范性修改
1 year ago
dshclm b82de922f1 提交修改
1 year ago
dshclm 415b66370a 人员离职字段名称修改
1 year ago
dshclm 5bb2dfa53c 字段名称修改
1 year ago
dshclm 0c36b00798 修改涉密人员培训--涉密人名称选择方式
1 year ago
wangxy dad5200005 feat:编码规范性修改
1 year ago
wangxy c27e23f427 feat:编码规范性修改
1 year ago
wangxy ae38bb0bb8 feat:编码规范性修改
1 year ago
wangxy 1295e88b5c feat:编码规范性修改
1 year ago
wangxy 2ca945c225 feat:编码规范性修改
1 year ago
wangxy 68af66d502 feat:多余字段去除
1 year ago
wangxy ea1fc2631f feat:多余字段去除
1 year ago
wangxy 6188428c35 feat:选择框修改
1 year ago
wangxy 1a3f442526 fix:选择框修改
1 year ago
wangxy c5b68eac57 fix:license认证添加
1 year ago
wangxy 9ba58f39c9 fix:license认证添加
1 year ago
dshclm 8ce78efe98 修改表单下拉框的默认选择
1 year ago
dshclm 9d46cd052b 提交修改
1 year ago
wangxy 08b25ec765 fix:license认证添加
1 year ago
wangxy 5cc10fb32f fix:license认证添加
1 year ago
dshclm 13bd3968f3 修改表单布局,
1 year ago
dshclm be44fb9c1b Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
dshclm 6bd3774e41 维修商管理添加、编辑页面表单布局修改
1 year ago
dshclm 2a2ab5e3fb 检查报告管理添加、编辑、详情、检查页面表单布局修改
1 year ago
dshclm 20b2f0847b 涉密网络登记【网络设备列表】添加、编辑页面表单布局修改
1 year ago
dshclm db6866aca5 删除注释代码
1 year ago
dshclm 56618f73cc 涉密文件下发添加、详情页面表单布局修改
1 year ago
dshclm 92df044d0b 人员登记,添加表单岗位必填校验修改
1 year ago
dshclm 12e4cb0f43 Merge remote-tracking branch 'origin/kingbase' into kingbase
1 year ago
dshclm 403ce51f7e 涉密人员培训添加、编辑、详情、审核页面表单布局修改
1 year ago
wangxy 977cb8bb83 fix:自定义sql中表名带前缀
1 year ago
20918 36f77ee0e6 权限问题
2 years ago
wangxy d17cad9ab2 Merge remote-tracking branch 'origin/kingbase' into kingbase
2 years ago
wangxy e67d2fab39 fix:自定义sql中表名带前缀
2 years ago
dshclm 6f18aaf5fa Merge remote-tracking branch 'origin/kingbase' into kingbase
2 years ago
dshclm 615c2ed431 文件销毁
2 years ago
wangxy b3e9cb6208 fix:自定义sql中表名带前缀
2 years ago
wangxy cc6d964722 Merge remote-tracking branch 'origin/kingbase' into kingbase
2 years ago
wangxy a9dcb6cf7c fix:会话信息
2 years ago
dshclm 7be4a0ec3d 文件下发详情单位回显问题
2 years ago
dshclm 1720b3914f 审核、接收等按钮进行修改
2 years ago
20918 bcd9280ee6 适配kingbase
2 years ago
wangxy a03e1884a8 Merge branch 'master' into kingbase
2 years ago
20918 e354204250 适配kingbase
2 years ago

@ -0,0 +1,3 @@
1.系统工具——————代码生成
2.涉密人员统计——————打印
4.文件管理若干问题

@ -6,11 +6,6 @@
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId> <artifactId>ruoyi</artifactId>
<version>4.7.7</version> <version>4.7.7</version>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<properties> <properties>
<ruoyi.version>4.7.7</ruoyi.version> <ruoyi.version>4.7.7</ruoyi.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -0,0 +1,149 @@
package com.ruoyi.web.controller.carrier;
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.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.web.controller.manager.CarrierManager;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.carrier
*
* @author wangxy
* @version JDK 8
* @className CarrierController
* @date 2024/8/21
* @description
*/
@Controller
@RequestMapping("/system/carrier")
public class CarrierController extends BaseController {
private String prefix = "system/carrier";
@Resource
private CarrierManager carrierManager;
@RequiresPermissions("system:carrier:view")
@GetMapping()
public String carrier() {
return prefix + "/carrier";
}
/**
*
*/
@RequiresPermissions("system:carrier:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrier tdCarrier) {
startPage();
List<TdCarrier> carriers = carrierManager.selectTdCarrierList(tdCarrier);
return getDataTable(carriers);
}
@Resource
private SysAreaManager sysAreaManager;
/**
*
*/
@RequiresPermissions("system:carrier:export")
@Log(title = "国家秘密载体", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdCarrier tdCarrier) {
List<TdCarrier> carriers = carrierManager.selectTdCarrierList(tdCarrier);
carriers.forEach(tdCarrier1 -> {
tdCarrier1.setAreaCity(sysAreaManager.getAreaName(tdCarrier1.getAreaCity()));
tdCarrier1.setAreaDistrict(sysAreaManager.getAreaName(tdCarrier1.getAreaDistrict()));
});
ExcelUtil<TdCarrier> util = new ExcelUtil<>(TdCarrier.class);
return util.exportExcel(carriers, "国家秘密载体数据");
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:carrier:add")
@Log(title = "国家秘密载体", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdCarrier tdCarrier) {
return toAjax(carrierManager.saveOrUpdate(tdCarrier));
}
/**
*
*/
@RequiresPermissions("system:carrier:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
mmap.put("tdCarrier", tdCarrier);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:carrier:edit")
@Log(title = "国家秘密载体", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrier tdCarrier) {
return toAjax(carrierManager.saveOrUpdate(tdCarrier));
}
/**
*
*/
@RequiresPermissions("system:carrier:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
mmap.put("tdCarrier", tdCarrier);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:carrier:remove")
@Log(title = "国家秘密载体", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(carrierManager.deletedTdCarrierByids(ids));
}
/**
*
*/
@GetMapping("/updateStatus/{id}/{status}")
@ResponseBody
public AjaxResult updateStatus(@PathVariable("id") String id, @PathVariable("status") String status) {
return toAjax(carrierManager.updateStatus(id, status));
}
}

@ -0,0 +1,68 @@
package com.ruoyi.web.controller.carrier;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.web.controller.manager.CarrierManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("/system/destoryCarrier")
public class DestoryCarrierController extends BaseController {
private String prefix = "system/destoryCarrier";
@Resource
private CarrierManager carrierManager;
@RequiresPermissions("system:destoryCarrier:view")
@GetMapping()
public String carrier() {
return prefix + "/destoryCarrier";
}
/**
*
*/
@RequiresPermissions("system:destoryCarrier:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrier tdCarrier) {
startPage();
List<TdCarrier> carriers = carrierManager.selectTdCarrierUpdateList(tdCarrier);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:destoryCarrier:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
mmap.put("tdCarrier", tdCarrier);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:destoryCarrier:edit")
@Log(title = "国家秘密载体销毁", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrier tdCarrier) {
return toAjax(carrierManager.saveOrUpdate(tdCarrier));
}
}

@ -0,0 +1,68 @@
package com.ruoyi.web.controller.carrier;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.web.controller.manager.CarrierManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("/system/maintainCarrier")
public class MaintainCarrierController extends BaseController {
private String prefix = "system/maintainCarrier";
@Resource
private CarrierManager carrierManager;
@RequiresPermissions("system:maintainCarrier:view")
@GetMapping()
public String carrier() {
return prefix + "/maintainCarrier";
}
/**
*
*/
@RequiresPermissions("system:maintainCarrier:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrier tdCarrier) {
startPage();
List<TdCarrier> carriers = carrierManager.selectTdCarrierUpdateList(tdCarrier);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:maintainCarrier:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
mmap.put("tdCarrier", tdCarrier);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:maintainCarrier:edit")
@Log(title = "国家秘密载体维修", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrier tdCarrier) {
return toAjax(carrierManager.saveOrUpdate(tdCarrier));
}
}

@ -0,0 +1,68 @@
package com.ruoyi.web.controller.carrier;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.web.controller.manager.CarrierManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("/system/recCarrier")
public class ReceiveCarrierController extends BaseController {
private String prefix = "system/recCarrier";
@Resource
private CarrierManager carrierManager;
@RequiresPermissions("system:recCarrier:view")
@GetMapping()
public String carrier() {
return prefix + "/recCarrier";
}
/**
*
*/
@RequiresPermissions("system:recCarrier:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrier tdCarrier) {
startPage();
List<TdCarrier> carriers = carrierManager.selectTdCarrierList(tdCarrier);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:recCarrier:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
mmap.put("tdCarrier", tdCarrier);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:recCarrier:edit")
@Log(title = "载体收发传递", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrier tdCarrier) {
return toAjax(carrierManager.saveOrUpdate(tdCarrier));
}
}

@ -0,0 +1,69 @@
package com.ruoyi.web.controller.carrier;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.web.controller.manager.CarrierManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("system/saveCarrier")
public class SaveCarrierController extends BaseController {
private String prefix = "system/saveCarrier";
@Resource
private CarrierManager carrierManager;
@RequiresPermissions("system:saveCarrier:view")
@GetMapping()
public String carrier() {
return prefix + "/saveCarrier";
}
/**
*
*/
@RequiresPermissions("system:saveCarrier:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrier tdCarrier) {
startPage();
List<TdCarrier> carriers = carrierManager.selectTdCarrierList(tdCarrier);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:saveCarrier:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
mmap.put("tdCarrier", tdCarrier);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:saveCarrier:edit")
@Log(title = "国家秘密载体保存", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrier tdCarrier) {
return toAjax(carrierManager.saveOrUpdate(tdCarrier));
}
}

@ -0,0 +1,69 @@
package com.ruoyi.web.controller.carrier;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.web.controller.manager.CarrierManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 使Controller
*/
@Controller
@RequestMapping("/system/useCarrier")
public class UseCarrierController extends BaseController {
private String prefix = "system/useCarrier";
@Resource
private CarrierManager carrierManager;
@RequiresPermissions("system:useCarrier:view")
@GetMapping()
public String carrier() {
return prefix + "/useCarrier";
}
/**
*
*/
@RequiresPermissions("system:useCarrier:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrier tdCarrier) {
startPage();
List<TdCarrier> carriers = carrierManager.selectTdCarrierList(tdCarrier);
return getDataTable(carriers);
}
/**
* 使
*/
@RequiresPermissions("system:useCarrier:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
mmap.put("tdCarrier", tdCarrier);
return prefix + "/edit";
}
/**
* 使
*/
@RequiresPermissions("system:useCarrier:edit")
@Log(title = "国家秘密载体使用", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrier tdCarrier) {
return toAjax(carrierManager.saveOrUpdate(tdCarrier));
}
}

@ -0,0 +1,152 @@
package com.ruoyi.web.controller.carrier.issued;
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.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* ClassName: CarrierIssuedController
* Package: com.ruoyi.web.controller.carrier.Issued
* Description:
*
* @Author wangxy
* @Create 2024/9/24 10:23
* @Version 1.0
*/
@Controller
@RequestMapping("/system/carrierIssued")
public class CarrierIssuedController extends BaseController {
private String prefix = "system/carrierIssued";
@Resource
private CarrierIssuedManager carrierIssuedManager;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:carrierIssued:view")
@GetMapping()
public String carrierIssued() {
return prefix + "/carrierIssued";
}
/**
*
*/
@RequiresPermissions("system:carrierIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:carrierIssued:export")
@Log(title = "国家秘密载体", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdCarrierIssued tdCarrierIssued) {
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued);
carriers.forEach(tdCarrier1 -> {
tdCarrier1.setAreaCity(sysAreaManager.getAreaName(tdCarrier1.getAreaCity()));
tdCarrier1.setAreaDistrict(sysAreaManager.getAreaName(tdCarrier1.getAreaDistrict()));
});
ExcelUtil<TdCarrierIssued> util = new ExcelUtil<>(TdCarrierIssued.class);
return util.exportExcel(carriers, "国家秘密载体数据");
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:carrierIssued:add")
@Log(title = "国家秘密载体登记", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdCarrierIssued tdCarrierIssued) {
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
/**
*
*/
@RequiresPermissions("system:carrierIssued:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:carrierIssued:edit")
@Log(title = "国家秘密载体修改", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) {
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
/**
*
*/
@RequiresPermissions("system:carrierIssued:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:carrier:remove")
@Log(title = "国家秘密载体", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(carrierIssuedManager.deletedTdCarrierByids(ids));
}
}

@ -0,0 +1,70 @@
package com.ruoyi.web.controller.carrier.issued;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
* @author Administrator
*/
@Controller
@RequestMapping("/system/destoryIssued")
public class DestoryIssuedController extends BaseController {
private String prefix = "system/destoryIssued";
@Resource
private CarrierIssuedManager carrierIssuedManager;
@RequiresPermissions("system:destoryIssued:view")
@GetMapping()
public String destoryIssued() {
return prefix + "/destoryIssued";
}
/**
*
*/
@RequiresPermissions("system:destoryIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:destoryIssued:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:destoryIssued:edit")
@Log(title = "国家秘密载体销毁", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) {
tdCarrierIssued.setStatus("6");
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
}

@ -0,0 +1,68 @@
package com.ruoyi.web.controller.carrier.issued;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("/system/maintainIssued")
public class MaintainIssuedController extends BaseController {
private String prefix = "system/maintainIssued";
@Resource
private CarrierIssuedManager carrierIssuedManager;
@RequiresPermissions("system:maintainIssued:view")
@GetMapping()
public String maintainIssued() {
return prefix + "/maintainIssued";
}
/**
*
*/
@RequiresPermissions("system:maintainIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierUpdateList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:maintainIssued:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:maintainIssued:edit")
@Log(title = "国家秘密载体维修", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) {
tdCarrierIssued.setStatus("5");
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
}

@ -0,0 +1,71 @@
package com.ruoyi.web.controller.carrier.issued;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Controller
* @author Administrator
*/
@Controller
@RequestMapping("system/saveIssued")
public class SaveIssuedController extends BaseController {
private String prefix = "system/saveIssued";
@Resource
private CarrierIssuedManager carrierIssuedManager;
@RequiresPermissions("system:saveIssued:view")
@GetMapping()
public String saveIssued() {
return prefix + "/saveIssued";
}
/**
*
*/
@RequiresPermissions("system:saveIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierSaveList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
*
*/
@RequiresPermissions("system:saveIssued:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:saveIssued:edit")
@Log(title = "国家秘密载体保存", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) {
tdCarrierIssued.setStatus("4");
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
}

@ -0,0 +1,84 @@
package com.ruoyi.web.controller.carrier.issued;
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.BusinessType;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* 使Controller
*/
@Controller
@RequestMapping("/system/useIssued")
public class UseIssuedController extends BaseController {
private String prefix = "system/useIssued";
@Resource
private CarrierIssuedManager carrierIssuedManager;
@RequiresPermissions("system:useIssued:view")
@GetMapping()
public String useIssued() {
return prefix + "/useIssued";
}
/**
*
*/
@RequiresPermissions("system:useIssued:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierUserList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
* 使
*/
@RequiresPermissions("system:useIssued:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
return prefix + "/edit";
}
/**
* 使
*/
@RequiresPermissions("system:useIssued:edit")
@Log(title = "国家秘密载体使用", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) {
tdCarrierIssued.setStatus("2");
return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued));
}
/**
*
*/
@GetMapping("/updateStatus/{id}")
@ResponseBody
public AjaxResult updateStatus(@PathVariable("id") String id) {
return toAjax(carrierIssuedManager.updateStatus(id));
}
}

@ -0,0 +1,128 @@
package com.ruoyi.web.controller.exam;
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.BusinessType;
import com.ruoyi.system.domain.exam.dto.ExamDTO;
import com.ruoyi.system.domain.exam.dto.request.ExamSaveReqDTO;
import com.ruoyi.system.domain.repo.ElRepo;
import com.ruoyi.web.controller.manager.ExamManager;
import com.ruoyi.web.controller.manager.RepoManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.examination
*
* @author wangxy
* @version JDK 8
* @className ExamController
* @date 2024/6/28
* @description
*/
@Api("考试")
@Controller
@RequestMapping("/system/newExam")
public class ExamController extends BaseController {
private String prefix = "system/elExam/exam";
@Resource
private ExamManager examManager;
@Resource
private RepoManager elRepoManager;
@ApiOperation("考试")
@RequiresPermissions("system:exam:view")
@GetMapping()
public String exam() {
return prefix + "/exam";
}
@ApiOperation("考试")
@RequiresPermissions("system:exam:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(ExamDTO examDTO) {
startPage();
List<ExamDTO> list = examManager.selectExamList(examDTO);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap) {
mmap.put("repo",elRepoManager.selectRepoList(new ElRepo()));
return prefix + "/add";
}
@ApiOperation("新增")
@RequiresPermissions("system:exam:add")
@Log(title = "考试", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@RequestBody @Validated ExamSaveReqDTO reqDTO) {
return toAjax(examManager.saveOrUpdate(reqDTO));
}
@ApiOperation("修改")
@RequiresPermissions("system:exam:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
mmap.put("repo",elRepoManager.selectRepoList(new ElRepo()));
mmap.put("detailDTO", examManager.detail(id));
return prefix + "/edit";
}
@ApiOperation("试题修改")
@RequiresPermissions("system:exam:edit")
@Log(title = "考试", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@RequestBody @Validated ExamSaveReqDTO reqDTO) {
return toAjax(examManager.saveOrUpdate(reqDTO));
}
@ApiOperation("删除")
@RequiresPermissions("system:exam:remove")
@Log(title = "考试", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(examManager.deleteQuByIds(ids));
}
@ApiOperation("详情")
@Log(title = "考试", businessType = BusinessType.OTHER)
@GetMapping("/detail")
@ResponseBody
public AjaxResult detail(String id) {
return success(examManager.detail(id));
}
@Log(title = "考试", businessType = BusinessType.UPDATE)
@PostMapping("/changeStatus")
@ResponseBody
public AjaxResult changeStatus(ExamDTO examDTO) {
return toAjax(examManager.changeStatus(examDTO));
}
}

@ -0,0 +1,66 @@
package com.ruoyi.web.controller.exam;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.exam.dto.ExamDTO;
import com.ruoyi.system.domain.exam.dto.response.ExamOnlineRespDTO;
import com.ruoyi.web.controller.manager.ExamManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.examination
*
* @author wangxy
* @version JDK 8
* @className OnlineExam
* @date 2024/6/28
* @description 线
*/
@Api("在线考试")
@Controller
@RequestMapping("/system/onlineExam")
public class OnlineExamController extends BaseController {
@Resource
private ExamManager examManager;
private String prefix = "system/elExam/onlineExam";
@ApiOperation("在线考试")
@RequiresPermissions("system:onlineExam:view")
@GetMapping()
public String onlineExam() {
return prefix + "/onlineExam";
}
@ApiOperation("在线考试")
@RequiresPermissions("system:onlineExam:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(ExamDTO examDTO) {
startPage();
examDTO.setUserId(getUserId());
List<ExamOnlineRespDTO> list = examManager.onlineExamList(examDTO);
return getDataTable(list);
}
@ApiOperation("去考试")
@GetMapping("/toExam/{id}")
public String toExam(@PathVariable("id") String id, ModelMap mmap) {
mmap.put("exam",examManager.view(id));
return prefix + "/toExam";
}
}

@ -0,0 +1,136 @@
package com.ruoyi.web.controller.exam;
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.BusinessType;
import com.ruoyi.system.domain.paper.dto.request.PaperAnswerDTO;
import com.ruoyi.system.domain.paper.dto.request.PaperListReqDTO;
import com.ruoyi.system.domain.paper.dto.request.PaperQuQueryDTO;
import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO;
import com.ruoyi.web.controller.manager.PaperManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.examination
*
* @author wangxy
* @version JDK 8
* @className PaperController
* @date 2024/6/28
* @description
*/
@Api("在线考试")
@Controller
@RequestMapping("/system/paper")
public class PaperController extends BaseController {
private String prefix = "system/elExam/paper";
@Resource
private PaperManager paperManager;
@ApiOperation("去考试")
@GetMapping("/toPaper/{examId}/{paperId}")
public String toPaper(@PathVariable("examId") String examId, @PathVariable String paperId,ModelMap mmap ) {
mmap.put("examId", examId);
mmap.put("paperId", paperId);
return prefix + "/paper";
}
@ApiOperation("在线考试")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(PaperListReqDTO paperListReqDTO) {
startPage();
List<PaperListRespDTO> list = paperManager.paging(paperListReqDTO);
return getDataTable(list);
}
@ApiOperation("创建试卷")
@Log(title = "创建试卷", businessType = BusinessType.INSERT)
@GetMapping("/create/{examId}")
@ResponseBody
public AjaxResult create(@PathVariable("examId") String examId) {
return AjaxResult.success(paperManager.createPaper(examId,getUserId()));
}
@ApiOperation("试卷详情")
@GetMapping("/detail/{paperId}")
@ResponseBody
public AjaxResult detail(@PathVariable("paperId") String paperId) {
return AjaxResult.success(paperManager.paperDetail(paperId));
}
@ApiOperation("试题详情")
@PostMapping("/quDetail")
@ResponseBody
public AjaxResult quDetail(@RequestBody @Validated PaperQuQueryDTO reqDTO) {
return AjaxResult.success(paperManager.findQuDetail(reqDTO.getPaperId(), reqDTO.getQuId()));
}
@ApiOperation("保存答案")
@PostMapping("/fillAnswer")
@ResponseBody
public AjaxResult fillAnswer(@RequestBody @Validated PaperAnswerDTO reqDTO) {
return toAjax(paperManager.fillAnswer(reqDTO));
}
@ApiOperation("交卷")
@GetMapping("/submitExam/{paperId}")
@Log(title = "交卷", businessType = BusinessType.INSERT)
@ResponseBody
public AjaxResult submitExam(@PathVariable("paperId") String paperId) {
return toAjax(paperManager.submitExam(paperId));
}
@ApiOperation("详情")
@GetMapping("/toView/{paperId}")
public String toView(@PathVariable("paperId") String paperId, ModelMap mmap) {
mmap.put("paperId", paperId);
return prefix + "/view";
}
@ApiOperation("详情")
@GetMapping("/paperResult/{paperId}")
@ResponseBody
public AjaxResult paperResult(@PathVariable("paperId") String paperId) {
return AjaxResult.success( paperManager.paperResult(paperId));
}
@ApiOperation("检测进行中的考试")
@GetMapping("/checkProcess")
@ResponseBody
public AjaxResult checkProcess() {
return AjaxResult.success(paperManager.checkProcess(getUserId()));
}
}

@ -0,0 +1,222 @@
package com.ruoyi.web.controller.exam;
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.BusinessType;
import com.ruoyi.common.utils.excel.ExportExcel;
import com.ruoyi.common.utils.excel.ImportExcel;
import com.ruoyi.system.domain.qu.ElQu;
import com.ruoyi.system.domain.qu.dto.export.QuExportDTO;
import com.ruoyi.system.domain.qu.dto.ext.QuDetailDTO;
import com.ruoyi.system.domain.qu.dto.request.QuQueryReqDTO;
import com.ruoyi.web.controller.manager.QuManager;
import com.ruoyi.web.controller.manager.RepoManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.compress.utils.IOUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.examination
*
* @author wangxy
* @version JDK 8
* @className QuController
* @date 2024/6/27
* @description
*/
@Api("试题")
@Controller
@RequestMapping("/system/qu")
public class QuController extends BaseController {
private String prefix = "system/elExam/qu";
@Resource
private QuManager quManager;
@Resource
private RepoManager elRepoManager;
@ApiOperation("试题")
@RequiresPermissions("system:qu:view")
@GetMapping()
public String qu() {
return prefix + "/qu";
}
@ApiOperation("试题")
@RequiresPermissions("system:qu:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(QuQueryReqDTO qu) {
startPage();
List<ElQu> list = quManager.selectQuList(qu);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap) {
mmap.put("repo",elRepoManager.getList());
return prefix + "/add";
}
@ApiOperation("新增")
@RequiresPermissions("system:qu:add")
@Log(title = "试题", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@RequestBody @Validated QuDetailDTO reqDTO) {
return toAjax(quManager.saveOrUpdate(reqDTO));
}
@ApiOperation("修改")
@RequiresPermissions("system:qu:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
mmap.put("repo",elRepoManager.getList());
mmap.put("detailDTO", quManager.detail(id));
mmap.put("detailid",id);
return prefix + "/edit";
}
@ApiOperation("试题修改")
@RequiresPermissions("system:qu:edit")
@Log(title = "试题", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@RequestBody @Validated QuDetailDTO reqDTO) {
return toAjax(quManager.saveOrUpdate(reqDTO));
}
@ApiOperation("删除")
@RequiresPermissions("system:qu:remove")
@Log(title = "试题", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(quManager.deleteQuByIds(ids));
}
@ApiOperation("详情")
@GetMapping ("/detail")
@ResponseBody
public AjaxResult detail(@RequestParam String quId) {
return success(quManager.detail(quId));
}
@ApiOperation("下载导入试题数据模板")
@ResponseBody
@GetMapping("/template")
public AjaxResult importFileTemplate(HttpServletResponse response) {
try {
String fileName = "试题导入模板.xlsx";
List<QuExportDTO> list = Lists.newArrayList();
QuExportDTO l1 = new QuExportDTO();
l1.setNo("正式导入,请删除此说明行:数字,相同的数字表示同一题的序列");
l1.setQContent("问题内容");
l1.setQAnalysis("整个问题的解析");
l1.setQuType("只能填写1、2、3、41表示单选题2表示多选题3表示判断题4表示主观题");
l1.setQImage("题目图片完整URL多个用逗号隔开限制10个");
l1.setQVideo("题目视频完整URL只限一个");
l1.setAImage("答案图片完整URL只限一个");
l1.setRepoList(Arrays.asList(new String[]{"已存在题库的ID多个用逗号隔开题库ID错误无法导入"}));
l1.setAContent("候选答案1");
l1.setAIsRight("只能填写0或10表示否1表示是");
l1.setAAnalysis("这个项是正确的");
QuExportDTO l2 = new QuExportDTO();
l2.setQContent("找出以下可以被2整除的数多选");
l2.setQAnalysis("最基本的数学题,不做过多解析");
l2.setQuType("2");
l2.setNo("1");
l2.setAIsRight("1");
l2.setAContent("数字2");
l2.setAAnalysis("2除以2=1对的");
QuExportDTO l3 = new QuExportDTO();
l3.setNo("1");
l3.setAIsRight("0");
l3.setAContent("数字3");
l3.setAAnalysis("3除以2=1.5,不能被整除");
QuExportDTO l4 = new QuExportDTO();
l4.setNo("1");
l4.setAIsRight("1");
l4.setAContent("数字6");
l4.setAAnalysis("6除以2=3对的");
list.add(l1);
list.add(l2);
list.add(l3);
list.add(l4);
new ExportExcel("试题数据", QuExportDTO.class, 1).setDataList(list).write(response, fileName).dispose();
return success();
} catch (Exception e) {
return error("导入模板下载失败!失败信息:"+e.getMessage());
}
}
@RequiresPermissions("system:qu:import")
@GetMapping("/toImport")
public String toImport() {
return prefix + "/toImport";
}
@ApiOperation("导入Excel")
@ResponseBody
@PostMapping( "/import")
public AjaxResult importFile(@RequestParam("file") MultipartFile file) {
InputStream inputStream = null;
try {
inputStream = file.getInputStream();
ImportExcel ei = new ImportExcel(file,inputStream, 1, 0);
List<QuExportDTO> list = ei.getDataList(QuExportDTO.class);
// 导入数据条数
quManager.importExcel(list);
// 导入成功
return success("导入成功");
} catch (IOException | InvalidFormatException | IllegalAccessException | InstantiationException e) {
logger.info(e.getMessage());
}finally {
IOUtils.closeQuietly(inputStream);
}
return error("导入失败");
}
}

@ -0,0 +1,124 @@
package com.ruoyi.web.controller.exam;
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.BusinessType;
import com.ruoyi.system.domain.repo.ElRepo;
import com.ruoyi.system.domain.repo.vo.RepoVO;
import com.ruoyi.web.controller.manager.RepoManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.examination
*
* @author wangxy
* @version JDK 8
* @className RepoController
* @date 2024/6/27
* @description
*/
@Api("题库")
@Controller
@RequestMapping("/system/repo")
public class RepoController extends BaseController {
private String prefix = "system/elExam/repo";
@Resource
private RepoManager elRepoManager;
@ApiOperation("题库列表")
@RequiresPermissions("system:repo:view")
@GetMapping()
public String repo() {
return prefix + "/repo";
}
@ApiOperation("列表")
@RequiresPermissions("system:repo:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(ElRepo repo) {
startPage();
List<RepoVO> list = elRepoManager.selectRepoList(repo);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
@ApiOperation("新增")
@RequiresPermissions("system:repo:add")
@Log(title = "题库", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@Validated ElRepo repo) {
return toAjax(elRepoManager.saveOrUpdate(repo));
}
@ApiOperation("修改")
@RequiresPermissions("system:repo:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
mmap.put("repo", elRepoManager.getById(id));
return prefix + "/edit";
}
@ApiOperation("题库修改")
@RequiresPermissions("system:repo:edit")
@Log(title = "题库", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@Validated ElRepo repo) {
return toAjax(elRepoManager.saveOrUpdate(repo));
}
@ApiOperation("删除")
@RequiresPermissions("system:repo:remove")
@Log(title = "题库", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(elRepoManager.deleteRepoByIds(ids));
}
@ApiOperation("详情")
@GetMapping("/detail")
@ResponseBody
public AjaxResult detail(String id) {
return success(elRepoManager.getById(id));
}
@ApiOperation("查询所有的题库")
@GetMapping("/repoList")
@ResponseBody
public AjaxResult repoList() {
return success(elRepoManager.getList());
}
}

@ -0,0 +1,91 @@
package com.ruoyi.web.controller.exam;
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.BusinessType;
import com.ruoyi.system.domain.userbook.ElUserBook;
import com.ruoyi.system.domain.userbook.dto.UserBookDTO;
import com.ruoyi.web.controller.manager.UserBookManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.exam
*
* @author wangxy
* @version JDK 8
* @className UserBookController
* @date 2024/7/9
* @description
*/
@Api("错题")
@Controller
@RequestMapping("/system/userBook")
public class UserBookController extends BaseController {
private String prefix = "system/elExam/userBook";
@Resource
private UserBookManager userBookManager;
@ApiOperation("错题列表")
@GetMapping("/toBook/{id}")
public String toBook(@PathVariable("id") String id, ModelMap mmap) {
mmap.put("examId", id);
return prefix + "/book";
}
@ApiOperation("错题")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(UserBookDTO reqDTO) {
startPage();
List<ElUserBook> list = userBookManager.paging(reqDTO);
return getDataTable(list);
}
@ApiOperation("删除")
@Log(title = "错题", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(userBookManager.deleteRepoByIds(ids));
}
@ApiOperation("详情")
@GetMapping("/view/{id}")
public String view(@PathVariable("id") String id, ModelMap mmap) {
mmap.put("quId", id);
return prefix + "/view";
}
@ApiOperation("错题训练")
@GetMapping("/toTrain/{examId}")
public String toTrain(@PathVariable("examId") String examId, ModelMap mmap) {
mmap.put("examId", examId);
return prefix + "/toTrain";
}
@ApiOperation("查找列表")
@PostMapping("/next")
@ResponseBody
public AjaxResult next(@RequestBody UserBookDTO reqDTO) {
return AjaxResult.success(userBookManager.findNext(reqDTO.getExamId(),reqDTO.getQuId()));
}
}

@ -0,0 +1,103 @@
package com.ruoyi.web.controller.exam;
import cn.hutool.core.convert.Convert;
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.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamExportDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamRespDTO;
import com.ruoyi.web.controller.manager.UserExamManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.exam
*
* @author wangxy
* @version JDK 8
* @className UserExamController
* @date 2024/7/3
* @description
*/
@Api("考试详情")
@Controller
@RequestMapping("/system/userExam")
public class UserExamController extends BaseController {
@Resource
private UserExamManager userExamManager;
private String prefix = "system/elExam/userExam";
@ApiOperation("考试详情")
@GetMapping("/toExam/{id}")
public String toExam(@PathVariable("id") String id, ModelMap mmap) {
mmap.put("examId", id);
return prefix + "/userExam";
}
@ApiOperation("考试详情")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(UserExamReqDTO reqDTO) {
startPage();
List<UserExamRespDTO> list = userExamManager.selectExamList(reqDTO);
return getDataTable(list);
}
@Log(title = "考试详情", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(UserExamReqDTO reqDTO) {
List<UserExamRespDTO> list = userExamManager.selectExamList(reqDTO);
List<UserExamExportDTO> list1 = Convert.toList(UserExamExportDTO.class, list);
ExcelUtil<UserExamExportDTO> util = new ExcelUtil<UserExamExportDTO>(UserExamExportDTO.class);
return util.exportExcel(list1, "考试数据");
}
@ApiOperation("详情")
@GetMapping("/detail/{examId}/{userId}")
public String detail(@PathVariable("examId") String examId, @PathVariable("userId") Long userId, ModelMap mmap) {
List<PaperListRespDTO> list = userExamManager.detail(examId, userId);
mmap.put("list", list);
return prefix + "/view";
}
@ApiOperation("我的成绩")
@RequiresPermissions("system:userExam:list")
@PostMapping("/myGrades")
@ResponseBody
public TableDataInfo myGrades(UserExamReqDTO reqDTO) {
startPage();
List<UserExamRespDTO> list = userExamManager.selectExamList(reqDTO);
return getDataTable(list);
}
@ApiOperation("我的成绩")
@RequiresPermissions("system:userExam:view")
@GetMapping()
public String userExam() {
return prefix + "/myGrades";
}
}

@ -0,0 +1,52 @@
package com.ruoyi.web.controller.license;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.license.domain.LicenseCreatorParam;
import com.ruoyi.license.service.AbstractServerInfos;
import com.ruoyi.license.service.impl.LinuxServerInfos;
import com.ruoyi.license.service.impl.WindowsServerInfos;
import com.ruoyi.license.utils.LicenseCreator;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
/**
*
*/
@RestController
@RequestMapping("/license")
public class LicenseController {
/**
*
*/
@GetMapping(value = "/getInfo")
public AjaxResult getInfo(@RequestParam(value = "osName",required = false) String osName) {
//操作系统类型
if(StringUtils.isBlank(osName)){
osName = System.getProperty("os.name");
}
osName = osName.toLowerCase();
AbstractServerInfos abstractServerInfos = null;
//根据不同操作系统类型选择不同的数据获取方法
if (osName.startsWith("windows")) {
abstractServerInfos = new WindowsServerInfos();
} else if (osName.startsWith("linux")) {
abstractServerInfos = new LinuxServerInfos();
}else{//其他服务器类型
abstractServerInfos = new LinuxServerInfos();
}
return AjaxResult.success(abstractServerInfos.getServerInfos());
}
@PostMapping(value = "/generate")
public AjaxResult generate(@RequestBody LicenseCreatorParam param) {
LicenseCreator licenseCreator = new LicenseCreator(param);
boolean result = licenseCreator.generateLicense();
if(result){
return AjaxResult.success();
}else{
return AjaxResult.error("证书文件生成失败");
}
}
}

@ -0,0 +1,79 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.system.service.carrier.TdCarrierIssuedService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* ClassName: TdCarrierIssuedManager
* Package: com.ruoyi.web.controller.manager
* Description:
*
* @Author wangxy
* @Create 2024/9/24 10:21
* @Version 1.0
*/
@Component
public class CarrierIssuedManager {
@Resource
private TdCarrierIssuedService carrierIssuedService;
public List<TdCarrierIssued> selectTdCarrierList(TdCarrierIssued tdCarrierIssued) {
return carrierIssuedService.selectTdCarrierList(tdCarrierIssued);
}
public List<TdCarrierIssued> selectTdCarrierUpdateList(TdCarrierIssued tdCarrierIssued) {
return carrierIssuedService.selectTdCarrierUpdateList(tdCarrierIssued);
}
public List<TdCarrierIssued> selectTdCarrierUserList(TdCarrierIssued tdCarrierIssued) {
return carrierIssuedService.selectTdCarrierUserList(tdCarrierIssued);
}
public List<TdCarrierIssued> selectTdCarrierSaveList(TdCarrierIssued tdCarrierIssued) {
return carrierIssuedService.selectTdCarrierSaveList(tdCarrierIssued);
}
public boolean saveOrUpdate(TdCarrierIssued tdCarrierIssued) {
if (CharSequenceUtil.isNotBlank(tdCarrierIssued.getId())) {
tdCarrierIssued.setUpdateBy(ShiroUtils.getSysUser().getLoginName());
tdCarrierIssued.setUpdateTime(new Date());
} else {
tdCarrierIssued.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdCarrierIssued.setCreateTime(new Date());
}
tdCarrierIssued.setDeptId(ShiroUtils.getSysUser().getDeptId());
return carrierIssuedService.saveOrUpdate(tdCarrierIssued);
}
public TdCarrierIssued selectTdCarrier(String id) {
return carrierIssuedService.getById(id);
}
public boolean deletedTdCarrierByids(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return carrierIssuedService.removeByIds(list);
}
public boolean updateStatus(String id) {
return carrierIssuedService.lambdaUpdate()
.eq(TdCarrierIssued::getId,id)
.set(TdCarrierIssued::getStatus,"3")
.set(TdCarrierIssued::getReclaimTime,new Date())
.update();
}
}

@ -0,0 +1,72 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.system.service.carrier.TdCarrierService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className CarrierManager
* @date 2024/8/21
* @description
*/
@Component
public class CarrierManager {
@Resource
private TdCarrierService carrierService;
public List<TdCarrier> selectTdCarrierList(TdCarrier tdCarrier) {
return carrierService.selectTdCarrierList(tdCarrier);
}
public List<TdCarrier> selectTdCarrierUpdateList(TdCarrier tdCarrier) {
return carrierService.selectTdCarrierUpdateList(tdCarrier);
}
public boolean saveOrUpdate(TdCarrier tdCarrier) {
if (CharSequenceUtil.isNotBlank(tdCarrier.getId())) {
tdCarrier.setUpdateBy(ShiroUtils.getSysUser().getLoginName());
tdCarrier.setUpdateTime(new Date());
} else {
tdCarrier.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdCarrier.setCreateTime(new Date());
}
tdCarrier.setDeptId(ShiroUtils.getSysUser().getDeptId());
return carrierService.saveOrUpdate(tdCarrier);
}
public TdCarrier selectTdCarrier(String id) {
return carrierService.getById(id);
}
public boolean deletedTdCarrierByids(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return carrierService.removeByIds(list);
}
public boolean updateStatus(String id,String status) {
return carrierService.lambdaUpdate()
.eq(TdCarrier::getId,id)
.set(TdCarrier::getStatus,status)
.update();
}
}

@ -0,0 +1,124 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.check.TdCheckType;
import com.ruoyi.system.domain.check.dto.*;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.check.TdCheckReportService;
import com.ruoyi.system.service.check.TdCheckTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className CheckReportManager
* @date 2024/8/15
* @description
*/
@Component
public class CheckReportManager {
@Resource
private TdCheckReportService checkReportService;
@Resource
private TdCheckTypeService checkTypeService;
@Autowired
private ISysDictDataService dictDataService;
public List<TdCheckReport> selectTdCheckReportList(CheckReportDTO tdCheckReport) {
return checkReportService.selectTdCheckReportList(tdCheckReport);
}
public List<TdCheckReport> selectTdCheckResultList(TdCheckReport tdCheckReport) {
return checkReportService.selectTdCheckResultList(tdCheckReport);
}
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(TdCheckReportDTO checkReportDTO) {
TdCheckReport tdCheckReport = Convert.convert(TdCheckReport.class, checkReportDTO);
if (CharSequenceUtil.isNotBlank(checkReportDTO.getCheckId())) {
checkTypeService.lambdaUpdate()
.eq(TdCheckType::getCheckId, checkReportDTO.getCheckId())
.remove();
tdCheckReport.setUpdateTime(new Date());
tdCheckReport.setUpdateBy(ShiroUtils.getSysUser().getUserName());
} else {
tdCheckReport.setDepart(ShiroUtils.getSysUser().getDept().getDeptName());
tdCheckReport.setAdduser(ShiroUtils.getSysUser().getUserName());
tdCheckReport.setCreateTime(new Date());
tdCheckReport.setCreateBy(ShiroUtils.getSysUser().getUserName());
}
tdCheckReport.setDeptId(ShiroUtils.getSysUser().getDeptId());
checkReportService.saveOrUpdate(tdCheckReport);
List<TdCheckType> list = Convert.toList(TdCheckType.class, checkReportDTO.getCheckTypeDTOS());
list.forEach(checkReport -> checkReport.setCheckId(tdCheckReport.getCheckId()));
return checkTypeService.saveBatch(list);
}
public List<CheckTypeItemDTO> getCheckTypeDTO(String checkType,String typeName) {
List<CheckTypeItemDTO> checkTypeItemDTOList =new ArrayList<>();
List<SysDictData> dataList = dictDataService.selectDictDataByType(checkType);
dataList.forEach(sysDictData2 -> checkTypeItemDTOList.add(CheckTypeItemDTO.builder()
.typeName(typeName)
.checkType(checkType)
.checkItems(sysDictData2.getDictLabel())
.itemsType(sysDictData2.getDictCode())
.typeContent(sysDictData2.getDictValue())
.score(sysDictData2.getCssClass())
.deductionCriteria(sysDictData2.getRemark())
.build()));
return checkTypeItemDTOList;
}
public List<CheckTypeDTO> getCheckTypeDtoParent(String type) {
List<CheckTypeDTO> checkTypeDtoS = new ArrayList<>();
List<SysDictData> list = dictDataService.selectDictDataByType(type);
list.forEach(sysDictData1 -> checkTypeDtoS.add(CheckTypeDTO.builder()
.typeName(sysDictData1.getDictLabel())
.checkType(sysDictData1.getDictValue()).build()));
return checkTypeDtoS;
}
@Transactional(rollbackFor = Exception.class)
public boolean deletedTdCheckReportIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
checkTypeService.lambdaUpdate().in(TdCheckType::getCheckId,list).remove();
return checkReportService.removeByIds(list);
}
public TdCheckReportDTO getTdCheckReportDTO(String id) {
TdCheckReport tdCheckReport = checkReportService.getById(id);
TdCheckReportDTO tdCheckReportDto = Convert.convert(TdCheckReportDTO.class, tdCheckReport);
List<TdCheckType> list = checkTypeService.lambdaQuery().eq(TdCheckType::getCheckId, id).list();
if(CollUtil.isNotEmpty(list)){
List<TdCheckTypeDTO> tdCheckTypeDtoS = Convert.toList(TdCheckTypeDTO.class, list);
tdCheckReportDto.setCheckTypeDTOS(tdCheckTypeDtoS);
}
return tdCheckReportDto;
}
}

@ -0,0 +1,204 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.exam.ElExam;
import com.ruoyi.system.domain.exam.ElExamDepart;
import com.ruoyi.system.domain.exam.ElExamRepo;
import com.ruoyi.system.domain.exam.dto.ExamDTO;
import com.ruoyi.system.domain.exam.dto.ExamRepoDTO;
import com.ruoyi.system.domain.exam.dto.ext.ExamRepoExtDTO;
import com.ruoyi.system.domain.exam.dto.request.ExamSaveReqDTO;
import com.ruoyi.system.domain.exam.dto.response.ExamOnlineRespDTO;
import com.ruoyi.system.domain.exam.enums.OpenType;
import com.ruoyi.system.service.ElExamDepartService;
import com.ruoyi.system.service.ElExamRepoService;
import com.ruoyi.system.service.ElExamService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className Exammanager
* @date 2024/6/28
* @description
*/
@Component
public class ExamManager {
@Resource
private ElExamService elExamService;
@Resource
private ElExamRepoService examRepoService;
@Resource
private ElExamDepartService elExamDepartService;
/**
*
*
* @param examDTO
* @return java.util.List<com.hyp.system.domain.SysNotice>
*/
public List<ExamDTO> selectExamList(ExamDTO examDTO) {
return elExamService.selectExamList(examDTO);
}
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(ExamSaveReqDTO reqDTO) {
// 计算分值
this.calcScore(reqDTO);
ElExam elExam = Convert.convert(ElExam.class, reqDTO);
// 修复状态
if (Objects.nonNull(reqDTO.getTimeLimit()) && !reqDTO.getTimeLimit()
&& Objects.nonNull(reqDTO.getState())
&& Objects.equals(reqDTO.getState(), 2)) {
elExam.setState(0);
} else {
elExam.setState(reqDTO.getState());
}
if (StringUtils.isNotEmpty(reqDTO.getId())) {
elExam.setUpdateTime(new Date());
LambdaQueryWrapper<ElExamRepo> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ElExamRepo::getExamId, reqDTO.getId());
examRepoService.remove(wrapper);
LambdaQueryWrapper<ElExamDepart> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ElExamDepart::getExamId, reqDTO.getId());
elExamDepartService.remove(queryWrapper);
} else {
elExam.setCreateTime(new Date());
}
elExamService.saveOrUpdate(elExam);
if (CollUtil.isNotEmpty(reqDTO.getRepoList())) {
List<ElExamRepo> examRepos = Convert.toList(ElExamRepo.class, reqDTO.getRepoList());
examRepos.forEach(elExamRepo -> elExamRepo.setExamId(elExam.getId()));
examRepoService.saveBatch(examRepos);
}
if (CollUtil.isNotEmpty(reqDTO.getDepartIds()) && OpenType.DEPT_OPEN.equals(reqDTO.getOpenType())) {
List<ElExamDepart> list = new ArrayList<>();
reqDTO.getDepartIds().forEach(deptId -> {
ElExamDepart ref = new ElExamDepart();
ref.setExamId(elExam.getId());
ref.setDepartId(deptId);
list.add(ref);
});
elExamDepartService.saveBatch(list);
}
return true;
}
@Transactional(rollbackFor = Exception.class)
public boolean deleteQuByIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
elExamService.removeByIds(list);
LambdaQueryWrapper<ElExamDepart> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ElExamDepart::getExamId, list);
elExamDepartService.remove(queryWrapper);
LambdaQueryWrapper<ElExamRepo> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ElExamRepo::getExamId, list);
return examRepoService.remove(wrapper);
}
/**
*
*
* @param id
* @return com.ruoyi.system.domain.exam.dto.request.ExamSaveReqDTO
*/
public ExamSaveReqDTO detail(String id) {
ElExam exam = elExamService.getById(id);
ExamSaveReqDTO respDTO = Convert.convert(ExamSaveReqDTO.class, exam);
// 考试部门
List<Long> departIds = elExamDepartService.lambdaQuery()
.eq(ElExamDepart::getExamId, id).list().stream()
.map(ElExamDepart::getDepartId).collect(Collectors.toList());
respDTO.setDepartIds(departIds);
// 题库
List<ExamRepoExtDTO> list = examRepoService.listByExam(id);
respDTO.setRepoList(list);
return respDTO;
}
public ExamDTO view(String id) {
ElExam exam = elExamService.getById(id);
return Convert.convert(ExamDTO.class, exam);
}
/**
* 线
*
* @param examDTO
* @return java.util.List<com.ruoyi.system.domain.exam.dto.response.ExamOnlineRespDTO>
*/
public List<ExamOnlineRespDTO> onlineExamList(ExamDTO examDTO) {
return elExamService.onlineExamList(examDTO);
}
/**
*
*
* @param reqDTO
*/
private void calcScore(ExamSaveReqDTO reqDTO) {
// 主观题分数
int objScore = 0;
// 题库组卷
List<ExamRepoExtDTO> repoList = reqDTO.getRepoList();
for (ExamRepoDTO item : repoList) {
if (item.getRadioCount() != null
&& item.getRadioCount() > 0
&& item.getRadioScore() != null
&& item.getRadioScore() > 0) {
objScore += item.getRadioCount() * item.getRadioScore();
}
if (item.getMultiCount() != null
&& item.getMultiCount() > 0
&& item.getMultiScore() != null
&& item.getMultiScore() > 0) {
objScore += item.getMultiCount() * item.getMultiScore();
}
if (item.getJudgeCount() != null
&& item.getJudgeCount() > 0
&& item.getJudgeScore() != null
&& item.getJudgeScore() > 0) {
objScore += item.getJudgeCount() * item.getJudgeScore();
}
}
reqDTO.setTotalScore(objScore);
}
/**
*
*
* @param examDTO
* @return boolean
*/
public boolean changeStatus(ExamDTO examDTO) {
return elExamService.lambdaUpdate()
.eq(ElExam::getId, examDTO.getId())
.set(ElExam::getState, examDTO.getState())
.update();
}
}

@ -0,0 +1,517 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.quartz.service.ISysJobService;
import com.ruoyi.system.domain.exam.ElExam;
import com.ruoyi.system.domain.exam.dto.ExamRepoDTO;
import com.ruoyi.system.domain.exam.dto.ext.ExamRepoExtDTO;
import com.ruoyi.system.domain.exam.enums.ExamState;
import com.ruoyi.system.domain.paper.ElPaper;
import com.ruoyi.system.domain.paper.ElPaperQu;
import com.ruoyi.system.domain.paper.ElPaperQuAnswer;
import com.ruoyi.system.domain.paper.dto.PaperDTO;
import com.ruoyi.system.domain.paper.dto.PaperQuDTO;
import com.ruoyi.system.domain.paper.dto.ext.PaperQuAnswerExtDTO;
import com.ruoyi.system.domain.paper.dto.ext.PaperQuDetailDTO;
import com.ruoyi.system.domain.paper.dto.request.PaperAnswerDTO;
import com.ruoyi.system.domain.paper.dto.request.PaperListReqDTO;
import com.ruoyi.system.domain.paper.dto.response.ExamDetailRespDTO;
import com.ruoyi.system.domain.paper.dto.response.ExamResultRespDTO;
import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO;
import com.ruoyi.system.domain.paper.enums.PaperState;
import com.ruoyi.system.domain.qu.ElQu;
import com.ruoyi.system.domain.qu.ElQuAnswer;
import com.ruoyi.system.domain.qu.enums.QuType;
import com.ruoyi.system.service.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.*;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className PaperManager
* @date 2024/6/28
* @description
*/
@Component
public class PaperManager {
@Resource
private ElPaperService paperService;
@Resource
private ElPaperQuService paperQuService;
@Resource
private ElPaperQuAnswerService paperQuAnswerService;
@Autowired
private ElExamService examService;
@Autowired
private ElExamRepoService examRepoService;
@Resource
private ElQuService quService;
@Autowired
private ISysUserService sysUserService;
@Autowired
private ElQuAnswerService quAnswerService;
@Autowired
private ISysJobService jobService;
@Autowired
private ISysUserService userService;
@Resource
private UserExamManager userExamManager;
@Resource
private UserBookManager userBookManager;
/**
* ABC
*/
private static List<String> ABC = Arrays.asList(new String[]{
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K","L","M","N","O","P","Q","R","S","T","U","V","W","X"
,"Y","Z"
});
/**
*
*
* @param paperListReqDTO
* @return java.util.List<com.hyp.system.domain.SysNotice>
*/
public List<PaperListRespDTO> paging(PaperListReqDTO paperListReqDTO) {
return paperService.paging(paperListReqDTO);
}
/**
*
*
* @param examId
* @param userId
* @return java.lang.String
*/
@Transactional(rollbackFor = Exception.class)
public String createPaper(String examId,Long userId) {
// 校验是否有正在考试的试卷
QueryWrapper<ElPaper> wrapper = new QueryWrapper<>();
wrapper.lambda()
.eq(ElPaper::getUserId, userId)
.eq(ElPaper::getState, PaperState.ING);
long exists = paperService.count(wrapper);
if (exists > 0) {
throw new ServiceException("您有正在进行的考试!");
}
// 查找考试
ElExam exam = examService.getById(examId);
if(Objects.isNull(exam)){
throw new ServiceException( "考试不存在!");
}
if(!ExamState.ENABLE.equals(exam.getState())){
throw new ServiceException( "考试状态不正确!");
}
// 考试题目列表
List<ElPaperQu> quList = this.generateByRepo(examId);
if(CollectionUtils.isEmpty(quList)){
throw new ServiceException("规则不正确,无对应的考题!");
}
//保存试卷内容
ElPaper paper = this.savePaper(userId, exam, quList);
return paper.getId();
}
/**
*
* @param examId
* @return
*/
private List<ElPaperQu> generateByRepo(String examId){
// 查找规则指定的题库
List<ExamRepoExtDTO> list = examRepoService.listByExam(examId);
//最终的题目列表
List<ElPaperQu> quList = new ArrayList<>();
//排除ID避免题目重复
List<String> excludes = new ArrayList<>();
excludes.add("none");
if (!CollectionUtils.isEmpty(list)) {
for (ExamRepoExtDTO item : list) {
// 单选题
if(item.getRadioCount() > 0){
List<ElQu> radioList = quService.listByRandom(item.getRepoId(), QuType.RADIO, excludes, item.getRadioCount());
for (ElQu qu : radioList) {
ElPaperQu paperQu = this.processPaperQu(item, qu);
quList.add(paperQu);
excludes.add(qu.getId());
}
}
//多选题
if(item.getMultiCount() > 0) {
List<ElQu> multiList = quService.listByRandom(item.getRepoId(), QuType.MULTI, excludes,
item.getMultiCount());
for (ElQu qu : multiList) {
ElPaperQu paperQu = this.processPaperQu(item, qu);
quList.add(paperQu);
excludes.add(qu.getId());
}
}
// 判断题
if(item.getJudgeCount() > 0) {
List<ElQu> judgeList = quService.listByRandom(item.getRepoId(), QuType.JUDGE, excludes,
item.getJudgeCount());
for (ElQu qu : judgeList) {
ElPaperQu paperQu = this.processPaperQu(item, qu);
quList.add(paperQu);
excludes.add(qu.getId());
}
}
}
}
return quList;
}
/**
*
* @param repo
* @param qu
* @return
*/
private ElPaperQu processPaperQu(ExamRepoDTO repo, ElQu qu) {
//保存试题信息
ElPaperQu paperQu = new ElPaperQu();
paperQu.setQuId(qu.getId());
paperQu.setAnswered(false);
paperQu.setIsRight(false);
paperQu.setQuType(qu.getQuType());
if (QuType.RADIO.equals(qu.getQuType())) {
paperQu.setScore(repo.getRadioScore());
paperQu.setActualScore(repo.getRadioScore());
}
if (QuType.MULTI.equals(qu.getQuType())) {
paperQu.setScore(repo.getMultiScore());
paperQu.setActualScore(repo.getMultiScore());
}
if (QuType.JUDGE.equals(qu.getQuType())) {
paperQu.setScore(repo.getJudgeScore());
paperQu.setActualScore(repo.getJudgeScore());
}
return paperQu;
}
/**
*
*
* @param userId
* @param exam
* @param quList
* @return
*/
private ElPaper savePaper(Long userId, ElExam exam, List<ElPaperQu> quList) {
// 查找用户
SysUser user = sysUserService.selectUserById(userId);
//保存试卷基本信息
ElPaper paper = new ElPaper();
paper.setDepartId(user.getDeptId());
paper.setExamId(exam.getId());
paper.setTitle(exam.getTitle());
paper.setTotalScore(exam.getTotalScore());
paper.setTotalTime(exam.getTotalTime());
paper.setUserScore(0);
paper.setUserId(userId);
paper.setCreateTime(new Date());
paper.setUpdateTime(new Date());
paper.setQualifyScore(exam.getQualifyScore());
paper.setState(PaperState.ING);
paper.setHasSaq(false);
// 截止时间
Calendar cl = Calendar.getInstance();
cl.setTimeInMillis(System.currentTimeMillis());
cl.add(Calendar.MINUTE, exam.getTotalTime());
paper.setLimitTime(cl.getTime());
paperService.save(paper);
if (CollUtil.isNotEmpty(quList)) {
this.savePaperQu(paper.getId(), quList);
}
return paper;
}
/**
*
* @param paperId
* @param quList
*/
private void savePaperQu(String paperId, List<ElPaperQu> quList){
List<ElPaperQu> batchQuList = new ArrayList<>();
List<ElPaperQuAnswer> batchAnswerList = new ArrayList<>();
int sort = 0;
for (ElPaperQu item : quList) {
item.setPaperId(paperId);
item.setSort(sort);
//回答列表
QueryWrapper<ElQuAnswer> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(ElQuAnswer::getQuId, item.getQuId());
wrapper.last(" ORDER BY RANDOM() ");
List<ElQuAnswer> answerList = quAnswerService.list(wrapper);
if (CollUtil.isNotEmpty(answerList)) {
int ii = 0;
for (ElQuAnswer answer : answerList) {
ElPaperQuAnswer paperQuAnswer = new ElPaperQuAnswer();
paperQuAnswer.setPaperId(paperId);
paperQuAnswer.setQuId(answer.getQuId());
paperQuAnswer.setAnswerId(answer.getId());
paperQuAnswer.setChecked(false);
paperQuAnswer.setSort(ii);
paperQuAnswer.setAbc(ABC.get(ii));
paperQuAnswer.setIsRight(answer.getIsRight());
ii++;
batchAnswerList.add(paperQuAnswer);
}
}
batchQuList.add(item);
sort++;
}
//添加问题
paperQuService.saveBatch(batchQuList);
//批量添加问题答案
paperQuAnswerService.saveBatch(batchAnswerList);
}
/**
*
*
* @param paperId
* @return com.ruoyi.system.domain.paper.dto.response.ExamDetailRespDTO
*/
public ExamDetailRespDTO paperDetail(String paperId) {
// 试题基本信息
ElPaper paper = paperService.getById(paperId);
if(Objects.isNull(paper)){
throw new ServiceException("试题基本信息为空");
}
ExamDetailRespDTO respDTO = Convert.convert(ExamDetailRespDTO.class, paper);
//查询条件
QueryWrapper<ElPaperQu> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(ElPaperQu::getPaperId, paperId)
.orderByAsc(ElPaperQu::getSort);
List<ElPaperQu> paperQus = paperQuService.list(wrapper);
// 查找题目列表
List<PaperQuDTO> list = Convert.toList(PaperQuDTO.class, paperQus);
List<PaperQuDTO> radioList = new ArrayList<>();
List<PaperQuDTO> multiList = new ArrayList<>();
List<PaperQuDTO> judgeList = new ArrayList<>();
for(PaperQuDTO item: list){
if(QuType.RADIO.equals(item.getQuType())){
radioList.add(item);
}
if(QuType.MULTI.equals(item.getQuType())){
multiList.add(item);
}
if(QuType.JUDGE.equals(item.getQuType())){
judgeList.add(item);
}
}
respDTO.setRadioList(radioList);
respDTO.setMultiList(multiList);
respDTO.setJudgeList(judgeList);
return respDTO;
}
/**
*
*
* @param paperId
* @param quId
* @return com.ruoyi.system.domain.paper.dto.ext.PaperQuDetailDTO
*/
public PaperQuDetailDTO findQuDetail(String paperId, String quId) {
// 问题
ElQu qu = quService.getById(quId);
if(Objects.isNull(qu)){
throw new ServiceException("问题信息为空");
}
// 基本信息
QueryWrapper<ElPaperQu> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(ElPaperQu::getPaperId, paperId)
.eq(ElPaperQu::getQuId, quId);
ElPaperQu paperQu = paperQuService.getOne(wrapper);
PaperQuDetailDTO respDTO = Convert.convert(PaperQuDetailDTO.class, paperQu);
respDTO.setContent(qu.getContent());
respDTO.setImage(qu.getImage());
// 答案列表
List<PaperQuAnswerExtDTO> list = paperQuAnswerService.list(paperId, quId);
respDTO.setAnswerList(list);
return respDTO;
}
@Transactional(rollbackFor = Exception.class)
public Boolean fillAnswer(PaperAnswerDTO reqDTO) {
// 未作答
if(CollectionUtils.isEmpty(reqDTO.getAnswers())
&& StringUtils.isBlank(reqDTO.getAnswer())){
return null;
}
//查找答案列表
QueryWrapper<ElPaperQuAnswer> wrapper = new QueryWrapper<>();
wrapper.lambda()
.eq(ElPaperQuAnswer::getPaperId, reqDTO.getPaperId())
.eq(ElPaperQuAnswer::getQuId, reqDTO.getQuId());
List<ElPaperQuAnswer> list = paperQuAnswerService.list(wrapper);
//是否正确
boolean right = true;
//更新正确答案
for (ElPaperQuAnswer item : list) {
if (reqDTO.getAnswers().contains(item.getId())) {
item.setChecked(true);
} else {
item.setChecked(false);
}
//有一个对不上就是错的
if (item.getIsRight()!=null && !item.getIsRight().equals(item.getChecked())) {
right = false;
}
paperQuAnswerService.updateById(item);
}
//修改为已回答
ElPaperQu qu = new ElPaperQu();
qu.setQuId(reqDTO.getQuId());
qu.setPaperId(reqDTO.getPaperId());
qu.setIsRight(right);
qu.setAnswer(reqDTO.getAnswer());
qu.setAnswered(true);
QueryWrapper<ElPaperQu> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ElPaperQu::getPaperId, qu.getPaperId())
.eq(ElPaperQu::getQuId, qu.getQuId());
paperQuService.update(qu,queryWrapper);
return true;
}
/**
*
*
* @param paperId
* @return boolean
*/
@Transactional(rollbackFor = Exception.class)
public boolean submitExam(String paperId) {
//获取试卷信息
ElPaper paper = paperService.getById(paperId);
//如果不是正常的,抛出异常
if(!PaperState.ING.equals(paper.getState())){
throw new ServiceException("试卷状态不正确!");
}
// 客观分
int objScore = paperQuService.sumObjective(paperId);
paper.setObjScore(objScore);
paper.setUserScore(objScore);
// 主观分因为要阅卷所以给0
paper.setSubjScore(0);
// 待阅卷
if(Boolean.TRUE.equals(paper.getHasSaq())) {
paper.setState(PaperState.WAIT_OPT);
}else {
// 同步保存考试成绩
userExamManager.joinResult(paper.getUserId(), paper.getExamId(), objScore, objScore>=paper.getQualifyScore());
paper.setState(PaperState.FINISHED);
}
paper.setUpdateTime(new Date());
//计算考试时长
Calendar cl = Calendar.getInstance();
cl.setTimeInMillis(System.currentTimeMillis());
int userTime = (int)((System.currentTimeMillis() - paper.getCreateTime().getTime()) / 1000 / 60);
if(userTime == 0){
userTime = 1;
}
paper.setUserTime(userTime);
//更新试卷
paperService.updateById(paper);
List<ElPaperQu> paperQus = paperQuService.lambdaQuery()
.eq(ElPaperQu::getPaperId, paperId)
.orderByAsc(ElPaperQu::getSort).list();
List<PaperQuDTO> list = Convert.toList(PaperQuDTO.class, paperQus);
for(PaperQuDTO qu: list){
// 主观题和对的都不加入错题库
if(Boolean.TRUE.equals(qu.getIsRight())){
continue;
}
//加入错题本
new Thread(() -> userBookManager.addBook(paper.getExamId(), qu.getQuId())).run();
}
return true;
}
public ExamResultRespDTO paperResult(String paperId) {
// 试题基本信息
ElPaper paper = paperService.getById(paperId);
ExamResultRespDTO respDTO = Convert.convert(ExamResultRespDTO.class, paper);
SysUser user = userService.selectUserById(respDTO.getUserId());
respDTO.setUserName(user.getUserName());
List<PaperQuDetailDTO> quList = paperQuService.listForPaperResult(paperId);
respDTO.setQuList(quList);
return respDTO;
}
public PaperDTO checkProcess(Long userId) {
QueryWrapper<ElPaper> wrapper = new QueryWrapper<>();
wrapper.lambda()
.eq(ElPaper::getUserId, userId)
.eq(ElPaper::getState, PaperState.ING);
ElPaper paper = paperService.getOne(wrapper, false);
if (Objects.nonNull(paper)) {
return Convert.convert(PaperDTO.class, paper);
}
return null;
}
}

@ -0,0 +1,338 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.qu.ElQu;
import com.ruoyi.system.domain.qu.ElQuAnswer;
import com.ruoyi.system.domain.qu.ElQuRepo;
import com.ruoyi.system.domain.qu.dto.QuAnswerDTO;
import com.ruoyi.system.domain.qu.dto.export.QuExportDTO;
import com.ruoyi.system.domain.qu.dto.ext.QuDetailDTO;
import com.ruoyi.system.domain.qu.dto.request.QuQueryReqDTO;
import com.ruoyi.system.domain.qu.enums.QuType;
import com.ruoyi.system.service.ElQuAnswerService;
import com.ruoyi.system.service.ElQuRepoService;
import com.ruoyi.system.service.ElQuService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className QuManager
* @date 2024/6/27
* @description
*/
@Component
public class QuManager {
@Resource
private ElQuService quService;
@Resource
private ElQuAnswerService quAnswerService;
@Resource
private ElQuRepoService quRepoService;
/**
*
*
* @param qu
* @return java.util.List<com.hyp.system.domain.SysNotice>
*/
public List<ElQu> selectQuList(QuQueryReqDTO qu) {
return quService.selectQuList(qu);
}
/**
*
*
* @param reqDTO
* @return boolean
*/
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(QuDetailDTO reqDTO) {
// 校验数据
this.checkData(reqDTO, "");
ElQu qu = Convert.convert(ElQu.class, reqDTO);
if (StringUtils.isNotEmpty(reqDTO.getId())) {
qu.setUpdateTime(new Date());
LambdaQueryWrapper<ElQuAnswer> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ElQuAnswer::getQuId,reqDTO.getId());
quAnswerService.remove(wrapper);
LambdaQueryWrapper<ElQuRepo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ElQuRepo::getQuId,reqDTO.getId());
quRepoService.remove(queryWrapper);
} else {
qu.setCreateTime(new Date());
}
quService.saveOrUpdate(qu);
if(CollUtil.isEmpty(reqDTO.getAnswerList())){
throw new ServiceException("备选项列表不能为空");
}
if(CollUtil.isNotEmpty(reqDTO.getAnswerList())){
List<ElQuAnswer> answerList = Convert.toList(ElQuAnswer.class, reqDTO.getAnswerList());
answerList.forEach(elQuAnswer -> elQuAnswer.setQuId(qu.getId()));
quAnswerService.saveBatch(answerList);
}
if(CollUtil.isEmpty(reqDTO.getRepoIds())){
throw new ServiceException("题库列表不能为空");
}
if(CollUtil.isNotEmpty(reqDTO.getRepoIds())){
List<ElQuRepo> list = new ArrayList<>();
reqDTO.getRepoIds().forEach(repoId->{
ElQuRepo ref = new ElQuRepo();
ref.setQuId(qu.getId());
ref.setRepoId(repoId);
ref.setQuType(qu.getQuType());
list.add(ref);
});
quRepoService.saveBatch(list);
reqDTO.getRepoIds().forEach(this::sortRepo);
}
return true;
}
/**
*
* @param repoId
*/
private void sortRepo(String repoId){
List<ElQuRepo> list = quRepoService.lambdaQuery()
.eq(ElQuRepo::getRepoId, repoId).list();
if(CollectionUtils.isEmpty(list)){
return;
}
int sort = 1;
for(ElQuRepo item: list){
item.setSort(sort);
sort++;
}
quRepoService.saveOrUpdateBatch(list);
}
public QuDetailDTO detail(String id) {
ElQu qu = quService.getById(id);
QuDetailDTO detailDTO = Convert.convert(QuDetailDTO.class, qu);
List<ElQuAnswer> quAnswers = quAnswerService.lambdaQuery().eq(ElQuAnswer::getQuId, id).list();
List<QuAnswerDTO> list = Convert.toList(QuAnswerDTO.class, quAnswers);
detailDTO.setAnswerList(list);
List<ElQuRepo> repos = quRepoService.lambdaQuery()
.eq(ElQuRepo::getQuId, id).list();
List<String> repoIds = repos.stream().map(ElQuRepo::getRepoId).collect(Collectors.toList());
detailDTO.setRepoIds(repoIds);
return detailDTO;
}
@Transactional(rollbackFor = Exception.class)
public boolean deleteQuByIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
quService.removeByIds(list);
LambdaQueryWrapper<ElQuAnswer> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ElQuAnswer::getQuId,list);
quAnswerService.remove(wrapper);
LambdaQueryWrapper<ElQuRepo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ElQuRepo::getQuId,list);
return quRepoService.remove(queryWrapper);
}
/**
*
*
* @param qu
* @param no
* @throws Exception
*/
public void checkData(QuDetailDTO qu, String no) {
if (StringUtils.isEmpty(qu.getContent())) {
throw new ServiceException( no + "题目内容不能为空!");
}
if (CollectionUtils.isEmpty(qu.getRepoIds())) {
throw new ServiceException(no + "至少要选择一个题库!");
}
List<QuAnswerDTO> answers = qu.getAnswerList();
if (CollectionUtils.isEmpty(answers)) {
throw new ServiceException( no + "客观题至少要包含一个备选答案!");
}
int trueCount = 0;
for (QuAnswerDTO a : answers) {
if (a.getIsRight() == null) {
throw new ServiceException( no + "必须定义选项是否正确项!");
}
if (StringUtils.isEmpty(a.getContent())) {
throw new ServiceException( no + "选项内容不为空!");
}
if (a.getIsRight()) {
trueCount += 1;
}
}
if (trueCount == 0) {
throw new ServiceException(no + "至少要包含一个正确项!");
}
//单选题
if (qu.getQuType().equals(QuType.RADIO) && trueCount > 1) {
throw new ServiceException( no + "单选题不能包含多个正确项!");
}
}
public int importExcel(List<QuExportDTO> dtoList) {
// 校验数据
checkExcel(dtoList);
//根据题目名称分组
Map<Integer, List<QuExportDTO>> anMap = new HashMap<>(16);
//题目本体信息
Map<Integer, QuExportDTO> quMap = new HashMap<>(16);
//数据分组
for (QuExportDTO item : dtoList) {
// 空白的ID
if (StringUtils.isEmpty(item.getNo())) {
continue;
}
Integer key;
//序号
try {
key = Integer.parseInt(item.getNo());
} catch (Exception e) {
continue;
}
//如果已经有题目了,直接处理选项
if (anMap.containsKey(key)) {
anMap.get(key).add(item);
} else {
//如果没有,将题目内容和选项一起
List<QuExportDTO> subList = new ArrayList<>();
subList.add(item);
anMap.put(key, subList);
quMap.put(key, item);
}
}
int count = 0;
try {
//循环题目插入
for (Integer key : quMap.keySet()) {
QuExportDTO im = quMap.get(key);
//题目基本信息
QuDetailDTO qu = new QuDetailDTO();
qu.setContent(im.getQContent());
qu.setAnalysis(im.getQAnalysis());
qu.setQuType(Integer.parseInt(im.getQuType()));
qu.setCreateTime(new Date());
//设置回答列表
List<QuAnswerDTO> answerList = this.processAnswerList(anMap.get(key));
//设置题目
qu.setAnswerList(answerList);
//设置引用题库
qu.setRepoIds(im.getRepoList());
// 保存答案
this.saveOrUpdate(qu);
count++;
}
} catch (ServiceException e) {
throw new ServiceException("导入出现问题,行:" + count + "" + e.getMessage());
}
return count;
}
/**
*
*
* @param importList
* @return
*/
private List<QuAnswerDTO> processAnswerList(List<QuExportDTO> importList) {
List<QuAnswerDTO> list = new ArrayList<>(16);
for (QuExportDTO item : importList) {
QuAnswerDTO a = new QuAnswerDTO();
a.setIsRight("1".equals(item.getAIsRight()));
a.setContent(item.getAContent());
a.setAnalysis(item.getAAnalysis());
a.setId("");
list.add(a);
}
return list;
}
/**
* Excel
*
* @param list
* @throws Exception
*/
private void checkExcel(List<QuExportDTO> list) throws ServiceException {
// 约定第三行开始导入
int line = 3;
StringBuffer sb = new StringBuffer();
if (CollectionUtils.isEmpty(list)) {
throw new ServiceException( "您导入的数据似乎是一个空表格!");
}
Integer quNo = null;
for (QuExportDTO item : list) {
if (org.apache.commons.lang3.StringUtils.isBlank(item.getNo())) {
line++;
continue;
}
Integer no;
try {
no = Integer.parseInt(item.getNo());
} catch (Exception e) {
line++;
continue;
}
if (no == null) {
sb.append("第" + line + "行,题目序号不能为空!<br>");
}
if (quNo == null || !quNo.equals(no)) {
if (item.getQuType() == null) {
sb.append("第" + line + "行,题目类型不能为空<br>");
}
if (StringUtils.isBlank(item.getQContent())) {
sb.append("第" + line + "行,题目内容不能为空<br>");
}
if (CollectionUtils.isEmpty(item.getRepoList())) {
sb.append("第" + line + "行,题目必须包含一个题库<br>");
}
}
if (org.apache.commons.lang3.StringUtils.isBlank(item.getAIsRight())) {
sb.append("第" + line + "行,选项是否正确不能为空<br>");
}
if (org.apache.commons.lang3.StringUtils.isBlank(item.getAContent()) && org.apache.commons.lang3.StringUtils.isBlank(item.getAImage())) {
sb.append("第" + line + "行,选项内容和选项图片必须有一个不为空<br>");
}
quNo = no;
line++;
}
// 存在错误
if (!"".equals(sb.toString())) {
throw new ServiceException(sb.toString());
}
}
}

@ -0,0 +1,73 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.repo.ElRepo;
import com.ruoyi.system.domain.repo.vo.RepoVO;
import com.ruoyi.system.service.ElRepoService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className ElRepoManager
* @date 2024/6/27
* @description
*/
@Component
public class RepoManager {
@Resource
private ElRepoService elRepoService;
/**
*
*
* @param repo
* @return java.util.List<com.hyp.system.domain.SysNotice>
*/
public List<RepoVO> selectRepoList(ElRepo repo) {
return elRepoService.selectRepoList(repo);
}
/**
*
*
* @param repo
* @return boolean
*/
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(ElRepo repo) {
if (StringUtils.isNotEmpty(repo.getId())) {
repo.setUpdateTime(new Date());
} else {
repo.setCreateTime(new Date());
}
return elRepoService.saveOrUpdate(repo);
}
public ElRepo getById(String id) {
return elRepoService.getById(id);
}
public List<ElRepo> getList() {
return elRepoService.lambdaQuery().list();
}
public boolean deleteRepoByIds(String ids) {
return elRepoService.removeByIds(Arrays.asList(Convert.toStrArray(ids)));
}
}

@ -0,0 +1,60 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.secreting.TdSecreting;
import com.ruoyi.system.service.secreting.TdSecretingService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author luo
* @version JDK 8
* @className SecretManager
* @description
*/
@Component
public class SecretManager {
@Resource
private TdSecretingService secretingService;
public List<TdSecreting> selectSecretList(TdSecreting tdSecreting) {
return secretingService.selectSecretList(tdSecreting);
}
public boolean saveOrUpdate(TdSecreting tdSecreting) {
if (CharSequenceUtil.isNotBlank(tdSecreting.getId())) {
tdSecreting.setUpdateBy(ShiroUtils.getSysUser().getLoginName());
tdSecreting.setUpdateTime(new Date());
} else {
tdSecreting.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdSecreting.setCreateTime(new Date());
}
tdSecreting.setDeptId(ShiroUtils.getSysUser().getDeptId());
return secretingService.saveOrUpdate(tdSecreting);
}
public TdSecreting selectSecreting(String id) {
return secretingService.getById(id);
}
public boolean deleteSecretingByIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return secretingService.removeByIds(list);
}
}

@ -0,0 +1,57 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.tdcase.TdCase;
import com.ruoyi.system.service.tdcase.TdCaseService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className TdCaseManager
* @date 2024/8/13
* @description
*/
@Component
public class TdCaseManager {
@Resource
private TdCaseService caseService;
public List<TdCase> selecttdCaseList(TdCase tdCase) {
return caseService.selectTdCaseList(tdCase);
}
public boolean saveOrUpdate(TdCase tdCase) {
if (CharSequenceUtil.isNotBlank(tdCase.getId())) {
tdCase.setUpdateBy(ShiroUtils.getSysUser().getLoginName());
tdCase.setUpdateTime(new Date());
} else {
tdCase.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdCase.setCreateTime(new Date());
}
return caseService.saveOrUpdate(tdCase);
}
public TdCase selecttdCase(String id) {
return caseService.getById(id);
}
public boolean deletedCaseByids(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return caseService.removeByIds(list);
}
public List<TdCase> selectList() {
return caseService.lambdaQuery().list();
}
}

@ -0,0 +1,61 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.TdMeeting;
import com.ruoyi.system.service.TdMeetingService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className TdMeetingManager
* @date 2024/8/6
* @description
*/
@Component
public class TdMeetingManager {
@Resource
private TdMeetingService meetingService;
public List<TdMeeting> selectTdMeetingList(TdMeeting tdMeeting) {
return meetingService.selectTdMeetingList(tdMeeting);
}
public boolean saveOrUpdate(TdMeeting tdMeeting) {
if (CharSequenceUtil.isNotBlank(tdMeeting.getId())) {
tdMeeting.setUpdateBy(ShiroUtils.getSysUser().getLoginName());
tdMeeting.setUpdateTime(new Date());
} else {
tdMeeting.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdMeeting.setCreateTime(new Date());
}
tdMeeting.setDeptId(ShiroUtils.getSysUser().getDeptId());
return meetingService.saveOrUpdate(tdMeeting);
}
public TdMeeting selectTdMeeting(String id) {
return meetingService.getById(id);
}
public boolean deleteTdMeetingByIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return meetingService.removeByIds(list);
}
}

@ -0,0 +1,83 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.place.TdPlace;
import com.ruoyi.system.service.place.TdPlaceService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className TdPlaceManager
* @date 2024/8/13
* @description
*/
@Component
public class TdPlaceManager {
@Resource
private TdPlaceService placeService;
public List<TdPlace> selectTdPlaceList(TdPlace tdPlace) {
return placeService.selectTdPlaceList(tdPlace);
}
public List<TdPlace> selectTdPlaceChangeList(TdPlace tdPlace) {
return placeService.selectTdPlaceChangeList(tdPlace);
}
public boolean saveOrUpdate(TdPlace tdPlace) {
if (CharSequenceUtil.isNotBlank(tdPlace.getId())) {
tdPlace.setUpdateBy(ShiroUtils.getSysUser().getLoginName());
tdPlace.setUpdateTime(new Date());
} else {
tdPlace.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdPlace.setCreateTime(new Date());
}
tdPlace.setState("1");
tdPlace.setIsDissolve("0");
tdPlace.setAfterName(tdPlace.getPlaceName());
tdPlace.setAfterRule(tdPlace.getPlaceRule());
tdPlace.setDeptId(ShiroUtils.getSysUser().getDeptId());
return placeService.saveOrUpdate(tdPlace);
}
public boolean updateChange(TdPlace tdPlace) {
tdPlace.setAfterTime(new Date());
tdPlace.setState("2");
tdPlace.setDeptId(ShiroUtils.getSysUser().getDeptId());
return placeService.saveOrUpdate(tdPlace);
}
public TdPlace selectTdPlace(String id) {
return placeService.getById(id);
}
public boolean deletedPlaceByids(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return placeService.lambdaUpdate()
.in(TdPlace::getId,list)
.set(TdPlace::getState,"0").update();
}
public List<TdPlace> selectList() {
return placeService.lambdaQuery().list();
}
public TdPlace selectById(Long id) {
return placeService.getById(id);
}
}

@ -0,0 +1,58 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.place.TdPlaceRegist;
import com.ruoyi.system.service.place.TdPlaceRegistService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className TdPlaceRegistManager
* @date 2024/8/13
* @description
*/
@Component
public class TdPlaceRegistManager {
@Resource
private TdPlaceRegistService placeRegistService;
public List<TdPlaceRegist> selectTdPlaceRegistList(TdPlaceRegist tdPlaceRegist) {
return placeRegistService.selectTdPlaceRegistList(tdPlaceRegist);
}
public boolean saveOrUpdate(TdPlaceRegist tdPlaceRegist) {
if (CharSequenceUtil.isNotBlank(tdPlaceRegist.getId())) {
tdPlaceRegist.setUpdateBy(ShiroUtils.getSysUser().getLoginName());
tdPlaceRegist.setUpdateTime(new Date());
} else {
tdPlaceRegist.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdPlaceRegist.setCreateTime(new Date());
}
return placeRegistService.saveOrUpdate(tdPlaceRegist);
}
public TdPlaceRegist selectTdPlaceRegist(String id) {
return placeRegistService.getById(id);
}
public boolean deleteTdPlaceRegistByids(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return placeRegistService.removeByIds(list);
}
}

@ -0,0 +1,52 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.system.domain.TdPropertyEment;
import com.ruoyi.system.service.TdPropertyEmentService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className TdPropertyEmentManager
* @date 2024/8/20
* @description
*/
@Component
public class TdPropertyEmentManager {
@Resource
private TdPropertyEmentService tdPropertyEmentService;
public List<TdPropertyEment> selectEmentList(TdPropertyEment tdPropertyEment) {
return tdPropertyEmentService.selectEmentList(tdPropertyEment);
}
public boolean saveOrUpdate(TdPropertyEment tdPropertyEment) {
if (CharSequenceUtil.isBlank(tdPropertyEment.getId())) {
tdPropertyEment.setCreateTime(new Date());
}
return tdPropertyEmentService.saveOrUpdate(tdPropertyEment);
}
public TdPropertyEment selecttdEment(String id) {
return tdPropertyEmentService.getById(id);
}
public boolean deletedEmentByids(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return tdPropertyEmentService.removeByIds(list);
}
public List<TdPropertyEment> selectList() {
return tdPropertyEmentService.lambdaQuery().list();
}
}

@ -0,0 +1,138 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.qu.ElQu;
import com.ruoyi.system.domain.userbook.ElUserBook;
import com.ruoyi.system.domain.userbook.dto.UserBookDTO;
import com.ruoyi.system.service.ElQuService;
import com.ruoyi.system.service.ElUserBookService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className UserBookManager
* @date 2024/7/1
* @description
*/
@Component
public class UserBookManager {
@Resource
private ElUserBookService userBookService;
@Resource
private ElQuService quService;
public void addBook(String examId, String quId) {
ElUserBook book = userBookService.lambdaQuery()
.eq(ElUserBook::getUserId, ShiroUtils.getUserId())
.eq(ElUserBook::getExamId, examId)
.eq(ElUserBook::getQuId, quId).one();
// 问题
ElQu qu = quService.getById(quId);
if (Objects.isNull(book)) {
book = new ElUserBook();
book.setExamId(examId);
book.setUserId(ShiroUtils.getUserId());
book.setTitle(qu.getContent());
book.setQuId(quId);
book.setWrongCount(1);
Integer maxSort = this.findMaxSort(examId, ShiroUtils.getUserId());
book.setSort(maxSort+1);
book.setCreateTime(new Date());
userBookService.save(book);
} else {
book.setWrongCount(book.getWrongCount()+1);
book.setUpdateTime(new Date());
userBookService.updateById(book);
}
}
/**
*
* @param userId
* @return
*/
private Integer findMaxSort(String examId, Long userId){
QueryWrapper<ElUserBook> wrapper = new QueryWrapper<>();
wrapper.lambda()
.eq(ElUserBook::getExamId, examId)
.eq(ElUserBook::getUserId, userId);
wrapper.last(" ORDER BY sort DESC");
ElUserBook book = userBookService.getOne(wrapper, false);
if(Objects.isNull(book)){
return 0;
}
return book.getSort();
}
public List<ElUserBook> paging(UserBookDTO reqDTO) {
//查询条件
QueryWrapper<ElUserBook> wrapper = new QueryWrapper<>();
// 查找用户的错题
wrapper.lambda().eq(ElUserBook::getUserId, ShiroUtils.getUserId());
if(Objects.nonNull(reqDTO.getTitle())){
wrapper.lambda().like(ElUserBook::getTitle, reqDTO.getTitle());
}
if(Objects.nonNull(reqDTO.getExamId())){
wrapper.lambda().eq(ElUserBook::getExamId, reqDTO.getExamId());
}
return userBookService.list(wrapper);
}
public boolean deleteRepoByIds(String ids) {
return userBookService.removeByIds(Arrays.asList(Convert.toStrArray(ids)));
}
public String findNext(String examId, String quId) {
Integer sort = 999999;
if(StringUtils.isNotBlank(quId)){
QueryWrapper<ElUserBook> wrapper = new QueryWrapper<>();
wrapper.lambda()
.eq(ElUserBook::getUserId, ShiroUtils.getUserId())
.eq(ElUserBook::getExamId, examId)
.eq(ElUserBook::getQuId, quId);
wrapper.last(" ORDER BY sort DESC");
ElUserBook last = userBookService.getOne(wrapper, false);
if(last!=null){
sort = last.getSort();
}
}
QueryWrapper<ElUserBook> wrapper = new QueryWrapper<>();
wrapper.lambda()
.eq(ElUserBook::getUserId, ShiroUtils.getUserId())
.eq(ElUserBook::getExamId, examId)
.lt(ElUserBook::getSort, sort);
wrapper.last(" ORDER BY sort DESC");
ElUserBook next = userBookService.getOne(wrapper, false);
if(next != null){
return next.getQuId();
}
return null;
}
}

@ -0,0 +1,124 @@
package com.ruoyi.web.controller.manager;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.paper.dto.request.PaperListReqDTO;
import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO;
import com.ruoyi.system.domain.userexam.ElUserExam;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
import com.ruoyi.system.domain.userexam.dto.response.ExamCountDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamCountDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamRespDTO;
import com.ruoyi.system.service.ElPaperService;
import com.ruoyi.system.service.ElUserExamService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import static com.ruoyi.common.utils.ShiroUtils.getUserId;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className UserExamManager
* @date 2024/7/1
* @description
*/
@Component
public class UserExamManager {
@Resource
private ElUserExamService elUserExamService;
@Resource
private ElPaperService paperService;
/**
*
*
* @param reqDTO
* @return java.util.List<com.hyp.system.domain.SysNotice>
*/
public List<UserExamRespDTO> selectExamList(UserExamReqDTO reqDTO) {
if (!SysUser.isAdmin(ShiroUtils.getUserId())){
reqDTO.setUserId(getUserId());
}
return elUserExamService.selectExamList(reqDTO);
}
/**
*
*
* @param userId
* @param examId
* @param score
* @param passed
* @return void
*/
public void joinResult(Long userId, String examId, Integer score, boolean passed) {
//查询条件
ElUserExam record = elUserExamService.lambdaQuery()
.eq(ElUserExam::getUserId, userId)
.eq(ElUserExam::getExamId, examId).one();
if(Objects.isNull(record)){
record = new ElUserExam();
record.setCreateTime(new Date());
record.setUpdateTime(new Date());
record.setUserId(userId);
record.setExamId(examId);
record.setMaxScore(score);
record.setPassed(passed);
record.setTryCount(1);
elUserExamService.save(record);
return;
}
// 修复低分数不加入统计问题
if(Objects.nonNull(record.getTryCount())){
record.setTryCount(record.getTryCount()+1);
}
record.setUpdateTime(new Date());
if(record.getMaxScore() < score){
record.setMaxScore(score);
record.setPassed(passed);
}
elUserExamService.updateById(record);
}
public List<PaperListRespDTO> detail(String examId,Long userId) {
PaperListReqDTO paperListReqDTO = new PaperListReqDTO();
paperListReqDTO.setUserId(userId);
paperListReqDTO.setExamId(examId);
return paperService.paging(paperListReqDTO);
}
public UserExamCountDTO selectCountList() {
return elUserExamService.selectCountList();
}
public List<ExamCountDTO> selectCountExam(){
return elUserExamService.selectCountExam();
}
public Integer countExamMonth(Date minDayTime, Date maxDayTime,Boolean passed){
return new LambdaQueryChainWrapper<>(elUserExamService.getBaseMapper())
.ge(ElUserExam::getUpdateTime, minDayTime)
.le(ElUserExam::getUpdateTime, maxDayTime)
.eq(ElUserExam::getPassed, passed)
.count();
}
}

@ -0,0 +1,82 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.record.SysUserAfter;
import com.ruoyi.system.domain.record.SysUserBefore;
import com.ruoyi.system.domain.record.dto.UserRecordDTO;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.record.SysUserAfterService;
import com.ruoyi.system.service.record.SysUserBeforeService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
* packageName com.ruoyi.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className UserRecordManager
* @date 2024/8/21
* @description
*/
@Component
public class UserRecordManager {
@Resource
private SysUserBeforeService userBeforeService;
@Resource
private SysUserAfterService userAfterService;
@Resource
private ISysUserService userService;
/**
*
*
* @param user
* @return boolean
*/
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(SysUser user) {
if(Objects.isNull(user)){
throw new ServiceException("人员信息不能为空");
}
SysUser sysUser = userService.selectUserById(user.getUserId());
SysUserBefore userBefore = Convert.convert(SysUserBefore.class, sysUser);
userBefore.setCreateTime(new Date());
userBefore.setCreateBy(ShiroUtils.getSysUser().getLoginName());
userBeforeService.save(userBefore);
SysUserAfter userAfter = Convert.convert(SysUserAfter.class, user);
userAfter.setCreateTime(new Date());
userAfter.setCreateBy(ShiroUtils.getSysUser().getLoginName());
return userAfterService.save(userAfter);
}
public UserRecordDTO getUserRecordDTO( Long userId) {
UserRecordDTO userRecordDTO = new UserRecordDTO();
List<SysUserAfter> userAfters = userAfterService.lambdaQuery()
.eq(SysUserAfter::getUserId, userId)
.orderByDesc(SysUserAfter::getCreateTime).list();
userRecordDTO.setUserAfterList(userAfters);
List<SysUserBefore> userBefores = userBeforeService.lambdaQuery().eq(SysUserBefore::getUserId, userId)
.orderByDesc(SysUserBefore::getCreateTime).list();
userRecordDTO.setUserBeforeList(userBefores);
return userRecordDTO;
}
}

@ -0,0 +1,95 @@
package com.ruoyi.web.controller.monitor;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.io.File;
/**
*
*
* @author wangxy
* @version JDK 8
* @className BackupController
* @date 2024/9/13
* @description
*/
@Controller
@RequestMapping("/monitor/backup")
public class BackupController extends BaseController {
private String prefix = "/monitor/backup";
@RequiresPermissions("monitor:backup:view")
@GetMapping()
public String backData() {
return prefix + "/backup";
}
/**
*
*
* @param username
* @param password
* @param hostname Ip
* @param port
* @param databaseName
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("backups")
@ResponseBody
public AjaxResult backups(@RequestParam String username,
@RequestParam String password,
@RequestParam String hostname,
@RequestParam String port,
@RequestParam String databaseName) {
String sqlFileName = RuoYiConfig.getDataBaseBackUp() + ".sql";
File file = new File(File.separator + sqlFileName);
//目录生成
if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs();
}
try {
ProcessBuilder processBuilder = new ProcessBuilder("pg_dump", "-Fp", "-f", sqlFileName,
"\"host=" + hostname, "port=" + port, "user=" + username, "password=" + password, "dbname=" + databaseName + "\"");
Process process = processBuilder.start();
if (process.waitFor() == 0) {
return AjaxResult.success("备份成功!");
} else {
return AjaxResult.error("备份失败!");
}
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("备份失败!");
}
}
@PostMapping("reduction")
@ResponseBody
public AjaxResult reduction(@RequestParam String username,
@RequestParam String password,
@RequestParam String hostname,
@RequestParam String port,
@RequestParam String databaseName) {
String sqlFileName = RuoYiConfig.getDataBaseBackUp() + ".sql";
try {
//金仓数据库还原指令ksql -f d:\bbb.sql "host=127.0.0.1 port=54321 user=root password=123456 dbname=test"
ProcessBuilder processBuilder = new ProcessBuilder("ksql", "-f", sqlFileName,
"\"host=" + hostname, "port=" + port, "user=" + username, "password=" + password, "dbname=" + databaseName + "\"");
Process process = processBuilder.start();
if (process.waitFor() == 0) {
return AjaxResult.success("还原成功!");
} else {
return AjaxResult.error("还原失败!");
}
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error("还原成功!");
}
}
}

@ -2,25 +2,24 @@ package com.ruoyi.web.controller.monitor;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
/** /**
* druid * druid
* *
* @author ruoyi * @author ruoyi
*/ */
@Controller @Controller
@RequestMapping("/monitor/data") @RequestMapping("/monitor/data")
public class DruidController extends BaseController public class DruidController extends BaseController {
{
private String prefix = "/druid"; private String prefix = "/druid";
@RequiresPermissions("monitor:data:view") @RequiresPermissions("monitor:data:view")
@GetMapping() @GetMapping()
public String index() public String index() {
{
return redirect(prefix + "/index.html"); return redirect(prefix + "/index.html");
} }
} }

@ -83,7 +83,7 @@ public class SysLogininforController extends BaseController
} }
@RequiresPermissions("monitor:logininfor:unlock") @RequiresPermissions("monitor:logininfor:unlock")
@Log(title = "账户解锁", businessType = BusinessType.OTHER) @Log(title = "账户解锁", businessType = BusinessType.UNLOCKING)
@PostMapping("/unlock") @PostMapping("/unlock")
@ResponseBody @ResponseBody
public AjaxResult unlock(String loginName) public AjaxResult unlock(String loginName)

@ -0,0 +1,91 @@
package com.ruoyi.web.controller.place;
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.BusinessType;
import com.ruoyi.system.domain.place.TdPlace;
import com.ruoyi.web.controller.manager.TdPlaceManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.place
*
* @author wangxy
* @version JDK 8
* @className TdPlaceController
* @date 2024/8/13
* @description
*/
@Controller
@RequestMapping("/system/placeChange")
public class TdPlaceChangeController extends BaseController {
private String prefix = "system/placeChange";
@Resource
private TdPlaceManager placeManager;
@RequiresPermissions("system:placeChange:view")
@GetMapping()
public String place() {
return prefix + "/placeChange";
}
/**
*
*/
@RequiresPermissions("system:placeChange:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPlace tdPlace) {
startPage();
List<TdPlace> tdPlaces = placeManager.selectTdPlaceChangeList(tdPlace);
return getDataTable(tdPlaces);
}
/**
*
*/
@RequiresPermissions("system:placeChange:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdPlace tdPlace = placeManager.selectTdPlace(id);
mmap.put("tdPlace", tdPlace);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:placeChange:edit")
@Log(title = "涉密场所变更", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdPlace tdPlace) {
return toAjax(placeManager.updateChange(tdPlace));
}
/**
*
*/
@RequiresPermissions("system:placeChange:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdPlace tdPlace = placeManager.selectTdPlace(id);
mmap.put("tdPlace", tdPlace);
return prefix + "/detail";
}
}

@ -0,0 +1,142 @@
package com.ruoyi.web.controller.place;
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.BusinessType;
import com.ruoyi.system.domain.place.TdPlace;
import com.ruoyi.web.controller.manager.TdPlaceManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.place
*
* @author wangxy
* @version JDK 8
* @className TdPlaceController
* @date 2024/8/13
* @description
*/
@Controller
@RequestMapping("/system/place")
public class TdPlaceController extends BaseController {
private String prefix = "system/place";
@Resource
private TdPlaceManager placeManager;
@RequiresPermissions("system:place:view")
@GetMapping()
public String place() {
return prefix + "/place";
}
/**
*
*/
@RequiresPermissions("system:place:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPlace tdPlace) {
startPage();
List<TdPlace> tdPlaces = placeManager.selectTdPlaceList(tdPlace);
return getDataTable(tdPlaces);
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:place:add")
@Log(title = "涉密场所", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdPlace tdPlace) {
return toAjax(placeManager.saveOrUpdate(tdPlace));
}
/**
*
*/
@RequiresPermissions("system:place:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdPlace tdPlace = placeManager.selectTdPlace(id);
mmap.put("tdPlace", tdPlace);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:place:edit")
@Log(title = "涉密场所", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdPlace tdPlace) {
return toAjax(placeManager.saveOrUpdate(tdPlace));
}
/**
*
*/
@RequiresPermissions("system:place:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdPlace tdPlace = placeManager.selectTdPlace(id);
mmap.put("tdPlace", tdPlace);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:place:remove")
@Log(title = "涉密场所", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(placeManager.deletedPlaceByids(ids));
}
/**
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/getList")
@ResponseBody
public AjaxResult getList(@RequestParam(value = "placeId", required = false) Long placeId) {
if (placeId == null) {
return AjaxResult.success(placeManager.selectList());
} else {
TdPlace place = placeManager.selectById(placeId);
if (place != null) {
return AjaxResult.success(place);
} else {
return AjaxResult.error("数据不存在");
}
}
}
}

@ -0,0 +1,123 @@
package com.ruoyi.web.controller.place;
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.BusinessType;
import com.ruoyi.system.domain.place.TdPlaceRegist;
import com.ruoyi.web.controller.manager.TdPlaceRegistManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.place
*
* @author wangxy
* @version JDK 8
* @className TdPlaceRegistController
* @date 2024/8/13
* @description
*/
@Controller
@RequestMapping("/system/placeRegist")
public class TdPlaceRegistController extends BaseController {
private String prefix = "system/placeRegist";
@Resource
private TdPlaceRegistManager placeRegistManager;
@RequiresPermissions("system:placeRegist:view")
@GetMapping()
public String placeRegist() {
return prefix + "/placeRegist";
}
/**
*
*/
@RequiresPermissions("system:placeRegist:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPlaceRegist tdPlaceRegist) {
startPage();
List<TdPlaceRegist> tdPlaceRegists = placeRegistManager.selectTdPlaceRegistList(tdPlaceRegist);
return getDataTable(tdPlaceRegists);
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:placeRegist:add")
@Log(title = "场所出入登记", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdPlaceRegist tdPlaceRegist) {
return toAjax(placeRegistManager.saveOrUpdate(tdPlaceRegist));
}
/**
*
*/
@RequiresPermissions("system:placeRegist:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdPlaceRegist tdPlaceRegist = placeRegistManager.selectTdPlaceRegist(id);
mmap.put("tdPlaceRegist", tdPlaceRegist);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:placeRegist:edit")
@Log(title = "场所出入登记", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdPlaceRegist tdPlaceRegist) {
return toAjax(placeRegistManager.saveOrUpdate(tdPlaceRegist));
}
/**
*
*/
@RequiresPermissions("system:placeRegist:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdPlaceRegist tdPlaceRegist = placeRegistManager.selectTdPlaceRegist(id);
mmap.put("tdPlaceRegist", tdPlaceRegist);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:placeRegist:remove")
@Log(title = "场所出入登记", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(placeRegistManager.deleteTdPlaceRegistByids(ids));
}
}

@ -0,0 +1,110 @@
package com.ruoyi.web.controller.secret;
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.BusinessType;
import com.ruoyi.system.domain.secreting.TdSecreting;
import com.ruoyi.web.controller.manager.SecretManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @author Administrator
*/
@Controller
@RequestMapping("/system/secreting")
public class TdSecretingController extends BaseController {
private String prefix = "system/secreting";
@Resource
private SecretManager secretManager;
@RequiresPermissions("system:secreting:view")
@GetMapping()
public String secreting() {
return prefix + "/secreting";
}
/**
*
*/
@RequiresPermissions("system:secreting:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdSecreting tdSecreting) {
startPage();
List<TdSecreting> tdSecretings = secretManager.selectSecretList(tdSecreting);
return getDataTable(tdSecretings);
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:secreting:add")
@Log(title = "定密事项管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdSecreting tdSecreting) {
return toAjax(secretManager.saveOrUpdate(tdSecreting));
}
/**
*
*/
@RequiresPermissions("system:secreting:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdSecreting tdSecreting = secretManager.selectSecreting(id);
mmap.put("tdSecreting", tdSecreting);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:secreting:edit")
@Log(title = "定密事项管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdSecreting tdSecreting) {
return toAjax(secretManager.saveOrUpdate(tdSecreting));
}
/**
*
*/
@RequiresPermissions("system:secreting:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdSecreting tdSecreting = secretManager.selectSecreting(id);
mmap.put("tdSecreting", tdSecreting);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:secreting:remove")
@Log(title = "定密事项管理", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(secretManager.deleteSecretingByIds(ids));
}
}

@ -0,0 +1,242 @@
package com.ruoyi.web.controller.system.check;
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.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.poi.MultiSheetExcelUtil;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.check.dto.CheckReportDTO;
import com.ruoyi.system.domain.check.dto.TdCheckReportDTO;
import com.ruoyi.system.domain.check.dto.TdCheckTypeDTO;
import com.ruoyi.web.controller.manager.CheckReportManager;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.system.check
*
* @author wangxy
* @version JDK 8
* @className CheckReportController
* @date 2024/8/15
* @description
*/
@Controller
@RequestMapping("/system/checkReport")
public class CheckReportController extends BaseController {
private String prefix = "system/checkReport";
@Resource
private CheckReportManager checkReportManager;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:check:view")
@GetMapping()
public String checkReport() {
return prefix + "/checkReport";
}
/**
*
*/
@RequiresPermissions("system:check:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(CheckReportDTO tdCheckReport) {
startPage();
List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckReportList(tdCheckReport);
return getDataTable(tdCheckReports);
}
/**
*
*/
@RequiresPermissions("system:check:export")
@Log(title = "检查报告", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(CheckReportDTO tdCheckReport) {
List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckReportList(tdCheckReport);
tdCheckReports.forEach(tdCheck1 -> {
tdCheck1.setFramework(sysAreaManager.getAreaName(tdCheck1.getFramework()));
tdCheck1.setArea(sysAreaManager.getAreaName(tdCheck1.getArea()));
});
ExcelUtil<TdCheckReport> util = new ExcelUtil<>(TdCheckReport.class);
return util.exportExcel(tdCheckReports, "检查报告管理数据");
}
@RequiresPermissions("system:check:exportDetail")
@Log(title = "检查报告", businessType = BusinessType.EXPORT)
@GetMapping("/exportDetail")
public void exportDetail(@RequestParam String checkId, HttpServletResponse response) throws IOException {
// 1. 查询主表数据
TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
tdCheckReportDTO.setFramework(sysAreaManager.getAreaName(tdCheckReportDTO.getFramework()));
tdCheckReportDTO.setArea(sysAreaManager.getAreaName(tdCheckReportDTO.getArea()));
List<TdCheckReportDTO> mainList = new ArrayList<>();
mainList.add(tdCheckReportDTO);
// 2. 初始化导出工具
MultiSheetExcelUtil excelUtil = new MultiSheetExcelUtil();
String fileName = URLEncoder.encode(tdCheckReportDTO.getCheckId() + ".xlsx", "UTF-8");
excelUtil.initExport(response, fileName);
// 3. 导出主表数据
excelUtil.createSheet(mainList, "检查信息", TdCheckReportDTO.class);
excelUtil.createSheet(tdCheckReportDTO.getCheckTypeDTOS(), "自查类信息", TdCheckTypeDTO.class);
// 5. 完成导出
excelUtil.finishExport();
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap) {
mmap.put("user", getSysUser());
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:check:add")
@Log(title = "检查报告", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(@RequestBody TdCheckReportDTO checkReportDTO) {
return toAjax(checkReportManager.saveOrUpdate(checkReportDTO));
}
/**
*
*/
@RequiresPermissions("system:check:edit")
@GetMapping("/edit/{checkId}")
public String edit(@PathVariable("checkId") String checkId, ModelMap mmap) {
TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
mmap.put("tdCheckReportDTO", tdCheckReportDTO);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:check:edit")
@Log(title = "检查报告", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(@RequestBody TdCheckReportDTO checkReportDTO) {
return toAjax(checkReportManager.saveOrUpdate(checkReportDTO));
}
/**
*
*/
@RequiresPermissions("system:check:detail")
@GetMapping("/detail/{checkId}")
public String detail(@PathVariable("checkId") String checkId, ModelMap mmap) {
TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
mmap.put("tdCheckReportDTO", tdCheckReportDTO);
return prefix + "/detail";
}
/**
*
*/
@GetMapping("/view/{checkId}")
@ResponseBody
public AjaxResult view(@PathVariable("checkId") String checkId) {
return AjaxResult.success(checkReportManager.getTdCheckReportDTO(checkId));
}
/**
* :sys_check_type_report
*/
@GetMapping("/checkViewParent/{type}")
@ResponseBody
public AjaxResult checkViewParent(@PathVariable("type") String type) {
return AjaxResult.success(checkReportManager.getCheckTypeDtoParent(type));
}
/**
*
* @param checkType
* @param typeName
* @return
*/
@GetMapping("/checkView/{checkType}/{typeName}")
@ResponseBody
public AjaxResult checkView(@PathVariable("checkType") String checkType,
@PathVariable("typeName") String typeName) {
return AjaxResult.success(checkReportManager.getCheckTypeDTO(checkType,typeName));
}
/**
*
*/
@RequiresPermissions("system:check:remove")
@Log(title = "检查报告", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(checkReportManager.deletedTdCheckReportIds(ids));
}
/**
*
*/
@RequiresPermissions("system:check:selfCheck")
@GetMapping("/selfCheck/{checkId}")
public String selfCheck(@PathVariable("checkId") String checkId, ModelMap mmap) {
TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
mmap.put("tdCheckReportDTO", tdCheckReportDTO);
return prefix + "/selfcheck";
}
/**
*
*/
@RequiresPermissions("system:check:selfCheck")
@Log(title = "检查报告管理", businessType = BusinessType.CHECK)
@PostMapping("/selfCheckSave")
@ResponseBody
public AjaxResult selfCheckSave(@RequestBody TdCheckReportDTO checkReportDTO) {
return toAjax(checkReportManager.saveOrUpdate(checkReportDTO));
}
/**
*
*/
@RequiresPermissions("system:check:print")
@GetMapping("/checkprint/{checkId}")
public String checkPrint(@PathVariable("checkId") String checkId, ModelMap mmap) {
TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
mmap.put("tdCheckReportDTO", tdCheckReportDTO);
return prefix + "/checkprint";
}
}

@ -1,177 +0,0 @@
package com.ruoyi.web.controller.system.check;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdCheck;
import com.ruoyi.system.service.ITdCheckService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-06
*/
@Controller
@RequestMapping("/system/check")
public class TdCheckController extends BaseController
{
private String prefix = "system/check";
@Autowired
private ITdCheckService tdCheckService;
@RequiresPermissions("system:check:view")
@GetMapping()
public String check()
{
return prefix + "/check";
}
/**
*
*/
@RequiresPermissions("system:check:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCheck tdCheck)
{
startPage();
List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:check:export")
@Log(title = "检查报告管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdCheck tdCheck)
{
List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck);
ExcelUtil<TdCheck> util = new ExcelUtil<TdCheck>(TdCheck.class);
return util.exportExcel(list, "检查报告管理数据");
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap)
{
mmap.put("user", getSysUser());
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:check:add")
@Log(title = "检查报告管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdCheck tdCheck)
{
return toAjax(tdCheckService.insertTdCheck(tdCheck));
}
/**
*
*/
@RequiresPermissions("system:check:edit")
@GetMapping("/edit/{checkId}")
public String edit(@PathVariable("checkId") Long checkId, ModelMap mmap)
{
TdCheck tdCheck = tdCheckService.selectTdCheckByCheckId(checkId);
mmap.put("tdCheck", tdCheck);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:check:edit")
@Log(title = "检查报告管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCheck tdCheck)
{
return toAjax(tdCheckService.updateTdCheck(tdCheck));
}
/**
*
*/
@RequiresPermissions("system:check:remove")
@Log(title = "检查报告管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tdCheckService.deleteTdCheckByCheckIds(ids));
}
/**
*
*/
@RequiresPermissions("system:check:selfcheck")
@GetMapping("/selfcheck/{checkId}")
public String selfcheck(@PathVariable("checkId") Long checkId, ModelMap mmap)
{
TdCheck tdCheck = tdCheckService.selectTdCheckByCheckId(checkId);
mmap.put("tdCheck", tdCheck);
return prefix + "/selfcheck";
}
/**
*
*/
@RequiresPermissions("system:check:selfcheck")
@Log(title = "检查报告管理", businessType = BusinessType.CHECK)
@PostMapping("/selfcheck")
@ResponseBody
public AjaxResult selfcheckSave(TdCheck tdCheck)
{
return toAjax(tdCheckService.updateTdCheck(tdCheck));
}
/**
*
*/
@RequiresPermissions("system:check:detail")
@GetMapping("/detail/{checkId}")
public String detail(@PathVariable("checkId") Long checkId, ModelMap mmap)
{
TdCheck tdCheck = tdCheckService.selectTdCheckByCheckId(checkId);
mmap.put("tdCheck", tdCheck);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:check:print")
@GetMapping("/checkprint/{checkId}")
public String checkPrint(@PathVariable("checkId") Long checkId, ModelMap mmap)
{
TdCheck tdCheck = tdCheckService.selectTdCheckByCheckId(checkId);
mmap.put("tdCheck", tdCheck);
return prefix + "/checkprint";
}
}

@ -6,27 +6,38 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.TdCheck; import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.service.ITdCheckService; import com.ruoyi.system.domain.check.dto.TdCheckReportDTO;
import com.ruoyi.system.domain.check.dto.TdCheckTypeDTO;
import com.ruoyi.system.service.check.TdCheckTypeService;
import com.ruoyi.web.controller.manager.CheckReportManager;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
@Controller @Controller
@RequestMapping("/system/checkresult") @RequestMapping("/system/checkresult")
public class TdCheckResultController extends BaseController { public class TdCheckResultController extends BaseController {
private String prefix = "system/checkresult"; private String prefix = "system/checkresult";
@Autowired
private ITdCheckService tdCheckService; @Resource
private TdCheckTypeService checkTypeService;
@Resource
private CheckReportManager checkReportManager;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:checkresult:view") @RequiresPermissions("system:checkresult:view")
@GetMapping() @GetMapping()
public String checkresult() public String checkresult() {
{
return prefix + "/checkresult"; return prefix + "/checkresult";
} }
@ -36,11 +47,10 @@ public class TdCheckResultController extends BaseController {
@RequiresPermissions("system:checkresult:list") @RequiresPermissions("system:checkresult:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdCheck tdCheck) public TableDataInfo list(TdCheckReport tdCheckReport) {
{
startPage(); startPage();
List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck); List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckResultList(tdCheckReport);
return getDataTable(list); return getDataTable(tdCheckReports);
} }
/** /**
@ -50,11 +60,14 @@ public class TdCheckResultController extends BaseController {
@Log(title = "检查结果管理", businessType = BusinessType.EXPORT) @Log(title = "检查结果管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdCheck tdCheck) public AjaxResult export(TdCheckReport tdCheckReport) {
{ List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckResultList(tdCheckReport);
List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck); tdCheckReports.forEach(tdCheck1 -> {
ExcelUtil<TdCheck> util = new ExcelUtil<TdCheck>(TdCheck.class); tdCheck1.setFramework(sysAreaManager.getAreaName(tdCheck1.getFramework()));
return util.exportExcel(list, "检查结果管理数据"); tdCheck1.setArea(sysAreaManager.getAreaName(tdCheck1.getArea()));
});
ExcelUtil<TdCheckReport> util = new ExcelUtil<>(TdCheckReport.class);
return util.exportExcel(tdCheckReports, "检查结果管理数据");
} }
/** /**
@ -62,10 +75,9 @@ public class TdCheckResultController extends BaseController {
*/ */
@RequiresPermissions("system:checkresult:edit") @RequiresPermissions("system:checkresult:edit")
@GetMapping("/edit/{checkId}") @GetMapping("/edit/{checkId}")
public String edit(@PathVariable("checkId") Long checkId, ModelMap mmap) public String edit(@PathVariable("checkId") String checkId, ModelMap mmap) {
{ TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
TdCheck tdCheck = tdCheckService.selectTdCheckByCheckId(checkId); mmap.put("tdCheckReportDTO", tdCheckReportDTO);
mmap.put("tdCheck", tdCheck);
return prefix + "/edit"; return prefix + "/edit";
} }
@ -76,9 +88,8 @@ public class TdCheckResultController extends BaseController {
@Log(title = "检查结果管理", businessType = BusinessType.UPDATE) @Log(title = "检查结果管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdCheck tdCheck) public AjaxResult editSave(@RequestBody TdCheckReportDTO checkReportDTO) {
{ return toAjax(checkReportManager.saveOrUpdate(checkReportDTO));
return toAjax(tdCheckService.updateTdCheck(tdCheck));
} }
/** /**
@ -86,11 +97,20 @@ public class TdCheckResultController extends BaseController {
*/ */
@RequiresPermissions("system:checkresult:remove") @RequiresPermissions("system:checkresult:remove")
@Log(title = "检查结果管理", businessType = BusinessType.DELETE) @Log(title = "检查结果管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove") @PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(checkReportManager.deletedTdCheckReportIds(ids));
}
/**
*
*/
@GetMapping("/view/{checkId}")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult view(@PathVariable("checkId") String checkId) {
{ return AjaxResult.success(checkReportManager.getTdCheckReportDTO(checkId));
return toAjax(tdCheckService.deleteTdCheckByCheckIds(ids));
} }
/** /**
@ -98,11 +118,10 @@ public class TdCheckResultController extends BaseController {
*/ */
@RequiresPermissions("system:checkresult:check") @RequiresPermissions("system:checkresult:check")
@GetMapping("/checkresult/{checkId}") @GetMapping("/checkresult/{checkId}")
public String selfcheck(@PathVariable("checkId") Long checkId, ModelMap mmap) public String selfcheck(@PathVariable("checkId") String checkId, ModelMap mmap) {
{ TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
TdCheck tdCheck = tdCheckService.selectTdCheckByCheckId(checkId); mmap.put("tdCheckReportDTO", tdCheckReportDTO);
mmap.put("sysuser",getSysUser()); mmap.put("sysuser", getSysUser());
mmap.put("tdCheck", tdCheck);
return prefix + "/docheck"; return prefix + "/docheck";
} }
@ -113,16 +132,8 @@ public class TdCheckResultController extends BaseController {
@Log(title = "检查结果管理", businessType = BusinessType.CHECK) @Log(title = "检查结果管理", businessType = BusinessType.CHECK)
@PostMapping("/checkresult") @PostMapping("/checkresult")
@ResponseBody @ResponseBody
public AjaxResult selfcheckSave(TdCheck tdCheck) public AjaxResult selfcheckSave(@RequestBody TdCheckReportDTO checkReportDTO) {
{ return toAjax(checkReportManager.saveOrUpdate(checkReportDTO));
if (tdCheck.getCheckresult1().equals("0")&&tdCheck.getCheckresult2().equals("0")
&&tdCheck.getCheckresult3().equals("0")&&tdCheck.getCheckresult4().equals("0")
&&tdCheck.getCheckresult5().equals("0")&&tdCheck.getCheckresult6().equals("0")){
tdCheck.setCheckState("0");
}else {
tdCheck.setCheckState("1");
}
return toAjax(tdCheckService.updateTdCheck(tdCheck));
} }
/** /**
@ -130,10 +141,9 @@ public class TdCheckResultController extends BaseController {
*/ */
@RequiresPermissions("system:checkresult:print") @RequiresPermissions("system:checkresult:print")
@GetMapping("/checkprint/{checkId}") @GetMapping("/checkprint/{checkId}")
public String checkresultPrint(@PathVariable("checkId") Long checkId, ModelMap mmap) public String checkresultPrint(@PathVariable("checkId") String checkId, ModelMap mmap) {
{ TdCheckReportDTO tdCheckReportDTO = checkReportManager.getTdCheckReportDTO(checkId);
TdCheck tdCheckResult = tdCheckService.selectTdCheckByCheckId(checkId); mmap.put("tdCheckReportDTO", tdCheckReportDTO);
mmap.put("tdCheckResult", tdCheckResult);
return prefix + "/checkresultprint"; return prefix + "/checkresultprint";
} }

@ -1,6 +1,8 @@
package com.ruoyi.web.controller.system.check; package com.ruoyi.web.controller.system.check;
import java.util.List; import java.util.List;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -19,6 +21,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
@ -34,6 +38,9 @@ public class TdNotifyController extends BaseController
@Autowired @Autowired
private ITdNotifyService tdNotifyService; private ITdNotifyService tdNotifyService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:notify:view") @RequiresPermissions("system:notify:view")
@GetMapping() @GetMapping()
public String notice() public String notice()
@ -64,6 +71,10 @@ public class TdNotifyController extends BaseController
public AjaxResult export(TdNotify tdNotify) public AjaxResult export(TdNotify tdNotify)
{ {
List<TdNotify> list = tdNotifyService.selectTdNotifyList(tdNotify); List<TdNotify> list = tdNotifyService.selectTdNotifyList(tdNotify);
list.forEach(tdNotify1 -> {
tdNotify1.setFramework(sysAreaManager.getAreaName(tdNotify1.getFramework()));
tdNotify1.setArea(sysAreaManager.getAreaName(tdNotify1.getArea()));
});
ExcelUtil<TdNotify> util = new ExcelUtil<TdNotify>(TdNotify.class); ExcelUtil<TdNotify> util = new ExcelUtil<TdNotify>(TdNotify.class);
return util.exportExcel(list, "检查通知数据"); return util.exportExcel(list, "检查通知数据");
} }

@ -1,22 +1,34 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdFileProvide; import com.ruoyi.system.domain.TdFileProvide;
import com.ruoyi.system.domain.TdFileReceive; import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.domain.TdPropertyNetinfo; import com.ruoyi.system.domain.carrier.TdCarrier;
import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.domain.carrier.TdCarrierIssued;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ITdFileProvideService; import com.ruoyi.system.service.ITdFileProvideService;
import com.ruoyi.system.service.ITdFileReceiveService; import com.ruoyi.system.service.ITdFileReceiveService;
import com.ruoyi.system.service.carrier.TdCarrierIssuedService;
import com.ruoyi.system.service.carrier.TdCarrierService;
import com.ruoyi.web.controller.manager.CarrierIssuedManager;
import com.ruoyi.web.controller.manager.CarrierManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/** /**
* *
@ -26,15 +38,15 @@ import java.util.List;
public class SysFilenumController extends BaseController { public class SysFilenumController extends BaseController {
private String prefix = "system/fileprovide/filenum"; private String prefix = "system/fileprovide/filenum";
@Autowired @Resource
private ITdFileProvideService tdFileProvideService; private CarrierManager carrierManager;
@Autowired
private ITdFileReceiveService tdFileReceiveService; @Resource
private TdCarrierService carrierService;
@RequiresPermissions("system:filenum:view") @RequiresPermissions("system:filenum:view")
@GetMapping() @GetMapping()
public String fileprovide() public String fileprovide() {
{
return prefix + "/filenum"; return prefix + "/filenum";
} }
@ -44,26 +56,116 @@ public class SysFilenumController extends BaseController {
@RequiresPermissions("system:filenum:list") @RequiresPermissions("system:filenum:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdFileProvide tdFileProvide) public TableDataInfo list(TdCarrier tdCarrier) {
{
startPage(); startPage();
List<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide); List<TdCarrier> carriers = carrierManager.selectTdCarrierList(tdCarrier);
return getDataTable(list); return getDataTable(carriers);
} }
/** /**
* *
*/ */
@RequiresPermissions("system:filenum:print") @RequiresPermissions("system:filenum:print")
@GetMapping("/print/{fileId}") @GetMapping("/print/{id}")
@Log(title = "文件统计", businessType = BusinessType.PRINT) @Log(title = "文件统计", businessType = BusinessType.PRINT)
public String print(@PathVariable("fileId") String fileId, ModelMap mmap) public String print(@PathVariable("id") String id, ModelMap mmap) {
{ TdCarrier tdCarrier = carrierManager.selectTdCarrier(id);
List<TdFileReceive> tdFileReceives = tdFileReceiveService.selectTdFileReceiveByFileId(fileId); mmap.put("tdCarrier", tdCarrier);
TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId);
mmap.put("tdFileReceives", tdFileReceives);
mmap.put("tdFileProvide", tdFileProvide);
mmap.put("sysuser", getSysUser()); mmap.put("sysuser", getSysUser());
return prefix + "/print"; return prefix + "/print";
} }
@Autowired
private ISysDictDataService dictDataService;
/**
* -
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/countLevel")
@ResponseBody
public AjaxResult countLevel() {
List<SysDictData> smType = dictDataService.selectDictDataByType("sys_carrier_status");
List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = carrierService.lambdaQuery()
.eq(TdCarrier::getStatus, xAxis.getDictValue())
.count();
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", list.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
@Resource
private TdCarrierIssuedService carrierIssuedService;
@Resource
private CarrierIssuedManager carrierIssuedManager;
/**
* -
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/countSecret")
@ResponseBody
public AjaxResult countSecret() {
List<SysDictData> smType = dictDataService.selectDictDataByType("carrier_issued_status");
List<JSONObject> jsonObjects = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> value = new AtomicReference<>(0L);
Integer count = carrierIssuedService.lambdaQuery()
.eq(TdCarrierIssued::getStatus, xAxis.getDictValue())
.count();
value.set(Long.valueOf(count));
JSONObject jsonObject = new JSONObject();
jsonObject.put("value", value.get());
jsonObject.put("name", xAxis.getDictLabel());
jsonObjects.add(jsonObject);
});
return AjaxResult.success(jsonObjects);
}
/**
*
* @return
*/
@GetMapping("/fileIssued")
public String fileIssued() {
return prefix + "/fileIssued";
}
/**
*
*/
@PostMapping("/listIssued")
@ResponseBody
public TableDataInfo listIssued(TdCarrierIssued tdCarrierIssued) {
startPage();
List<TdCarrierIssued> carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued);
return getDataTable(carriers);
}
/**
*
*/
@GetMapping("/printIssued/{id}")
@Log(title = "文件统计", businessType = BusinessType.PRINT)
public String printIssued(@PathVariable("id") String id, ModelMap mmap) {
TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id);
mmap.put("tdCarrierIssued", tdCarrierIssued);
mmap.put("sysuser", getSysUser());
return prefix + "/printIssued";
}
} }

@ -0,0 +1,138 @@
package com.ruoyi.web.controller.system.count;
import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
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.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.system.domain.TdMeeting;
import com.ruoyi.system.service.TdMeetingService;
import com.ruoyi.web.controller.manager.TdMeetingManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
/**
*
*/
@Controller
@RequestMapping("/system/meetingnum")
public class SysMeetingnumController extends BaseController {
private String prefix = "system/tdmeeting/meetingnum";
@Resource
private TdMeetingService tdMeetingService;
@Resource
private TdMeetingManager tdMeetingManager;
@RequiresPermissions("system:meetingnum:view")
@GetMapping()
public String meetingnum() {
return prefix + "/meetingnum";
}
/**
*
*/
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdMeeting tdMeeting) {
startPage();
List<TdMeeting> tdMeetings = tdMeetingManager.selectTdMeetingList(tdMeeting);
return getDataTable(tdMeetings);
}
/**
* 12
*
* @return
*/
@PostMapping("/countMeetingMonth")
@ResponseBody
public AjaxResult countMeetingMonth() {
List<String> recentlyTwelveMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Long> yAxisData = new ArrayList<>();
List<Long> yAxisDataW = new ArrayList<>();
List<Long> yAxisDataXs= new ArrayList<>();
List<Long> yAxisDataXx = new ArrayList<>();
recentlyTwelveMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingState,1).count();
if (Objects.isNull(count)) {
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
AtomicReference<Long> yAxisW = new AtomicReference<>(0L);
Integer countW = new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingState,0).count();
if (Objects.isNull(countW)) {
countW = 0;
}
yAxisW.set(Long.valueOf(countW));
yAxisDataW.add(yAxisW.get());
AtomicReference<Long> yAxisXs = new AtomicReference<>(0L);
Integer countXs= new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,0).count();
if (Objects.isNull(countXs)) {
countXs = 0;
}
yAxisXs.set(Long.valueOf(countXs));
yAxisDataXs.add(yAxisXs.get());
AtomicReference<Long> yAxisXx = new AtomicReference<>(0L);
Integer countXx= new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,1).count();
if (Objects.isNull(countXx)) {
countXx = 0;
}
yAxisXx.set(Long.valueOf(countXx));
yAxisDataXx.add(yAxisXx.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlyTwelveMonth.toArray());
obj.put("yAxisData", yAxisData);
obj.put("yAxisDataW", yAxisDataW);
obj.put("yAxisDataXs", yAxisDataXs);
obj.put("yAxisDataXx", yAxisDataXx);
return AjaxResult.success(obj);
}
/**
*
*/
@GetMapping("/detail/{id}")
public String view(@PathVariable("id") String id, ModelMap mmap) {
TdMeeting meeting = tdMeetingManager.selectTdMeeting(id);
mmap.put("meeting", meeting);
return prefix + "/detail";
}
}

@ -1,12 +1,19 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyNet; import com.ruoyi.system.domain.TdPropertyNet;
import com.ruoyi.system.domain.TdPropertyNetinfo; import com.ruoyi.system.domain.TdPropertyNetinfo;
import com.ruoyi.system.domain.count.PropertyManagerDTO;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ITdPropertyNetService; import com.ruoyi.system.service.ITdPropertyNetService;
import com.ruoyi.system.service.ITdPropertyNetinfoService; import com.ruoyi.system.service.ITdPropertyNetinfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -15,7 +22,14 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@Controller @Controller
@RequestMapping("/system/networknum") @RequestMapping("/system/networknum")
@ -50,7 +64,7 @@ public class SysNetworknumController extends BaseController {
/** /**
* *
*/ */
@RequiresPermissions("system:propertynum:print") @RequiresPermissions("system:networknum:print")
@GetMapping("/print/{netId}") @GetMapping("/print/{netId}")
@Log(title = "网络设备统计", businessType = BusinessType.PRINT) @Log(title = "网络设备统计", businessType = BusinessType.PRINT)
public String print(@PathVariable("netId") String netId, ModelMap mmap) public String print(@PathVariable("netId") String netId, ModelMap mmap)
@ -63,4 +77,102 @@ public class SysNetworknumController extends BaseController {
return prefix + "/print"; return prefix + "/print";
} }
/**
*
*
* @param null
* @return
*/
@Autowired
private ISysDictDataService dictDataService;
@PostMapping("/countNetInfo")
@ResponseBody
public AjaxResult countNetInfo() {
SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("sys_net_type");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData);
List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = tdPropertyNetinfoService.lambdaQuery()
.eq(TdPropertyNetinfo::getNetName, xAxis.getDictValue())
.count();
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", list.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
/**
*
*
* @return
*/
@PostMapping("/countInfo")
@ResponseBody
public AjaxResult countInfo() {
SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("sys_file_miji");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData);
List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = tdPropertyNetService.selectCountMi(xAxis.getDictValue());
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", list.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
/**
*
*6
* @return
*/
@PostMapping("/countNetMonth")
@ResponseBody
public AjaxResult countNetMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Long> yAxisData = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
PropertyManagerDTO tdPropertyManager = new PropertyManagerDTO();
tdPropertyManager.setMinDayTime(minDayTime);
tdPropertyManager.setMaxDayTime(maxDayTime);
Integer count = tdPropertyNetService.countMessageMonth(tdPropertyManager);
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
} }

@ -1,20 +1,38 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.system.domain.TdPropertyEment;
import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyManager; import com.ruoyi.system.domain.TdPropertyManager;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.count.*;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ITdPropertyInfoService; import com.ruoyi.system.service.ITdPropertyInfoService;
import com.ruoyi.system.service.ITdPropertyManagerService; import com.ruoyi.system.service.ITdPropertyManagerService;
import com.ruoyi.system.service.TdPropertyEmentService;
import lombok.val;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@Controller @Controller
@RequestMapping("/system/propertynum") @RequestMapping("/system/propertynum")
@ -25,21 +43,22 @@ public class SysPropertynumController extends BaseController {
@Autowired @Autowired
private ITdPropertyInfoService tdPropertyInfoService; private ITdPropertyInfoService tdPropertyInfoService;
@Resource
private TdPropertyEmentService tdPropertyEmentService;
@RequiresPermissions("system:propertynum:view") @RequiresPermissions("system:propertynum:view")
@GetMapping() @GetMapping()
public String property() public String property() {
{
return prefix + "/propertynum"; return prefix + "/propertynum";
} }
/** /**
* *
*/ */
@RequiresPermissions("system:propertynum:list") @RequiresPermissions("system:propertynum:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdPropertyManager tdPropertyManager) public TableDataInfo list(TdPropertyManager tdPropertyManager) {
{
startPage(); startPage();
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager); List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
return getDataTable(list); return getDataTable(list);
@ -50,9 +69,8 @@ public class SysPropertynumController extends BaseController {
*/ */
@RequiresPermissions("system:propertynum:print") @RequiresPermissions("system:propertynum:print")
@GetMapping("/print/{useId}") @GetMapping("/print/{useId}")
@Log(title = "资产设备统计", businessType = BusinessType.PRINT) @Log(title = "涉密信息设备统计", businessType = BusinessType.PRINT)
public String print(@PathVariable("useId") String useId, ModelMap mmap) public String print(@PathVariable("useId") String useId, ModelMap mmap) {
{
List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoByUseId(useId); List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoByUseId(useId);
TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId); TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId);
mmap.put("tdPropertyInfos", tdPropertyInfos); mmap.put("tdPropertyInfos", tdPropertyInfos);
@ -60,4 +78,259 @@ public class SysPropertynumController extends BaseController {
mmap.put("sysuser", getSysUser()); mmap.put("sysuser", getSysUser());
return prefix + "/print"; return prefix + "/print";
} }
/**
*
*/
@RequiresPermissions("system:propertynum:print")
@GetMapping("/printEment/{useId}")
@Log(title = "涉密设备统计", businessType = BusinessType.PRINT)
public String printEment(@PathVariable("useId") String useId, ModelMap mmap) {
TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId);
List<TdPropertyEment> tdPropertyEments = tdPropertyEmentService.lambdaQuery()
.eq(TdPropertyEment::getUseId, useId)
.orderByDesc(TdPropertyEment::getCreateTime)
.list();
mmap.put("tdPropertyEments", tdPropertyEments);
mmap.put("tdPropertyManager", tdPropertyManager);
mmap.put("sysuser", getSysUser());
return prefix + "/printEment";
}
@Autowired
private ISysDictDataService dictDataService;
/**
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/countInfo")
@ResponseBody
public AjaxResult countInfo() {
SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("sys_sm_property");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData);
List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = tdPropertyInfoService.lambdaQuery()
.eq(TdPropertyInfo::getPropertyType, xAxis.getDictValue())
.count();
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", list.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
private List<String> bf = Arrays.asList("信息设备未报废", "信息设备已报废","设备未报废", "设备已报废");
private List<String> xh = Arrays.asList("未销毁", "已销毁");
/**
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/countBF")
@ResponseBody
public AjaxResult countbf() {
PropertyStateCountDTO propertyStateCountDTO = tdPropertyInfoService.selectCountBF();
List<JSONObject> datas = bf.stream()
.map(name -> {
AtomicReference<Object> value = new AtomicReference<>(0L);
if ("信息设备未报废".equals(name)) {
value.set(propertyStateCountDTO.getWbf());
} else if("信息设备已报废".equals(name)) {
value.set(propertyStateCountDTO.getYbf());
} else if("设备未报废".equals(name)) {
value.set(tdPropertyEmentService.lambdaQuery()
.eq(TdPropertyEment::getDestoryType,0)
.count());
}else{
value.set(tdPropertyEmentService.lambdaQuery()
.eq(TdPropertyEment::getDestoryType,1)
.count());
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("value", value.get());
jsonObject.put("name", name);
return jsonObject;
})
.collect(Collectors.toList());
return AjaxResult.success(datas);
}
/**
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/countXH")
@ResponseBody
public AjaxResult countXH() {
PropertyDesCountDTO propertyDesCountDTO = tdPropertyInfoService.selectCountXH();
List<JSONObject> datas = xh.stream()
.map(name -> {
AtomicReference<Object> value = new AtomicReference<>(0L);
if ("未销毁".equals(name)) {
value.set(propertyDesCountDTO.getWxh());
} else {
value.set(propertyDesCountDTO.getYxh());
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("value", value.get());
jsonObject.put("name", name);
return jsonObject;
})
.collect(Collectors.toList());
return AjaxResult.success(datas);
}
/**
*
*6
* @return
*/
@PostMapping("/countMessageMonth")
@ResponseBody
public AjaxResult countMessageMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Long> yAxisData = new ArrayList<>();
List<Long> yAxisDataSb = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
PropertyManagerDTO tdPropertyManager = new PropertyManagerDTO();
tdPropertyManager.setMinDayTime(minDayTime);
tdPropertyManager.setMaxDayTime(maxDayTime);
tdPropertyManager.setSecretsType("1");
Integer count = tdPropertyManagerService.countMessageMonth(tdPropertyManager);
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
AtomicReference<Long> yAxisSb = new AtomicReference<>(0L);
PropertyManagerDTO tdPropertManager = new PropertyManagerDTO();
tdPropertManager.setMinDayTime(minDayTime);
tdPropertManager.setMaxDayTime(maxDayTime);
tdPropertManager.setSecretsType("2");
Integer countSecrets = tdPropertyManagerService.countSecretsMonth(tdPropertManager);
if(Objects.isNull(countSecrets)){
countSecrets = 0;
}
yAxisSb.set(Long.valueOf(countSecrets));
yAxisDataSb.add(yAxisSb.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
//涉密信息设备
obj.put("yAxisData", yAxisData);
//涉密设备
obj.put("yAxisDataSb", yAxisDataSb);
return AjaxResult.success(obj);
}
/**
*
*6
* @return
*/
@PostMapping("/countSecretsMonth")
@ResponseBody
public AjaxResult countSecretsMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Long> yAxisData = new ArrayList<>();
List<Long> yAxisDataWx = new ArrayList<>();
List<Long> yAxisDataSb = new ArrayList<>();
List<Long> yAxisDataWxSb = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
PropertyManagerDTO tdPropertyManager = new PropertyManagerDTO();
tdPropertyManager.setMinDayTime(minDayTime);
tdPropertyManager.setMaxDayTime(maxDayTime);
tdPropertyManager.setSecretsType("1");
tdPropertyManager.setDestoryState("1");
Integer count = tdPropertyManagerService.countDestoryMonth(tdPropertyManager);
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
AtomicReference<Long> yAxisWx = new AtomicReference<>(0L);
PropertyManagerDTO tdPropertManager = new PropertyManagerDTO();
tdPropertManager.setMinDayTime(minDayTime);
tdPropertManager.setMaxDayTime(maxDayTime);
tdPropertManager.setSecretsType("1");
Integer countWx = tdPropertyManagerService.countMessageWxMonth(tdPropertManager);
if(Objects.isNull(countWx)){
countWx = 0;
}
yAxisWx.set(Long.valueOf(countWx));
yAxisDataWx.add(yAxisWx.get());
AtomicReference<Long> yAxisSb = new AtomicReference<>(0L);
PropertyManagerDTO tdProperty = new PropertyManagerDTO();
tdProperty.setMinDayTime(minDayTime);
tdProperty.setMaxDayTime(maxDayTime);
tdProperty.setSecretsType("2");
tdProperty.setDestoryState("1");
Integer countSb = tdPropertyManagerService.countSecretsDestoryMonth(tdProperty);
if(Objects.isNull(countSb)){
countSb = 0;
}
yAxisSb.set(Long.valueOf(countSb));
yAxisDataSb.add(yAxisSb.get());
AtomicReference<Long> yAxisSbWx = new AtomicReference<>(0L);
PropertyManagerDTO tdPropertWx = new PropertyManagerDTO();
tdPropertWx.setMinDayTime(minDayTime);
tdPropertWx.setMaxDayTime(maxDayTime);
tdPropertWx.setSecretsType("2");
Integer countSbWx = tdPropertyManagerService.countSecretsWxMonth(tdPropertWx);
if(Objects.isNull(countSbWx)){
countSbWx = 0;
}
yAxisSbWx.set(Long.valueOf(countSbWx));
yAxisDataWxSb.add(yAxisSbWx.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
//已销毁
obj.put("yAxisData", yAxisData);
//未销毁
obj.put("yAxisDataWx", yAxisDataWx);
//设备销毁
obj.put("yAxisDataSb", yAxisDataSb);
//设备未销毁
obj.put("yAxisDataWxSb", yAxisDataWxSb);
return AjaxResult.success(obj);
}
} }

@ -1,21 +1,36 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.TdTrain; import com.ruoyi.system.domain.TdTrain;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.ITdTrainService; import com.ruoyi.system.service.ITdTrainService;
import com.ruoyi.web.controller.manager.SysAreaManager;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
@Controller @Controller
@RequestMapping("/system/trainnum") @RequestMapping("/system/trainnum")
@ -24,6 +39,13 @@ public class SysTrainnumController extends BaseController {
@Autowired @Autowired
private ITdTrainService tdTrainService; private ITdTrainService tdTrainService;
@Resource
private SysAreaManager sysAreaManager;
@Resource
private ISysUserService sysUserService;
@RequiresPermissions("system:trainnum:view") @RequiresPermissions("system:trainnum:view")
@GetMapping() @GetMapping()
public String trainnum() public String trainnum()
@ -58,21 +80,110 @@ public class SysTrainnumController extends BaseController {
public AjaxResult export(TdTrain tdTrain) public AjaxResult export(TdTrain tdTrain)
{ {
List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain); List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain);
list.forEach(tdTrain1 -> {
tdTrain1.setAREAID(sysAreaManager.getAreaName(tdTrain1.getAREAID()));
tdTrain1.setFRAMEWORK(sysAreaManager.getAreaName(tdTrain1.getFRAMEWORK()));
SysUser sysUser = sysUserService.selectUserById(Long.valueOf(tdTrain1.getUSERNAME()));
if(Objects.nonNull(sysUser)){
tdTrain1.setUSERNAME(sysUser.getUserName());
}
});
ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class); ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class);
return util.exportExcel(list, "培训统计数据"); return util.exportExcel(list, "培训统计数据");
} }
/** /**
* *
*/
@RequiresPermissions("system:trainnum:detail")
@GetMapping("/detail/{ID}")
public String detail(@PathVariable("ID") Long ID, ModelMap mmap)
{
mmap.put("tdTrain", tdTrainService.selectTdTrainByID(ID));
SysUser user = getSysUser();
mmap.put("user", user);
return prefix + "/detail";
}
@ApiOperation("培训统计数据")
@PostMapping("/countList")
@ResponseBody
public AjaxResult countList() {
return AjaxResult.success(tdTrainService.selectCountList());
}
/**
*
*6
* @return
*/
@PostMapping("/countTrainMonth")
@ResponseBody
public AjaxResult countTrainMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Long> yAxisData = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = new LambdaQueryChainWrapper<>(tdTrainService.getBaseMapper())
.ge(TdTrain::getCreateDate, minDayTime)
.le(TdTrain::getCreateDate, maxDayTime)
.eq(TdTrain::getTrainState,0)
.count();
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
/**
*
*6
* @return
*/ */
@RequiresPermissions("system:trainnum:print") @PostMapping("/countTrainNoMonth")
@GetMapping("/print/{traiId}")
@ResponseBody @ResponseBody
public String print(@PathVariable("trainId") Long trainId, ModelMap mmap){ public AjaxResult countTrainNoMonth() {
TdTrain tdTrain = tdTrainService.selectTdTrainByID(trainId); List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<TdTrain> tdTrains = tdTrainService.selectTdTrainList(tdTrain); List<Long> yAxisData = new ArrayList<>();
mmap.put("train", tdTrain); recentlySixMonth.forEach(month -> {
return prefix + "/print"; // 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = new LambdaQueryChainWrapper<>(tdTrainService.getBaseMapper())
.ge(TdTrain::getCreateDate, minDayTime)
.le(TdTrain::getCreateDate, maxDayTime)
.eq(TdTrain::getTrainState,2)
.count();
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
} }
} }

@ -1,8 +1,12 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
@ -12,10 +16,14 @@ import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.SysUserPost; import com.ruoyi.system.domain.SysUserPost;
import com.ruoyi.system.domain.SysUserRole; import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.count.UserCountDTO;
import com.ruoyi.system.domain.count.UserSmCountDTO;
import com.ruoyi.system.service.*; import com.ruoyi.system.service.*;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -23,9 +31,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList; import java.time.LocalDate;
import java.util.Collections; import java.time.ZoneId;
import java.util.List; import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -51,28 +60,27 @@ public class SysUsernumController extends BaseController {
@RequiresPermissions("system:usernum:view") @RequiresPermissions("system:usernum:view")
@GetMapping() @GetMapping()
public String user() public String user() {
{
return prefix + "/usernum"; return prefix + "/usernum";
} }
/** /**
* *
*
* @param user * @param user
* @return * @return
*/ */
@RequiresPermissions("system:usernum:list") @RequiresPermissions("system:usernum:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(SysUser user,SysDept dept) public TableDataInfo list(SysUser user, SysDept dept) {
{
startPage(); startPage();
List<SysUser> sysuser = new ArrayList<>(); List<SysUser> sysuser = new ArrayList<>();
List<SysUser> list = userService.selectUserGroupBydept(user); List<SysUser> list = userService.selectUserGroupBydept(user);
List<SysDept> sysDepts = deptService.selectDeptList(dept); List<SysDept> sysDepts = deptService.selectDeptList(dept);
for (SysDept Dept : sysDepts){ for (SysDept sysDept : sysDepts) {
for ( SysUser user1 : list){ for (SysUser user1 : list) {
if (Dept.getDeptName().equals(user1.getDept().getDeptName())){ if (sysDept.getDeptId().equals(user1.getDept().getDeptId())) {
sysuser.add(user1); sysuser.add(user1);
} }
} }
@ -82,6 +90,7 @@ public class SysUsernumController extends BaseController {
/** /**
* *
*
* @param user * @param user
* @return * @return
*/ */
@ -89,8 +98,7 @@ public class SysUsernumController extends BaseController {
@RequiresPermissions("system:usernum:export") @RequiresPermissions("system:usernum:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(SysUser user) public AjaxResult export(SysUser user) {
{
List<SysUser> list = userService.selectUserList(user); List<SysUser> list = userService.selectUserList(user);
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.exportExcel(list, "用户统计数据"); return util.exportExcel(list, "用户统计数据");
@ -101,25 +109,129 @@ public class SysUsernumController extends BaseController {
*/ */
@RequiresPermissions("system:usernum:detail") @RequiresPermissions("system:usernum:detail")
@GetMapping("/print/{deptId}") @GetMapping("/print/{deptId}")
public String print(@PathVariable("deptId")Long deptId, SysUser user,ModelMap mmap) public String print(@PathVariable("deptId") Long deptId, SysUser user, ModelMap mmap) {
{
List<SysUser> list = userService.lambdaQuery().eq(SysUser::getDeptId, deptId) List<SysUser> list = userService.lambdaQuery().eq(SysUser::getDeptId, deptId)
.eq(SysUser::getDelFlag,0) .eq(SysUser::getDelFlag, '0')
.ne(SysUser::getUserId,1) .ne(SysUser::getUserId, 1)
.list(); .list();
list.forEach(sysuser -> { list.forEach(sysuser -> {
List<SysUserPost> postList = sysUserPostService.lambdaQuery(). List<SysUserPost> postList = sysUserPostService.lambdaQuery().
eq(SysUserPost::getUserId, sysuser.getUserId()).list(); eq(SysUserPost::getUserId, sysuser.getUserId()).list();
List<Long> postIds = postList.stream().map(SysUserPost::getPostId).collect(Collectors.toList()); List<Long> postIds = postList.stream().map(SysUserPost::getPostId).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(postIds)){ if (CollUtil.isNotEmpty(postIds)) {
List<SysPost> sysPostList = postService.lambdaQuery().in(SysPost::getPostId, postIds).list(); List<SysPost> sysPostList = postService.lambdaQuery().in(SysPost::getPostId, postIds).list();
sysuser.setPosts( Convert.toList(SysPostVO.class, sysPostList)); sysuser.setPosts(Convert.toList(SysPostVO.class, sysPostList));
} }
}); });
mmap.put("list", list); mmap.put("list", list);
mmap.put("dept",deptService.selectDeptById(deptId)); mmap.put("dept", deptService.selectDeptById(deptId));
mmap.put("sysuser",getSysUser()); mmap.put("sysuser", getSysUser());
return prefix + "/print"; return prefix + "/print";
} }
private List<String> sharType = Arrays.asList("已登记", "已审查", "已定岗", "已离职","已离岗");
private List<String> smType = Arrays.asList("一般涉密人员", "重要涉密人员", "核心涉密人员");
@PostMapping("/countSm")
@ResponseBody
public AjaxResult countSm() {
UserSmCountDTO userSmCountDTO = userService.selectCountSmUser();
List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
if("一般涉密人员".equals(xAxis)){
yAxis.set(Long.valueOf(userSmCountDTO.getYb()));
}else if("重要涉密人员".equals(xAxis)){
yAxis.set(Long.valueOf(userSmCountDTO.getZy()));
}else{
yAxis.set(Long.valueOf(userSmCountDTO.getHx()));
}
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", smType.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
/**
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/countUser")
@ResponseBody
public AjaxResult countUser() {
UserCountDTO userCountDTO = userService.selectCountUser();
List<JSONObject> datas = sharType.stream()
.map(name -> {
AtomicReference<Object> value = new AtomicReference<>(0L);
if("已登记".equals(name)){
value.set(userCountDTO.getYdj());
}else if("已审查".equals(name)){
value.set(userCountDTO.getYsc());
}else if("已定岗".equals(name)){
value.set(userCountDTO.getYdg());
}else if("已离职".equals(name)){
value.set(userCountDTO.getYlz());
}else{
value.set(userCountDTO.getYlg());
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("value", value.get());
jsonObject.put("name", name);
return jsonObject;
})
.collect(Collectors.toList());
return AjaxResult.success(datas);
}
/**
*
*6
* @return
*/
@PostMapping("/countCheckMonth")
@ResponseBody
public AjaxResult countCheckMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Long> yAxisData = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = new LambdaQueryChainWrapper<>(userService.getBaseMapper())
.ge(SysUser::getCreateTime, minDayTime)
.le(SysUser::getCreateTime, maxDayTime)
.eq(SysUser::getExamine,'2')
.eq(SysUser::getDelFlag,'0')
.count();
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
} }

@ -0,0 +1,155 @@
package com.ruoyi.web.controller.system.count;
import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.check.dto.CheckReportDTO;
import com.ruoyi.system.domain.count.CheckResultCountDTO;
import com.ruoyi.system.domain.count.CheckTypeCountDTO;
import com.ruoyi.system.domain.count.PropertyManagerDTO;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ITdNotifyService;
import com.ruoyi.system.service.check.TdCheckReportService;
import com.ruoyi.web.controller.manager.CheckReportManager;
import io.swagger.annotations.ApiOperation;
import lombok.val;
import org.apache.catalina.User;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
/**
*
*/
@Controller
@RequestMapping("/system/checknum")
public class TdChecknumController extends BaseController{
private String prefix = "system/check/checknum";
@Resource
private TdCheckReportService checkReportService;
@Autowired
private ITdNotifyService tdNotifyService;
@Resource
private CheckReportManager checkReportManager;
@RequiresPermissions("system:checknum:view")
@GetMapping()
public String checknum() {
return prefix + "/checknum";
}
/**
*
*/
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(CheckReportDTO tdCheckReport) {
startPage();
List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckReportList(tdCheckReport);
return getDataTable(tdCheckReports);
}
/**
*
*6
* @return
*/
@PostMapping("/countCheckMonth")
@ResponseBody
public AjaxResult countCheckMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Long> yAxisData = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = new LambdaQueryChainWrapper<>(checkReportService.getBaseMapper())
.ge(TdCheckReport::getCreateTime, minDayTime)
.le(TdCheckReport::getCreateTime, maxDayTime).count();
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
/**
*
*6
* @return
*/
@PostMapping("/countCheckScoresMonth")
@ResponseBody
public AjaxResult countCheckScoresMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
List<Double> yAxisData = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Double> yAxis = new AtomicReference<>();
PropertyManagerDTO tdPropertWx = new PropertyManagerDTO();
tdPropertWx.setMinDayTime(minDayTime);
tdPropertWx.setMaxDayTime(maxDayTime);
Double maxCount = checkReportService.countSecretsWxMonth(tdPropertWx);
if(Objects.isNull(maxCount)){
yAxis.set(0.0);
}else{
yAxis.set(maxCount);
}
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
}

@ -1,16 +1,31 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.userbook.dto.UserBookDTO;
import com.ruoyi.system.domain.userexam.dto.request.UserExamReqDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamExportDTO;
import com.ruoyi.system.domain.userexam.dto.response.UserExamRespDTO;
import com.ruoyi.web.controller.manager.UserExamManager;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdExamnum; import com.ruoyi.system.domain.TdExamnum;
@ -20,27 +35,37 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2024-04-10 * @date 2024-04-10
*/ */
@Controller @Controller
@RequestMapping("/system/examnum") @RequestMapping("/system/examnum")
public class TdExamnumController extends BaseController public class TdExamnumController extends BaseController {
{
private String prefix = "system/examnum"; private String prefix = "system/examnum";
@Autowired @Autowired
private ITdExamnumService tdExamnumService; private ITdExamnumService tdExamnumService;
@RequiresPermissions("system:examnum:view") @Resource
private UserExamManager userExamManager;
@RequiresPermissions("system:examnum:countExam")
@GetMapping() @GetMapping()
public String examnum() public String countExam() {
{ return prefix + "/countExam";
}
@GetMapping("/examnum/{examId}")
public String examnum(@PathVariable("examId") String examId, ModelMap mmap) {
mmap.put("examId",examId);
return prefix + "/examnum"; return prefix + "/examnum";
} }
@ -50,10 +75,9 @@ public class TdExamnumController extends BaseController
@RequiresPermissions("system:examnum:list") @RequiresPermissions("system:examnum:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdExamnum tdExamnum) public TableDataInfo list(UserExamReqDTO reqDTO) {
{
startPage(); startPage();
List<TdExamnum> list = tdExamnumService.selectTdExamnumList(tdExamnum); List<UserExamRespDTO> list = userExamManager.selectExamList(reqDTO);
return getDataTable(list); return getDataTable(list);
} }
@ -61,71 +85,101 @@ public class TdExamnumController extends BaseController
* *
*/ */
@RequiresPermissions("system:examnum:export") @RequiresPermissions("system:examnum:export")
@Log(title = "考试结果", businessType = BusinessType.EXPORT) @Log(title = "考试详情", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdExamnum tdExamnum) public AjaxResult export(UserExamReqDTO reqDTO) {
{ List<UserExamRespDTO> list = userExamManager.selectExamList(reqDTO);
List<TdExamnum> list = tdExamnumService.selectTdExamnumList(tdExamnum); List<UserExamExportDTO> list1 = Convert.toList(UserExamExportDTO.class, list);
ExcelUtil<TdExamnum> util = new ExcelUtil<TdExamnum>(TdExamnum.class); ExcelUtil<UserExamExportDTO> util = new ExcelUtil<UserExamExportDTO>(UserExamExportDTO.class);
return util.exportExcel(list, "考试结果数据"); return util.exportExcel(list1, "考试数据");
} }
/**
*
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/** @ApiOperation("查找考试总数")
* @PostMapping("/countList")
*/
@RequiresPermissions("system:examnum:add")
@Log(title = "考试结果", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(TdExamnum tdExamnum) public AjaxResult countList() {
{ return AjaxResult.success(userExamManager.selectCountList());
return toAjax(tdExamnumService.insertTdExamnum(tdExamnum));
} }
/**
* @GetMapping("/examList")
*/ public String examList(ModelMap mmap) {
@RequiresPermissions("system:examnum:edit") return prefix + "/examList";
@GetMapping("/edit/{id}") }
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{ @ApiOperation("最新考试列表")
TdExamnum tdExamnum = tdExamnumService.selectTdExamnumById(id); @PostMapping("/countExamList")
mmap.put("tdExamnum", tdExamnum); @ResponseBody
return prefix + "/edit"; public AjaxResult countExamList() {
return AjaxResult.success(userExamManager.selectCountExam());
} }
/** /**
* *
*6
* @return
*/ */
@RequiresPermissions("system:examnum:edit") @PostMapping("/countExamMonth")
@Log(title = "考试结果", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdExamnum tdExamnum) public AjaxResult countExamMonth() {
{ List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
return toAjax(tdExamnumService.updateTdExamnum(tdExamnum)); List<Long> yAxisData = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = userExamManager.countExamMonth(minDayTime, maxDayTime,true);
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
} }
/** /**
* *
*6
* @return
*/ */
@RequiresPermissions("system:examnum:remove") @PostMapping("/countExamNoPass")
@Log(title = "考试结果", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult countExamNoPass() {
{ List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
return toAjax(tdExamnumService.deleteTdExamnumByIds(ids)); List<Long> yAxisData = new ArrayList<>();
recentlySixMonth.forEach(month -> {
// 获取指定月份的最大日期
String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
// 获取指定天的最大时间
Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
// 获取最小时间
date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = userExamManager.countExamMonth(minDayTime, maxDayTime,false);
if(Objects.isNull(count)){
count = 0;
}
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", recentlySixMonth.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
} }

@ -40,9 +40,7 @@ public class TdExamController extends BaseController{
public String index(ModelMap mmap){ public String index(ModelMap mmap){
SysUser user = getSysUser(); SysUser user = getSysUser();
mmap.put("user", user); mmap.put("user", user);
return prefix + "/index"; return prefix + "/index";
} }
/** /**

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.system.exam; package com.ruoyi.web.controller.system.exam;
import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -87,6 +88,8 @@ public class TdQuestionController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(TdQuestion tdQuestion) public AjaxResult addSave(TdQuestion tdQuestion)
{ {
tdQuestion.setCREATEPERSON(getLoginName());
tdQuestion.setCREATEDATE(new Date());
return toAjax(tdQuestionService.insertTdQuestion(tdQuestion)); return toAjax(tdQuestionService.insertTdQuestion(tdQuestion));
} }

@ -2,6 +2,7 @@ package com.ruoyi.web.controller.system.filemanager;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
import com.ruoyi.system.domain.TdFileProvide; import com.ruoyi.system.domain.TdFileProvide;
import com.ruoyi.system.domain.TdFileReceive; import com.ruoyi.system.domain.TdFileReceive;
@ -58,7 +59,7 @@ public class TdFileDestoryController extends BaseController
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive); List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
List<TdFileReceive> tdFileReceives = new ArrayList<>(); List<TdFileReceive> tdFileReceives = new ArrayList<>();
for (TdFileReceive FileReceivelist : list){ for (TdFileReceive FileReceivelist : list){
if (FileReceivelist.getExtractState().equals("1") && FileReceivelist.getReceiveDepartid().equals(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName())){ if (Objects.equals(FileReceivelist.getExtractState(),"1") && FileReceivelist.getReceiveDepartid().equals(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName())){
tdFileReceives.add(FileReceivelist); tdFileReceives.add(FileReceivelist);
} }
} }

@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* Controller * Controller
@ -37,7 +38,6 @@ public class TdFileExtractController extends BaseController {
mmap.put("sysuser",getSysUser()); mmap.put("sysuser",getSysUser());
return prefix + "/fileextract"; return prefix + "/fileextract";
} }
/** /**
* *
*/ */
@ -50,13 +50,12 @@ public class TdFileExtractController extends BaseController {
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive); List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
List<TdFileReceive> tdFileReceives = new ArrayList<>(); List<TdFileReceive> tdFileReceives = new ArrayList<>();
for (TdFileReceive FileReceivelist : list){ for (TdFileReceive FileReceivelist : list){
if (FileReceivelist.getReceiveState().equals("1") && FileReceivelist.getReceiveDepartid().equals(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName())){ if (Objects.equals(FileReceivelist.getReceiveState(),"1") && FileReceivelist.getReceiveDepartid().equals(getSysUser().getDept().getDeptName())){
tdFileReceives.add(FileReceivelist); tdFileReceives.add(FileReceivelist);
} }
} }
return getDataTable(tdFileReceives); return getDataTable(tdFileReceives);
} }
/** /**
* *
*/ */
@ -70,7 +69,6 @@ public class TdFileExtractController extends BaseController {
ExcelUtil<TdFileReceive> util = new ExcelUtil<TdFileReceive>(TdFileReceive.class); ExcelUtil<TdFileReceive> util = new ExcelUtil<TdFileReceive>(TdFileReceive.class);
return util.exportExcel(list, "涉密文件接收数据"); return util.exportExcel(list, "涉密文件接收数据");
} }
/** /**
* *
*/ */

@ -3,6 +3,7 @@ package com.ruoyi.web.controller.system.filemanager;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.sql.SqlUtil; import com.ruoyi.common.utils.sql.SqlUtil;
@ -13,6 +14,7 @@ import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ITdFileReceiveService; import com.ruoyi.system.service.ITdFileReceiveService;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -31,6 +33,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
@ -70,6 +74,9 @@ public class TdFileProvideController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
@Resource
private SysAreaManager sysAreaManager;
/** /**
* *
*/ */
@ -80,6 +87,10 @@ public class TdFileProvideController extends BaseController
public AjaxResult export(TdFileProvide tdFileProvide) public AjaxResult export(TdFileProvide tdFileProvide)
{ {
List<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide); List<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide);
list.forEach(tdFileProvide1 -> {
tdFileProvide1.setFrameworkId(sysAreaManager.getAreaName(tdFileProvide1.getFrameworkId()));
tdFileProvide1.setAreaid(sysAreaManager.getAreaName(tdFileProvide1.getAreaid()));
});
ExcelUtil<TdFileProvide> util = new ExcelUtil<TdFileProvide>(TdFileProvide.class); ExcelUtil<TdFileProvide> util = new ExcelUtil<TdFileProvide>(TdFileProvide.class);
return util.exportExcel(list, "文件下发数据"); return util.exportExcel(list, "文件下发数据");
} }

@ -59,7 +59,7 @@ public class TdFileReceiveController extends BaseController
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive); List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
List<TdFileReceive> tdFileReceives = new ArrayList<>(); List<TdFileReceive> tdFileReceives = new ArrayList<>();
for (TdFileReceive FileReceivelist : list){ for (TdFileReceive FileReceivelist : list){
if (FileReceivelist.getReceiveDepartid().equals(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName())){ if (FileReceivelist.getReceiveDepartid().equals(getSysUser().getDept().getDeptName())){
tdFileReceives.add(FileReceivelist); tdFileReceives.add(FileReceivelist);
} }
} }

@ -0,0 +1,148 @@
package com.ruoyi.web.controller.system.meet;
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.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.TdMeeting;
import com.ruoyi.web.controller.manager.TdMeetingManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.system.meet
*
* @author wangxy
* @version JDK 8
* @className TdMeetingController
* @date 2024/8/6
* @description
*/
@Controller
@RequestMapping("/system/tdmeeting")
public class TdMeetingController extends BaseController {
private String prefix = "system/tdmeeting";
@Resource
private TdMeetingManager meetingManager;
@RequiresPermissions("system:tdmeeting:view")
@GetMapping()
public String tdmeeting() {
return prefix + "/tdmeeting";
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdMeeting tdMeeting) {
startPage();
List<TdMeeting> tdMeetings = meetingManager.selectTdMeetingList(tdMeeting);
return getDataTable(tdMeetings);
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:export")
@Log(title = "涉密会议导出", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdMeeting tdMeeting) {
List<TdMeeting> tdMeetings = meetingManager.selectTdMeetingList(tdMeeting);
ExcelUtil<TdMeeting> util = new ExcelUtil<>(TdMeeting.class);
return util.exportExcel(tdMeetings, "涉密会议数据");
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:add")
@Log(title = "涉密会议", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdMeeting tdMeeting) {
return toAjax(meetingManager.saveOrUpdate(tdMeeting));
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdMeeting meeting = meetingManager.selectTdMeeting(id);
mmap.put("meeting", meeting);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:edit")
@Log(title = "涉密会议", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdMeeting tdMeeting) {
return toAjax(meetingManager.saveOrUpdate(tdMeeting));
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdMeeting meeting = meetingManager.selectTdMeeting(id);
mmap.put("meeting", meeting);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:remove")
@Log(title = "涉密会议", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(meetingManager.deleteTdMeetingByIds(ids));
}
/**
*
*/
@RequiresPermissions("system:tdmeeting:view")
@GetMapping("/view/{id}")
public String view(@PathVariable("id") String id, ModelMap mmap) {
TdMeeting meeting = meetingManager.selectTdMeeting(id);
mmap.put("meeting", meeting);
return prefix + "/view";
}
}

@ -24,31 +24,28 @@ public class TdPropertyChangeController extends BaseController {
@RequiresPermissions("system:changeproperty:view") @RequiresPermissions("system:changeproperty:view")
@GetMapping() @GetMapping()
public String changeProperty() public String changeProperty() {
{
return prefix + "/changeproperty"; return prefix + "/changeproperty";
} }
/** /**
* *
*/ */
@RequiresPermissions("system:changeproperty:list") @RequiresPermissions("system:changeproperty:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdPropertyInfo tdPropertyInfo) public TableDataInfo list(TdPropertyInfo tdPropertyInfo) {
{
startPage(); startPage();
List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo); List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo);
return getDataTable(tdPropertyInfos); return getDataTable(tdPropertyInfos);
} }
/** /**
* *
*/ */
@RequiresPermissions("system:changeproperty:change") @RequiresPermissions("system:changeproperty:change")
@GetMapping("/edit/{id}") @GetMapping("/edit/{id}")
public String change(@PathVariable("id") String id, ModelMap mmap) public String change(@PathVariable("id") String id, ModelMap mmap) {
{
TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id); TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
mmap.put("tdPropertyInfo", tdPropertyInfo); mmap.put("tdPropertyInfo", tdPropertyInfo);
return prefix + "/change"; return prefix + "/change";
@ -58,21 +55,20 @@ public class TdPropertyChangeController extends BaseController {
* *
*/ */
@RequiresPermissions("system:changeproperty:change") @RequiresPermissions("system:changeproperty:change")
@Log(title = "资产变更", businessType = BusinessType.UPDATE) @Log(title = "密品变更", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo) public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo) {
{ tdPropertyInfo.setMaintainState("2");
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo)); return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
} }
/** /**
* *
*/ */
@RequiresPermissions("system:changeproperty:destory") @RequiresPermissions("system:changeproperty:destory")
@GetMapping("/destory/{id}") @GetMapping("/destory/{id}")
public String destory(@PathVariable("id") String id, ModelMap mmap) public String destory(@PathVariable("id") String id, ModelMap mmap) {
{
TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id); TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
mmap.put("tdPropertyInfo", tdPropertyInfo); mmap.put("tdPropertyInfo", tdPropertyInfo);
return prefix + "/destory"; return prefix + "/destory";
@ -82,11 +78,10 @@ public class TdPropertyChangeController extends BaseController {
* *
*/ */
@RequiresPermissions("system:changeproperty:destory") @RequiresPermissions("system:changeproperty:destory")
@Log(title = "资产变更", businessType = BusinessType.UPDATE) @Log(title = "密品变更", businessType = BusinessType.UPDATE)
@PostMapping("/destory") @PostMapping("/destory")
@ResponseBody @ResponseBody
public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo) public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo) {
{
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo)); return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
} }

@ -0,0 +1,75 @@
package com.ruoyi.web.controller.system.property;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.TdPropertyManager;
import com.ruoyi.system.service.ITdPropertyManagerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.system.property
*
* @author wangxy
* @version JDK 8
* @className TdPropertyChangeListController
* @date 2024/6/24
* @description
*/
@Controller
@RequestMapping("/system/change/list")
public class TdPropertyChangeListController extends BaseController {
private String prefix = "system/property/propertychange/list";
@Autowired
private ITdPropertyManagerService tdPropertyManagerService;
@RequiresPermissions("system:change:view")
@GetMapping()
public String property()
{
return prefix + "/property";
}
/**
*
*/
@RequiresPermissions("system:change:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyManager tdPropertyManager)
{
startPage();
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:change:detail")
@GetMapping("/detail/{useId}")
public String detail(@PathVariable("useId") String useId, ModelMap mmap)
{
mmap.put("useId",useId);
return "system/property/propertychange/changeproperty";
}
/**
*
*/
@RequiresPermissions("system:change:detail")
@GetMapping("/ementChDetail/{useId}")
public String ementChDetail(@PathVariable("useId") String useId, ModelMap mmap)
{
mmap.put("useId",useId);
return "system/property/ementChange/ementChange";
}
}

@ -0,0 +1,69 @@
package com.ruoyi.web.controller.system.property;
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.BusinessType;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.service.ITdPropertyInfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
@RequestMapping("/system/propertyDestory")
public class TdPropertyDestoryController extends BaseController {
private String prefix = "system/property/propertydestory";
@Autowired
private ITdPropertyInfoService tdPropertyInfoService;
@RequiresPermissions("system:destoryproperty:view")
@GetMapping()
public String destoryProperty()
{
return prefix + "/destoryproperty";
}
/**
*
*/
@RequiresPermissions("system:destoryproperty:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyInfo tdPropertyInfo)
{
startPage();
List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo);
return getDataTable(tdPropertyInfos);
}
/**
*
*/
@RequiresPermissions("system:destoryproperty:destory")
@GetMapping("/destory/{id}")
public String destory(@PathVariable("id") String id, ModelMap mmap)
{
TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
mmap.put("tdPropertyInfo", tdPropertyInfo);
return prefix + "/destory";
}
/**
*
*/
@RequiresPermissions("system:destoryproperty:destory")
@Log(title = "密品变更", businessType = BusinessType.UPDATE)
@PostMapping("/destory")
@ResponseBody
public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo)
{
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
}
}

@ -0,0 +1,75 @@
package com.ruoyi.web.controller.system.property;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.TdPropertyManager;
import com.ruoyi.system.service.ITdPropertyManagerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.system.property
*
* @author luoluo
* @version JDK 8
* @className TdPropertyDestoryListController
* @date 2024/6/24
* @description
*/
@Controller
@RequestMapping("/system/propertyDestory/list")
public class TdPropertyDestoryListController extends BaseController {
private String prefix = "system/property/propertydestory/list";
@Autowired
private ITdPropertyManagerService tdPropertyManagerService;
@RequiresPermissions("system:propertyDestory:view")
@GetMapping()
public String property()
{
return prefix + "/property";
}
/**
*
*/
@RequiresPermissions("system:destory:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyManager tdPropertyManager)
{
startPage();
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:destory:detail")
@GetMapping("/detail/{useId}")
public String detail(@PathVariable("useId") String useId, ModelMap mmap)
{
mmap.put("useId",useId);
return "system/property/propertydestory/destoryproperty";
}
/**
*
*/
@RequiresPermissions("system:destory:detail")
@GetMapping("/destoryDetail/{useId}")
public String destoryDetail(@PathVariable("useId") String useId, ModelMap mmap)
{
mmap.put("useId",useId);
return "system/property/ementDestory/ementList";
}
}

@ -0,0 +1,108 @@
package com.ruoyi.web.controller.system.property;
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.BusinessType;
import com.ruoyi.system.domain.TdPropertyEment;
import com.ruoyi.web.controller.manager.TdPropertyEmentManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.system.property
*
* @author wangxy
* @version JDK 8
* @className TdPropertyEmentChangeController
* @date 2024/8/20
* @description
*/
@Controller
@RequestMapping("/system/ementChange")
public class TdPropertyEmentChangeController extends BaseController {
private String prefix = "system/property/ementChange";
@Autowired
private TdPropertyEmentManager tdPropertyEmentManager;
@RequiresPermissions("system:ementChange:view")
@GetMapping()
public String ementChange() {
return prefix + "/ementChange";
}
/**
*
*/
@RequiresPermissions("system:ementChange:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyEment tdPropertyEment) {
startPage();
List<TdPropertyEment> tdPropertyEments = tdPropertyEmentManager.selectEmentList(tdPropertyEment);
return getDataTable(tdPropertyEments);
}
/**
*
*/
@RequiresPermissions("system:ementChange:change")
@GetMapping("/edit/{id}")
public String ementEdit(@PathVariable("id") String id, ModelMap mmap) {
TdPropertyEment tdPropertyEment = tdPropertyEmentManager.selecttdEment(id);
mmap.put("tdPropertyEment", tdPropertyEment);
return prefix + "/ementEdit";
}
/**
*
*/
@RequiresPermissions("system:ementChange:change")
@Log(title = "涉密设备维修", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ResponseBody
public AjaxResult update(TdPropertyEment tdPropertyEment) {
tdPropertyEment.setMaintainState("2");
return toAjax(tdPropertyEmentManager.saveOrUpdate(tdPropertyEment));
}
/**
*
*/
@RequiresPermissions("system:ementChange:destory")
@GetMapping("/destory/{id}")
public String destory(@PathVariable("id") String id, ModelMap mmap) {
TdPropertyEment tdPropertyEment = tdPropertyEmentManager.selecttdEment(id);
mmap.put("tdPropertyEment", tdPropertyEment);
return prefix + "/destory";
}
/**
*
*/
@RequiresPermissions("system:ementChange:destory")
@Log(title = "涉密设备报废", businessType = BusinessType.UPDATE)
@PostMapping("/destorySave")
@ResponseBody
public AjaxResult destorySave(TdPropertyEment tdPropertyEment) {
return toAjax(tdPropertyEmentManager.saveOrUpdate(tdPropertyEment));
}
}

@ -0,0 +1,124 @@
package com.ruoyi.web.controller.system.property;
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.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.system.domain.TdPropertyEment;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.web.controller.manager.TdPropertyEmentManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.system.property
*
* @author wangxy
* @version JDK 8
* @className TdPropertyEmentController
* @date 2024/8/20
* @description
*/
@Controller
@RequestMapping("/system/prementData")
public class TdPropertyEmentController extends BaseController {
private String prefix = "system/property/ementdata";
@Resource
private TdPropertyEmentManager tdPropertyEmentManager;
@RequiresPermissions("system:property:view")
@GetMapping()
public String tdEment() {
return prefix + "/propertyEment";
}
/**
*
*/
@RequiresPermissions("system:property:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyEment tdPropertyEment) {
startPage();
List<TdPropertyEment> tdPropertyEments = tdPropertyEmentManager.selectEmentList(tdPropertyEment);
return getDataTable(tdPropertyEments);
}
/**
*
*/
@RequiresPermissions("system:property:export")
@Log(title = "涉密设备", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdPropertyEment tdPropertyEment) {
List<TdPropertyEment> tdPropertyEments = tdPropertyEmentManager.selectEmentList(tdPropertyEment);
ExcelUtil<TdPropertyEment> util = new ExcelUtil<>(TdPropertyEment.class);
return util.exportExcel(tdPropertyEments, "涉密设备数据");
}
/**
*
*/
@GetMapping("/add/{useId}")
public String add(@PathVariable("useId") String useId, ModelMap mmap) {
mmap.put("useId", useId);
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:property:add")
@Log(title = "涉密设备", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdPropertyEment tdPropertyEment) {
tdPropertyEment.setId("Ement_" + Seq.getId(Seq.commSeqType));
tdPropertyEment.setMaintainState("1");
return toAjax(tdPropertyEmentManager.saveOrUpdate(tdPropertyEment));
}
/**
*
*/
@RequiresPermissions("system:property:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdPropertyEment tdPropertyEment = tdPropertyEmentManager.selecttdEment(id);
mmap.put("tdPropertyEment", tdPropertyEment);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:property:remove")
@Log(title = "涉密设备", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(tdPropertyEmentManager.deletedEmentByids(ids));
}
/**
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/getList")
@ResponseBody
public AjaxResult getList() {
return AjaxResult.success(tdPropertyEmentManager.selectList());
}
}

@ -0,0 +1,68 @@
package com.ruoyi.web.controller.system.property;
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.BusinessType;
import com.ruoyi.system.domain.TdPropertyEment;
import com.ruoyi.web.controller.manager.TdPropertyEmentManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("/system/ementDestory")
public class TdPropertyEmentDestoryController extends BaseController {
private String prefix = "system/property/ementDestory";
@Autowired
private TdPropertyEmentManager tdPropertyEmentManager;
@RequiresPermissions("system:ementDestory:view")
@GetMapping()
public String ementDestory() {
return prefix + "/ementList";
}
/**
*
*/
@RequiresPermissions("system:ementDestory:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyEment tdPropertyEment) {
startPage();
List<TdPropertyEment> tdPropertyEments = tdPropertyEmentManager.selectEmentList(tdPropertyEment);
return getDataTable(tdPropertyEments);
}
/**
*
*/
@RequiresPermissions("system:ementDestory:destroy")
@GetMapping("/destory/{id}")
public String ementDestory(@PathVariable("id") String id, ModelMap mmap) {
TdPropertyEment tdPropertyEment = tdPropertyEmentManager.selecttdEment(id);
mmap.put("tdPropertyEment", tdPropertyEment);
return prefix + "/ementDestory";
}
/**
*
*/
@RequiresPermissions("system:ementDestory:destroy")
@Log(title = "涉密设备销毁", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ResponseBody
public AjaxResult update(TdPropertyEment tdPropertyEment) {
return toAjax(tdPropertyEmentManager.saveOrUpdate(tdPropertyEment));
}
}

@ -18,7 +18,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2024-04-29 * @date 2024-04-29
@ -40,34 +40,34 @@ public class TdPropertyInfoController extends BaseController
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:list") @RequiresPermissions("system:property:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(@RequestParam String useId) public TableDataInfo list(TdPropertyInfo tdPropertyInfo)
{ {
startPage(); startPage();
List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoByUseId(useId); List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo);
return getDataTable(tdPropertyInfos); return getDataTable(tdPropertyInfos);
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:export") @RequiresPermissions("system:property:export")
@Log(title = "资产管理", businessType = BusinessType.EXPORT) @Log(title = "密品管理", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdPropertyInfo tdPropertyInfo) public AjaxResult export(TdPropertyInfo tdPropertyInfo)
{ {
List<TdPropertyInfo> list = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo); List<TdPropertyInfo> list = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo);
ExcelUtil<TdPropertyInfo> util = new ExcelUtil<TdPropertyInfo>(TdPropertyInfo.class); ExcelUtil<TdPropertyInfo> util = new ExcelUtil<TdPropertyInfo>(TdPropertyInfo.class);
return util.exportExcel(list, "资产管理数据"); return util.exportExcel(list, "密品管理数据");
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:add") @RequiresPermissions("system:property:add")
@GetMapping("/add/{useId}") @GetMapping("/add/{useId}")
@ -78,20 +78,21 @@ public class TdPropertyInfoController extends BaseController
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:add") @RequiresPermissions("system:property:add")
@Log(title = "资产管理", businessType = BusinessType.INSERT) @Log(title = "密品管理", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(TdPropertyInfo tdPropertyInfo) public AjaxResult addSave(TdPropertyInfo tdPropertyInfo)
{ {
tdPropertyInfo.setId("Register_" + Seq.getId(Seq.commSeqType)); tdPropertyInfo.setId("Register_" + Seq.getId(Seq.commSeqType));
tdPropertyInfo.setMaintainState("1");
return toAjax(tdPropertyInfoService.insertTdPropertyInfo(tdPropertyInfo)); return toAjax(tdPropertyInfoService.insertTdPropertyInfo(tdPropertyInfo));
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:edit") @RequiresPermissions("system:property:edit")
@GetMapping("/edit/{id}") @GetMapping("/edit/{id}")
@ -102,7 +103,7 @@ public class TdPropertyInfoController extends BaseController
return prefix + "/edit"; return prefix + "/edit";
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:detail") @RequiresPermissions("system:property:detail")
@GetMapping("/detail/{id}") @GetMapping("/detail/{id}")
@ -113,10 +114,10 @@ public class TdPropertyInfoController extends BaseController
return prefix + "/detail"; return prefix + "/detail";
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:edit") @RequiresPermissions("system:property:edit")
@Log(title = "资产管理", businessType = BusinessType.UPDATE) @Log(title = "密品管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdPropertyInfo tdPropertyInfo) public AjaxResult editSave(TdPropertyInfo tdPropertyInfo)
@ -125,10 +126,10 @@ public class TdPropertyInfoController extends BaseController
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:remove") @RequiresPermissions("system:property:remove")
@Log(title = "资产管理", businessType = BusinessType.DELETE) @Log(title = "密品管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove") @PostMapping( "/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids)

@ -3,9 +3,13 @@ package com.ruoyi.web.controller.system.property;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.service.ITdPropertyInfoService; import com.ruoyi.system.service.ITdPropertyInfoService;
import com.ruoyi.system.service.TdPropertyEmentService;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -24,16 +28,17 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2024-04-26 * @date 2024-04-26
*/ */
@Controller @Controller
@RequestMapping("/system/property") @RequestMapping("/system/property")
public class TdPropertyManagerController extends BaseController public class TdPropertyManagerController extends BaseController {
{
private String prefix = "system/property/property"; private String prefix = "system/property/property";
@Autowired @Autowired
@ -41,108 +46,125 @@ public class TdPropertyManagerController extends BaseController
@Autowired @Autowired
private ITdPropertyInfoService tdPropertyInfoService; private ITdPropertyInfoService tdPropertyInfoService;
@Resource
private TdPropertyEmentService tdPropertyEmentService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:property:view") @RequiresPermissions("system:property:view")
@GetMapping() @GetMapping()
public String property() public String property() {
{
return prefix + "/property"; return prefix + "/property";
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:list") @RequiresPermissions("system:property:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdPropertyManager tdPropertyManager) public TableDataInfo list(TdPropertyManager tdPropertyManager) {
{
startPage(); startPage();
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager); List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:export") @RequiresPermissions("system:property:export")
@Log(title = "资产登记", businessType = BusinessType.EXPORT) @Log(title = "密品登记", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdPropertyManager tdPropertyManager) public AjaxResult export(TdPropertyManager tdPropertyManager) {
{
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager); List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
list.forEach(tdPropertyManager1 -> {
tdPropertyManager1.setPart(sysAreaManager.getAreaName(tdPropertyManager1.getPart()));
tdPropertyManager1.setAreaId(sysAreaManager.getAreaName(tdPropertyManager1.getAreaId()));
});
ExcelUtil<TdPropertyManager> util = new ExcelUtil<TdPropertyManager>(TdPropertyManager.class); ExcelUtil<TdPropertyManager> util = new ExcelUtil<TdPropertyManager>(TdPropertyManager.class);
return util.exportExcel(list, "资产登记数据"); return util.exportExcel(list, "密品登记数据");
} }
/** /**
* *
*/ */
@GetMapping("/add") @GetMapping("/add")
public String add(ModelMap mmap) public String add(ModelMap mmap) {
{ mmap.put("sysuser", getSysUser());
mmap.put("sysuser",getSysUser());
return prefix + "/add"; return prefix + "/add";
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:add") @RequiresPermissions("system:property:add")
@Log(title = "资产登记", businessType = BusinessType.INSERT) @Log(title = "密品登记", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(TdPropertyManager tdPropertyManager) public AjaxResult addSave(TdPropertyManager tdPropertyManager) {
{ tdPropertyManager.setUseId("Property_" + Seq.getId(Seq.commSeqType));
tdPropertyManager.setUseId("Property_"+ Seq.getId(Seq.commSeqType)); tdPropertyManager.setDeptId(ShiroUtils.getSysUser().getDeptId());
return toAjax(tdPropertyManagerService.insertTdPropertyManager(tdPropertyManager)); return toAjax(tdPropertyManagerService.insertTdPropertyManager(tdPropertyManager));
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:edit") @RequiresPermissions("system:property:edit")
@GetMapping("/edit/{useId}") @GetMapping("/edit/{useId}")
public String edit(@PathVariable("useId") String useId, ModelMap mmap) public String edit(@PathVariable("useId") String useId, ModelMap mmap) {
{
TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId); TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId);
mmap.put("tdPropertyManager", tdPropertyManager); mmap.put("tdPropertyManager", tdPropertyManager);
return prefix + "/edit"; return prefix + "/edit";
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:edit") @RequiresPermissions("system:property:edit")
@Log(title = "资产登记", businessType = BusinessType.UPDATE) @Log(title = "密品登记", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdPropertyManager tdPropertyManager) public AjaxResult editSave(TdPropertyManager tdPropertyManager) {
{ tdPropertyManager.setDeptId(ShiroUtils.getSysUser().getDeptId());
return toAjax(tdPropertyManagerService.updateTdPropertyManager(tdPropertyManager)); return toAjax(tdPropertyManagerService.updateTdPropertyManager(tdPropertyManager));
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:remove") @RequiresPermissions("system:property:remove")
@Log(title = "资产登记", businessType = BusinessType.DELETE) @Log(title = "密品登记", businessType = BusinessType.DELETE)
@PostMapping( "/remove") @PostMapping("/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids) {
{ QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.in("use_id", ids.split(","));
tdPropertyInfoService.remove(queryWrapper);
tdPropertyEmentService.remove(queryWrapper);
return toAjax(tdPropertyManagerService.deleteTdPropertyManagerByUseIds(ids)); return toAjax(tdPropertyManagerService.deleteTdPropertyManagerByUseIds(ids));
} }
/** /**
* *
*/ */
@RequiresPermissions("system:property:list") @RequiresPermissions("system:property:list")
@GetMapping("/detail/{useId}") @GetMapping("/detail/{useId}")
public String detail(@PathVariable("useId") String useId, ModelMap mmap) public String detail(@PathVariable("useId") String useId, ModelMap mmap) {
{ mmap.put("useId", useId);
mmap.put("useId",useId);
return "system/property/data/propertyinfo"; return "system/property/data/propertyinfo";
} }
/**
*
*/
@RequiresPermissions("system:property:list")
@GetMapping("/ementDetail/{useId}")
public String ementDetail(@PathVariable("useId") String useId, ModelMap mmap) {
mmap.put("useId", useId);
return "system/property/ementdata/propertyEment";
}
} }

@ -2,7 +2,10 @@ package com.ruoyi.web.controller.system.property;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.system.service.ITdPropertyNetinfoService;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -21,25 +24,31 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2024-05-09 * @date 2024-05-09
*/ */
@Controller @Controller
@RequestMapping("/system/network") @RequestMapping("/system/network")
public class TdPropertyNetController extends BaseController public class TdPropertyNetController extends BaseController {
{
private String prefix = "system/network/network"; private String prefix = "system/network/network";
@Autowired @Autowired
private ITdPropertyNetService tdPropertyNetService; private ITdPropertyNetService tdPropertyNetService;
@Autowired
private ITdPropertyNetinfoService tdPropertyNetinfoService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:network:view") @RequiresPermissions("system:network:view")
@GetMapping() @GetMapping()
public String network() public String network() {
{
return prefix + "/network"; return prefix + "/network";
} }
@ -49,8 +58,7 @@ public class TdPropertyNetController extends BaseController
@RequiresPermissions("system:network:list") @RequiresPermissions("system:network:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdPropertyNet tdPropertyNet) public TableDataInfo list(TdPropertyNet tdPropertyNet) {
{
startPage(); startPage();
List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet); List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet);
return getDataTable(list); return getDataTable(list);
@ -63,9 +71,12 @@ public class TdPropertyNetController extends BaseController
@Log(title = "涉密网络设备", businessType = BusinessType.EXPORT) @Log(title = "涉密网络设备", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdPropertyNet tdPropertyNet) public AjaxResult export(TdPropertyNet tdPropertyNet) {
{
List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet); List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet);
list.forEach(tdPropertyNet1 -> {
tdPropertyNet1.setFramework(sysAreaManager.getAreaName(tdPropertyNet1.getFramework()));
tdPropertyNet1.setArea(sysAreaManager.getAreaName(tdPropertyNet1.getArea()));
});
ExcelUtil<TdPropertyNet> util = new ExcelUtil<TdPropertyNet>(TdPropertyNet.class); ExcelUtil<TdPropertyNet> util = new ExcelUtil<TdPropertyNet>(TdPropertyNet.class);
return util.exportExcel(list, "涉密网络设备数据"); return util.exportExcel(list, "涉密网络设备数据");
} }
@ -74,9 +85,8 @@ public class TdPropertyNetController extends BaseController
* *
*/ */
@GetMapping("/add") @GetMapping("/add")
public String add(ModelMap mmap) public String add(ModelMap mmap) {
{ mmap.put("sysuser", getSysUser());
mmap.put("sysuser",getSysUser());
return prefix + "/add"; return prefix + "/add";
} }
@ -87,9 +97,8 @@ public class TdPropertyNetController extends BaseController
@Log(title = "涉密网络设备", businessType = BusinessType.INSERT) @Log(title = "涉密网络设备", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(TdPropertyNet tdPropertyNet) public AjaxResult addSave(TdPropertyNet tdPropertyNet) {
{ tdPropertyNet.setNetId("Net_" + Seq.getId(Seq.commSeqType));
tdPropertyNet.setNetId("Net_"+ Seq.getId(Seq.commSeqType));
return toAjax(tdPropertyNetService.insertTdPropertyNet(tdPropertyNet)); return toAjax(tdPropertyNetService.insertTdPropertyNet(tdPropertyNet));
} }
@ -98,8 +107,7 @@ public class TdPropertyNetController extends BaseController
*/ */
@RequiresPermissions("system:network:edit") @RequiresPermissions("system:network:edit")
@GetMapping("/edit/{netId}") @GetMapping("/edit/{netId}")
public String edit(@PathVariable("netId") String netId, ModelMap mmap) public String edit(@PathVariable("netId") String netId, ModelMap mmap) {
{
TdPropertyNet tdPropertyNet = tdPropertyNetService.selectTdPropertyNetByNetId(netId); TdPropertyNet tdPropertyNet = tdPropertyNetService.selectTdPropertyNetByNetId(netId);
mmap.put("tdPropertyNet", tdPropertyNet); mmap.put("tdPropertyNet", tdPropertyNet);
return prefix + "/edit"; return prefix + "/edit";
@ -112,8 +120,7 @@ public class TdPropertyNetController extends BaseController
@Log(title = "涉密网络设备", businessType = BusinessType.UPDATE) @Log(title = "涉密网络设备", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdPropertyNet tdPropertyNet) public AjaxResult editSave(TdPropertyNet tdPropertyNet) {
{
return toAjax(tdPropertyNetService.updateTdPropertyNet(tdPropertyNet)); return toAjax(tdPropertyNetService.updateTdPropertyNet(tdPropertyNet));
} }
@ -122,10 +129,12 @@ public class TdPropertyNetController extends BaseController
*/ */
@RequiresPermissions("system:network:remove") @RequiresPermissions("system:network:remove")
@Log(title = "涉密网络设备", businessType = BusinessType.DELETE) @Log(title = "涉密网络设备", businessType = BusinessType.DELETE)
@PostMapping( "/remove") @PostMapping("/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids) {
{ QueryWrapper queryWrapper= new QueryWrapper();
queryWrapper.in("net_id",ids.split(","));
tdPropertyNetinfoService.remove(queryWrapper);
return toAjax(tdPropertyNetService.deleteTdPropertyNetByNetIds(ids)); return toAjax(tdPropertyNetService.deleteTdPropertyNetByNetIds(ids));
} }
@ -134,9 +143,8 @@ public class TdPropertyNetController extends BaseController
*/ */
@RequiresPermissions("system:network:list") @RequiresPermissions("system:network:list")
@GetMapping("/detail/{netId}") @GetMapping("/detail/{netId}")
public String detail(@PathVariable("netId") String netId, ModelMap mmap) public String detail(@PathVariable("netId") String netId, ModelMap mmap) {
{ mmap.put("netId", netId);
mmap.put("netId",netId);
return "system/network/netinfo/netinfo"; return "system/network/netinfo/netinfo";
} }

@ -45,10 +45,10 @@ public class TdPropertyNetinfoController extends BaseController
@RequiresPermissions("system:network:list") @RequiresPermissions("system:network:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(@RequestParam String netId) public TableDataInfo list(TdPropertyNetinfo tdPropertyNetinfo)
{ {
startPage(); startPage();
List<TdPropertyNetinfo> list = tdPropertyNetinfoService.selectTdPropertyNetinfoByNetId(netId); List<TdPropertyNetinfo> list = tdPropertyNetinfoService.selectTdPropertyNetinfoList(tdPropertyNetinfo);
return getDataTable(list); return getDataTable(list);
} }

@ -1,16 +1,15 @@
package com.ruoyi.web.controller.system.system; package com.ruoyi.web.controller.system.system;
import java.util.List; import java.util.List;
import java.util.Objects;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
@ -184,4 +183,12 @@ public class SysDeptController extends BaseController
List<Ztree> ztrees = deptService.selectDeptTreeExcludeChild(dept); List<Ztree> ztrees = deptService.selectDeptTreeExcludeChild(dept);
return ztrees; return ztrees;
} }
@ApiOperation("查询下级")
@GetMapping("/detpList")
@ResponseBody
public AjaxResult getDeptById(@RequestParam(required = false) Long deptId) {
return success(deptService.getDeptBydeptId(Objects.nonNull(deptId) ? deptId : 0));
}
} }

@ -1,6 +1,8 @@
package com.ruoyi.web.controller.system.system; package com.ruoyi.web.controller.system.system;
import java.util.List; import java.util.List;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -22,13 +24,12 @@ import com.ruoyi.system.service.ISysDictDataService;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
@Controller @Controller
@RequestMapping("/system/dict/data") @RequestMapping("/system/dict/data")
public class SysDictDataController extends BaseController public class SysDictDataController extends BaseController {
{
private String prefix = "system/dict/data"; private String prefix = "system/dict/data";
@Autowired @Autowired
@ -36,16 +37,14 @@ public class SysDictDataController extends BaseController
@RequiresPermissions("system:dict:view") @RequiresPermissions("system:dict:view")
@GetMapping() @GetMapping()
public String dictData() public String dictData() {
{
return prefix + "/data"; return prefix + "/data";
} }
@PostMapping("/list") @PostMapping("/list")
@RequiresPermissions("system:dict:list") @RequiresPermissions("system:dict:list")
@ResponseBody @ResponseBody
public TableDataInfo list(SysDictData dictData) public TableDataInfo list(SysDictData dictData) {
{
startPage(); startPage();
List<SysDictData> list = dictDataService.selectDictDataList(dictData); List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return getDataTable(list); return getDataTable(list);
@ -55,8 +54,7 @@ public class SysDictDataController extends BaseController
@RequiresPermissions("system:dict:export") @RequiresPermissions("system:dict:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(SysDictData dictData) public AjaxResult export(SysDictData dictData) {
{
List<SysDictData> list = dictDataService.selectDictDataList(dictData); List<SysDictData> list = dictDataService.selectDictDataList(dictData);
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class); ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
return util.exportExcel(list, "字典数据"); return util.exportExcel(list, "字典数据");
@ -66,8 +64,7 @@ public class SysDictDataController extends BaseController
* *
*/ */
@GetMapping("/add/{dictType}") @GetMapping("/add/{dictType}")
public String add(@PathVariable("dictType") String dictType, ModelMap mmap) public String add(@PathVariable("dictType") String dictType, ModelMap mmap) {
{
mmap.put("dictType", dictType); mmap.put("dictType", dictType);
return prefix + "/add"; return prefix + "/add";
} }
@ -79,8 +76,7 @@ public class SysDictDataController extends BaseController
@RequiresPermissions("system:dict:add") @RequiresPermissions("system:dict:add")
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(@Validated SysDictData dict) public AjaxResult addSave(@Validated SysDictData dict) {
{
dict.setCreateBy(getLoginName()); dict.setCreateBy(getLoginName());
return toAjax(dictDataService.insertDictData(dict)); return toAjax(dictDataService.insertDictData(dict));
} }
@ -90,8 +86,7 @@ public class SysDictDataController extends BaseController
*/ */
@RequiresPermissions("system:dict:edit") @RequiresPermissions("system:dict:edit")
@GetMapping("/edit/{dictCode}") @GetMapping("/edit/{dictCode}")
public String edit(@PathVariable("dictCode") Long dictCode, ModelMap mmap) public String edit(@PathVariable("dictCode") Long dictCode, ModelMap mmap) {
{
mmap.put("dict", dictDataService.selectDictDataById(dictCode)); mmap.put("dict", dictDataService.selectDictDataById(dictCode));
return prefix + "/edit"; return prefix + "/edit";
} }
@ -103,8 +98,7 @@ public class SysDictDataController extends BaseController
@RequiresPermissions("system:dict:edit") @RequiresPermissions("system:dict:edit")
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(@Validated SysDictData dict) public AjaxResult editSave(@Validated SysDictData dict) {
{
dict.setUpdateBy(getLoginName()); dict.setUpdateBy(getLoginName());
return toAjax(dictDataService.updateDictData(dict)); return toAjax(dictDataService.updateDictData(dict));
} }
@ -113,9 +107,17 @@ public class SysDictDataController extends BaseController
@RequiresPermissions("system:dict:remove") @RequiresPermissions("system:dict:remove")
@PostMapping("/remove") @PostMapping("/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids) {
{
dictDataService.deleteDictDataByIds(ids); dictDataService.deleteDictDataByIds(ids);
return success(); return success();
} }
@ApiOperation("根据类型查询字典值")
@PostMapping("/dataList")
@ResponseBody
public AjaxResult dataList(SysDictData dictData) {
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return success(list);
}
} }

@ -2,8 +2,11 @@ package com.ruoyi.web.controller.system.system;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
@ -28,7 +31,7 @@ import com.ruoyi.system.service.ISysMenuService;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
@Controller @Controller
@ -43,6 +46,10 @@ public class SysIndexController extends BaseController
@Autowired @Autowired
private SysPasswordService passwordService; private SysPasswordService passwordService;
@Autowired
private ISysUserService userService;
// 系统首页 // 系统首页
@GetMapping("/index") @GetMapping("/index")
public String index(ModelMap mmap) public String index(ModelMap mmap)
@ -65,7 +72,12 @@ public class SysIndexController extends BaseController
mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate())); mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate())); mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
mmap.put("isMobile", ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent"))); mmap.put("isMobile", ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")));
//获取系统登录的方式
SysUser sysUser = userService.lambdaQuery().select(SysUser::getIsWay)
.eq(SysUser::getUserId, user.getUserId()).one();
if(Objects.nonNull(sysUser)){
mmap.put("isWay", sysUser.getIsWay());
}
// 菜单导航显示风格 // 菜单导航显示风格
String menuStyle = configService.selectConfigByKey("sys.index.menuStyle"); String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
// 移动端,默认使左侧导航菜单,否则取默认配置 // 移动端,默认使左侧导航菜单,否则取默认配置

@ -3,7 +3,9 @@ package com.ruoyi.web.controller.system.system;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.security.RsaUtils; import com.ruoyi.common.utils.security.RsaUtils;
import com.ruoyi.system.service.ISysUserService;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.authc.UsernamePasswordToken;
@ -22,9 +24,11 @@ import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.service.ConfigService; import com.ruoyi.framework.web.service.ConfigService;
import java.util.Objects;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
@Controller @Controller
@ -39,6 +43,11 @@ public class SysLoginController extends BaseController
@Autowired @Autowired
private ConfigService configService; private ConfigService configService;
@Autowired
private ISysUserService userService;
@GetMapping("/login") @GetMapping("/login")
public String login(HttpServletRequest request, HttpServletResponse response, ModelMap mmap) public String login(HttpServletRequest request, HttpServletResponse response, ModelMap mmap)
{ {
@ -76,6 +85,37 @@ public class SysLoginController extends BaseController
} }
} }
@PostMapping("/login/ukey")
@ResponseBody
public AjaxResult ukeyLogin(String ukeyId) {
try {
// 1. 参数校验
if (StringUtils.isEmpty(ukeyId)) {
return AjaxResult.error("UKey标识不能为空");
}
// 2. 查询用户
SysUser user = userService.lambdaQuery()
.eq(SysUser::getUkeyId, ukeyId)
.eq(SysUser::getStatus, "0")
.eq(SysUser::getDelFlag, "0")
.one();
if (Objects.isNull(user)) {
return AjaxResult.error("未找到UKey绑定的用户");
}
// 3. 复用原有登录逻辑
UsernamePasswordToken token = new UsernamePasswordToken(
user.getUserName(), "", true);
SecurityUtils.getSubject().login(token);
return success();
} catch (Exception e) {
String msg = "未识别到UKey";
if (StringUtils.isNotEmpty(e.getMessage())) {
msg = e.getMessage();
}
return error(msg);
}
}
@GetMapping("/unauth") @GetMapping("/unauth")
public String unauth() public String unauth()
{ {

@ -110,4 +110,12 @@ public class SysNoticeController extends BaseController
{ {
return toAjax(noticeService.deleteNoticeByIds(ids)); return toAjax(noticeService.deleteNoticeByIds(ids));
} }
@GetMapping ("/getNotice")
@ResponseBody
public AjaxResult getNotice()
{
return AjaxResult.success(noticeService.selectList());
}
} }

@ -73,7 +73,7 @@ public class SysProfileController extends BaseController
return prefix + "/resetPwd"; return prefix + "/resetPwd";
} }
@Log(title = "重置密码", businessType = BusinessType.UPDATE) @Log(title = "重置密码", businessType = BusinessType.RESET)
@PostMapping("/resetPwd") @PostMapping("/resetPwd")
@ResponseBody @ResponseBody
public AjaxResult resetPwd(String oldPassword, String newPassword) public AjaxResult resetPwd(String oldPassword, String newPassword)

@ -0,0 +1,121 @@
package com.ruoyi.web.controller.system.system;
import cn.hutool.core.convert.Convert;
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.core.domain.entity.SysUserVo;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.shiro.util.AuthorizationUtils;
import com.ruoyi.system.domain.record.SysUserAfter;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.controller.manager.UserRecordManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
/**
* packageName com.ruoyi.web.controller.system.system
*
* @author wangxy
* @version JDK 8
* @className SysUserApplyController
* @date 2024/8/5
* @description
*/
@Controller
@RequestMapping("/system/userApply")
public class SysUserApplyController extends BaseController {
@Autowired
private ISysUserService userService;
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysPostService postService;
@Autowired
private UserRecordManager userRecordManager;
private String prefix = "system/user/userApply";
@RequiresPermissions("system:userApply:view")
@GetMapping()
public String apply() {
return prefix + "/userApply";
}
/**
*
*
* @param user
* @return
*/
@RequiresPermissions("system:userApply:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysUser user) {
startPage();
user.setExamine("0");
List<SysUser> list = userService.selectUserList(user);
List<SysUser> userList = list.stream()
.filter(u -> !"admin".equals(u.getLoginName())).collect(Collectors.toList());
return getDataTable(userList);
}
/**
*
*/
@RequiresPermissions("system:userApply:apply")
@GetMapping("/apply/{userId}")
public String apply(@PathVariable("userId") Long userId, ModelMap mmap) {
List<SysRole> roles = roleService.selectRolesByUserId(userId);
mmap.put("sysuser", getSysUser());
mmap.put("user", userService.selectUserById(userId));
mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
mmap.put("posts", postService.selectPostsByUserId(userId));
return prefix + "/applyDetail";
}
@GetMapping("/submit2/{userId}")
@ResponseBody
public AjaxResult submit2(@PathVariable("userId") Long userId) {
boolean update = userService.lambdaUpdate()
.eq(SysUser::getUserId, userId)
.set(SysUser::getExamine, "3").update();
return toAjax(update);
}
/**
*
*/
@Log(title = "用户定岗", businessType = BusinessType.UPDATE)
@PostMapping("/submit")
@ResponseBody
public AjaxResult submit(@Validated SysUserVo userVo) {
SysUser user = Convert.convert(SysUser.class, userVo);
user.setExamine("3");
userRecordManager.saveOrUpdate(user);
return toAjax(userService.updateUser(user));
}
}

@ -2,17 +2,19 @@ package com.ruoyi.web.controller.system.system;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import cn.hutool.core.util.RandomUtil;
import cn.hutool.extra.pinyin.PinyinUtil;
import com.ruoyi.web.controller.manager.UserRecordManager;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
@ -36,13 +38,13 @@ import com.ruoyi.system.service.ISysUserService;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
@Controller @Controller
@RequestMapping("/system/user") @RequestMapping("/system/user")
public class SysUserController extends BaseController public class SysUserController extends BaseController {
{ private static final Logger log = LoggerFactory.getLogger(SysUserController.class);
private String prefix = "system/user"; private String prefix = "system/user";
@Autowired @Autowired
@ -50,7 +52,7 @@ public class SysUserController extends BaseController
@Autowired @Autowired
private ISysRoleService roleService; private ISysRoleService roleService;
@Autowired @Autowired
private ISysDeptService deptService; private ISysDeptService deptService;
@ -60,18 +62,19 @@ public class SysUserController extends BaseController
@Autowired @Autowired
private SysPasswordService passwordService; private SysPasswordService passwordService;
@Autowired
private UserRecordManager userRecordManager;
@RequiresPermissions("system:user:view") @RequiresPermissions("system:user:view")
@GetMapping() @GetMapping()
public String user() public String user() {
{
return prefix + "/user"; return prefix + "/user";
} }
@RequiresPermissions("system:user:list") @RequiresPermissions("system:user:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(SysUser user) public TableDataInfo list(SysUser user) {
{
startPage(); startPage();
List<SysUser> list = userService.selectUserList(user); List<SysUser> list = userService.selectUserList(user);
return getDataTable(list); return getDataTable(list);
@ -81,8 +84,7 @@ public class SysUserController extends BaseController
@RequiresPermissions("system:user:export") @RequiresPermissions("system:user:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(SysUser user) public AjaxResult export(SysUser user) {
{
List<SysUser> list = userService.selectUserList(user); List<SysUser> list = userService.selectUserList(user);
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.exportExcel(list, "用户数据"); return util.exportExcel(list, "用户数据");
@ -92,8 +94,7 @@ public class SysUserController extends BaseController
@RequiresPermissions("system:user:import") @RequiresPermissions("system:user:import")
@PostMapping("/importData") @PostMapping("/importData")
@ResponseBody @ResponseBody
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
List<SysUser> userList = util.importExcel(file.getInputStream()); List<SysUser> userList = util.importExcel(file.getInputStream());
String message = userService.importUser(userList, updateSupport, getLoginName()); String message = userService.importUser(userList, updateSupport, getLoginName());
@ -103,8 +104,7 @@ public class SysUserController extends BaseController
@RequiresPermissions("system:user:view") @RequiresPermissions("system:user:view")
@GetMapping("/importTemplate") @GetMapping("/importTemplate")
@ResponseBody @ResponseBody
public AjaxResult importTemplate() public AjaxResult importTemplate() {
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.importTemplateExcel("用户数据"); return util.importTemplateExcel("用户数据");
} }
@ -113,8 +113,7 @@ public class SysUserController extends BaseController
* *
*/ */
@GetMapping("/add") @GetMapping("/add")
public String add(ModelMap mmap) public String add(ModelMap mmap) {
{
mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); mmap.put("roles", roleService.selectRoleAll().stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
mmap.put("posts", postService.selectPostAll()); mmap.put("posts", postService.selectPostAll());
return prefix + "/add"; return prefix + "/add";
@ -127,18 +126,12 @@ public class SysUserController extends BaseController
@Log(title = "用户管理", businessType = BusinessType.INSERT) @Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(@Validated SysUser user) public AjaxResult addSave(@Validated SysUser user) {
{ if (!userService.checkLoginNameUnique(user)) {
if (!userService.checkLoginNameUnique(user))
{
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在"); return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
} } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) {
else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
{
return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在"); return error("新增用户'" + user.getLoginName() + "'失败,手机号码已存在");
} } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) {
else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
{
return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在"); return error("新增用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
} }
user.setSalt(ShiroUtils.randomSalt()); user.setSalt(ShiroUtils.randomSalt());
@ -152,8 +145,7 @@ public class SysUserController extends BaseController
*/ */
@RequiresPermissions("system:user:edit") @RequiresPermissions("system:user:edit")
@GetMapping("/edit/{userId}") @GetMapping("/edit/{userId}")
public String edit(@PathVariable("userId") Long userId, ModelMap mmap) public String edit(@PathVariable("userId") Long userId, ModelMap mmap) {
{
userService.checkUserDataScope(userId); userService.checkUserDataScope(userId);
List<SysRole> roles = roleService.selectRolesByUserId(userId); List<SysRole> roles = roleService.selectRolesByUserId(userId);
mmap.put("user", userService.selectUserById(userId)); mmap.put("user", userService.selectUserById(userId));
@ -169,49 +161,41 @@ public class SysUserController extends BaseController
@Log(title = "用户管理", businessType = BusinessType.UPDATE) @Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(@Validated SysUser user) public AjaxResult editSave(@Validated SysUser user) {
{
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId()); userService.checkUserDataScope(user.getUserId());
if (!userService.checkLoginNameUnique(user)) if (!userService.checkLoginNameUnique(user)) {
{
return error("修改用户'" + user.getLoginName() + "'失败,登录账号已存在"); return error("修改用户'" + user.getLoginName() + "'失败,登录账号已存在");
} } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) {
else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
{
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在"); return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
} } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) {
else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
{
return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在"); return error("修改用户'" + user.getLoginName() + "'失败,邮箱账号已存在");
} }
user.setUpdateBy(getLoginName()); user.setUpdateBy(getLoginName());
user.setExamine("2");
AuthorizationUtils.clearAllCachedAuthorizationInfo(); AuthorizationUtils.clearAllCachedAuthorizationInfo();
userRecordManager.saveOrUpdate(user);
return toAjax(userService.updateUser(user)); return toAjax(userService.updateUser(user));
} }
@RequiresPermissions("system:user:resetPwd") @RequiresPermissions("system:user:resetPwd")
@GetMapping("/resetPwd/{userId}") @GetMapping("/resetPwd/{userId}")
public String resetPwd(@PathVariable("userId") Long userId, ModelMap mmap) public String resetPwd(@PathVariable("userId") Long userId, ModelMap mmap) {
{
mmap.put("user", userService.selectUserById(userId)); mmap.put("user", userService.selectUserById(userId));
return prefix + "/resetPwd"; return prefix + "/resetPwd";
} }
@RequiresPermissions("system:user:resetPwd") @RequiresPermissions("system:user:resetPwd")
@Log(title = "重置密码", businessType = BusinessType.UPDATE) @Log(title = "重置密码", businessType = BusinessType.RESET)
@PostMapping("/resetPwd") @PostMapping("/resetPwd")
@ResponseBody @ResponseBody
public AjaxResult resetPwdSave(SysUser user) public AjaxResult resetPwdSave(SysUser user) {
{
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId()); userService.checkUserDataScope(user.getUserId());
user.setSalt(ShiroUtils.randomSalt()); user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt())); user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
if (userService.resetUserPwd(user) > 0) if (userService.resetUserPwd(user) > 0) {
{ if (ShiroUtils.getUserId().longValue() == user.getUserId().longValue()) {
if (ShiroUtils.getUserId().longValue() == user.getUserId().longValue())
{
setSysUser(userService.selectUserById(user.getUserId())); setSysUser(userService.selectUserById(user.getUserId()));
} }
return success(); return success();
@ -219,12 +203,45 @@ public class SysUserController extends BaseController
return error(); return error();
} }
/**
* resetUeky
* @param userId
* @param mmap
* @return
*/
//@RequiresPermissions("system:user:resetUeky")
@GetMapping("/resetUeky/{userId}")
public String resetUeky(@PathVariable("userId") Long userId, ModelMap mmap) {
mmap.put("user", userService.lambdaQuery().
select(SysUser::getUserId,SysUser::getUkeyId)
.eq(SysUser::getUserId, userId).one());
return prefix + "/resetUeky";
}
/**
* resetUeky
* @param user
* @return
*/
//@RequiresPermissions("system:user:resetUeky")
@Log(title = "UKey绑定", businessType = BusinessType.RESET)
@PostMapping("/resetUekySave")
@ResponseBody
public AjaxResult resetUekySave(SysUser user) {
boolean update = userService.lambdaUpdate()
.eq(SysUser::getUserId, user.getUserId())
.set(SysUser::getUkeyId, user.getUkeyId())
.update();
if (update) {
return success();
}
return error();
}
/** /**
* *
*/ */
@GetMapping("/authRole/{userId}") @GetMapping("/authRole/{userId}")
public String authRole(@PathVariable("userId") Long userId, ModelMap mmap) public String authRole(@PathVariable("userId") Long userId, ModelMap mmap) {
{
SysUser user = userService.selectUserById(userId); SysUser user = userService.selectUserById(userId);
// 获取用户所属的角色列表 // 获取用户所属的角色列表
List<SysRole> roles = roleService.selectRolesByUserId(userId); List<SysRole> roles = roleService.selectRolesByUserId(userId);
@ -240,8 +257,7 @@ public class SysUserController extends BaseController
@Log(title = "用户管理", businessType = BusinessType.GRANT) @Log(title = "用户管理", businessType = BusinessType.GRANT)
@PostMapping("/authRole/insertAuthRole") @PostMapping("/authRole/insertAuthRole")
@ResponseBody @ResponseBody
public AjaxResult insertAuthRole(Long userId, Long[] roleIds) public AjaxResult insertAuthRole(Long userId, Long[] roleIds) {
{
userService.checkUserDataScope(userId); userService.checkUserDataScope(userId);
userService.insertUserAuth(userId, roleIds); userService.insertUserAuth(userId, roleIds);
AuthorizationUtils.clearAllCachedAuthorizationInfo(); AuthorizationUtils.clearAllCachedAuthorizationInfo();
@ -252,10 +268,8 @@ public class SysUserController extends BaseController
@Log(title = "用户管理", businessType = BusinessType.DELETE) @Log(title = "用户管理", businessType = BusinessType.DELETE)
@PostMapping("/remove") @PostMapping("/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids) {
{ if (ArrayUtils.contains(Convert.toLongArray(ids), getUserId())) {
if (ArrayUtils.contains(Convert.toLongArray(ids), getUserId()))
{
return error("当前用户不能删除"); return error("当前用户不能删除");
} }
return toAjax(userService.deleteUserByIds(ids)); return toAjax(userService.deleteUserByIds(ids));
@ -266,8 +280,7 @@ public class SysUserController extends BaseController
*/ */
@PostMapping("/checkLoginNameUnique") @PostMapping("/checkLoginNameUnique")
@ResponseBody @ResponseBody
public boolean checkLoginNameUnique(SysUser user) public boolean checkLoginNameUnique(SysUser user) {
{
return userService.checkLoginNameUnique(user); return userService.checkLoginNameUnique(user);
} }
@ -276,8 +289,7 @@ public class SysUserController extends BaseController
*/ */
@PostMapping("/checkPhoneUnique") @PostMapping("/checkPhoneUnique")
@ResponseBody @ResponseBody
public boolean checkPhoneUnique(SysUser user) public boolean checkPhoneUnique(SysUser user) {
{
return userService.checkPhoneUnique(user); return userService.checkPhoneUnique(user);
} }
@ -286,8 +298,7 @@ public class SysUserController extends BaseController
*/ */
@PostMapping("/checkEmailUnique") @PostMapping("/checkEmailUnique")
@ResponseBody @ResponseBody
public boolean checkEmailUnique(SysUser user) public boolean checkEmailUnique(SysUser user) {
{
return userService.checkEmailUnique(user); return userService.checkEmailUnique(user);
} }
@ -298,8 +309,7 @@ public class SysUserController extends BaseController
@RequiresPermissions("system:user:edit") @RequiresPermissions("system:user:edit")
@PostMapping("/changeStatus") @PostMapping("/changeStatus")
@ResponseBody @ResponseBody
public AjaxResult changeStatus(SysUser user) public AjaxResult changeStatus(SysUser user) {
{
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId()); userService.checkUserDataScope(user.getUserId());
return toAjax(userService.changeStatus(user)); return toAjax(userService.changeStatus(user));
@ -311,25 +321,77 @@ public class SysUserController extends BaseController
@RequiresPermissions("system:user:list") @RequiresPermissions("system:user:list")
@GetMapping("/deptTreeData") @GetMapping("/deptTreeData")
@ResponseBody @ResponseBody
public List<Ztree> deptTreeData() public List<Ztree> deptTreeData() {
{
List<Ztree> ztrees = deptService.selectDeptTree(new SysDept()); List<Ztree> ztrees = deptService.selectDeptTree(new SysDept());
return ztrees; return ztrees;
} }
/** /**
* *
* *
* @param deptId ID * @param deptId ID
*/ */
@RequiresPermissions("system:user:list") @RequiresPermissions("system:user:list")
@GetMapping("/selectDeptTree/{deptId}") @GetMapping("/selectDeptTree/{deptId}")
public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap) public String selectDeptTree(@PathVariable("deptId") Long deptId, ModelMap mmap) {
{
mmap.put("dept", deptService.selectDeptById(deptId)); mmap.put("dept", deptService.selectDeptById(deptId));
return prefix + "/deptTree"; return prefix + "/deptTree";
} }
@GetMapping("/getPinyin")
@ResponseBody
public AjaxResult getPinyin(@RequestParam String name) {
return AjaxResult.success(getFirstLetter(name));
}
/**
*
*
* @param columnName
* @return java.lang.String
*/
public String getFirstLetter(String columnName) {
return PinyinUtil.getFirstLetter(columnName, "") + RandomUtil.randomNumbers(4);
}
/**
*
*
* @param userId
* @param mmap
* @return java.lang.String
*/
@GetMapping("/getChangeRecord/{userId}")
public String getChangeRecord(@PathVariable("userId") Long userId, ModelMap mmap) {
mmap.put("userRecordDTO", userRecordManager.getUserRecordDTO(userId));
return prefix + "/changeRecord";
}
/**
*
*
* @param userId
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@GetMapping("/getUserRecordDTO")
@ResponseBody
public AjaxResult getUserRecordDTO(@RequestParam Long userId) {
return AjaxResult.success(userRecordManager.getUserRecordDTO(userId));
}
@PostMapping("/userList")
@ResponseBody
public AjaxResult userList() {
List<SysUser> list = userService.lambdaQuery().
select(SysUser::getUserId, SysUser::getUserName).list();
List<SysUser> userList = list.stream()
.filter(u -> !"admin".equals(u.getUserName())).collect(Collectors.toList());
return AjaxResult.success(userList);
}
} }

@ -53,8 +53,28 @@ public class SysUserExamineController extends BaseController {
public TableDataInfo list(SysUser user) public TableDataInfo list(SysUser user)
{ {
startPage(); startPage();
user.setExamine("2");
List<SysUser> list = userService.selectUserList(user); List<SysUser> list = userService.selectUserList(user);
return getDataTable(list); List<SysUser> userList = list.stream()
.filter(u -> !"admin".equals(u.getLoginName())).collect(Collectors.toList());
return getDataTable(userList);
}
/**
*
* @param user
* @return
*/
@PostMapping("/reviewList")
@ResponseBody
public TableDataInfo reviewList(SysUser user)
{
startPage();
user.setExamine("0");
List<SysUser> list = userService.selectUserList(user);
List<SysUser> userList = list.stream()
.filter(u -> !"admin".equals(u.getLoginName())).collect(Collectors.toList());
return getDataTable(userList);
} }
/** /**
@ -90,7 +110,7 @@ public class SysUserExamineController extends BaseController {
sysUser.setExamine(examine); sysUser.setExamine(examine);
sysUser.setExaminedate(examinedate); sysUser.setExaminedate(examinedate);
sysUser.setExamineuser(examineuser); sysUser.setExamineuser(examineuser);
return toAjax(userService.updateUser(sysUser)); return toAjax(userService.updateUserAudit(sysUser));
} }
/** /**

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.system.system; package com.ruoyi.web.controller.system.system;
import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -87,6 +88,9 @@ public class TdIndentureController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(TdIndenture tdIndenture) public AjaxResult addSave(TdIndenture tdIndenture)
{ {
tdIndenture.setCreateStaffid(getLoginName());
tdIndenture.setCreateDate(new Date());
tdIndenture.setDeptId(getSysUser().getDeptId());
return toAjax(tdIndentureService.insertTdIndenture(tdIndenture)); return toAjax(tdIndentureService.insertTdIndenture(tdIndenture));
} }
@ -111,6 +115,7 @@ public class TdIndentureController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(TdIndenture tdIndenture) public AjaxResult editSave(TdIndenture tdIndenture)
{ {
tdIndenture.setDeptId(getSysUser().getDeptId());
return toAjax(tdIndentureService.updateTdIndenture(tdIndenture)); return toAjax(tdIndentureService.updateTdIndenture(tdIndenture));
} }

@ -1,6 +1,7 @@
package com.ruoyi.web.controller.system.system; package com.ruoyi.web.controller.system.system;
import java.util.List; import java.util.List;
import java.util.Objects;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysPostService;
@ -145,11 +146,6 @@ public class TdLeaveController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult examinesave(TdLeave tdLeave) public AjaxResult examinesave(TdLeave tdLeave)
{ {
if (tdLeave.getLeavestate().equals("1")){
SysUser sysUser = userService.selectUserById(tdLeave.getUserId());
sysUser.setStatus("1");
userService.updateUser(sysUser);
}
return toAjax(tdLeaveService.updateTdLeave(tdLeave)); return toAjax(tdLeaveService.updateTdLeave(tdLeave));
} }
@ -180,4 +176,17 @@ public class TdLeaveController extends BaseController
mmap.put("posts", postService.selectPostsByUserIds(userId)); mmap.put("posts", postService.selectPostsByUserIds(userId));
return prefix + "/leaveprint"; return prefix + "/leaveprint";
} }
/**
*
* @param userId
* @return
*/
public Boolean userUpdate(Long userId) {
return userService.lambdaUpdate()
.eq(SysUser::getUserId, userId)
.set(SysUser::getStatus, "1")
.update();
}
} }

@ -1,8 +1,10 @@
package com.ruoyi.web.controller.system.system; package com.ruoyi.web.controller.system.system;
import java.util.Date;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -21,6 +23,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
@ -36,6 +40,9 @@ public class TdTrainController extends BaseController
@Autowired @Autowired
private ITdTrainService tdTrainService; private ITdTrainService tdTrainService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:train:view") @RequiresPermissions("system:train:view")
@GetMapping() @GetMapping()
public String train() public String train()
@ -66,6 +73,10 @@ public class TdTrainController extends BaseController
public AjaxResult export(TdTrain tdTrain) public AjaxResult export(TdTrain tdTrain)
{ {
List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain); List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain);
list.forEach(tdTrain1 -> {
tdTrain1.setAREAID(sysAreaManager.getAreaName(tdTrain1.getAREAID()));
tdTrain1.setFRAMEWORK(sysAreaManager.getAreaName(tdTrain1.getFRAMEWORK()));
});
ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class); ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class);
return util.exportExcel(list, "涉密人员培训数据"); return util.exportExcel(list, "涉密人员培训数据");
} }
@ -88,6 +99,9 @@ public class TdTrainController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(TdTrain tdTrain) public AjaxResult addSave(TdTrain tdTrain)
{ {
tdTrain.setCreateStaffid(getLoginName());
tdTrain.setCreateDate(new Date());
tdTrain.setCreateDepartid(String.valueOf(getSysUser().getDeptId()));
return toAjax(tdTrainService.insertTdTrain(tdTrain)); return toAjax(tdTrainService.insertTdTrain(tdTrain));
} }
@ -113,6 +127,9 @@ public class TdTrainController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult editSave(TdTrain tdTrain) public AjaxResult editSave(TdTrain tdTrain)
{ {
tdTrain.setUpdateStaffid(getLoginName());
tdTrain.setUpdateDate(new Date());
tdTrain.setUpdateDepartid(String.valueOf(getSysUser().getDeptId()));
return toAjax(tdTrainService.updateTdTrain(tdTrain)); return toAjax(tdTrainService.updateTdTrain(tdTrain));
} }

@ -0,0 +1,129 @@
package com.ruoyi.web.controller.tdcase;
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.BusinessType;
import com.ruoyi.system.domain.tdcase.TdCase;
import com.ruoyi.web.controller.manager.TdCaseManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.ruoyi.web.controller.tdcase
*
* @author wangxy
* @version JDK 8
* @className TdCaseController
* @date 2024/8/13
* @description
*/
@Controller
@RequestMapping("/system/tdCase")
public class TdCaseController extends BaseController {
private String prefix = "system/case";
@Resource
private TdCaseManager tdCaseManager;
@RequiresPermissions("system:case:view")
@GetMapping()
public String tdCase() {
return prefix + "/case";
}
/**
*
*/
@RequiresPermissions("system:case:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdCase tdCase) {
startPage();
List<TdCase> tdCases = tdCaseManager.selecttdCaseList(tdCase);
return getDataTable(tdCases);
}
/**
*
*/
@GetMapping("/add")
public String add() {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:case:add")
@Log(title = "失泄密案件", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdCase tdCase) {
return toAjax(tdCaseManager.saveOrUpdate(tdCase));
}
/**
*
*/
@RequiresPermissions("system:case:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap) {
TdCase tdCase = tdCaseManager.selecttdCase(id);
mmap.put("tdCase", tdCase);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:case:edit")
@Log(title = "失泄密案件", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdCase tdCase) {
return toAjax(tdCaseManager.saveOrUpdate(tdCase));
}
/**
*
*/
@RequiresPermissions("system:case:detail")
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") String id, ModelMap mmap) {
TdCase tdCase = tdCaseManager.selecttdCase(id);
mmap.put("tdCase", tdCase);
return prefix + "/detail";
}
/**
*
*/
@RequiresPermissions("system:case:remove")
@Log(title = "失泄密案件", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(tdCaseManager.deletedCaseByids(ids));
}
/**
*
*
* @return com.ruoyi.common.core.domain.AjaxResult
*/
@PostMapping("/getList")
@ResponseBody
public AjaxResult getList() {
return AjaxResult.success(tdCaseManager.selectList());
}
}

@ -0,0 +1,66 @@
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
# driverClassName: com.mysql.cj.jdbc.Driver
driverClassName: com.kingbase8.Driver
druid:
# 主库数据源
master:
# 外网-人大金仓数据库
url: jdbc:kingbase8://61.178.84.89:54321/test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&clientEncoding=UTF8
#username: root
#password: 123456
username: ENC(Q+yfell1zQ6sxQ0Safq/Wg==)
# password: ENC(aM81j4MP4WJC4ZQBNlDntx0jKsP3wwQZ)
password: ENC(zAEOw2QzRe7UXMKfeIkWWg==)
# 从库数据源
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: zhky
login-password: qwer1234@
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true

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

Loading…
Cancel
Save