Compare commits

...

869 Commits

Author SHA1 Message Date
wangxy fef4644463 feat:文件上传
6 months ago
dshclm e012da9d4f 提交
6 months ago
wangxy b783ec4e7f feat:文件上传
6 months ago
wangxy 515d1d15a2 feat:文件上传
6 months ago
wangxy 9ec0160a1c feat:文件上传
6 months ago
wangxy fe6da0f39b feat:文件上传
6 months ago
dshclm 693b8982fe 提交
6 months ago
dshclm c0341d8884 提交
6 months ago
dshclm caf9f27b80 退回意见
6 months ago
wangxy cb9672c6c1 feat:人员类型统计
6 months ago
dshclm c1af4b2887 修改
6 months ago
wangxy 48de408462 feat:人员类型统计
6 months ago
dshclm dbd1b9c57a 修改
6 months ago
dshclm 859f0996b7 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
6 months ago
dshclm 7f200ecffd 修改
6 months ago
wangxy b133cc8b81 feat:人员类型统计
6 months ago
wangxy cfa38551ba feat:人员类型统计
6 months ago
wangxy 18b318a3c7 feat:人员类型统计
6 months ago
wangxy 44eec8083b feat:人员类型统计
6 months ago
wangxy 8d8175bb67 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
6 months ago
wangxy 41f3c7d602 feat:人员类型统计
6 months ago
dshclm 1d00dfc711 人员审查兼容修改
6 months ago
wangxy 99f5a6a122 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
6 months ago
wangxy fb91261b9f feat:人员类型统计
6 months ago
dshclm c41190735a 人员登记兼容修改
6 months ago
wangxy 8f2ac2271e feat:人员类型统计
6 months ago
wangxy f93b0b9a71 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
6 months ago
wangxy 665c935ca0 feat:人员统计
6 months ago
dshclm 07429e4264 修改兼容低版本浏览器
6 months ago
dshclm 2dcc2e2eeb 提交修改
6 months ago
wangxy fef92d181e feat:人员调岗记录
6 months ago
wangxy 602e36c06f feat:人员调岗记录
6 months ago
wangxy 1c8c26e9e2 feat:人员调岗记录
6 months ago
dshclm de3f0a623d 提交修改
6 months ago
wangxy 0440642b68 feat:涉密岗位一览表
6 months ago
wangxy bd19988825 feat:涉密岗位一览表
6 months ago
dshclm e716a10bb2 提交
6 months ago
20918 441ba06176 调离岗位
6 months ago
dshclm 63d68cb4c6 表单
6 months ago
dshclm e86aca478e 离职离岗校验修改
6 months ago
dshclm 225b3b8ffe 人员登记校验及pdf下载位置修改
6 months ago
20918 ba9695f4d9 离职
6 months ago
dshclm 62efe64940 修改
6 months ago
wangxy 6f192f3a3a feat:涉密岗位一览表
6 months ago
wangxy adb9340ccb feat:涉密岗位一览表
6 months ago
wangxy c1941b8d0b feat:涉密岗位一览表
6 months ago
dshclm c207301225 提交
6 months ago
wangxy 63893ecd16 feat:添加部门名称和页面提示
6 months ago
dshclm 59b14f4026 修改
6 months ago
wangxy 7f2d1a703c feat:离职离岗审批
6 months ago
dshclm 7bc3752853 人员登记岗位、密级修改
6 months ago
wangxy fcdd213415 feat:离职离岗审批
6 months ago
wangxy 58a897a709 feat:离职离岗审批
6 months ago
wangxy 1722a5c01f feat:离职离岗审批
6 months ago
wangxy 07e8e34c12 feat:离职离岗
6 months ago
dshclm c48faf7c4f 出国
6 months ago
wangxy 28ee949659 feat:添加新字段
6 months ago
wangxy 683527b674 feat:添加新字段
6 months ago
wangxy a454f06336 feat:岗位名称和涉密等级查询接口
6 months ago
wangxy 194852901a feat:Enum材料编号提交
6 months ago
wangxy 8179888722 feat:Enum材料编号提交
7 months ago
wangxy fd30a72fa8 feat:Enum材料编号提交
7 months ago
dshclm 7bdbe25167 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
7 months ago
wangxy 888ef5219f feat:Enum流程状态
7 months ago
dshclm 9fbb955b72 调离岗位
7 months ago
wangxy 77f907a8b7 feat:人员出国
7 months ago
wangxy 265317a793 feat:人员出国
7 months ago
wangxy b6aab2aa53 feat:人员在岗调离
7 months ago
wangxy 38534cdf24 feat:人员在岗调离
7 months ago
dshclm da321ee8ae 修改
7 months ago
dshclm 557a1dd4dd 修改
7 months ago
dshclm bdd66a09ce 修改
7 months ago
wangxy 08b9938a98 feat:修改账号列表
7 months ago
wangxy 780a9c341e Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
7 months ago
wangxy db2374904a feat:修改账号列表
7 months ago
zhaodw d1e0c105ce 文档提交
7 months ago
wangxy 671a924c81 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
7 months ago
wangxy c174b26c85 feat:修改账号列表
7 months ago
dshclm 1ffc224604 修改
7 months ago
20918 a877d8ca0c 文件表格
7 months ago
wangxy dbe2e223e1 fix:sm人员管理详情
7 months ago
wangxy 6d73926e0b fix:sm人员管理详情
7 months ago
dshclm e6f0a24a32 删除无用代码,替换消息提示样式
7 months ago
dshclm a0a3cb2a1a 删除无用代码,替换消息提示样式
7 months ago
dshclm 8e2c0e3998 人员审查
7 months ago
dshclm 383c3633ab 人员登记--材料修改tab名称修改
7 months ago
dshclm 4344fb629f 人员登记--添加、编辑、材料上传修改
7 months ago
dshclm 5cefe6c9fe 人员登记--添加、编辑、材料上传修改
7 months ago
dshclm 87acaa411b 人员登记--添加、编辑、材料上传修改
7 months ago
wangxy b9495dc473 fix:sm人员管理详情
7 months ago
wangxy 6da25424f6 fix:sm人员管理
7 months ago
wangxy 438835a435 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
7 months ago
wangxy ef457f5c7f fix:字段类型修改
7 months ago
dshclm 9a2cc26f77 材料上传
7 months ago
wangxy 8669466ea9 fix:字段类型修改
7 months ago
wangxy 07617ffdf6 fix:字段类型修改
7 months ago
zhaodw 6029c4cd64 教育培训提交
7 months ago
wangxy b4bd54752d fix:承诺书上传
7 months ago
wangxy e9b79b8048 Merge remote-tracking branch 'origin/ln_ry20250512' into ln_ry20250512
7 months ago
wangxy b754b11f06 fix:承诺书上传
7 months ago
dshclm b9c213ddf4 人员登记,pdf生成器
7 months ago
wangxy e51ee4d9b7 fix:承诺书上传
7 months ago
zhaodw b2e44af2d5 教育培训列表查询修改
7 months ago
zhaodw 5fdb9d16cc 教育培训manager提交
7 months ago
wangxy c9958e93b3 fix:培训人员
7 months ago
wangxy a384922024 fix:培训人员
7 months ago
wangxy f01b573e9f fix:培训人员
7 months ago
wangxy aebaa0ff26 fix:人员上岗
7 months ago
wangxy 98feadd7d2 fix:人员上岗
7 months ago
wangxy 02e0320040 fix:人员上岗
7 months ago
wangxy f04e1b7a38 fix:人员上岗
7 months ago
wangxy dc08d49484 fix:人员上岗
7 months ago
wangxy 3f735ccf28 fix:人员上岗
7 months ago
wangxy c8f445de18 fix:文件上传
7 months ago
wangxy 51f8308ab7 fix:岗位情况导入开发
7 months ago
wangxy c43078c4f8 fix:岗位情况导入开发
7 months ago
wangxy ee1940455a fix:岗位情况导入开发
7 months ago
wangxy c9fad3dea3 fix:岗位情况
7 months ago
wangxy 4b3c59ddba fix:岗位情况
7 months ago
wangxy 6ef3bbec64 fix:ln新分支删除多余无用代码
7 months ago
wangxy f0914083d4 fix:ln新分支删除多余无用代码
7 months ago
wangxy 05ee3cb323 fix:ln新分支删除多余无用代码
7 months ago
wangxy ee1a0c104b fix:ln新分支删除多余无用代码
7 months ago
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

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

@ -81,6 +81,48 @@
<artifactId>jasypt-spring-boot-starter</artifactId> <artifactId>jasypt-spring-boot-starter</artifactId>
<version>2.1.0</version> <version>2.1.0</version>
</dependency> </dependency>
<!-- PDFBox 核心库 -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.27</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 字体处理库 -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId>
<version>2.0.27</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 使用SLF4J替代commons-logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.36</version>
</dependency>
</dependencies> </dependencies>

@ -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,270 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import com.ruoyi.common.enums.ApplyListStatusEnum;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.system.domain.file.TdFileRelation;
import com.ruoyi.system.service.apply.TdApplyInfoListService;
import com.ruoyi.system.service.file.TdFileRelationService;
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;
import java.util.Objects;
/**
* ClassName: ApplyInfoListManager
* Package: com.ruoyi.web.controller.manager
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:30
* @Version 1.0
*/
@Component
public class ApplyInfoListManager {
@Resource
private TdApplyInfoListService applyInfoListService;
@Resource
private TdFileRelationService fileRelationService;
@Resource
private ApplyRecordManager applyRecordManager;
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectTdApplyInfoListList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectTdApplyInfoListList(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectTdApplyInfoListListByApplyStatus(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectTdApplyInfoListListByApplyStatus(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectTdAuditInfoListList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectTdAuditInfoListList(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectPromiseInfoListList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectPromiseInfoListList(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectPersonList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectPersonList(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectOndutyInfoListList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectOndutyInfoListList(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectAbroadInfoListList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectAbroadInfoListList(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectPersonLeaveList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectPersonLeaveList(applyInfoListDTO);
}
/**
*
* @param applyInfoListDTO
* @return
*/
public List<TdApplyInfoList> selectPersonLeaveAuditList(TdApplyInfoListDTO applyInfoListDTO) {
return applyInfoListService.selectPersonLeaveAuditList(applyInfoListDTO);
}
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(TdApplyInfoListDTO applyInfoListDTO) {
TdApplyInfoList applyInfoList = Convert.convert(TdApplyInfoList.class, applyInfoListDTO);
if (CharSequenceUtil.isNotBlank(applyInfoList.getApplyId())) {
applyInfoList.setUpdateTime(new Date());
applyInfoList.setUpdateBy(ShiroUtils.getSysUser().getUserName());
} else {
applyInfoList.setCreateId(ShiroUtils.getSysUser().getUserId());
applyInfoList.setCreateTime(new Date());
applyInfoList.setCreateBy(ShiroUtils.getSysUser().getUserName());
}
applyInfoList.setDeptId(ShiroUtils.getSysUser().getDeptId());
applyInfoList.setDeptName(ShiroUtils.getSysUser().getDept().getDeptName());
applyInfoList.setApplyStatus(ApplyListStatusEnum.NEWSAVE.getStatus());
return applyInfoListService.saveOrUpdate(applyInfoList);
}
public TdApplyInfoListDTO getTdApplyInfoList(String id) {
return Convert.convert(TdApplyInfoListDTO.class, applyInfoListService.getById(id));
}
@Transactional(rollbackFor = Exception.class)
public boolean deletedTdApplyInfoListIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
fileRelationService.lambdaUpdate().in(TdFileRelation::getApplyId,list).remove();
return applyInfoListService.removeByIds(list);
}
/**
*
*/
public boolean submit(String applyId) {
return applyInfoListService.lambdaUpdate()
.eq(TdApplyInfoList::getApplyId,applyId)
.set(TdApplyInfoList::getApplyStatus,ApplyListStatusEnum.SUBMIT.getStatus())
.set(TdApplyInfoList::getAppTime,new Date()).update();
}
/**
*
*/
public boolean submitAudit(String applyId) {
return applyInfoListService.lambdaUpdate()
.eq(TdApplyInfoList::getApplyId,applyId)
.set(TdApplyInfoList::getApplyStatus,ApplyListStatusEnum.AUDITED.getStatus())
.set(TdApplyInfoList::getAuthTime,new Date()).update();
}
/**
*
*/
public boolean goBack(String applyId,String applyMsg) {
return applyInfoListService.lambdaUpdate()
.eq(TdApplyInfoList::getApplyId,applyId)
.set(TdApplyInfoList::getApplyStatus,ApplyListStatusEnum.GOBACK.getStatus())
.set(Objects.nonNull(applyMsg), TdApplyInfoList::getApplyMsg, applyMsg)
.update();
}
/**
*
*/
public boolean submitPromise(String applyId) {
return applyInfoListService.lambdaUpdate()
.eq(TdApplyInfoList::getApplyId,applyId)
.set(TdApplyInfoList::getApplyStatus,ApplyListStatusEnum.PROMISE.getStatus()).update();
}
/**
*
*/
public boolean submitLeave(String applyId) {
return applyInfoListService.lambdaUpdate()
.eq(TdApplyInfoList::getApplyId,applyId)
.set(TdApplyInfoList::getApplyStatus,ApplyListStatusEnum.LEAVESUBMIT.getStatus())
.update();
}
/**
*
*/
public boolean submitLeaveAudit(String applyId) {
return applyInfoListService.lambdaUpdate()
.eq(TdApplyInfoList::getApplyId,applyId)
.set(TdApplyInfoList::getApplyStatus,ApplyListStatusEnum.LEAVEADUIT.getStatus())
.set(TdApplyInfoList::getLeaveTime,new Date()).update();
}
/**
*
*/
public boolean goBackLeave(String applyId,String leaveMsg) {
return applyInfoListService.lambdaUpdate()
.eq(TdApplyInfoList::getApplyId,applyId)
.set(TdApplyInfoList::getApplyStatus,ApplyListStatusEnum.LEAVEBACK.getStatus())
.set(Objects.nonNull(leaveMsg), TdApplyInfoList::getLeaveMsg, leaveMsg)
.update();
}
/**
*
*/
@Transactional(rollbackFor = Exception.class)
public boolean saveDuty(TdApplyInfoListDTO applyInfoListDTO) {
TdApplyInfoList applyInfoList = Convert.convert(TdApplyInfoList.class, applyInfoListDTO);
if (CharSequenceUtil.isNotBlank(applyInfoList.getApplyId())) {
applyInfoList.setUpdateTime(new Date());
applyInfoList.setUpdateBy(ShiroUtils.getSysUser().getUserName());
}
applyInfoList.setRemark("1");
applyRecordManager.saveRecord(applyInfoListDTO);
return applyInfoListService.saveOrUpdate(applyInfoList);
}
}

@ -0,0 +1,87 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.apply.TdApplyAfter;
import com.ruoyi.system.domain.apply.TdApplyBefore;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.ApplyRecordDTO;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.system.service.apply.TdApplyAfterService;
import com.ruoyi.system.service.apply.TdApplyBeforeService;
import com.ruoyi.system.service.apply.TdApplyInfoListService;
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;
/**
* ClassName: ApplyRecordManager
* Package: com.ruoyi.web.controller.manager
* Description:
*
* @Author wangxy
* @Create 2025/6/3 16:28
* @Version 1.0
*/
@Component
public class ApplyRecordManager {
@Resource
private TdApplyBeforeService applyBeforeService;
@Resource
private TdApplyAfterService applyAfterService;
@Resource
private TdApplyInfoListService applyInfoListService;
/**
*
*
* @param applyInfoListDTO
*/
@Transactional(rollbackFor = Exception.class)
public void saveRecord(TdApplyInfoListDTO applyInfoListDTO) {
if(Objects.isNull(applyInfoListDTO)){
throw new ServiceException("人员信息不能为空");
}
TdApplyInfoList applyInfoList = applyInfoListService.getById(applyInfoListDTO.getApplyId());
TdApplyBefore applyBefore = Convert.convert(TdApplyBefore.class, applyInfoList);
applyBefore.setCreateTime(new Date());
applyBefore.setCreateBy(ShiroUtils.getSysUser().getLoginName());
applyBeforeService.save(applyBefore);
TdApplyAfter applyAfter = Convert.convert(TdApplyAfter.class, applyInfoListDTO);
applyAfter.setCreateTime(new Date());
applyAfter.setCreateBy(ShiroUtils.getSysUser().getLoginName());
applyAfterService.save(applyAfter);
}
public ApplyRecordDTO getApplyRecordDTO(String applyId) {
ApplyRecordDTO userRecordDTO = new ApplyRecordDTO();
List<TdApplyAfter> userAfters = applyAfterService.lambdaQuery()
.eq(TdApplyAfter::getApplyId, applyId)
.orderByDesc(TdApplyAfter::getCreateTime).list();
userRecordDTO.setApplyAfterList(userAfters);
List<TdApplyBefore> userBefores = applyBeforeService.lambdaQuery()
.eq(TdApplyBefore::getApplyId, applyId)
.orderByDesc(TdApplyBefore::getCreateTime).list();
userRecordDTO.setApplyBeforeList(userBefores);
return userRecordDTO;
}
}

@ -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,130 @@
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.exception.ServiceException;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.spost.TdClassifiedPost;
import com.ruoyi.system.domain.spost.dto.TdClassifiedPostDTO;
import com.ruoyi.system.service.spost.TdClassifiedPostService;
import lombok.extern.slf4j.Slf4j;
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;
import java.util.stream.Collectors;
/**
* ClassName: ClassifiedPostmanager
* Package: com.ruoyi.web.controller.manager
* Description:
*
* @Author wangxy
* @Create 2025/5/13 11:49
* @Version 1.0
*/
@Component
@Slf4j
public class ClassifiedPostManager {
@Resource
private TdClassifiedPostService classifiedPostService;
public List<TdClassifiedPost> selectTdCheckReportList(TdClassifiedPostDTO classifiedPostDTO) {
return classifiedPostService.selectTdClassifiedPostList(classifiedPostDTO);
}
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(TdClassifiedPostDTO classifiedPostDTO) {
TdClassifiedPost classifiedPost = Convert.convert(TdClassifiedPost.class, classifiedPostDTO);
if (CharSequenceUtil.isNotBlank(classifiedPost.getClassifiedId())) {
classifiedPost.setUpdateTime(new Date());
classifiedPost.setUpdateBy(ShiroUtils.getSysUser().getUserName());
} else {
classifiedPost.setCreateTime(new Date());
classifiedPost.setCreateBy(ShiroUtils.getSysUser().getUserName());
}
classifiedPost.setDeptId(ShiroUtils.getSysUser().getDeptId());
classifiedPost.setStatus("0");
return classifiedPostService.saveOrUpdate(classifiedPost);
}
public TdClassifiedPostDTO getTdClassifiedPost(String id) {
return Convert.convert(TdClassifiedPostDTO.class, classifiedPostService.getById(id));
}
@Transactional(rollbackFor = Exception.class)
public boolean deletedTdClassifiedPostIds(String ids) {
List<String> list = Arrays.asList(Convert.toStrArray(ids));
return classifiedPostService.removeByIds(list);
}
/**
*
* @return
*/
public List<String> getPostNames() {
return classifiedPostService.lambdaQuery()
.select(TdClassifiedPost::getPostName)
.list().stream().map(TdClassifiedPost::getPostName).distinct().collect(Collectors.toList());
}
/**
*
* @return
*/
public List<String> getClassifiedLevels() {
return classifiedPostService.lambdaQuery()
.select(TdClassifiedPost::getClassifiedLevel)
.list().stream().map(TdClassifiedPost::getClassifiedLevel).distinct().collect(Collectors.toList());
}
/**
*
* @param classifiedPosts
* @return
*/
public String importPost(List<TdClassifiedPost> classifiedPosts) {
if (CollUtil.isEmpty(classifiedPosts)) {
throw new ServiceException("导入数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
for (TdClassifiedPost classifiedPost : classifiedPosts) {
try {
classifiedPost.setCreateTime(new Date());
classifiedPost.setCreateBy(ShiroUtils.getSysUser().getUserName());
classifiedPost.setDeptId(ShiroUtils.getSysUser().getDeptId());
classifiedPost.setStatus("0");
classifiedPostService.save(classifiedPost);
successNum++;
successMsg.append("<br/>").append(successNum).append("、账号 ").append(classifiedPost.getPostName()).append(" 导入成功");
} catch (Exception e) {
failureNum++;
String msg = "<br/>" + failureNum + "、账号 " + classifiedPost.getPostName() + " 导入失败:";
failureMsg.append(msg).append(e.getMessage());
log.error(msg, e);
}
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
} else {
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
}

@ -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,233 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.FileUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.config.ServerConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.system.domain.file.TdFileRelation;
import com.ruoyi.system.service.file.TdFileRelationService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* packageName com.hyp.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className FileRelationManager
* @date 2024/4/12
* @description
*/
@Component
public class FileRelationManager {
@Resource
private TdFileRelationService fileRelationService;
@Resource
private ServerConfig serverConfig;
/**
*
*
*/
private static final Integer FILE_STATE_WTG = 2;
/**
*
*
* @return boolean
*/
public boolean delFile(String fileId){
TdFileRelation fileRelation = fileRelationService.getById(fileId);
if(Objects.isNull(fileRelation)){
throw new ServiceException("文件不存在");
}
FileUtil.del(fileRelation.getFilePath());
return fileRelationService.removeById(fileId);
}
/**
*
*
* @param applyId
* @param fileCode
* @param fileState
* @return boolean
*/
public boolean filePass( String applyId, String fileCode, Integer fileState){
return fileRelationService.lambdaUpdate()
.eq(TdFileRelation::getApplyId,applyId)
.eq(TdFileRelation::getFileCode,fileCode)
.set(TdFileRelation::getFileState,fileState)
.update();
}
/**
*
*
* @param fileId
* @param fileState
* @return boolean
*/
public boolean pass( String fileId, Integer fileState){
return fileRelationService.lambdaUpdate()
.eq(TdFileRelation::getFileId,fileId)
.set(TdFileRelation::getFileState,fileState)
.update();
}
/**
*
*
* @param applyId
* @return com.hyp.common.core.domain.AjaxResult
*/
public AjaxResult checkFile(String applyId){
List<TdFileRelation> list = fileRelationService.lambdaQuery()
.eq(TdFileRelation::getApplyId, applyId)
.list();
if(CollUtil.isNotEmpty(list)){
for(TdFileRelation rewFileRelation : list){
if(Objects.equals(rewFileRelation.getFileState(),FILE_STATE_WTG) || Objects.isNull(rewFileRelation.getFileState())){
return AjaxResult.error("材料存在未审核情况,请检查");
}
}
}
return AjaxResult.success();
}
/**
*
*
* @param applyId
* @param filename
* @param fileCode
* @param url
* @param originalFilename
* @return com.hyp.system.domain.RewFileRelation
*/
@Transactional(rollbackFor = Exception.class)
public TdFileRelation save(String applyId,String filename,String fileCode,String url,String originalFilename){
TdFileRelation rewFileRelation = new TdFileRelation();
rewFileRelation.setApplyId(applyId);
rewFileRelation.setFileName(filename);
rewFileRelation.setFileCode(fileCode);
rewFileRelation.setFilePath(url);
rewFileRelation.setRealName(originalFilename);
fileRelationService.save(rewFileRelation);
return rewFileRelation;
}
/**
*
*
* @param files
* @param applyId
* @param filename
* @param fileCode
* @return java.util.List<com.hyp.system.domain.RewFileRelation>
*/
@Transactional(rollbackFor = Exception.class)
public List<TdFileRelation> saveBatch(List<MultipartFile> files,
String applyId,
String filename,
String fileCode) throws IOException {
List<TdFileRelation> fileRelations = new ArrayList<>();
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
for (MultipartFile file : files) {
if (!file.isEmpty()) {
// 上传并返回新文件名称
String fileNames = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileNames;
if(StringUtils.isBlank(filename)){
filename = fileNames;
}
TdFileRelation rewFileRelation = new TdFileRelation();
rewFileRelation.setApplyId(applyId);
rewFileRelation.setFileName(filename);
rewFileRelation.setFileCode(fileCode);
rewFileRelation.setFilePath(url);
rewFileRelation.setRealName(FileUtils.getNameNotSuffix(file.getOriginalFilename()));
fileRelations.add(rewFileRelation);
}
}
fileRelationService.saveBatch(fileRelations);
return fileRelations;
}
/**
*
*
* @param fileId
* @return java.lang.String
*/
public String getFilePath(String fileId){
TdFileRelation fileRelation = fileRelationService.getById(fileId);
if(Objects.nonNull(fileRelation)){
return fileRelation.getFilePath();
}
return null;
}
/**
*
*
* @param fileId
* @return java.lang.String
*/
public String getRealName(String fileId){
TdFileRelation fileRelation = fileRelationService.getById(fileId);
if(Objects.nonNull(fileRelation)){
return fileRelation.getRealName();
}
return null;
}
/**
*
*
* @param applyId
* @param fileCode
* @return java.util.List<com.hyp.system.domain.RewFileRelation>
*/
public List<TdFileRelation> getFileInfo(String applyId,String fileCode){
LambdaQueryWrapper<TdFileRelation> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TdFileRelation::getApplyId,applyId);
queryWrapper.eq(Objects.nonNull(fileCode), TdFileRelation::getFileCode, fileCode);
return fileRelationService.list(queryWrapper);
}
/**
*
*
* @return java.util.List<com.hyp.system.domain.RewFileRelation>
*/
public TdFileRelation getRewFileRelation(String fileId){
return fileRelationService.getById(fileId);
}
}

@ -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,53 @@
package com.ruoyi.web.controller.manager;
import cn.hutool.core.convert.Convert;
import com.ruoyi.common.enums.ApplyListStatusEnum;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.train.TdTrain;
import com.ruoyi.system.domain.train.dto.TdTrainDTO;
import com.ruoyi.system.service.apply.TdApplyInfoListService;
import com.ruoyi.system.service.train.TdTrainService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
/**
* ClassName: TrainInfoManager
* Package: com.ruoyi.web.controller.manager
* Description:
*
* @Author zhaodw
* @Create 2025/5/15 15:37
* @Version 1.0
*/
@Component
public class TrainInfoListManager {
@Resource
private TdTrainService trainService;
@Resource
private TdApplyInfoListService applyInfoListService;
@Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(TdTrainDTO tdTrainDTO) {
TdTrain train = Convert.convert(TdTrain.class, tdTrainDTO);
train.setTrainName(tdTrainDTO.getName());
train.setCreateId(ShiroUtils.getSysUser().getUserId());
train.setCreateTime(new Date());
train.setCreateBy(ShiroUtils.getSysUser().getUserName());
train.setDeptId(ShiroUtils.getSysUser().getDeptId());
//更新TdApplyInfoList表中字段applyStatus = 4
/**
* 0123退45
*/
applyInfoListService.lambdaUpdate().
eq(TdApplyInfoList::getApplyId,tdTrainDTO.getApplyId()).
set(TdApplyInfoList::getApplyStatus, ApplyListStatusEnum.TRAIN.getStatus()).update();
return trainService.saveOrUpdate(train);
}
}

@ -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,10 +2,10 @@ 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
* *
@ -13,14 +13,13 @@ import com.ruoyi.common.core.controller.BaseController;
*/ */
@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,60 @@
package com.ruoyi.web.controller.pdf.controller;
import com.ruoyi.web.controller.pdf.service.ChangePdfService;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayOutputStream;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/api/ChangePdf")
public class ChangePdfController {
private final ChangePdfService ChangePdfService;
public ChangePdfController(ChangePdfService changePdfService) {
this.ChangePdfService = changePdfService;
}
@PostMapping(value = "/ChangeFill", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<byte[]> fillPdfForm(
@RequestParam(required = false) String name,
@RequestParam(required = false) String sex,
@RequestParam(required = false) String phone,
@RequestParam(required = false) String smPost,
@RequestParam(required = false) String smGrade,
@RequestParam(required = false) MultipartFile photo) throws Exception {
// 构建表单数据
Map<String, String> formData = new HashMap<>();
if (name != null) formData.put("姓名", name);
if (sex != null) formData.put("性别", sex);
if (phone != null) formData.put("联系电话", phone);
if (smPost != null) formData.put("原涉密岗位名称", smPost);
if (smGrade != null) formData.put("原涉密等级", smGrade);
// 构建图片数据
Map<String, MultipartFile> imageData = new HashMap<>();
if (photo != null && !photo.isEmpty()) {
imageData.put("照片", photo);
}
// 生成PDF
ByteArrayOutputStream outputStream = ChangePdfService.fillForm(formData, imageData);
// 返回PDF文件
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_PDF);
headers.setContentDispositionFormData("attachment", "output.pdf");
return ResponseEntity.ok()
.headers(headers)
.body(outputStream.toByteArray());
}
}

@ -0,0 +1,65 @@
package com.ruoyi.web.controller.pdf.controller;
import com.ruoyi.web.controller.pdf.service.LeavePdfService;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayOutputStream;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/api/LeavePdf")
public class LeavePdfController {
private final LeavePdfService LeavePdfService;
public LeavePdfController(LeavePdfService LeavePdfService) {
this.LeavePdfService = LeavePdfService;
}
@PostMapping(value = "/LeaveFill", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<byte[]> fillPdfForm(
@RequestParam(required = false) String name,
@RequestParam(required = false) String political,
@RequestParam(required = false) String phone,
@RequestParam(required = false) String positionCapacity,
@RequestParam(required = false) String smPost,
@RequestParam(required = false) String smGrade,
@RequestParam(required = false) MultipartFile photo) throws Exception {
// 构建表单数据
Map<String, String> formData = new HashMap<>();
if (name != null) formData.put("姓名", name);
if (political != null) formData.put("政治面貌", political);
if (phone != null) formData.put("联系电话", phone);
if (positionCapacity != null) formData.put("职务职级", positionCapacity);
if (smPost != null) formData.put("涉密岗位", smPost);
if (smGrade != null) formData.put("涉密等级", smGrade);
// 构建图片数据
Map<String, MultipartFile> imageData = new HashMap<>();
if (photo != null && !photo.isEmpty()) {
imageData.put("照片", photo);
}
// 生成PDF
ByteArrayOutputStream outputStream = LeavePdfService.fillForm(formData, imageData);
// 返回PDF文件
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_PDF);
headers.setContentDispositionFormData("attachment", "output.pdf");
return ResponseEntity.ok()
.headers(headers)
.body(outputStream.toByteArray());
}
}

@ -0,0 +1,85 @@
package com.ruoyi.web.controller.pdf.controller;
import com.ruoyi.web.controller.pdf.service.PdfService;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayOutputStream;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/api/pdf")
public class PdfController {
private final PdfService pdfService;
public PdfController(PdfService pdfService) {
this.pdfService = pdfService;
}
@PostMapping(value = "/fill", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<byte[]> fillPdfForm(
@RequestParam(required = false) String name,
@RequestParam(required = false) String sex,
@RequestParam(required = false) String nationa,
@RequestParam(required = false) String formerName,
@RequestParam(required = false) String nationality,
@RequestParam(required = false) String maritalStatus,
@RequestParam(required = false) String political,
@RequestParam(required = false) String phone,
@RequestParam(required = false) String cerno,
@RequestParam(required = false) String address,
@RequestParam(required = false) String registeredAuthority,
@RequestParam(required = false) String permanentAddress,
@RequestParam(required = false) String residentBureau,
@RequestParam(required = false) String positionCapacity,
@RequestParam(required = false) String smPost,
@RequestParam(required = false) String smGrade,
@RequestParam(required = false) MultipartFile photo) throws Exception {
// 构建表单数据
Map<String, String> formData = new HashMap<>();
if (name != null) formData.put("姓名", name);
if (sex != null) formData.put("性别", sex);
if (nationa != null) formData.put("国籍", nationa);
if (formerName != null) formData.put("曾用名", formerName);
if (nationality != null) formData.put("民族", nationality);
if (maritalStatus != null) formData.put("婚姻状况", maritalStatus);
if (political != null) formData.put("政治面貌", political);
if (phone != null) formData.put("联系方式", phone);
if (cerno != null) formData.put("身份证号", cerno);
if (address != null) formData.put("户籍地址", address);
if (registeredAuthority != null) formData.put("户籍地公安机关", registeredAuthority);
if (permanentAddress != null) formData.put("常住地址", permanentAddress);
if (residentBureau != null) formData.put("常住地公安机关", residentBureau);
if (positionCapacity != null) formData.put("单位及职务职称", positionCapacity);
if (smPost != null) formData.put("已(拟)任涉密岗位", smPost);
if (smGrade != null) formData.put("涉密等级", smGrade);
// 构建图片数据
Map<String, MultipartFile> imageData = new HashMap<>();
if (photo != null && !photo.isEmpty()) {
imageData.put("照片", photo);
}
// 生成PDF
ByteArrayOutputStream outputStream = pdfService.fillForm(formData, imageData);
// 返回PDF文件
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_PDF);
headers.setContentDispositionFormData("attachment", "output.pdf");
return ResponseEntity.ok()
.headers(headers)
.body(outputStream.toByteArray());
}
}

@ -0,0 +1,206 @@
package com.ruoyi.web.controller.pdf.service;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
import org.apache.pdfbox.pdmodel.font.PDType0Font;
import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
import org.apache.pdfbox.pdmodel.interactive.form.PDField;
import org.apache.pdfbox.pdmodel.interactive.form.PDTextField;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
@Service
public class ChangePdfService {
// 定义最大和最小字体大小,用于动态调整
private static final float MAX_FONT_SIZE = 12;
private static final float MIN_FONT_SIZE = 8;
// 预估的字段宽度根据实际PDF调整
private static final float ESTIMATED_FIELD_WIDTH = 100f;
// 需要特殊处理的字段列表
private static final String[] AUTO_WRAP_FIELDS = {
"姓名","性别","联系电话","原涉密岗位名称"
};
public ByteArrayOutputStream fillForm(Map<String, String> formData,
Map<String, MultipartFile> imageData) throws IOException {
// 禁用系统字体扫描,只使用自定义字体
System.setProperty("org.apache.pdfbox.rendering.UseSystemFonts", "false");
// 提高字体解析警告的日志级别
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.fontbox", "ERROR");
PDDocument document = null;
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
// 加载模板PDF
ClassLoader classLoader = getClass().getClassLoader();
InputStream templateStream = classLoader.getResourceAsStream("static/file/pdf/smrydlgwspb.pdf");
if (templateStream == null) {
throw new IOException("无法找到PDF模板文件");
}
document = PDDocument.load(templateStream);
PDAcroForm acroForm = document.getDocumentCatalog().getAcroForm();
if (acroForm == null) {
throw new IOException("PDF不包含表单域");
}
// 加载中文字体
InputStream fontStream = classLoader.getResourceAsStream("static/file/pdf/STSONG.TTF");
if (fontStream == null) {
throw new IOException("无法找到字体文件");
}
PDType0Font font = PDType0Font.load(document, fontStream);
// 设置需要更新表单外观
acroForm.setNeedAppearances(true);
// 填充文本表单
for (Map.Entry<String, String> entry : formData.entrySet()) {
String fieldName = entry.getKey();
String fieldValue = entry.getValue();
PDField field = acroForm.getField(fieldName);
if (field != null) {
// 设置表单域为不可编辑
field.setReadOnly(true);
// 设置表单域不高亮显示
// for (PDAnnotationWidget widget : field.getWidgets()) {
// widget.setHighlightMode(PDAnnotationWidget.HIGHLIGHT_MODE_NONE);
// }
if (fieldValue != null && !fieldValue.isEmpty()) {
field.setValue(fieldValue);
if (field instanceof PDTextField) {
PDTextField textField = (PDTextField) field;
if (isAutoWrapField(fieldName)) {
// 计算文本在最大字体下的宽度
float textWidth = calculateTextWidth(fieldValue, font, MAX_FONT_SIZE);
// 如果文本宽度超过预估字段宽度,启用自动换行并调整字体
if (textWidth > ESTIMATED_FIELD_WIDTH) {
textField.setMultiline(true);
float fontSize = calculateFontSize(fieldValue, font);
textField.setDefaultAppearance("/" + font.getName() + " " + fontSize + " Tf 0 g");
} else {
// 文本未超出,使用默认字体和不换行
textField.setMultiline(false);
textField.setDefaultAppearance("/" + font.getName() + " " + MAX_FONT_SIZE + " Tf 0 g");
}
} else {
textField.setDefaultAppearance("/" + font.getName() + " 12 Tf 0 g");
}
}
} else {
// 无内容时,也设置默认外观
if (field instanceof PDTextField) {
((PDTextField) field).setDefaultAppearance("/" + font.getName() + " 12 Tf 0 g");
}
}
}
}
// 插入图片
insertImages(document, acroForm, imageData);
// 保存到输出流
document.save(outputStream);
} catch (Exception e) {
e.printStackTrace(); // 打印异常信息,方便调试
throw new IOException("处理PDF时出错", e);
} finally {
if (document != null) {
document.close();
}
}
return outputStream;
}
private void insertImages(PDDocument document, PDAcroForm acroForm,
Map<String, MultipartFile> imageData) throws IOException {
for (Map.Entry<String, MultipartFile> entry : imageData.entrySet()) {
String fieldName = entry.getKey();
MultipartFile file = entry.getValue();
PDField refField = acroForm.getField(fieldName);
// 设置表单域为不可编辑
if (refField != null) {
refField.setReadOnly(true);
}
if (refField != null && !file.isEmpty()) {
// 假设图片插入到第一页,你可以根据实际情况修改
PDPage page = document.getPage(0);
// 手动指定图片插入位置
float x = 440; // 可以根据实际情况调整
float y = 650; // 可以根据实际情况调整
PDImageXObject image = null;
PDPageContentStream contentStream = null;
try {
// 从上传的文件创建图片对象
image = PDImageXObject.createFromByteArray(document, file.getBytes(), file.getOriginalFilename());
// 计算图片尺寸(按比例缩放)
float imageWidth = image.getWidth();
float imageHeight = image.getHeight();
float maxWidth = 100;
float maxHeight = 100;
float scale = Math.min(maxWidth / imageWidth, maxHeight / imageHeight);
imageWidth *= scale;
imageHeight *= scale;
// 在指定位置绘制图片
contentStream = new PDPageContentStream(
document, page, PDPageContentStream.AppendMode.APPEND, true);
contentStream.drawImage(image, x, y, imageWidth, imageHeight);
} finally {
if (contentStream != null) {
contentStream.close();
}
}
}
}
}
// 判断是否是需要自动换行的字段
private boolean isAutoWrapField(String fieldName) {
for (String autoWrapField : AUTO_WRAP_FIELDS) {
if (autoWrapField.equals(fieldName)) {
return true;
}
}
return false;
}
// 计算文本在指定字体和大小下的宽度
private float calculateTextWidth(String text, PDType0Font font, float fontSize) throws IOException {
if (text == null || text.isEmpty()) {
return 0;
}
// 计算文本宽度,考虑字符间距
return font.getStringWidth(text) / 1000 * fontSize;
}
// 计算适应字段的字体大小
private float calculateFontSize(String fieldValue, PDType0Font font) throws IOException {
float fontSize = MAX_FONT_SIZE;
float textWidth = calculateTextWidth(fieldValue, font, fontSize);
// 循环降低字体大小直到文本适合预估宽度
while (textWidth > ESTIMATED_FIELD_WIDTH && fontSize > MIN_FONT_SIZE) {
fontSize -= 0.5f;
textWidth = calculateTextWidth(fieldValue, font, fontSize);
}
return fontSize;
}
}

@ -0,0 +1,207 @@
package com.ruoyi.web.controller.pdf.service;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
import org.apache.pdfbox.pdmodel.font.PDType0Font;
import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
import org.apache.pdfbox.pdmodel.interactive.form.PDField;
import org.apache.pdfbox.pdmodel.interactive.form.PDTextField;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
@Service
public class LeavePdfService {
// 定义最大和最小字体大小,用于动态调整
private static final float MAX_FONT_SIZE = 12;
private static final float MIN_FONT_SIZE = 8;
// 预估的字段宽度根据实际PDF调整
private static final float ESTIMATED_FIELD_WIDTH = 100f;
// 需要特殊处理的字段列表
private static final String[] AUTO_WRAP_FIELDS = {
"涉密岗位","职务职级","姓名","政治面貌"
};
public ByteArrayOutputStream fillForm(Map<String, String> formData,
Map<String, MultipartFile> imageData) throws IOException {
// 禁用系统字体扫描,只使用自定义字体
System.setProperty("org.apache.pdfbox.rendering.UseSystemFonts", "false");
// 提高字体解析警告的日志级别
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.fontbox", "ERROR");
PDDocument document = null;
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
// 加载模板PDF
ClassLoader classLoader = getClass().getClassLoader();
InputStream templateStream = classLoader.getResourceAsStream("static/file/pdf/smrylzlgspb.pdf");
if (templateStream == null) {
throw new IOException("无法找到PDF模板文件");
}
document = PDDocument.load(templateStream);
PDAcroForm acroForm = document.getDocumentCatalog().getAcroForm();
if (acroForm == null) {
throw new IOException("PDF不包含表单域");
}
// 加载中文字体
InputStream fontStream = classLoader.getResourceAsStream("static/file/pdf/STSONG.TTF");
if (fontStream == null) {
throw new IOException("无法找到字体文件");
}
PDType0Font font = PDType0Font.load(document, fontStream);
// 设置需要更新表单外观
acroForm.setNeedAppearances(true);
// 填充文本表单
for (Map.Entry<String, String> entry : formData.entrySet()) {
String fieldName = entry.getKey();
String fieldValue = entry.getValue();
PDField field = acroForm.getField(fieldName);
if (field != null) {
// 设置表单域为不可编辑
field.setReadOnly(true);
// 设置表单域不高亮显示
// for (PDAnnotationWidget widget : field.getWidgets()) {
// widget.setHighlightMode(PDAnnotationWidget.HIGHLIGHT_MODE_NONE);
// }
if (fieldValue != null && !fieldValue.isEmpty()) {
field.setValue(fieldValue);
if (field instanceof PDTextField) {
PDTextField textField = (PDTextField) field;
if (isAutoWrapField(fieldName)) {
// 计算文本在最大字体下的宽度
float textWidth = calculateTextWidth(fieldValue, font, MAX_FONT_SIZE);
// 如果文本宽度超过预估字段宽度,启用自动换行并调整字体
if (textWidth > ESTIMATED_FIELD_WIDTH) {
textField.setMultiline(true);
float fontSize = calculateFontSize(fieldValue, font);
textField.setDefaultAppearance("/" + font.getName() + " " + fontSize + " Tf 0 g");
} else {
// 文本未超出,使用默认字体和不换行
textField.setMultiline(false);
textField.setDefaultAppearance("/" + font.getName() + " " + MAX_FONT_SIZE + " Tf 0 g");
}
} else {
textField.setDefaultAppearance("/" + font.getName() + " 12 Tf 0 g");
}
}
} else {
// 无内容时,也设置默认外观
if (field instanceof PDTextField) {
((PDTextField) field).setDefaultAppearance("/" + font.getName() + " 12 Tf 0 g");
}
}
}
}
// 插入图片
insertImages(document, acroForm, imageData);
// 保存到输出流
document.save(outputStream);
} catch (Exception e) {
e.printStackTrace(); // 打印异常信息,方便调试
throw new IOException("处理PDF时出错", e);
} finally {
if (document != null) {
document.close();
}
}
return outputStream;
}
private void insertImages(PDDocument document, PDAcroForm acroForm,
Map<String, MultipartFile> imageData) throws IOException {
for (Map.Entry<String, MultipartFile> entry : imageData.entrySet()) {
String fieldName = entry.getKey();
MultipartFile file = entry.getValue();
PDField refField = acroForm.getField(fieldName);
// 设置表单域为不可编辑
if (refField != null) {
refField.setReadOnly(true);
}
if (refField != null && !file.isEmpty()) {
// 假设图片插入到第一页,你可以根据实际情况修改
PDPage page = document.getPage(0);
// 手动指定图片插入位置
float x = 440; // 可以根据实际情况调整
float y = 650; // 可以根据实际情况调整
PDImageXObject image = null;
PDPageContentStream contentStream = null;
try {
// 从上传的文件创建图片对象
image = PDImageXObject.createFromByteArray(document, file.getBytes(), file.getOriginalFilename());
// 计算图片尺寸(按比例缩放)
float imageWidth = image.getWidth();
float imageHeight = image.getHeight();
float maxWidth = 100;
float maxHeight = 100;
float scale = Math.min(maxWidth / imageWidth, maxHeight / imageHeight);
imageWidth *= scale;
imageHeight *= scale;
// 在指定位置绘制图片
contentStream = new PDPageContentStream(
document, page, PDPageContentStream.AppendMode.APPEND, true);
contentStream.drawImage(image, x, y, imageWidth, imageHeight);
} finally {
if (contentStream != null) {
contentStream.close();
}
}
}
}
}
// 判断是否是需要自动换行的字段
private boolean isAutoWrapField(String fieldName) {
for (String autoWrapField : AUTO_WRAP_FIELDS) {
if (autoWrapField.equals(fieldName)) {
return true;
}
}
return false;
}
// 计算文本在指定字体和大小下的宽度
private float calculateTextWidth(String text, PDType0Font font, float fontSize) throws IOException {
if (text == null || text.isEmpty()) {
return 0;
}
// 计算文本宽度,考虑字符间距
return font.getStringWidth(text) / 1000 * fontSize;
}
// 计算适应字段的字体大小
private float calculateFontSize(String fieldValue, PDType0Font font) throws IOException {
float fontSize = MAX_FONT_SIZE;
float textWidth = calculateTextWidth(fieldValue, font, fontSize);
// 循环降低字体大小直到文本适合预估宽度
while (textWidth > ESTIMATED_FIELD_WIDTH && fontSize > MIN_FONT_SIZE) {
fontSize -= 0.5f;
textWidth = calculateTextWidth(fieldValue, font, fontSize);
}
return fontSize;
}
}

@ -0,0 +1,224 @@
package com.ruoyi.web.controller.pdf.service;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
import org.apache.pdfbox.pdmodel.font.PDType0Font;
import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
import org.apache.pdfbox.pdmodel.interactive.form.PDField;
import org.apache.pdfbox.pdmodel.interactive.form.PDTextField;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
@Service
public class PdfService {
// 定义最大和最小字体大小,用于动态调整
private static final float MAX_FONT_SIZE = 12;
private static final float MIN_FONT_SIZE = 10;
// 字段宽度映射表根据实际PDF字段宽度设置
private static final Map<String, Float> FIELD_WIDTHS = new HashMap<>();
static {
FIELD_WIDTHS.put("常住地址", 145.87099f);
FIELD_WIDTHS.put("户籍地址", 147.149f);
FIELD_WIDTHS.put("常住地公安机关", 91.56003f);
FIELD_WIDTHS.put("户籍地公安机关", 91.685f);
FIELD_WIDTHS.put("已(拟)任涉密岗位", 93.54599f);
FIELD_WIDTHS.put("涉密等级", 90.23602f);
FIELD_WIDTHS.put("联系方式", 88.69202f);
FIELD_WIDTHS.put("性别", 42.579987f);
FIELD_WIDTHS.put("单位及职务职称", 279.75403f);
FIELD_WIDTHS.put("姓名", 51.342987f);
FIELD_WIDTHS.put("曾用名", 50.871994f);
FIELD_WIDTHS.put("婚姻状况", 39.933014f);
FIELD_WIDTHS.put("民族", 42.359985f);
FIELD_WIDTHS.put("政治面貌", 50.276993f);
FIELD_WIDTHS.put("国籍", 39.713013f);
FIELD_WIDTHS.put("身份证号", 235.40901f);
}
// 需要特殊处理的字段列表
private static final String[] AUTO_WRAP_FIELDS = {
"常住地址", "户籍地址", "户籍地公安机关", "常住地公安机关", "姓名", "已(拟)任涉密岗位"
};
public ByteArrayOutputStream fillForm(Map<String, String> formData,
Map<String, MultipartFile> imageData) throws IOException {
// 禁用系统字体扫描,只使用自定义字体
System.setProperty("org.apache.pdfbox.rendering.UseSystemFonts", "false");
// 提高字体解析警告的日志级别
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.fontbox", "ERROR");
PDDocument document = null;
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
try {
// 加载模板PDF
InputStream templateStream = getClass().getClassLoader().getResourceAsStream("static/file/pdf/smryscb.pdf");
if (templateStream == null) {
throw new IOException("无法找到模板PDF文件");
}
document = PDDocument.load(templateStream);
PDAcroForm acroForm = document.getDocumentCatalog().getAcroForm();
if (acroForm == null) {
throw new IOException("PDF不包含表单域");
}
// 加载中文字体
InputStream fontStream = getClass().getClassLoader().getResourceAsStream("static/file/pdf/STSONG.TTF");
PDType0Font font = PDType0Font.load(document, fontStream);
// 设置需要更新表单外观
acroForm.setNeedAppearances(true);
// 填充文本表单
for (Map.Entry<String, String> entry : formData.entrySet()) {
String fieldName = entry.getKey();
String fieldValue = entry.getValue();
PDField field = acroForm.getField(fieldName);
if (field != null) {
// 设置表单域为不可编辑
field.setReadOnly(true);
if (fieldValue != null && !fieldValue.isEmpty()) {
field.setValue(fieldValue);
if (field instanceof PDTextField) {
PDTextField textField = (PDTextField) field;
if (isAutoWrapField(fieldName)) {
// 获取该字段的实际宽度
float fieldWidth = getFieldWidth(fieldName);
// 计算文本在最大字体下的宽度
float textWidth = calculateTextWidth(fieldValue, font, MAX_FONT_SIZE);
// 如果文本宽度超过字段宽度,启用自动换行并调整字体
if (textWidth > fieldWidth) {
textField.setMultiline(true);
float fontSize = calculateFontSize(fieldValue, font, fieldWidth);
textField.setDefaultAppearance("/" + font.getName() + " " + fontSize + " Tf 0 g");
} else {
// 文本未超出,使用默认字体和不换行
textField.setMultiline(false);
textField.setDefaultAppearance("/" + font.getName() + " " + MAX_FONT_SIZE + " Tf 0 g");
}
} else {
textField.setDefaultAppearance("/" + font.getName() + " 12 Tf 0 g");
}
}
} else {
// 无内容时,也设置默认外观
if (field instanceof PDTextField) {
((PDTextField) field).setDefaultAppearance("/" + font.getName() + " 12 Tf 0 g");
}
}
}
}
// 插入图片
insertImages(document, acroForm, imageData);
// 保存到输出流
document.save(outputStream);
} catch (Exception e) {
e.printStackTrace(); // 打印异常信息,方便调试
throw new IOException("处理PDF时出错", e);
} finally {
if (document != null) {
document.close();
}
}
return outputStream;
}
private void insertImages(PDDocument document, PDAcroForm acroForm,
Map<String, MultipartFile> imageData) throws IOException {
for (Map.Entry<String, MultipartFile> entry : imageData.entrySet()) {
String fieldName = entry.getKey();
MultipartFile file = entry.getValue();
PDField refField = acroForm.getField(fieldName);
// 设置表单域为不可编辑
if (refField != null) {
refField.setReadOnly(true);
}
if (refField != null && !file.isEmpty()) {
// 假设图片插入到第一页,你可以根据实际情况修改
PDPage page = document.getPage(0);
// 手动指定图片插入位置
float x = 435; // 可以根据实际情况调整
float y = 620; // 可以根据实际情况调整
PDImageXObject image = null;
PDPageContentStream contentStream = null;
try {
// 从上传的文件创建图片对象
image = PDImageXObject.createFromByteArray(document, file.getBytes(), file.getOriginalFilename());
// 计算图片尺寸(按比例缩放)
float imageWidth = image.getWidth();
float imageHeight = image.getHeight();
float maxWidth = 100;
float maxHeight = 100;
float scale = Math.min(maxWidth / imageWidth, maxHeight / imageHeight);
imageWidth *= scale;
imageHeight *= scale;
// 在指定位置绘制图片
contentStream = new PDPageContentStream(
document, page, PDPageContentStream.AppendMode.APPEND, true);
contentStream.drawImage(image, x, y, imageWidth, imageHeight);
} finally {
if (contentStream != null) {
contentStream.close();
}
}
}
}
}
// 判断是否是需要自动换行的字段
private boolean isAutoWrapField(String fieldName) {
for (String autoWrapField : AUTO_WRAP_FIELDS) {
if (autoWrapField.equals(fieldName)) {
return true;
}
}
return false;
}
// 获取字段宽度,如果没有配置则使用默认值
private float getFieldWidth(String fieldName) {
return FIELD_WIDTHS.getOrDefault(fieldName, 100f);
}
// 计算文本在指定字体和大小下的宽度
private float calculateTextWidth(String text, PDType0Font font, float fontSize) throws IOException {
if (text == null || text.isEmpty()) {
return 0;
}
// 计算文本宽度,考虑字符间距
return font.getStringWidth(text) / 1000 * fontSize;
}
// 计算适应字段的字体大小
private float calculateFontSize(String fieldValue, PDType0Font font, float fieldWidth) throws IOException {
float fontSize = MAX_FONT_SIZE;
float textWidth = calculateTextWidth(fieldValue, font, fontSize);
// 循环降低字体大小直到文本适合字段宽度
while (textWidth > fieldWidth && fontSize > MIN_FONT_SIZE) {
fontSize -= 0.5f;
textWidth = calculateTextWidth(fieldValue, font, fontSize);
}
return fontSize;
}
}

@ -0,0 +1,72 @@
package com.ruoyi.web.controller.system.abroad;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/abroadList")
public class AbroadInfoListController extends BaseController {
private String prefix = "system/newdev/abroad";
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:abroad:view")
@GetMapping()
public String abroadList() {
return prefix + "/abroadList";
}
/**
*
*/
@RequiresPermissions("system:abroad:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectAbroadInfoListList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@RequiresPermissions("system:abroad:editAbroad")
@GetMapping("/editAbroad/{applyId}")
public String editAbroad(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/editAbroad";
}
}

@ -0,0 +1,139 @@
package com.ruoyi.web.controller.system.apply;
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.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/applyList")
public class ApplyInfoListController extends BaseController {
private String prefix = "system/newdev/apply";
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:apply:view")
@GetMapping()
public String applyListInfo() {
return prefix + "/applyList";
}
/**
*
*/
@RequiresPermissions("system:apply:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectTdApplyInfoListList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap) {
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:apply:add")
@Log(title = "涉密人员", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdApplyInfoListDTO applyInfoListDTO) {
return toAjax(applyInfoListManager.saveOrUpdate(applyInfoListDTO));
}
/**
*
*/
@RequiresPermissions("system:apply:edit")
@GetMapping("/edit/{applyId}")
public String edit(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:apply:edit")
@Log(title = "涉密人员", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdApplyInfoListDTO applyInfoListDTO) {
return toAjax(applyInfoListManager.saveOrUpdate(applyInfoListDTO));
}
/**
*
*/
@RequiresPermissions("system:apply:remove")
@Log(title = "涉密人员", businessType = BusinessType.DELETE)
@PostMapping("/remove")
@ResponseBody
public AjaxResult remove(String ids) {
return toAjax(applyInfoListManager.deletedTdApplyInfoListIds(ids));
}
/**
*
*/
@RequiresPermissions("system:apply:editFile")
@GetMapping("/editFile/{applyId}")
public String editFile(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/editFile";
}
/**
*
*/
@PostMapping("/submit")
@ResponseBody
public AjaxResult submit(@RequestParam String applyId) {
return toAjax(applyInfoListManager.submit(applyId));
}
}

@ -0,0 +1,92 @@
package com.ruoyi.web.controller.system.apply;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/auditList")
public class AuditInfoListController extends BaseController {
private String prefix = "system/newdev/audit";
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:audit:view")
@GetMapping()
public String auditListInfo() {
return prefix + "/auditList";
}
/**
*
*/
@RequiresPermissions("system:audit:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectTdAuditInfoListList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@RequiresPermissions("system:audit:editAudit")
@GetMapping("/editAudit/{applyId}")
public String editAudit(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/editAudit";
}
/**
*
*/
@PostMapping("/submitAudit")
@ResponseBody
public AjaxResult submitAudit(@RequestParam String applyId) {
return toAjax(applyInfoListManager.submitAudit(applyId));
}
/**
*
*/
@PostMapping("/goBack")
@ResponseBody
public AjaxResult goBack(@RequestParam String applyId,
@RequestParam(required = false) String applyMsg) {
return toAjax(applyInfoListManager.goBack(applyId,applyMsg));
}
}

@ -0,0 +1,93 @@
package com.ruoyi.web.controller.system.apply;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
import com.ruoyi.web.controller.manager.ApplyRecordManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/personList")
public class PersonApplyController extends BaseController {
private String prefix = "system/newdev/person";
@Resource
private ApplyInfoListManager applyInfoListManager;
@Resource
private ApplyRecordManager applyRecordManager;
@RequiresPermissions("system:person:view")
@GetMapping()
public String personListInfo() {
return prefix + "/personList";
}
/**
*
*/
@RequiresPermissions("system:person:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectPersonList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@RequiresPermissions("system:person:detail")
@GetMapping("/detail/{applyId}")
public String detail(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/detail";
}
/**
*
*
* @param applyId
* @param mmap
* @return java.lang.String
*/
@GetMapping("/getApplyRecord/{applyId}")
public String getChangeRecord(@PathVariable("applyId") String applyId, ModelMap mmap) {
mmap.put("userRecordDTO", applyRecordManager.getApplyRecordDTO(applyId));
return prefix + "/applyRecord";
}
}

@ -0,0 +1,81 @@
package com.ruoyi.web.controller.system.apply;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/promiseList")
public class PromiseInfoListController extends BaseController {
private String prefix = "system/newdev/promise";
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:promise:view")
@GetMapping()
public String promiseListInfo() {
return prefix + "/promiseList";
}
/**
*
*/
@RequiresPermissions("system:promise:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectPromiseInfoListList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@RequiresPermissions("system:promise:editPromise")
@GetMapping("/editPromise/{applyId}")
public String editPromise(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/editPromise";
}
/**
*
*/
@PostMapping("/submitPromise")
@ResponseBody
public AjaxResult submitPromise(@RequestParam String applyId) {
return toAjax(applyInfoListManager.submitPromise(applyId));
}
}

@ -0,0 +1,87 @@
package com.ruoyi.web.controller.system.apply;
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.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.system.domain.train.dto.TdTrainDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
import com.ruoyi.web.controller.manager.TrainInfoListManager;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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: TrainInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author zhaodw
* @Create 2025/5/15 15:31
* @Version 1.0
*/
@Controller
@RequestMapping("/system/train")
public class TrainInfoListController extends BaseController {
private static final Logger log = LoggerFactory.getLogger(TrainInfoListController.class);
private String prefix = "system/newdev/train";
@Resource
private TrainInfoListManager trainInfoListManager;
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:train:view")
@GetMapping()
public String applyListInfo() {
return prefix + "/trainList";
}
/**
*
*/
@RequiresPermissions("system:train:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectTdApplyInfoListListByApplyStatus(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@Log(title = "保存教育培训信息", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdTrainDTO tdTrainDTO) {
return toAjax(trainInfoListManager.saveOrUpdate(tdTrainDTO));
}
/**
*
*/
@RequiresPermissions("system:train:edit")
@GetMapping("/detail/{applyId}")
public String edit(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/training";
}
}

@ -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 @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids) {
{ return toAjax(checkReportManager.deletedTdCheckReportIds(ids));
return toAjax(tdCheckService.deleteTdCheckByCheckIds(ids)); }
/**
*
*/
@GetMapping("/view/{checkId}")
@ResponseBody
public AjaxResult view(@PathVariable("checkId") String checkId) {
return AjaxResult.success(checkReportManager.getTdCheckReportDTO(checkId));
} }
/** /**
@ -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,128 +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.TdNotify;
import com.ruoyi.system.service.ITdNotifyService;
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/notify")
public class TdNotifyController extends BaseController
{
private String prefix = "system/notify";
@Autowired
private ITdNotifyService tdNotifyService;
@RequiresPermissions("system:notify:view")
@GetMapping()
public String notice()
{
return prefix + "/notify";
}
/**
*
*/
@RequiresPermissions("system:notify:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdNotify tdNotify)
{
startPage();
List<TdNotify> list = tdNotifyService.selectTdNotifyList(tdNotify);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:notify:export")
@Log(title = "检查通知", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdNotify tdNotify)
{
List<TdNotify> list = tdNotifyService.selectTdNotifyList(tdNotify);
ExcelUtil<TdNotify> util = new ExcelUtil<TdNotify>(TdNotify.class);
return util.exportExcel(list, "检查通知数据");
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap)
{
mmap.put("sysuser", getSysUser());
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:notify:add")
@Log(title = "检查通知", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdNotify tdNotify)
{
return toAjax(tdNotifyService.insertTdNotify(tdNotify));
}
/**
*
*/
@RequiresPermissions("system:notify:edit")
@GetMapping("/edit/{notifyId}")
public String edit(@PathVariable("notifyId") Long notifyId, ModelMap mmap)
{
TdNotify tdNotify = tdNotifyService.selectTdNotifyByNotifyId(notifyId);
mmap.put("tdNotify", tdNotify);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:notify:edit")
@Log(title = "检查通知", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdNotify tdNotify)
{
return toAjax(tdNotifyService.updateTdNotify(tdNotify));
}
/**
*
*/
@RequiresPermissions("system:notify:remove")
@Log(title = "检查通知", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tdNotifyService.deleteTdNotifyByNotifyIds(ids));
}
}

@ -1,69 +0,0 @@
package com.ruoyi.web.controller.system.count;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdFileProvide;
import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.domain.TdPropertyNetinfo;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ITdFileProvideService;
import com.ruoyi.system.service.ITdFileReceiveService;
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/filenum")
public class SysFilenumController extends BaseController {
private String prefix = "system/fileprovide/filenum";
@Autowired
private ITdFileProvideService tdFileProvideService;
@Autowired
private ITdFileReceiveService tdFileReceiveService;
@RequiresPermissions("system:filenum:view")
@GetMapping()
public String fileprovide()
{
return prefix + "/filenum";
}
/**
*
*/
@RequiresPermissions("system:filenum:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdFileProvide tdFileProvide)
{
startPage();
List<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:filenum:print")
@GetMapping("/print/{fileId}")
@Log(title = "文件统计", businessType = BusinessType.PRINT)
public String print(@PathVariable("fileId") String fileId, ModelMap mmap)
{
List<TdFileReceive> tdFileReceives = tdFileReceiveService.selectTdFileReceiveByFileId(fileId);
TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId);
mmap.put("tdFileReceives", tdFileReceives);
mmap.put("tdFileProvide", tdFileProvide);
mmap.put("sysuser", getSysUser());
return prefix + "/print";
}
}

@ -1,66 +0,0 @@
package com.ruoyi.web.controller.system.count;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyNet;
import com.ruoyi.system.domain.TdPropertyNetinfo;
import com.ruoyi.system.service.ITdPropertyNetService;
import com.ruoyi.system.service.ITdPropertyNetinfoService;
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/networknum")
public class SysNetworknumController extends BaseController {
private String prefix = "system/network/networknum";
@Autowired
private ITdPropertyNetService tdPropertyNetService;
@Autowired
private ITdPropertyNetinfoService tdPropertyNetinfoService;
@RequiresPermissions("system:networknum:view")
@GetMapping()
public String network()
{
return prefix + "/networknum";
}
/**
*
*/
@RequiresPermissions("system:networknum:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyNet tdPropertyNet)
{
startPage();
List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:propertynum:print")
@GetMapping("/print/{netId}")
@Log(title = "网络设备统计", businessType = BusinessType.PRINT)
public String print(@PathVariable("netId") String netId, ModelMap mmap)
{
List<TdPropertyNetinfo> tdPropertyNetinfos = tdPropertyNetinfoService.selectTdPropertyNetinfoByNetId(netId);
TdPropertyNet tdPropertyNet = tdPropertyNetService.selectTdPropertyNetByNetId(netId);
mmap.put("tdPropertyNetinfos", tdPropertyNetinfos);
mmap.put("tdPropertyNet", tdPropertyNet);
mmap.put("sysuser", getSysUser());
return prefix + "/print";
}
}

@ -1,63 +0,0 @@
package com.ruoyi.web.controller.system.count;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyManager;
import com.ruoyi.system.service.ITdPropertyInfoService;
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;
@Controller
@RequestMapping("/system/propertynum")
public class SysPropertynumController extends BaseController {
private String prefix = "system/property/propertynum";
@Autowired
private ITdPropertyManagerService tdPropertyManagerService;
@Autowired
private ITdPropertyInfoService tdPropertyInfoService;
@RequiresPermissions("system:propertynum:view")
@GetMapping()
public String property()
{
return prefix + "/propertynum";
}
/**
*
*/
@RequiresPermissions("system:propertynum:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyManager tdPropertyManager)
{
startPage();
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:propertynum:print")
@GetMapping("/print/{useId}")
@Log(title = "资产设备统计", businessType = BusinessType.PRINT)
public String print(@PathVariable("useId") String useId, ModelMap mmap)
{
List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoByUseId(useId);
TdPropertyManager tdPropertyManager = tdPropertyManagerService.selectTdPropertyManagerByUseId(useId);
mmap.put("tdPropertyInfos", tdPropertyInfos);
mmap.put("tdPropertyManager", tdPropertyManager);
mmap.put("sysuser", getSysUser());
return prefix + "/print";
}
}

@ -1,78 +0,0 @@
package com.ruoyi.web.controller.system.count;
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.SysUser;
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.TdTrain;
import com.ruoyi.system.service.ITdTrainService;
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/trainnum")
public class SysTrainnumController extends BaseController {
private String prefix = "system/trainnum";
@Autowired
private ITdTrainService tdTrainService;
@RequiresPermissions("system:trainnum:view")
@GetMapping()
public String trainnum()
{
return prefix + "/trainnum";
}
/**
*
* @param tdTrain
* @return
*/
@RequiresPermissions("system:trainnum:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdTrain tdTrain)
{
startPage();
List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain);
return getDataTable(list);
}
/**
*
* @param tdTrain
* @return
*/
@Log(title = "培训统计", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:trainnum:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdTrain tdTrain)
{
List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain);
ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class);
return util.exportExcel(list, "培训统计数据");
}
/**
*
*/
@RequiresPermissions("system:trainnum:print")
@GetMapping("/print/{traiId}")
@ResponseBody
public String print(@PathVariable("trainId") Long trainId, ModelMap mmap){
TdTrain tdTrain = tdTrainService.selectTdTrainByID(trainId);
List<TdTrain> tdTrains = tdTrainService.selectTdTrainList(tdTrain);
mmap.put("train", tdTrain);
return prefix + "/print";
}
}

@ -1,125 +1,182 @@
package com.ruoyi.web.controller.system.count; package com.ruoyi.web.controller.system.count;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert; import cn.hutool.core.text.StrPool;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Log; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
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.SysDept;
import com.ruoyi.common.core.domain.entity.SysPostVO;
import com.ruoyi.common.core.domain.entity.SysRole;
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.utils.ObtainLastSixMonthsUtil;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.domain.apply.dto.ApplyCountDTO;
import com.ruoyi.system.domain.SysUserPost; import com.ruoyi.system.domain.apply.dto.ApplySmCountDTO;
import com.ruoyi.system.domain.SysUserRole; import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.system.service.*; import com.ruoyi.system.service.apply.TdApplyInfoListService;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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.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;
/** /**
* *
* @author Administrator
*/ */
@Controller @Controller
@RequestMapping("/system/usernum") @RequestMapping("/system/usernum")
public class SysUsernumController extends BaseController { public class SysUsernumController extends BaseController {
private String prefix = "system/usernum"; private String prefix = "system/usernum";
@Autowired
private ISysUserService userService;
@Autowired private String prefixPre = "system/newdev/person";
private ISysPostService postService;
@Autowired @Resource
private ISysRoleService roleService; private TdApplyInfoListService applyInfoListService;
@Autowired
private ISysDeptService deptService;
@Autowired @Resource
private SysUserPostService sysUserPostService; private ApplyInfoListManager applyInfoListManager;
@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 applyInfoListDTO
* @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(TdApplyInfoListDTO applyInfoListDTO) {
{
startPage(); startPage();
List<SysUser> sysuser = new ArrayList<>(); List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectPersonList(applyInfoListDTO);
List<SysUser> list = userService.selectUserGroupBydept(user); return getDataTable(tdApplyInfoLists);
List<SysDept> sysDepts = deptService.selectDeptList(dept);
for (SysDept Dept : sysDepts){
for ( SysUser user1 : list){
if (Dept.getDeptName().equals(user1.getDept().getDeptName())){
sysuser.add(user1);
} }
/**
*
*/
@RequiresPermissions("system:usernum:detail")
@GetMapping("/detail/{applyId}")
public String detail(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefixPre + "/detail";
} }
private List<String> sharType = Arrays.asList("已登记", "已上岗", "已调岗","已离职");
private List<String> smType = Arrays.asList("一般涉密人员", "重要涉密人员", "核心涉密人员");
@PostMapping("/countSm")
@ResponseBody
public AjaxResult countSm() {
ApplySmCountDTO userSmCountDTO = applyInfoListService.selectCountSmApply();
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()));
} }
return getDataTable(sysuser); yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", smType.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
} }
/** /**
* *
* @param user *
* @return * @return com.ruoyi.common.core.domain.AjaxResult
*/ */
@Log(title = "用户统计", businessType = BusinessType.EXPORT) @PostMapping("/countUser")
@RequiresPermissions("system:usernum:export")
@PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(SysUser user) public AjaxResult countUser() {
{ ApplyCountDTO userCountDTO = applyInfoListService.selectCountApply();
List<SysUser> list = userService.selectUserList(user); List<JSONObject> datas = sharType.stream()
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class); .map(name -> {
return util.exportExcel(list, "用户统计数据"); AtomicReference<Object> value = new AtomicReference<>(0L);
if("已登记".equals(name)){
value.set(userCountDTO.getYdj());
}else if("已上岗".equals(name)){
value.set(userCountDTO.getYsg());
}else if("已离职".equals(name)){
value.set(userCountDTO.getYlz());
}else{
value.set(userCountDTO.getYtg());
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("value", value.get());
jsonObject.put("name", name);
return jsonObject;
})
.collect(Collectors.toList());
return AjaxResult.success(datas);
} }
/** /**
* *
*6
* @return
*/ */
@RequiresPermissions("system:usernum:detail") @PostMapping("/countCheckMonth")
@GetMapping("/print/{deptId}") @ResponseBody
public String print(@PathVariable("deptId")Long deptId, SysUser user,ModelMap mmap) public AjaxResult countCheckMonth() {
List<String> recentlySixMonth = ObtainLastSixMonthsUtil.getRecentlySixMonth();
{ List<Long> yAxisData = new ArrayList<>();
List<SysUser> list = userService.lambdaQuery().eq(SysUser::getDeptId, deptId) recentlySixMonth.forEach(month -> {
.eq(SysUser::getDelFlag,0) // 获取指定月份的最大日期
.ne(SysUser::getUserId,1) String lastDayOfMonth = ObtainLastSixMonthsUtil.getLastDayOfMonth(month);
.list(); // 获取指定天的最大时间
list.forEach(sysuser -> { Date date = Date.from(LocalDate.parse(lastDayOfMonth).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
List<SysUserPost> postList = sysUserPostService.lambdaQuery(). Date maxDayTime = ObtainLastSixMonthsUtil.getEndOfDay(date);
eq(SysUserPost::getUserId, sysuser.getUserId()).list(); // 获取最小时间
List<Long> postIds = postList.stream().map(SysUserPost::getPostId).collect(Collectors.toList()); date = Date.from(LocalDate.parse(month.concat(StrPool.DASHED).concat("01")).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());
if(CollectionUtil.isNotEmpty(postIds)){ Date minDayTime = ObtainLastSixMonthsUtil.getStartOfDay(date);
List<SysPost> sysPostList = postService.lambdaQuery().in(SysPost::getPostId, postIds).list(); AtomicReference<Long> yAxis = new AtomicReference<>(0L);
sysuser.setPosts( Convert.toList(SysPostVO.class, sysPostList)); Integer count = new LambdaQueryChainWrapper<>(applyInfoListService.getBaseMapper())
.ge(TdApplyInfoList::getCreateTime, minDayTime)
.le(TdApplyInfoList::getCreateTime, maxDayTime)
.eq(TdApplyInfoList::getApplyStatus,'5')
.count();
if(Objects.isNull(count)){
count = 0;
} }
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
}); });
mmap.put("list", list); JSONObject obj = new JSONObject();
mmap.put("dept",deptService.selectDeptById(deptId)); obj.put("xAxisData", recentlySixMonth.toArray());
mmap.put("sysuser",getSysUser()); obj.put("yAxisData", yAxisData);
return prefix + "/print"; return AjaxResult.success(obj);
} }
} }

@ -0,0 +1,150 @@
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.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.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;
@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,26 +1,35 @@
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.ruoyi.common.utils.ObtainLastSixMonthsUtil;
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.web.bind.annotation.*;
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.annotation.Log;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdExamnum;
import com.ruoyi.system.service.ITdExamnumService;
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.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.servlet.http.HttpServletRequest; import javax.annotation.Resource;
/** /**
* Controller * Controller
@ -30,17 +39,23 @@ import javax.servlet.http.HttpServletRequest;
*/ */
@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
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 +65,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 +75,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);
} }

@ -1,79 +0,0 @@
package com.ruoyi.web.controller.system.exam;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdExamnum;
import com.ruoyi.system.domain.TdQuestion;
import com.ruoyi.system.service.ITdExamnumService;
import com.ruoyi.system.service.ITdQuestionService;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.core.controller.BaseController;
import java.util.List;
/**
*
*
*/
@Controller
@RequestMapping("/system/exam")
public class TdExamController extends BaseController{
private String prefix = "system/exam";
@Autowired
private ITdQuestionService tdQuestionService;
@Autowired
private ITdExamnumService tdExamnumService;
@RequiresPermissions("system:exam:view")
@GetMapping()
public String index(ModelMap mmap){
SysUser user = getSysUser();
mmap.put("user", user);
return prefix + "/index";
}
/**
*
*/
@Log(title = "保密考试", businessType = BusinessType.EXAM)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdExamnum tdExamnum)
{
return toAjax(tdExamnumService.insertTdExamnum(tdExamnum));
}
/**
*
*/
@RequiresPermissions("system:exam:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdQuestion tdQuestion)
{
startPage();
List<TdQuestion> list = tdQuestionService.selectTdQuestionList(tdQuestion);
return getDataTable(list);
}
/**
* 访exam
*/
@GetMapping("/edit")
public String index(){
return prefix + "/exam";
}
}

@ -1,128 +0,0 @@
package com.ruoyi.web.controller.system.exam;
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.TdQuestion;
import com.ruoyi.system.service.ITdQuestionService;
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 admin
* @date 2024-04-07
*/
@Controller
@RequestMapping("/system/question")
public class TdQuestionController extends BaseController
{
private String prefix = "system/question";
@Autowired
private ITdQuestionService tdQuestionService;
@RequiresPermissions("system:question:view")
@GetMapping()
public String question()
{
return prefix + "/question";
}
/**
*
*/
@RequiresPermissions("system:question:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdQuestion tdQuestion)
{
startPage();
List<TdQuestion> list = tdQuestionService.selectTdQuestionList(tdQuestion);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:question:export")
@Log(title = "题库管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdQuestion tdQuestion)
{
List<TdQuestion> list = tdQuestionService.selectTdQuestionList(tdQuestion);
ExcelUtil<TdQuestion> util = new ExcelUtil<TdQuestion>(TdQuestion.class);
return util.exportExcel(list, "题库管理数据");
}
/**
*
*/
@GetMapping("/add")
public String add(ModelMap mmap)
{
mmap.put("sysuser",getSysUser());
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:question:add")
@Log(title = "题库管理", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdQuestion tdQuestion)
{
return toAjax(tdQuestionService.insertTdQuestion(tdQuestion));
}
/**
*
*/
@RequiresPermissions("system:question:edit")
@GetMapping("/edit/{ID}")
public String edit(@PathVariable("ID") Long ID, ModelMap mmap)
{
TdQuestion tdQuestion = tdQuestionService.selectTdQuestionByID(ID);
mmap.put("tdQuestion", tdQuestion);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:question:edit")
@Log(title = "题库管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdQuestion tdQuestion)
{
return toAjax(tdQuestionService.updateTdQuestion(tdQuestion));
}
/**
*
*/
@RequiresPermissions("system:question:remove")
@Log(title = "题库管理", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tdQuestionService.deleteTdQuestionByIDs(ids));
}
}

@ -1,34 +0,0 @@
package com.ruoyi.web.controller.system.exam;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ITdQuestionService;
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.RequestMapping;
/**
* Controller
*/
@Controller
@RequestMapping("/system/userexam")
public class TdUserExamController extends BaseController {
private String prefix = "system/exam";
@RequiresPermissions("system:userexam:view")
@GetMapping()
public String index(ModelMap mmap) {
//获取用户信息
SysUser user = getSysUser();
mmap.put("user", user);
//跳转考试界面
return prefix + "/index";
}
}

@ -0,0 +1,196 @@
package com.ruoyi.web.controller.system.file;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.config.ServerConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.system.domain.file.TdFileRelation;
import com.ruoyi.web.controller.manager.FileRelationManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.List;
import java.util.Objects;
/**
* packageName com.hyp.web.controller.reward
*
* @author wangxy
* @version JDK 8
* @className FileRelationController
* @date 2024/4/12
* @description
*/
@Api("文件")
@RestController
@RequestMapping("/system/file")
@Slf4j
public class FileRelationController extends BaseController {
@Resource
private FileRelationManager fileRelationManager;
@Resource
private ServerConfig serverConfig;
@ApiOperation("文件上传")
@PostMapping("/upload")
public AjaxResult uploadFile(MultipartFile file,
@RequestParam String applyId,
@RequestParam(required = false) String filename,
@RequestParam String fileCode) {
try {
if(file.isEmpty()){
throw new ServiceException("上传文件不能为空");
}
// 上传文件路径
String filePath = RuoYiConfig.getUploadPath();
// 上传并返回新文件名称
String fileNames = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileNames;
if(StringUtils.isBlank(filename)){
filename = fileNames;
}
String originalFilename = FileUtils.getNameNotSuffix(file.getOriginalFilename()) ;
return AjaxResult.success(fileRelationManager.save(applyId,filename,fileCode,url,originalFilename));
} catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
}
/**
*
*/
@ApiOperation("多文件上传")
@PostMapping("/uploads")
public AjaxResult uploadFiles(List<MultipartFile> files,
@RequestParam String applyId,
@RequestParam(required = false) String filename,
@RequestParam String fileCode){
try {
return AjaxResult.success(fileRelationManager.saveBatch(files,applyId,filename,fileCode));
} catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
}
@ApiOperation("材料预览")
@GetMapping("fileView/{fileId}")
public void fileView(@PathVariable String fileId, HttpServletResponse response) throws IOException {
String filePath = fileRelationManager.getFilePath(fileId);
String fileName = fileRelationManager.getRealName(fileId);
String encodedFileName = new String(fileName.getBytes(StandardCharsets.UTF_8),StandardCharsets.ISO_8859_1);
InputStream in = null;
OutputStream out = null;
try {
response.setHeader("content-disposition", "attachment;filename=" + encodedFileName + ".pdf");
// 设置文件ContentType类型这样设置会自动判断下载文件类型
response.setContentType("application/octet-stream;charset=utf-8");
File file = new File(filePath);
in = Files.newInputStream(file.toPath());
// 从response对象获取输出流
out = response.getOutputStream();
// 将输入流中的数据读取出来,写到输出流中
for (int b = -1; (b = in.read()) != -1; ) {
out.write(b);
}
} catch (Exception e) {
log.error("获取文件流失败:", e.getMessage(), e);
} finally {
if (in != null) {
try {
in.close();
} catch (IOException e) {
log.error(e.getMessage(), e);
} finally {
if (out != null) {
out.close();
}
}
}
}
}
@ApiOperation("材料删除")
@Log(title = "材料删除", businessType = BusinessType.DELETE)
@GetMapping("/delFile/{fileId}")
public AjaxResult delFile(@PathVariable String fileId){
return toAjax(fileRelationManager.delFile(fileId));
}
@ApiOperation("材料审核通过id")
@GetMapping("/filePass")
public AjaxResult pass(@RequestParam String fileId,
@RequestParam Integer fileState){
return toAjax(fileRelationManager.pass(fileId,fileState));
}
@ApiOperation("材料校验")
@GetMapping("/checkFile/{applyId}")
public AjaxResult checkFile(@PathVariable String applyId){
return fileRelationManager.checkFile(applyId);
}
@ApiOperation("文件查询")
@GetMapping("/getFileInfo")
public AjaxResult getFileInfo(@RequestParam String applyId,
@RequestParam(required = false) String fileCode) {
return success(fileRelationManager.getFileInfo(applyId,fileCode));
}
@ApiOperation("文件下载")
@GetMapping("/download")
public void fileDownload(String fileId, HttpServletResponse response, HttpServletRequest request) {
try {
TdFileRelation rewFileRelation = fileRelationManager.getRewFileRelation(fileId);
if(Objects.isNull(rewFileRelation)){
throw new ServiceException("下载文件不存在");
}
String fileName = rewFileRelation.getFilePath();
if (!FileUtils.checkAllowDownload(fileName)) {
throw new ServiceException(com.ruoyi.common.utils.StringUtils.format("资源文件({})非法,不允许下载。 ", fileName));
}
// 本地资源路径
String localPath = RuoYiConfig.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(fileName, Constants.RESOURCE_PREFIX);
// 下载名称
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());
} catch (Exception e) {
log.error("下载文件失败", e);
}
}
}

@ -1,126 +0,0 @@
package com.ruoyi.web.controller.system.filemanager;
import java.util.ArrayList;
import java.util.List;
import com.ruoyi.system.domain.TdFileProvide;
import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ITdFileProvideService;
import com.ruoyi.system.service.ITdFileReceiveService;
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 com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
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-15
*/
@Controller
@RequestMapping("/system/filedestory")
public class TdFileDestoryController extends BaseController
{
private String prefix = "system/filedestory";
@Autowired
private ITdFileReceiveService tdFileReceiveService;
@Autowired
private ITdFileProvideService tdFileProvideService;
@Autowired
private ISysDeptService deptService;
@RequiresPermissions("system:filedestory:view")
@GetMapping()
public String filedestory()
{
return prefix + "/filedestory";
}
/**
*
*/
@RequiresPermissions("system:filedestory:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdFileReceive tdFileReceive)
{
startPage();
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
List<TdFileReceive> tdFileReceives = new ArrayList<>();
for (TdFileReceive FileReceivelist : list){
if (FileReceivelist.getExtractState().equals("1") && FileReceivelist.getReceiveDepartid().equals(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName())){
tdFileReceives.add(FileReceivelist);
}
}
return getDataTable(tdFileReceives);
}
/**
*
*/
@RequiresPermissions("system:filedestory:export")
@Log(title = "涉密文件销毁", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdFileReceive tdFileReceive)
{
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
ExcelUtil<TdFileReceive> util = new ExcelUtil<TdFileReceive>(TdFileReceive.class);
return util.exportExcel(list, "涉密文件销毁数据");
}
/**
*
*/
@RequiresPermissions("system:filedestory:edit")
@GetMapping("/edit/{receiveId}")
public String edit(@PathVariable("receiveId") Long receiveId, ModelMap mmap)
{
TdFileReceive tdFileReceive = tdFileReceiveService.selectTdFileReceiveByReceiveId(receiveId);
String fileId = tdFileReceive.getFileId();
TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId);
mmap.put("tdFileProvide", tdFileProvide);
mmap.put("tdFileReceive", tdFileReceive);
mmap.put("user",getSysUser());
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:filedestory:edit")
@Log(title = "涉密文件销毁", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdFileReceive tdFileReceive)
{
return toAjax(tdFileReceiveService.updateTdFileReceive(tdFileReceive));
}
/**
*
*/
@RequiresPermissions("system:filedestory:detail")
@GetMapping("/detail/{receiveId}")
public String detail(@PathVariable("receiveId") Long receiveId, ModelMap mmap)
{
TdFileReceive tdFileReceive = tdFileReceiveService.selectTdFileReceiveByReceiveId(receiveId);
String fileId = tdFileReceive.getFileId();
TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId);
mmap.put("tdFileProvide", tdFileProvide);
mmap.put("tdFileReceive", tdFileReceive);
return prefix + "/detail";
}
}

@ -1,99 +0,0 @@
package com.ruoyi.web.controller.system.filemanager;
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.TdFileReceive;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ITdFileReceiveService;
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.ArrayList;
import java.util.List;
/**
* Controller
*/
@Controller
@RequestMapping("/system/fileextract")
public class TdFileExtractController extends BaseController {
private String prefix = "system/fileextract";
@Autowired
private ITdFileReceiveService tdFileReceiveService;
@Autowired
private ISysDeptService deptService;
@RequiresPermissions("system:fileextract:view")
@GetMapping()
public String fileextract(ModelMap mmap)
{
mmap.put("sysuser",getSysUser());
return prefix + "/fileextract";
}
/**
*
*/
@RequiresPermissions("system:fileextract:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdFileReceive tdFileReceive)
{
startPage();
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
List<TdFileReceive> tdFileReceives = new ArrayList<>();
for (TdFileReceive FileReceivelist : list){
if (FileReceivelist.getReceiveState().equals("1") && FileReceivelist.getReceiveDepartid().equals(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName())){
tdFileReceives.add(FileReceivelist);
}
}
return getDataTable(tdFileReceives);
}
/**
*
*/
@RequiresPermissions("system:fileextract:export")
@Log(title = "涉密文件接收", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdFileReceive tdFileReceive)
{
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
ExcelUtil<TdFileReceive> util = new ExcelUtil<TdFileReceive>(TdFileReceive.class);
return util.exportExcel(list, "涉密文件接收数据");
}
/**
*
*/
@RequiresPermissions("system:fileextract:edit")
@GetMapping("/edit/{receiveId}")
public String edit(@PathVariable("receiveId") Long receiveId, ModelMap mmap)
{
TdFileReceive tdFileReceive = tdFileReceiveService.selectTdFileReceiveByReceiveId(receiveId);
mmap.put("tdFileReceive", tdFileReceive);
mmap.put("user",getSysUser());
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:fileextract:edit")
@Log(title = "涉密文件接收", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdFileReceive tdFileReceive)
{
return toAjax(tdFileReceiveService.updateTdFileReceive(tdFileReceive));
}
}

@ -1,184 +0,0 @@
package com.ruoyi.web.controller.system.filemanager;
import java.util.ArrayList;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.sql.SqlUtil;
import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.framework.web.domain.server.Sys;
import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.TdFileReceive;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ITdFileReceiveService;
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.TdFileProvide;
import com.ruoyi.system.service.ITdFileProvideService;
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-04-23
*/
@Controller
@RequestMapping("/system/fileprovide")
public class TdFileProvideController extends BaseController
{
private String prefix = "system/fileprovide";
@Autowired
private ITdFileProvideService tdFileProvideService;
@Autowired
private ISysDeptService deptService;
@Autowired
private ITdFileReceiveService tdFileReceiveService;
@RequiresPermissions("system:fileprovide:view")
@GetMapping()
public String fileprovide()
{
return prefix + "/fileprovide";
}
/**
*
*/
@RequiresPermissions("system:fileprovide:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdFileProvide tdFileProvide)
{
startPage();
List<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:fileprovide:export")
@Log(title = "文件下发", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(TdFileProvide tdFileProvide)
{
List<TdFileProvide> list = tdFileProvideService.selectTdFileProvideList(tdFileProvide);
ExcelUtil<TdFileProvide> util = new ExcelUtil<TdFileProvide>(TdFileProvide.class);
return util.exportExcel(list, "文件下发数据");
}
/**
*
*/
@GetMapping("/add")
public String add(SysDept dept, ModelMap mmap)
{
mmap.put("dept",deptService.selectDeptList(dept));
mmap.put("user",getSysUser());
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:fileprovide:add")
@Log(title = "文件下发", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdFileProvide tdFileProvide)
{
tdFileProvide.setFileId("File_"+Seq.getId(Seq.commSeqType));
String[] tar = tdFileProvide.getTargetDepart().split(",");
for (String depart : tar) {
TdFileReceive tdFileReceive = new TdFileReceive();
tdFileReceive.setFileId(tdFileProvide.getFileId());
tdFileReceive.setFileName(tdFileProvide.getFileName());
tdFileReceive.setProvideDepart(tdFileProvide.getProvideDepart());
tdFileReceive.setProvideDate(tdFileProvide.getProvideDate());
tdFileReceive.setReceiveDepartid(depart);
tdFileReceiveService.insertTdFileReceive(tdFileReceive);
}
return toAjax(tdFileProvideService.insertTdFileProvide(tdFileProvide));
}
/**
*
*/
@RequiresPermissions("system:fileprovide:edit")
@GetMapping("/edit/{fileId}")
public String edit(@PathVariable("fileId") String fileId,SysDept dept, ModelMap mmap)
{
TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId);
mmap.put("user",getSysUser());
mmap.put("dept",deptService.selectDeptList(dept));
mmap.put("tdFileProvide", tdFileProvide);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:fileprovide:edit")
@Log(title = "文件下发", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdFileProvide tdFileProvide)
{
return toAjax(tdFileProvideService.updateTdFileProvide(tdFileProvide));
}
/**
*
*/
@RequiresPermissions("system:fileprovide:remove")
@Log(title = "文件下发", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
List<TdFileReceive> tdFileReceives = tdFileReceiveService.selectTdFileReceiveByFileId(ids);
List<String> statesList = new ArrayList<>();
for (TdFileReceive tdFileReceive : tdFileReceives) {
statesList.add(tdFileReceive.getReceiveState());
}
if (statesList.contains("1")){
return AjaxResult.error("下发的已被接收文件不能删除");
}else {
for (TdFileReceive tdFileReceive : tdFileReceives){
tdFileReceiveService.deleteTdFileReceiveByReceiveId(tdFileReceive.getReceiveId());
}
return toAjax(tdFileProvideService.deleteTdFileProvideByFileIds(ids));
}
}
/**
*
*/
@RequiresPermissions("system:fileprovide:detail")
@GetMapping("/detail/{fileId}")
public String detail(@PathVariable("fileId") String fileId,SysDept dept ,ModelMap mmap)
{
TdFileProvide tdFileProvide = tdFileProvideService.selectTdFileProvideByFileId(fileId);
mmap.put("dept",deptService.selectDeptList(dept));
mmap.put("tdFileProvide", tdFileProvide);
return prefix + "/detail";
}
}

@ -1,142 +0,0 @@
package com.ruoyi.web.controller.system.filemanager;
import java.util.ArrayList;
import java.util.List;
import com.ruoyi.system.service.ISysDeptService;
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.TdFileReceive;
import com.ruoyi.system.service.ITdFileReceiveService;
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-14
*/
@Controller
@RequestMapping("/system/filereceive")
public class TdFileReceiveController extends BaseController
{
private String prefix = "system/filereceive";
@Autowired
private ITdFileReceiveService tdFileReceiveService;
@Autowired
private ISysDeptService deptService;
@RequiresPermissions("system:filereceive:view")
@GetMapping()
public String filereceive(ModelMap mmap)
{
mmap.put("sysuser",getSysUser());
return prefix + "/filereceive";
}
/**
*
*/
@RequiresPermissions("system:filereceive:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdFileReceive tdFileReceive)
{
startPage();
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveList(tdFileReceive);
List<TdFileReceive> tdFileReceives = new ArrayList<>();
for (TdFileReceive FileReceivelist : list){
if (FileReceivelist.getReceiveDepartid().equals(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName())){
tdFileReceives.add(FileReceivelist);
}
}
return getDataTable(tdFileReceives);
}
/**
*
*/
@RequiresPermissions("system:filereceive:export")
@Log(title = "涉密文件接收", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export()
{
List<TdFileReceive> list = tdFileReceiveService.selectTdFileReceiveByReceiveDepart(deptService.selectDeptById(getSysUser().getDeptId()).getDeptName());
ExcelUtil<TdFileReceive> util = new ExcelUtil<TdFileReceive>(TdFileReceive.class);
return util.exportExcel(list, "涉密文件接收数据");
}
/**
*
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:filereceive:add")
@Log(title = "涉密文件接收", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(TdFileReceive tdFileReceive)
{
return toAjax(tdFileReceiveService.insertTdFileReceive(tdFileReceive));
}
/**
*
*/
@RequiresPermissions("system:filereceive:edit")
@GetMapping("/edit/{receiveId}")
public String edit(@PathVariable("receiveId") Long receiveId, ModelMap mmap)
{
TdFileReceive tdFileReceive = tdFileReceiveService.selectTdFileReceiveByReceiveId(receiveId);
mmap.put("tdFileReceive", tdFileReceive);
mmap.put("user",getSysUser());
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:filereceive:edit")
@Log(title = "涉密文件接收", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(TdFileReceive tdFileReceive)
{
return toAjax(tdFileReceiveService.updateTdFileReceive(tdFileReceive));
}
/**
*
*/
@RequiresPermissions("system:filereceive:remove")
@Log(title = "涉密文件接收", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(tdFileReceiveService.deleteTdFileReceiveByReceiveIds(ids));
}
}

@ -0,0 +1,79 @@
package com.ruoyi.web.controller.system.leave;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/leaveList")
public class LeaveApplyController extends BaseController {
private String prefix = "system/newdev/leave";
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:leave:view")
@GetMapping()
public String leaveListInfo() {
return prefix + "/leaveList";
}
/**
*
*/
@RequiresPermissions("system:leave:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectPersonLeaveList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@RequiresPermissions("system:leave:leaveFile")
@GetMapping("/leaveFile/{applyId}")
public String leaveFile(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/leaveFile";
}
/**
*
*/
@PostMapping("/submitLeave")
@ResponseBody
public AjaxResult submitLeave(@RequestParam String applyId) {
return toAjax(applyInfoListManager.submitLeave(applyId));
}
}

@ -0,0 +1,91 @@
package com.ruoyi.web.controller.system.leave;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/leaveAuditList")
public class LeaveAuditController extends BaseController {
private String prefix = "system/newdev/leaveAudit";
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:leaveAudit:view")
@GetMapping()
public String leaveAuditList() {
return prefix + "/leaveAuditList";
}
/**
*
*/
@RequiresPermissions("system:leaveAudit:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectPersonLeaveAuditList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@RequiresPermissions("system:leave:leaveAudit")
@GetMapping("/leaveAudit/{applyId}")
public String leaveAudit(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/leaveAudit";
}
/**
*
*/
@PostMapping("/leaveAudit")
@ResponseBody
public AjaxResult leaveAudit(@RequestParam String applyId) {
return toAjax(applyInfoListManager.submitLeaveAudit(applyId));
}
/**
*
*/
@PostMapping("/goBackLeave")
@ResponseBody
public AjaxResult goBackLeave(@RequestParam String applyId,
@RequestParam(required = false) String leaveMsg) {
return toAjax(applyInfoListManager.goBackLeave(applyId,leaveMsg));
}
}

@ -0,0 +1,86 @@
package com.ruoyi.web.controller.system.onduty;
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.apply.TdApplyInfoList;
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
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: ApplyInfoListController
* Package: com.ruoyi.web.controller.system.apply
* Description:
*
* @Author wangxy
* @Create 2025/5/14 11:32
* @Version 1.0
*/
@Controller
@RequestMapping("/system/onDutyList")
public class OnDutyInfoListController extends BaseController {
private String prefix = "system/newdev/onduty";
@Resource
private ApplyInfoListManager applyInfoListManager;
@RequiresPermissions("system:onduty:view")
@GetMapping()
public String ondutyList() {
return prefix + "/ondutyList";
}
/**
*
*/
@RequiresPermissions("system:onduty:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
startPage();
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectOndutyInfoListList(applyInfoListDTO);
return getDataTable(tdApplyInfoLists);
}
/**
*
*/
@RequiresPermissions("system:onduty:editDuty")
@GetMapping("/editDuty/{applyId}")
public String editDuty(@PathVariable("applyId") String applyId, ModelMap mmap) {
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
mmap.put("applyInfoList", applyInfoList);
return prefix + "/editDuty";
}
/**
*
*/
@PostMapping("/saveDuty")
@ResponseBody
public AjaxResult saveDuty(TdApplyInfoListDTO applyInfoListDTO) {
return toAjax(applyInfoListManager.saveDuty(applyInfoListDTO));
}
}

@ -1,93 +0,0 @@
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/propertychange")
public class TdPropertyChangeController extends BaseController {
private String prefix = "system/property/propertychange";
@Autowired
private ITdPropertyInfoService tdPropertyInfoService;
@RequiresPermissions("system:changeproperty:view")
@GetMapping()
public String changeProperty()
{
return prefix + "/changeproperty";
}
/**
*
*/
@RequiresPermissions("system:changeproperty:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(TdPropertyInfo tdPropertyInfo)
{
startPage();
List<TdPropertyInfo> tdPropertyInfos = tdPropertyInfoService.selectTdPropertyInfoList(tdPropertyInfo);
return getDataTable(tdPropertyInfos);
}
/**
*
*/
@RequiresPermissions("system:changeproperty:change")
@GetMapping("/edit/{id}")
public String change(@PathVariable("id") String id, ModelMap mmap)
{
TdPropertyInfo tdPropertyInfo = tdPropertyInfoService.selectTdPropertyInfoById(id);
mmap.put("tdPropertyInfo", tdPropertyInfo);
return prefix + "/change";
}
/**
*
*/
@RequiresPermissions("system:changeproperty:change")
@Log(title = "资产变更", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult changeSave(TdPropertyInfo tdPropertyInfo)
{
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
}
/**
*
*/
@RequiresPermissions("system:changeproperty: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:changeproperty:destory")
@Log(title = "资产变更", businessType = BusinessType.UPDATE)
@PostMapping("/destory")
@ResponseBody
public AjaxResult destorySave(TdPropertyInfo tdPropertyInfo)
{
return toAjax(tdPropertyInfoService.updateTdPropertyInfo(tdPropertyInfo));
}
}

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

Loading…
Cancel
Save