Compare commits
407 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e11dde7c0 | |||
| e8f24ee290 | |||
| a1e07a204b | |||
| a080b4294c | |||
| 0827ce2908 | |||
| 5f600209b8 | |||
| 79ea4ed4f7 | |||
| cbd3e7f981 | |||
| 3c497417dc | |||
| 088861f66e | |||
| 8c607c8749 | |||
| 3115e38cc4 | |||
| ae6c486114 | |||
| a41ffa4cfc | |||
| b1f74161f8 | |||
| 3bab56a19b | |||
| abc0674531 | |||
| 85fcb7c2e2 | |||
| fc6a7437a3 | |||
| 999a0992e7 | |||
| 55b3dfc077 | |||
|
|
32d1673667 | ||
| 17c7cc70ed | |||
| 44be570ffa | |||
| c6f4996ba7 | |||
| 6c20b15339 | |||
| c297072b36 | |||
| 4c6886be6a | |||
| 8beb7f3d3d | |||
| 91968530b4 | |||
| 0833f82fb4 | |||
| cce71f324b | |||
| ee6efafde4 | |||
| 2051807ecf | |||
| 0a4de15599 | |||
| 25b3c26ec2 | |||
| 91d673de77 | |||
| 0bfa7183f9 | |||
| 79d451931d | |||
| ae5f1c795b | |||
| c1074fc4fb | |||
| e832b6d38e | |||
| 5043466e84 | |||
| fcaeedb543 | |||
| 8cf434a46f | |||
| bfbc061b0b | |||
| f92cd830e9 | |||
| a7a1a18445 | |||
| d1331cd4e1 | |||
| 37d08b8545 | |||
| e69f499ac0 | |||
| 3baf7161f1 | |||
| 85188651ca | |||
| d6fbfb1427 | |||
| 966847499a | |||
| 1e91171001 | |||
| 51f495f81e | |||
| 1e6a5972b9 | |||
| 515f03a5cd | |||
| b27542ba6d | |||
| 4790855079 | |||
| 72cf9c6f2d | |||
| 19ecb65183 | |||
| d85a8684a6 | |||
| 574a9267bf | |||
| 27a7396c78 | |||
| 633cf2c17f | |||
| 3188ca5752 | |||
| c79e4c2623 | |||
| f3c451d0a1 | |||
| a077bd57d4 | |||
| cf16c497bd | |||
| fd1ab239a9 | |||
| caf65e3113 | |||
| c18c21ff4c | |||
| ab6849c9eb | |||
| 6b555f2563 | |||
| 7645405c5b | |||
| 5bfadb9174 | |||
| e1b9d36153 | |||
| fdb8d6c934 | |||
| 22a1ac57b2 | |||
| 4d243815a6 | |||
| 882e8c9199 | |||
| a0c87f6335 | |||
| 538dde55f7 | |||
| f33e3c6f15 | |||
| 0794782505 | |||
| d37fa46b5f | |||
| 8fcc229ad8 | |||
| 39aa710fd3 | |||
| 49f95b40ea | |||
| eb2d7302b7 | |||
| eb26f9db34 | |||
| bd6f3ca587 | |||
| a58e02f2cb | |||
| 8c8ef13021 | |||
| d9a0a98f52 | |||
| 8c84b6eb46 | |||
| 3d797cc0e0 | |||
| df7281a2d4 | |||
| f83d7ae520 | |||
| d9c8525b94 | |||
| bcc5cbb2fb | |||
| 67a8351d70 | |||
| 391506e423 | |||
| b1117b4157 | |||
| b0eb9861b9 | |||
| b863c14f2b | |||
| 18f6a845e6 | |||
| e1385cb3e6 | |||
| c8ca56c3f5 | |||
| b149f7d687 | |||
| 19702c25e5 | |||
|
|
eaa681c9ff | ||
| 205c58782b | |||
| 00e1c62de0 | |||
| 46c9787216 | |||
| e0a768de2e | |||
| fc7f931728 | |||
|
|
3ccb970a09 | ||
|
|
8a9a622aeb | ||
|
|
29e7f0937b | ||
| 029d534b3c | |||
|
|
213723b220 | ||
|
|
c636e77fd0 | ||
|
|
7407562ec5 | ||
|
|
b3c27ec789 | ||
|
|
601ae40666 | ||
| 3dda5ce72d | |||
|
|
99d4c28b95 | ||
|
|
0e70de6de7 | ||
| 72eb1088df | |||
| a853c16854 | |||
| 73a349f98a | |||
| 5fb7a3f488 | |||
| a8eb7d5697 | |||
| eb3b142ce4 | |||
| 9f6a39ba30 | |||
| f7f2f98bbe | |||
| 79e68ee14e | |||
| bc8987c463 | |||
| 3f7174fcd1 | |||
| 080008f447 | |||
| 5c3d935615 | |||
| a0845127c6 | |||
| ba65ab303b | |||
|
|
6fbdddf0ee | ||
| 173cbc7f87 | |||
|
|
2e341a123e | ||
|
|
8beff2ee14 | ||
| 1b939ba5b7 | |||
| 577daabe1c | |||
| 327e88e6d4 | |||
|
|
548fabcffe | ||
| 263e21e157 | |||
| d7955aa628 | |||
|
|
d197f7555f | ||
| a0e52da437 | |||
|
|
88d79729fe | ||
| 6dc6480e64 | |||
| 98c263a72b | |||
| 50a2ef9e00 | |||
| 065f7052c6 | |||
| e23d42404d | |||
| 4120d4e001 | |||
| 1bd2089047 | |||
| 6d9ff7dc10 | |||
| ae7ca984f8 | |||
| 69b7a4d865 | |||
| 864bf55025 | |||
| 249ef5f87e | |||
|
|
df3fb6c66c | ||
|
|
10ec9f4c1b | ||
| 0b98763c05 | |||
|
|
3d3b21a775 | ||
|
|
4ba4f80946 | ||
|
|
ed7cb2dab5 | ||
| 50ef9e6743 | |||
| 250d7dde34 | |||
| 69f3e066db | |||
|
|
afb0c3933c | ||
|
|
45ac07e57c | ||
|
|
262ea97824 | ||
|
|
dcfa13f239 | ||
|
|
27c3c850d6 | ||
| 122a15a73d | |||
| 61749aee4d | |||
| 97a29a31c5 | |||
| c3734f921c | |||
| c561586cfa | |||
|
|
60593233bc | ||
| 992b03f9c2 | |||
| 36628342dc | |||
|
|
3783e4a872 | ||
| 584f79294b | |||
| a5884ec069 | |||
| cc2f7db754 | |||
| fcccfc1959 | |||
| c5ec91e7d3 | |||
| 6b67e25d94 | |||
| 6da3b63012 | |||
|
|
ea0f0e2294 | ||
|
|
980f0aeb9c | ||
|
|
17b40118ce | ||
|
|
d10a78e5e8 | ||
|
|
f7ad010b2a | ||
|
|
1a7ff0a686 | ||
|
|
3ad3f21362 | ||
|
|
c84fc3c236 | ||
|
|
a6561e2ca6 | ||
|
|
dfe35bb7f0 | ||
| 18c96e006f | |||
| f5db504363 | |||
| deb31c969a | |||
| e7dac9762d | |||
|
|
89862878b5 | ||
|
|
e105919dab | ||
|
|
e83fc94334 | ||
| 5bf7ab481f | |||
| afa904bd83 | |||
| a343464d8d | |||
| 4a2485e434 | |||
|
|
4e2d4d85ec | ||
| 7ddf6211ee | |||
| d44600b641 | |||
| a68c4402de | |||
| 93103f7f40 | |||
| 7202151a41 | |||
| 491d8f8930 | |||
| b886726ecc | |||
|
|
9d0dde6794 | ||
|
|
f3578b3202 | ||
|
|
0610ba7cb5 | ||
|
|
8b848f787a | ||
| a794cd0ce3 | |||
|
|
d97fd0bed1 | ||
|
|
c0e67722d9 | ||
|
|
aca7fea69f | ||
| ce9344f9ce | |||
| 991ad61655 | |||
|
|
e4ac857461 | ||
|
|
24ab98ae89 | ||
| e79ab9ac4f | |||
| b66c2027d1 | |||
| 09bf895711 | |||
|
|
825cdd58ae | ||
| 0977eb8145 | |||
|
|
73efeecfc1 | ||
| fe8fb3d321 | |||
|
|
618fb1e340 | ||
|
|
215fe8b889 | ||
|
|
3e32458b7f | ||
| a8e170ea45 | |||
| 1856ae50fd | |||
| 1711e6c115 | |||
|
|
b3f226feab | ||
| c086dc8c77 | |||
| 6762341fbd | |||
| d5f8b0f23b | |||
|
|
38233110f2 | ||
| 6ebb59bc5e | |||
| 69aefab280 | |||
| 3d3ff82e24 | |||
| 69780d204f | |||
|
|
ef52f290fe | ||
| e9d1119777 | |||
|
|
cf182f0e34 | ||
|
|
626ae1a459 | ||
| 3d6977328f | |||
| 2dcd7ba1d5 | |||
|
|
16a4d38113 | ||
| 57c98ea39d | |||
| 08f7e35042 | |||
| 43f3d1ba94 | |||
| 2e45c6c029 | |||
| 945182c6f8 | |||
|
|
f7de87860b | ||
| 67e4de0d68 | |||
|
|
602d521424 | ||
|
|
01e14ee084 | ||
|
|
4a5572de26 | ||
| 88a516d1be | |||
| 9ce967002a | |||
| fd536a035e | |||
| df84a7eefa | |||
| 2804703eaa | |||
| e14a0e3d13 | |||
| 5a99fe8234 | |||
| 3ad5c5533f | |||
|
|
9997f4f7c9 | ||
|
|
3d4e4a8119 | ||
|
|
3deac74898 | ||
| 7bbc50ef47 | |||
| 4ae6765a15 | |||
| 1292853c5d | |||
|
|
41791c9ccc | ||
|
|
0674215b53 | ||
| e42d990304 | |||
| 0dbe9a57c8 | |||
| 85ea831a1c | |||
| 7ac26cf781 | |||
| b7412648b4 | |||
|
|
97571652e5 | ||
| b5d4da97f9 | |||
|
|
e5edb6bda2 | ||
|
|
0e1ae53194 | ||
| a1efd3f91b | |||
| 3211553d0d | |||
| a57a326b83 | |||
| f77d0a2567 | |||
| 72581466aa | |||
|
|
4b3471df06 | ||
|
|
68c65ae8bd | ||
| 1b879addc7 | |||
|
|
3888859b2b | ||
|
|
f03d2e1633 | ||
| bc91eb7cdc | |||
|
|
93120e973a | ||
| c6a27f6276 | |||
| 778704c9dc | |||
| ff227b40c1 | |||
| c7d8ab5b48 | |||
| 9c27b2a134 | |||
|
|
3f919188d2 | ||
| 8942058972 | |||
|
|
6c2dbf0418 | ||
|
|
85e185bab8 | ||
|
|
88aa1517ef | ||
|
|
c05118c427 | ||
|
|
2a7f1326b9 | ||
|
|
c07255fe5b | ||
|
|
749bfc89dd | ||
| 52cc5e3aae | |||
| 642c4a0941 | |||
| 30953d5771 | |||
| 83e0c663c9 | |||
| b19337e76a | |||
| ba607346bd | |||
|
|
433c452a40 | ||
|
|
a1be7fdbfd | ||
|
|
87409d0c93 | ||
| d5c8ae8d45 | |||
| bc45e9c8c6 | |||
|
|
42992382c0 | ||
|
|
22d7eba510 | ||
| 9728c8a6dd | |||
| c951144ac6 | |||
|
|
0b179fffd6 | ||
|
|
75374ac5d3 | ||
|
|
2a83719b87 | ||
|
|
e58f2d807b | ||
|
|
b2884def17 | ||
|
|
064840dd42 | ||
| 1aa814c766 | |||
|
|
b9719a51d1 | ||
|
|
03b83aaf7c | ||
|
|
d93976483b | ||
| dd0a3a915c | |||
| 2f3994c575 | |||
| daa78e128f | |||
| 2ca594cb39 | |||
|
|
7805c26f4a | ||
|
|
b7d34537c2 | ||
| c1213fcf59 | |||
| a64edace55 | |||
| 4afe0d107c | |||
|
|
d8af11412f | ||
|
|
00816c9834 | ||
|
|
4fb7bea80a | ||
|
|
0fc72cb270 | ||
|
|
eadf521903 | ||
| f786fdbc3f | |||
| 92c4c938a3 | |||
|
|
a94a1b7b69 | ||
|
|
48755c2d9e | ||
|
|
f99f8eb560 | ||
|
|
ddc7ce2fe7 | ||
|
|
c9899c62d2 | ||
| 8b9837d7dc | |||
| 2cba41331a | |||
| 4da5ca427b | |||
| f4605b1af7 | |||
|
|
d2babdc9ed | ||
| 4d0599eac1 | |||
|
|
35d99df274 | ||
|
|
ce76b2f98d | ||
| 8fbca1a898 | |||
| d548215123 | |||
| 953d17dc8c | |||
|
|
b71a21ea5c | ||
|
|
0a20b5e34e | ||
| 388425084e | |||
| 51ee8d1b43 | |||
|
|
d29d56e712 | ||
|
|
9084ddaa98 | ||
|
|
be6d5c1ccc | ||
| 1bba9e598a | |||
| d58a5e8ab3 | |||
| e6ffb7101f | |||
|
|
48b2188cf9 | ||
|
|
8bc5d45976 | ||
| 04f6e7e960 | |||
| 8fb58bdab8 | |||
|
|
fdfe5334a1 | ||
|
|
66b99009e6 | ||
|
|
2c7456531d |
76
.github/copilot-instructions.md
vendored
Normal file
76
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
# OpenHIS — AI 编码助手 指南
|
||||||
|
|
||||||
|
目的:帮助自动化/AI 编码代理快速上手本仓库,包含架构要点、关键文件、常用构建/运行命令以及项目约定。请只按照仓库内真实可见的内容提出修改建议或补充说明。
|
||||||
|
|
||||||
|
- **代码组织**: 本项目是一个 Java 后端(多模块 Maven)+ Vue3 前端(Vite)的大型应用。
|
||||||
|
- 后端主模块目录:`openhis-server-new/`(顶层为 `pom`,包含多个子模块)。关键子模块示例:`openhis-application`, `openhis-domain`, `openhis-common`, `core-*` 系列。
|
||||||
|
- 前端目录:`openhis-ui-vue3/`(Vite + Vue 3,使用 Pinia、Element Plus 等)。
|
||||||
|
|
||||||
|
- **大局观(Big Picture)**: 后端以 Spring Boot(Java 17)实现,使用多模块 Maven 管理公共库与业务模块;前端由单独仓库目录通过 Vite 构建并以环境变量(`VITE_APP_BASE_API`)与后端交互。后端扫描 `com.core` 与 `com.openhis` 包(见 `OpenHisApplication.java`),启动类位于:`openhis-server-new/openhis-application/src/main/java/com/openhis/OpenHisApplication.java`。
|
||||||
|
|
||||||
|
- **运行/构建(Windows PowerShell 示例)**:
|
||||||
|
- 构建后端(从仓库根执行):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd openhis-server-new
|
||||||
|
mvn clean package -DskipTests
|
||||||
|
```
|
||||||
|
|
||||||
|
- 仅运行后端模块(开发时常用):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd openhis-server-new/openhis-application
|
||||||
|
mvn spring-boot:run
|
||||||
|
# 或在 IDE 中运行 `com.openhis.OpenHisApplication` 的 main()
|
||||||
|
```
|
||||||
|
|
||||||
|
- 前端启动与构建(需要 Node.js v16.x,仓库 README 建议 v16.15):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd openhis-ui-vue3
|
||||||
|
npm install
|
||||||
|
npm run dev # 本地开发(热重载)
|
||||||
|
npm run build:prod # 生产构建
|
||||||
|
```
|
||||||
|
|
||||||
|
- **环境与配置**:
|
||||||
|
- 后端配置:`openhis-server-new/openhis-application/src/main/resources/application.yml`(数据库、端口、profile 等)。README 还提及 `application-druid.yml`(若存在请优先查看)。
|
||||||
|
- 前端配置:多个 `.env.*` 文件(例如 `.env.development`, `.env.staging`, `.env.production`),关键变量:`VITE_APP_BASE_API`(例如 `/dev-api`),前端通过 `import.meta.env.VITE_APP_BASE_API` 拼接后端 URL(见 `src/utils/request.js`、多个视图与组件)。
|
||||||
|
|
||||||
|
- **重要约定 / 模式**:
|
||||||
|
- 后端采用 Java 17、Spring Boot 2.5.x 家族,父 POM在 `openhis-server-new/pom.xml` 定义。常用依赖版本在该 POM 的 `<properties>` 中集中维护。
|
||||||
|
- 模块间以 Maven 模块依赖与 `com.core` / `com.openhis` 包名分层(见 `pom.xml` 的 `<modules>` 与 `dependencyManagement`)。
|
||||||
|
- 前端通过 Vite 插件配置(`openhis-ui-vue3/vite/plugins`)管理 svg、自动导入等。UI 框架为 Element Plus,状态管理为 Pinia。
|
||||||
|
|
||||||
|
- **集成点 & 外部依赖**:
|
||||||
|
- 数据库:PostgreSQL(README 建议 v16.2),仓库根含一个大型初始化 SQL:`数据库初始话脚本(请使用navicat16版本导入).sql`,用于初始化表与演示数据。
|
||||||
|
- 缓存/会话:Redis(需自行配置)。
|
||||||
|
- 其他:Flowable(工作流),Druid(连接池监控),第三方服务通过特定配置类(例如 `YbServiceConfig` 在 `OpenHisApplication` 中启用)。
|
||||||
|
|
||||||
|
- **调试与常见位置**:
|
||||||
|
- 启动类:`openhis-server-new/openhis-application/src/main/java/com/openhis/OpenHisApplication.java`。
|
||||||
|
- 全局配置:`openhis-server-new/openhis-application/src/main/resources/`(`application.yml`、profile 文件等)。
|
||||||
|
- 前端入口:`openhis-ui-vue3/src/main.js`、路由在 `openhis-ui-vue3/src/router/index.js`。
|
||||||
|
- API 文档与监控路径(通常由后端暴露并被前端访问):
|
||||||
|
- Swagger UI: `<VITE_APP_BASE_API>/swagger-ui/index.html`(前端视图在 `src/views/tool/swagger/index.vue`)。
|
||||||
|
- Druid: `<VITE_APP_BASE_API>/druid/login.html`(见前端相关视图引用)。
|
||||||
|
|
||||||
|
- **为 AI 代理的具体建议(如何安全、有效地修改代码)**:
|
||||||
|
- 修改后端时:优先在子模块(例如 `openhis-application`)本地运行 `mvn spring-boot:run` 验证启动与基础 API;大量改动前先执行 `mvn -T1C -DskipTests clean package` 在 CI 环境上验证构建(本地机器也可用)。
|
||||||
|
- 修改前端时:检查/调整对应 `.env.*` 文件中的 `VITE_APP_BASE_API`,使用 `npm run dev` 本地联调后端接口(可通过代理或将 `VITE_APP_BASE_API` 指向后端地址)。
|
||||||
|
- 修改数据库结构或 seed:请参考仓库根的 SQL 初始化脚本,任何 DDL/数据变更需同步该脚本并通知数据库管理员/运维。
|
||||||
|
|
||||||
|
- **举例(常见任务示例)**:
|
||||||
|
- 本地联调前端 + 后端(PowerShell):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# 启动后端
|
||||||
|
cd openhis-server-new/openhis-application
|
||||||
|
mvn spring-boot:run
|
||||||
|
|
||||||
|
# 启动前端(另开终端)
|
||||||
|
cd openhis-ui-vue3
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
如需我把这些内容合并为更短或更详细的版本,或把其中某部分(例如后端模块依赖关系图、关键 Java 包说明)展开,请告诉我要增强哪一节。
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -58,3 +58,8 @@
|
|||||||
PostgreSQL/openHis_DB设计书.xlsx
|
PostgreSQL/openHis_DB设计书.xlsx
|
||||||
|
|
||||||
public.sql
|
public.sql
|
||||||
|
发版记录/2025-11-12/~$发版日志.docx
|
||||||
|
发版记录/2025-11-12/~$S-管理系统-调价管理.docx
|
||||||
|
发版记录/2025-11-12/发版日志.docx
|
||||||
|
.gitignore
|
||||||
|
openhis-server-new/openhis-application/src/main/resources/application-dev.yml
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
天天开源的前⾝是新致开源,最早于2022年6⽉发布开源医疗软件平台OpenHIS.org.cn,于2023年6⽉发布开源企业软件平台OpenCOM.com.cn。2025年7⽉,新致开源品牌更新为天天开源,我们始终秉持开源、专业、协作的理念,致⼒于为医疗、教育、中⼩企业等⾏业提供优质的开源解决⽅案。
|
||||||
|
|
||||||
了解我们:https://open.tntlinking.com/about?site=gitee
|
了解我们a:https://open.tntlinking.com/about?site=gitee
|
||||||
|
|
||||||
## 💾【部署包下载】
|
## 💾【部署包下载】
|
||||||
|
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
|
|
||||||
## 📚【支持文档】
|
## 📚【支持文档】
|
||||||
|
|
||||||
技术支持资源:https://open.tntlinking.com/resource/technicalSupport?site=gitee
|
技术支持资源:https://open.tntlinking.com/resource/openProductDoc?site=gitee
|
||||||
(含演示环境、操作手册、部署手册、开发手册、常见问题等)
|
(含演示环境、操作手册、部署手册、开发手册、常见问题等)
|
||||||
|
|
||||||
产品介绍:https://open.tntlinking.com/resource/industryKnowledge?site=gitee
|
产品介绍:https://open.tntlinking.com/resource/productPresentation?site=gitee
|
||||||
|
|
||||||
操作教程:https://open.tntlinking.com/resource/operationTutorial?site=gitee
|
操作教程:https://open.tntlinking.com/resource/operationTutorial?site=gitee
|
||||||
|
|
||||||
|
|||||||
39
TestDeleteInspectionType.java
Normal file
39
TestDeleteInspectionType.java
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import java.io.IOException;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
public class TestDeleteInspectionType {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
try {
|
||||||
|
// 测试删除ID为1的检验类型
|
||||||
|
long inspectionTypeId = 1;
|
||||||
|
URL url = new URL("http://localhost:8080/system/inspection-type/" + inspectionTypeId);
|
||||||
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
|
connection.setRequestMethod("DELETE");
|
||||||
|
connection.setRequestProperty("Content-Type", "application/json");
|
||||||
|
connection.setRequestProperty("Accept", "application/json");
|
||||||
|
|
||||||
|
// 发送请求
|
||||||
|
int responseCode = connection.getResponseCode();
|
||||||
|
System.out.println("响应代码: " + responseCode);
|
||||||
|
|
||||||
|
// 读取响应
|
||||||
|
Scanner scanner;
|
||||||
|
if (responseCode >= 200 && responseCode < 300) {
|
||||||
|
scanner = new Scanner(connection.getInputStream());
|
||||||
|
} else {
|
||||||
|
scanner = new Scanner(connection.getErrorStream());
|
||||||
|
}
|
||||||
|
|
||||||
|
String response = scanner.useDelimiter("\\A").next();
|
||||||
|
System.out.println("响应内容: " + response);
|
||||||
|
|
||||||
|
scanner.close();
|
||||||
|
connection.disconnect();
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
45
openhis-server-new/com/openhis/tool/DatabaseFieldAdder.java
Normal file
45
openhis-server-new/com/openhis/tool/DatabaseFieldAdder.java
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package com.openhis.tool;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.Statement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database field adder tool
|
||||||
|
*/
|
||||||
|
public class DatabaseFieldAdder {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
String url = "jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public";
|
||||||
|
String username = "postgresql";
|
||||||
|
String password = "Jchl1528";
|
||||||
|
|
||||||
|
try (Connection conn = DriverManager.getConnection(url, username, password);
|
||||||
|
Statement stmt = conn.createStatement()) {
|
||||||
|
|
||||||
|
// Check if field exists
|
||||||
|
String checkSql = "SELECT column_name FROM information_schema.columns " +
|
||||||
|
"WHERE table_name = 'adm_healthcare_service' AND column_name = 'practitioner_id'";
|
||||||
|
|
||||||
|
boolean fieldExists = stmt.executeQuery(checkSql).next();
|
||||||
|
|
||||||
|
if (!fieldExists) {
|
||||||
|
// Add field
|
||||||
|
String addSql = "ALTER TABLE \"public\".\"adm_healthcare_service\" " +
|
||||||
|
"ADD COLUMN \"practitioner_id\" int8";
|
||||||
|
stmt.execute(addSql);
|
||||||
|
|
||||||
|
// Add comment
|
||||||
|
String commentSql = "COMMENT ON COLUMN \"public\".\"adm_healthcare_service\".\"practitioner_id\" IS 'practitioner_id'";
|
||||||
|
stmt.execute(commentSql);
|
||||||
|
|
||||||
|
System.out.println("Successfully added practitioner_id field to adm_healthcare_service table");
|
||||||
|
} else {
|
||||||
|
System.out.println("practitioner_id field already exists");
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println("Error executing SQL: " + e.getMessage());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -25,6 +25,11 @@
|
|||||||
<artifactId>spring-boot-devtools</artifactId>
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- lombok -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger3-->
|
<!-- swagger3-->
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -36,7 +41,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-models</artifactId>
|
<artifactId>swagger-models</artifactId>
|
||||||
<version>1.6.2</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Mysql驱动包 -->
|
<!-- Mysql驱动包 -->
|
||||||
@@ -68,45 +72,12 @@
|
|||||||
<groupId>com.core</groupId>
|
<groupId>com.core</groupId>
|
||||||
<artifactId>core-flowable</artifactId>
|
<artifactId>core-flowable</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.core</groupId>
|
||||||
|
<artifactId>core-common</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<!-- <build>-->
|
|
||||||
<!-- <plugins>-->
|
|
||||||
<!-- <plugin>-->
|
|
||||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
||||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
|
||||||
<!-- <version>2.5.15</version>-->
|
|
||||||
<!-- <configuration>-->
|
|
||||||
<!-- <fork>true</fork> <!– 如果没有该配置,devtools不会生效 –>-->
|
|
||||||
<!-- </configuration>-->
|
|
||||||
<!-- <executions>-->
|
|
||||||
<!-- <execution>-->
|
|
||||||
<!-- <goals>-->
|
|
||||||
<!-- <goal>repackage</goal>-->
|
|
||||||
<!-- </goals>-->
|
|
||||||
<!-- </execution>-->
|
|
||||||
<!-- </executions>-->
|
|
||||||
<!-- </plugin>-->
|
|
||||||
<!-- <plugin>-->
|
|
||||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
||||||
<!-- <artifactId>maven-war-plugin</artifactId>-->
|
|
||||||
<!-- <version>3.1.0</version>-->
|
|
||||||
<!-- <configuration>-->
|
|
||||||
<!-- <failOnMissingWebXml>false</failOnMissingWebXml>-->
|
|
||||||
<!-- <warName>${project.artifactId}</warName>-->
|
|
||||||
<!-- </configuration>-->
|
|
||||||
<!-- </plugin>-->
|
|
||||||
<!-- <plugin>-->
|
|
||||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
|
||||||
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
|
|
||||||
<!-- <configuration>-->
|
|
||||||
<!-- <source>8</source>-->
|
|
||||||
<!-- <target>8</target>-->
|
|
||||||
<!-- </configuration>-->
|
|
||||||
<!-- </plugin>-->
|
|
||||||
<!-- </plugins>-->
|
|
||||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
|
||||||
<!-- </build>-->
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,18 +1,5 @@
|
|||||||
package com.core.web.controller.common;
|
package com.core.web.controller.common;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.util.FastByteArrayOutputStream;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
@@ -22,6 +9,17 @@ import com.core.common.utils.sign.Base64;
|
|||||||
import com.core.common.utils.uuid.IdUtils;
|
import com.core.common.utils.uuid.IdUtils;
|
||||||
import com.core.system.service.ISysConfigService;
|
import com.core.system.service.ISysConfigService;
|
||||||
import com.google.code.kaptcha.Producer;
|
import com.google.code.kaptcha.Producer;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.FastByteArrayOutputStream;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码操作处理
|
* 验证码操作处理
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package com.core.web.controller.common;
|
package com.core.web.controller.common;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.config.CoreConfig;
|
||||||
import java.util.List;
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import com.core.common.utils.StringUtils;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.core.common.utils.file.FileUploadUtils;
|
||||||
|
import com.core.common.utils.file.FileUtils;
|
||||||
|
import com.core.framework.config.ServerConfig;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -16,13 +17,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.core.common.constant.Constants;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import java.util.ArrayList;
|
||||||
import com.core.common.utils.StringUtils;
|
import java.util.List;
|
||||||
import com.core.common.utils.file.FileUploadUtils;
|
|
||||||
import com.core.common.utils.file.FileUtils;
|
|
||||||
import com.core.framework.config.ServerConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用请求处理
|
* 通用请求处理
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.common;
|
package com.core.web.controller.common;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Anonymous;
|
import com.core.common.annotation.Anonymous;
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -16,6 +8,13 @@ import com.core.common.utils.StringUtils;
|
|||||||
import com.core.common.utils.file.FileUploadUtils;
|
import com.core.common.utils.file.FileUploadUtils;
|
||||||
import com.core.common.utils.file.FileUtils;
|
import com.core.common.utils.file.FileUtils;
|
||||||
import com.core.framework.config.ServerConfig;
|
import com.core.framework.config.ServerConfig;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/file")
|
@RequestMapping("/file")
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.*;
|
import com.core.common.constant.CacheConstants;
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import com.core.system.domain.SysCache;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.RedisCallback;
|
import org.springframework.data.redis.core.RedisCallback;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import com.core.common.constant.CacheConstants;
|
import java.util.*;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
import com.core.system.domain.SysCache;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存监控
|
* 缓存监控
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
|
import com.core.framework.web.domain.Server;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.core.common.core.domain.AjaxResult;
|
|
||||||
import com.core.framework.web.domain.Server;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务器监控
|
* 服务器监控
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,15 +9,23 @@ import com.core.common.utils.poi.ExcelUtil;
|
|||||||
import com.core.framework.web.service.SysPasswordService;
|
import com.core.framework.web.service.SysPasswordService;
|
||||||
import com.core.system.domain.SysLogininfor;
|
import com.core.system.domain.SysLogininfor;
|
||||||
import com.core.system.service.ISysLogininforService;
|
import com.core.system.service.ISysLogininforService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统访问记录
|
*
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/monitor/logininfor")
|
@RequestMapping("/monitor/logininfor")
|
||||||
|
|
||||||
public class SysLogininforController extends BaseController {
|
public class SysLogininforController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysLogininforService logininforService;
|
private ISysLogininforService logininforService;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -16,6 +8,12 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.domain.SysOperLog;
|
import com.core.system.domain.SysOperLog;
|
||||||
import com.core.system.service.ISysOperLogService;
|
import com.core.system.service.ISysOperLogService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志记录
|
* 操作日志记录
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -20,6 +11,14 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.system.domain.SysUserOnline;
|
import com.core.system.domain.SysUserOnline;
|
||||||
import com.core.system.service.ISysUserOnlineService;
|
import com.core.system.service.ISysUserOnlineService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线用户监控
|
* 在线用户监控
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,6 +8,13 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.domain.SysConfig;
|
import com.core.system.domain.SysConfig;
|
||||||
import com.core.system.service.ISysConfigService;
|
import com.core.system.service.ISysConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 信息操作处理
|
* 参数配置 信息操作处理
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.constant.UserConstants;
|
import com.core.common.constant.UserConstants;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -16,6 +8,13 @@ import com.core.common.core.domain.entity.SysDept;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.system.service.ISysDeptService;
|
import com.core.system.service.ISysDeptService;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门信息
|
* 部门信息
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -20,6 +10,14 @@ import com.core.common.utils.StringUtils;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.service.ISysDictDataService;
|
import com.core.system.service.ISysDictDataService;
|
||||||
import com.core.system.service.ISysDictTypeService;
|
import com.core.system.service.ISysDictTypeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
@@ -62,11 +60,12 @@ public class SysDictDataController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型查询字典数据信息
|
* 根据字典类型查询字典数据信息(支持拼音搜索)
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/type/{dictType}")
|
@GetMapping(value = "/type/{dictType}")
|
||||||
public AjaxResult dictType(@PathVariable String dictType) {
|
public AjaxResult dictType(@PathVariable String dictType,
|
||||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
@RequestParam(value = "searchKey", required = false) String searchKey) {
|
||||||
|
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType, searchKey);
|
||||||
if (StringUtils.isNull(data)) {
|
if (StringUtils.isNull(data)) {
|
||||||
data = new ArrayList<SysDictData>();
|
data = new ArrayList<SysDictData>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,6 +8,13 @@ import com.core.common.core.page.TableDataInfo;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.service.ISysDictTypeService;
|
import com.core.system.service.ISysDictTypeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页
|
* 首页
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.entity.SysMenu;
|
import com.core.common.core.domain.entity.SysMenu;
|
||||||
@@ -20,6 +11,14 @@ import com.core.framework.web.service.SysLoginService;
|
|||||||
import com.core.framework.web.service.SysPermissionService;
|
import com.core.framework.web.service.SysPermissionService;
|
||||||
import com.core.framework.web.service.TokenService;
|
import com.core.framework.web.service.TokenService;
|
||||||
import com.core.system.service.ISysMenuService;
|
import com.core.system.service.ISysMenuService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**已评审
|
/**已评审
|
||||||
* 登录验证
|
* 登录验证
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.constant.UserConstants;
|
import com.core.common.constant.UserConstants;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -15,6 +8,12 @@ import com.core.common.core.domain.entity.SysMenu;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.system.service.ISysMenuService;
|
import com.core.system.service.ISysMenuService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单信息
|
* 菜单信息
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -14,6 +7,12 @@ import com.core.common.core.page.TableDataInfo;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.system.domain.SysNotice;
|
import com.core.system.domain.SysNotice;
|
||||||
import com.core.system.service.ISysNoticeService;
|
import com.core.system.service.ISysNoticeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告 信息操作处理
|
* 公告 信息操作处理
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,6 +8,13 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.domain.SysPost;
|
import com.core.system.domain.SysPost;
|
||||||
import com.core.system.service.ISysPostService;
|
import com.core.system.service.ISysPostService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息操作处理
|
* 岗位信息操作处理
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -17,6 +13,9 @@ import com.core.common.utils.file.FileUploadUtils;
|
|||||||
import com.core.common.utils.file.MimeTypeUtils;
|
import com.core.common.utils.file.MimeTypeUtils;
|
||||||
import com.core.framework.web.service.TokenService;
|
import com.core.framework.web.service.TokenService;
|
||||||
import com.core.system.service.ISysUserService;
|
import com.core.system.service.ISysUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人信息 业务处理
|
* 个人信息 业务处理
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.model.RegisterBody;
|
import com.core.common.core.domain.model.RegisterBody;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.framework.web.service.SysRegisterService;
|
import com.core.framework.web.service.SysRegisterService;
|
||||||
import com.core.system.service.ISysConfigService;
|
import com.core.system.service.ISysConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册验证
|
* 注册验证
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -26,6 +17,13 @@ import com.core.system.domain.SysUserRole;
|
|||||||
import com.core.system.service.ISysDeptService;
|
import com.core.system.service.ISysDeptService;
|
||||||
import com.core.system.service.ISysRoleService;
|
import com.core.system.service.ISysRoleService;
|
||||||
import com.core.system.service.ISysUserService;
|
import com.core.system.service.ISysUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色信息
|
* 角色信息
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.core.common.annotation.Anonymous;
|
import com.core.common.annotation.Anonymous;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -13,6 +7,11 @@ import com.core.common.core.domain.R;
|
|||||||
import com.core.common.core.domain.entity.SysUser;
|
import com.core.common.core.domain.entity.SysUser;
|
||||||
import com.core.system.domain.SysTenant;
|
import com.core.system.domain.SysTenant;
|
||||||
import com.core.system.service.ISysTenantService;
|
import com.core.system.service.ISysTenantService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户信息controller
|
* 租户信息controller
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.system.domain.dto.SaveTenantOptionDetailDto;
|
import com.core.system.domain.dto.SaveTenantOptionDetailDto;
|
||||||
import com.core.system.domain.dto.TenantOptionDto;
|
import com.core.system.domain.dto.TenantOptionDto;
|
||||||
import com.core.system.service.ISysTenantOptionService;
|
import com.core.system.service.ISysTenantOptionService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户配置项信息controller
|
* 租户配置项信息controller
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -27,6 +15,16 @@ import com.core.system.service.ISysDeptService;
|
|||||||
import com.core.system.service.ISysPostService;
|
import com.core.system.service.ISysPostService;
|
||||||
import com.core.system.service.ISysRoleService;
|
import com.core.system.service.ISysRoleService;
|
||||||
import com.core.system.service.ISysUserService;
|
import com.core.system.service.ISysUserService;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息
|
* 用户信息
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package com.core.web.controller.tool;
|
package com.core.web.controller.tool;
|
||||||
|
|
||||||
|
import com.core.common.core.controller.BaseController;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.core.controller.BaseController;
|
|
||||||
import com.core.common.core.domain.R;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* swagger 用户测试方法
|
* swagger 用户测试方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
package com.core.web.core.config;
|
package com.core.web.core.config;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.config.CoreConfig;
|
||||||
import java.util.List;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import io.swagger.models.auth.In;
|
|
||||||
import springfox.documentation.builders.ApiInfoBuilder;
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
import springfox.documentation.builders.PathSelectors;
|
import springfox.documentation.builders.PathSelectors;
|
||||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
@@ -20,6 +15,9 @@ import springfox.documentation.spi.DocumentationType;
|
|||||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||||
import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger2的接口配置
|
* Swagger2的接口配置
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,6 +16,31 @@
|
|||||||
common通用工具
|
common通用工具
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>17</source>
|
||||||
|
<target>17</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-parameters</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.34</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- mybatis-plus 增强CRUD -->
|
<!-- mybatis-plus 增强CRUD -->
|
||||||
@@ -54,6 +79,12 @@
|
|||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- jsr250 annotations -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 自定义验证注解 -->
|
<!-- 自定义验证注解 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.enums.DataSourceType;
|
import com.core.common.enums.DataSourceType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义多数据源切换注解
|
* 自定义多数据源切换注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
|
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
||||||
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||||
|
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
|
||||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
|
||||||
|
|
||||||
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义导出Excel数据注解
|
* 自定义导出Excel数据注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.enums.OperatorType;
|
import com.core.common.enums.OperatorType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义操作日志记录注解
|
* 自定义操作日志记录注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.enums.LimitType;
|
import com.core.common.enums.LimitType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限流注解
|
* 限流注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import com.core.common.config.serializer.SensitiveJsonSerializer;
|
import com.core.common.config.serializer.SensitiveJsonSerializer;
|
||||||
import com.core.common.enums.DesensitizedType;
|
import com.core.common.enums.DesensitizedType;
|
||||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据脱敏注解
|
* 数据脱敏注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package com.core.common.config.serializer;
|
package com.core.common.config.serializer;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Sensitive;
|
import com.core.common.annotation.Sensitive;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.enums.DesensitizedType;
|
import com.core.common.enums.DesensitizedType;
|
||||||
@@ -14,6 +11,9 @@ import com.fasterxml.jackson.databind.JsonSerializer;
|
|||||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
import com.fasterxml.jackson.databind.ser.ContextualSerializer;
|
import com.fasterxml.jackson.databind.ser.ContextualSerializer;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据脱敏序列化过滤
|
* 数据脱敏序列化过滤
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.constant;
|
package com.core.common.constant;
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用常量信息
|
* 通用常量信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.common.core.controller;
|
package com.core.common.core.controller;
|
||||||
|
|
||||||
import java.beans.PropertyEditorSupport;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.web.bind.WebDataBinder;
|
|
||||||
import org.springframework.web.bind.annotation.InitBinder;
|
|
||||||
|
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
@@ -22,6 +13,14 @@ import com.core.common.utils.StringUtils;
|
|||||||
import com.core.common.utils.sql.SqlUtil;
|
import com.core.common.utils.sql.SqlUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.web.bind.WebDataBinder;
|
||||||
|
import org.springframework.web.bind.annotation.InitBinder;
|
||||||
|
|
||||||
|
import java.beans.PropertyEditorSupport;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web层通用数据处理
|
* web层通用数据处理
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作消息提醒
|
* 操作消息提醒
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应信息主体
|
* 响应信息主体
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.core.common.core.domain.entity.SysDept;
|
import com.core.common.core.domain.entity.SysDept;
|
||||||
import com.core.common.core.domain.entity.SysMenu;
|
import com.core.common.core.domain.entity.SysMenu;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Treeselect树结构实体类
|
* Treeselect树结构实体类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
import java.util.List;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.ArrayList;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import java.util.List;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门表 sys_dept
|
* 部门表 sys_dept
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.constant.UserConstants;
|
import com.core.common.constant.UserConstants;
|
||||||
import com.core.common.core.domain.BaseEntity;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典数据表 sys_dict_data
|
* 字典数据表 sys_dict_data
|
||||||
@@ -53,6 +52,9 @@ public class SysDictData extends BaseEntity {
|
|||||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
/** 拼音首字母 */
|
||||||
|
private String pyStr;
|
||||||
|
|
||||||
public Long getDictCode() {
|
public Long getDictCode() {
|
||||||
return dictCode;
|
return dictCode;
|
||||||
}
|
}
|
||||||
@@ -136,13 +138,21 @@ public class SysDictData extends BaseEntity {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPyStr() {
|
||||||
|
return pyStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPyStr(String pyStr) {
|
||||||
|
this.pyStr = pyStr;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("dictCode", getDictCode())
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("dictCode", getDictCode())
|
||||||
.append("dictSort", getDictSort()).append("dictLabel", getDictLabel()).append("dictValue", getDictValue())
|
.append("dictSort", getDictSort()).append("dictLabel", getDictLabel()).append("dictValue", getDictValue())
|
||||||
.append("dictType", getDictType()).append("cssClass", getCssClass()).append("listClass", getListClass())
|
.append("dictType", getDictType()).append("cssClass", getCssClass()).append("listClass", getListClass())
|
||||||
.append("isDefault", getIsDefault()).append("status", getStatus()).append("createBy", getCreateBy())
|
.append("isDefault", getIsDefault()).append("status", getStatus()).append("pyStr", getPyStr())
|
||||||
.append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
|
.append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
|
.append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Pattern;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.core.domain.BaseEntity;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型表 sys_dict_type
|
* 字典类型表 sys_dict_type
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
import java.util.List;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.ArrayList;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import java.util.List;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单权限表 sys_menu
|
* 菜单权限表 sys_menu
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.core.domain.BaseEntity;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色表 sys_role
|
* 角色表 sys_role
|
||||||
|
|||||||
@@ -1,16 +1,8 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.annotation.Excel.Type;
|
import com.core.common.annotation.Excel.Type;
|
||||||
@@ -19,8 +11,15 @@ import com.core.common.core.domain.BaseEntity;
|
|||||||
import com.core.common.xss.Xss;
|
import com.core.common.xss.Xss;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Email;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户对象 sys_user
|
* 用户对象 sys_user
|
||||||
@@ -32,6 +31,7 @@ public class SysUser extends BaseEntity {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@Excel(name = "用户序号", type = Type.EXPORT, cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
@Excel(name = "用户序号", type = Type.EXPORT, cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
package com.core.common.core.domain.model;
|
package com.core.common.core.domain.model;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
|
import com.core.common.core.domain.entity.SysRole;
|
||||||
|
import com.core.common.core.domain.entity.SysUser;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.core.common.core.domain.entity.SysRole;
|
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
|
||||||
import com.core.common.core.domain.entity.SysUser;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录用户身份权限
|
* 登录用户身份权限
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
package com.core.common.core.redis;
|
package com.core.common.core.redis;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import com.core.common.exception.UtilException;
|
import com.core.common.exception.UtilException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.*;
|
import org.springframework.data.redis.core.BoundSetOperations;
|
||||||
|
import org.springframework.data.redis.core.HashOperations;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.data.redis.core.ValueOperations;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spring redis 工具类
|
* spring redis 工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.core.text;
|
package com.core.common.core.text;
|
||||||
|
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符集工具类
|
* 字符集工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.core.common.core.text;
|
package com.core.common.core.text;
|
||||||
|
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
@@ -8,10 +11,6 @@ import java.nio.charset.Charset;
|
|||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型转换器
|
* 类型转换器
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -33,10 +33,23 @@ public enum DelFlag {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (DelFlag val : values()) {
|
for (DelFlag val : values()) {
|
||||||
if (val.getValue().equals(value)) {
|
if (val.value.equals(value)) {
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 手动添加 getter 方法以解决 Lombok 兼容性问题
|
||||||
|
public Integer getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo() {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.enums;
|
package com.core.common.enums;
|
||||||
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
import com.core.common.utils.DesensitizedUtil;
|
import com.core.common.utils.DesensitizedUtil;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 脱敏类型
|
* 脱敏类型
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.enums;
|
package com.core.common.enums;
|
||||||
|
|
||||||
|
import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.lang.Nullable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求方式
|
* 请求方式
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ public enum TenantOptionDict {
|
|||||||
* 医院名称
|
* 医院名称
|
||||||
*/
|
*/
|
||||||
YB_HOSPITAL_NAME("hospitalName", "医保-医院名称", 0),
|
YB_HOSPITAL_NAME("hospitalName", "医保-医院名称", 0),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医保-医疗机构等级(3101接口)
|
* 医保-医疗机构等级(3101接口)
|
||||||
*/
|
*/
|
||||||
@@ -24,37 +23,30 @@ public enum TenantOptionDict {
|
|||||||
* 电子发票appid
|
* 电子发票appid
|
||||||
*/
|
*/
|
||||||
EINVOICE_APP_ID("app_id", "电子发票-appid", 3),
|
EINVOICE_APP_ID("app_id", "电子发票-appid", 3),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子发票key
|
* 电子发票key
|
||||||
*/
|
*/
|
||||||
EINVOICE_KEY("key", "电子发票-key", 4),
|
EINVOICE_KEY("key", "电子发票-key", 4),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子发票url
|
* 电子发票url
|
||||||
*/
|
*/
|
||||||
EINVOICE_URL("url", "电子发票-url", 5),
|
EINVOICE_URL("url", "电子发票-url", 5),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医保开关
|
* 医保开关
|
||||||
*/
|
*/
|
||||||
YB_SWITCH("yb_switch", "医保开关", 6),
|
YB_SWITCH("yb_switch", "医保开关", 6),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子地址
|
* 电子地址
|
||||||
*/
|
*/
|
||||||
ELE_ADDRESS("eleAddress", "电子处方-请求地址", 22),
|
ELE_ADDRESS("eleAddress", "电子处方-请求地址", 22),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务地址
|
* 服务地址
|
||||||
*/
|
*/
|
||||||
ADDRESS("address", "服务地址", 23),
|
ADDRESS("address", "服务地址", 23),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 超时时间
|
* 超时时间
|
||||||
*/
|
*/
|
||||||
TIME("time", "超时时间", 24),
|
TIME("time", "超时时间", 24),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否加密
|
* 是否加密
|
||||||
*/
|
*/
|
||||||
@@ -63,32 +55,26 @@ public enum TenantOptionDict {
|
|||||||
* 医保区划
|
* 医保区划
|
||||||
*/
|
*/
|
||||||
YB_INSUPLC_ADMDVS("insuplc_admdvs", "医保-区划", 26),
|
YB_INSUPLC_ADMDVS("insuplc_admdvs", "医保-区划", 26),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方appId
|
* 电子处方appId
|
||||||
*/
|
*/
|
||||||
ELE_PRE_APP_ID("pre_app_id", "电子处方-appId", 27),
|
ELE_PRE_APP_ID("pre_app_id", "电子处方-appId", 27),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方appSecret
|
* 电子处方appSecret
|
||||||
*/
|
*/
|
||||||
ELE_PRE_APP_SECRET("pre_app_secret", "电子处方-appSecret", 28),
|
ELE_PRE_APP_SECRET("pre_app_secret", "电子处方-appSecret", 28),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方私钥
|
* 电子处方私钥
|
||||||
*/
|
*/
|
||||||
ELE_APP_PRVKEY("APP_PRVKEY", "电子处方-私钥", 29),
|
ELE_APP_PRVKEY("APP_PRVKEY", "电子处方-私钥", 29),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电子处方公钥
|
* 电子处方公钥
|
||||||
*/
|
*/
|
||||||
ELE_PLAF_PUBKEY("PLAF_PUBKEY", "电子处方-公钥", 30),
|
ELE_PLAF_PUBKEY("PLAF_PUBKEY", "电子处方-公钥", 30),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医院等级
|
* 医院等级
|
||||||
*/
|
*/
|
||||||
EINVOICE_HOSPITAL_LV("hospital_lv", "电子发票-医院等级", 39),
|
EINVOICE_HOSPITAL_LV("hospital_lv", "电子发票-医院等级", 39),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 无视LIS&PACS报错
|
* 无视LIS&PACS报错
|
||||||
*/
|
*/
|
||||||
@@ -161,12 +147,10 @@ public enum TenantOptionDict {
|
|||||||
* 电子发票开关
|
* 电子发票开关
|
||||||
*/
|
*/
|
||||||
INVOICE_SWITCH("invoiceSwitch", "电子发票开关", 56),
|
INVOICE_SWITCH("invoiceSwitch", "电子发票开关", 56),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 医嘱定价来源
|
* 医嘱定价来源
|
||||||
*/
|
*/
|
||||||
ORDER_PRICING_SOURCE("orderPricingSource", "定价来源 batchSellingPrice/retailPrice", 57),
|
ORDER_PRICING_SOURCE("orderPricingSource", "定价来源 batchSellingPrice/retailPrice", 57),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付(签到)
|
* 三方支付(签到)
|
||||||
*/
|
*/
|
||||||
@@ -199,7 +183,6 @@ public enum TenantOptionDict {
|
|||||||
* 三方支付(消费)
|
* 三方支付(消费)
|
||||||
*/
|
*/
|
||||||
THREE_PART_PAY_MAPPING_METHOD("threePartPayMappingMethod", "三方支付【消费】请求方式", 65),
|
THREE_PART_PAY_MAPPING_METHOD("threePartPayMappingMethod", "三方支付【消费】请求方式", 65),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付(退费)
|
* 三方支付(退费)
|
||||||
*/
|
*/
|
||||||
@@ -216,7 +199,6 @@ public enum TenantOptionDict {
|
|||||||
* 三方支付(退费)
|
* 三方支付(退费)
|
||||||
*/
|
*/
|
||||||
THREE_PART_RETURN_MAPPING_METHOD("threePartReturnMappingMethod", "三方支付【退费】请求方式", 69),
|
THREE_PART_RETURN_MAPPING_METHOD("threePartReturnMappingMethod", "三方支付【退费】请求方式", 69),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付(隔天退费)
|
* 三方支付(隔天退费)
|
||||||
*/
|
*/
|
||||||
@@ -233,7 +215,6 @@ public enum TenantOptionDict {
|
|||||||
* 三方支付(隔天退费)
|
* 三方支付(隔天退费)
|
||||||
*/
|
*/
|
||||||
THREE_PART_NEXT_DAY_RETURN_MAPPING_METHOD("threePartNextDayReturnMappingMethod", "三方支付【隔天退费】请求方式", 73),
|
THREE_PART_NEXT_DAY_RETURN_MAPPING_METHOD("threePartNextDayReturnMappingMethod", "三方支付【隔天退费】请求方式", 73),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付路径(支付结果查询)
|
* 三方支付路径(支付结果查询)
|
||||||
*/
|
*/
|
||||||
@@ -250,7 +231,6 @@ public enum TenantOptionDict {
|
|||||||
* 三方支付(支付结果查询)
|
* 三方支付(支付结果查询)
|
||||||
*/
|
*/
|
||||||
THREE_PART_PAY_QUERY_MAPPING_METHOD("threePartPayQueryMappingMethod", "三方支付【支付结果查询】请求方式", 77),
|
THREE_PART_PAY_QUERY_MAPPING_METHOD("threePartPayQueryMappingMethod", "三方支付【支付结果查询】请求方式", 77),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付路径(退费结果查询)
|
* 三方支付路径(退费结果查询)
|
||||||
*/
|
*/
|
||||||
@@ -267,7 +247,6 @@ public enum TenantOptionDict {
|
|||||||
* 三方支付(退费结果查询)
|
* 三方支付(退费结果查询)
|
||||||
*/
|
*/
|
||||||
THREE_PART_RETURN_QUERY_MAPPING_METHOD("threePartReturnQueryMappingMethod", "三方支付【退费结果查询】请求方式", 81),
|
THREE_PART_RETURN_QUERY_MAPPING_METHOD("threePartReturnQueryMappingMethod", "三方支付【退费结果查询】请求方式", 81),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付路径(隔天退费结果查询)
|
* 三方支付路径(隔天退费结果查询)
|
||||||
*/
|
*/
|
||||||
@@ -285,7 +264,6 @@ public enum TenantOptionDict {
|
|||||||
*/
|
*/
|
||||||
THREE_PART_NEXT_DAY_RETURN_QUERY_MAPPING_METHOD("threePartNextDayReturnQueryMappingMethod", "三方支付【隔天退费结果查询】请求方式",
|
THREE_PART_NEXT_DAY_RETURN_QUERY_MAPPING_METHOD("threePartNextDayReturnQueryMappingMethod", "三方支付【隔天退费结果查询】请求方式",
|
||||||
85),
|
85),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付(签出)
|
* 三方支付(签出)
|
||||||
*/
|
*/
|
||||||
@@ -302,27 +280,22 @@ public enum TenantOptionDict {
|
|||||||
* 三方支付(签出)
|
* 三方支付(签出)
|
||||||
*/
|
*/
|
||||||
THREE_PART_SIGN_OUT_MAPPING_METHOD("threePartSignOutMappingMethod", "三方支付【签出】请求方式", 89),
|
THREE_PART_SIGN_OUT_MAPPING_METHOD("threePartSignOutMappingMethod", "三方支付【签出】请求方式", 89),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三方支付(签出)
|
* 三方支付(签出)
|
||||||
*/
|
*/
|
||||||
YB_INPATIENT_SETTLEMENT_UP_URL("ybInpatientSetlUp", "选填4101或4101A", 90),
|
YB_INPATIENT_SETTLEMENT_UP_URL("ybInpatientSetlUp", "选填4101或4101A", 90),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PACS查看报告地址
|
* PACS查看报告地址
|
||||||
*/
|
*/
|
||||||
PACS_REPORT_URL("pacsReportUrl", "PACS查看报告地址", 91),
|
PACS_REPORT_URL("pacsReportUrl", "PACS查看报告地址", 91),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LIS查看报告地址
|
* LIS查看报告地址
|
||||||
*/
|
*/
|
||||||
LIS_REPORT_URL("lisReportUrl", "LIS查看报告地址", 92),
|
LIS_REPORT_URL("lisReportUrl", "LIS查看报告地址", 92),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开药时药房允许多选开关
|
* 开药时药房允许多选开关
|
||||||
*/
|
*/
|
||||||
PHARMACY_MULTIPLE_CHOICE_SWITCH("pharmacyMultipleChoiceSwitch", "开药时药房允许多选开关", 93),
|
PHARMACY_MULTIPLE_CHOICE_SWITCH("pharmacyMultipleChoiceSwitch", "开药时药房允许多选开关", 93),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PEIS服务地址
|
* PEIS服务地址
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.IOException;
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
import javax.servlet.*;
|
import javax.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.IOException;
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Repeatable 过滤器
|
* Repeatable 过滤器
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import com.core.common.constant.Constants;
|
||||||
import java.io.ByteArrayInputStream;
|
import com.core.common.utils.http.HttpHelper;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
|
|
||||||
import javax.servlet.ReadListener;
|
import javax.servlet.ReadListener;
|
||||||
import javax.servlet.ServletInputStream;
|
import javax.servlet.ServletInputStream;
|
||||||
import javax.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
|
import java.io.BufferedReader;
|
||||||
import com.core.common.constant.Constants;
|
import java.io.ByteArrayInputStream;
|
||||||
import com.core.common.utils.http.HttpHelper;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建可重复读取inputStream的request
|
* 构建可重复读取inputStream的request
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.IOException;
|
import com.core.common.enums.HttpMethod;
|
||||||
import java.util.ArrayList;
|
import com.core.common.utils.StringUtils;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
import javax.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import com.core.common.enums.HttpMethod;
|
import java.util.ArrayList;
|
||||||
import com.core.common.utils.StringUtils;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 防止XSS攻击的过滤器
|
* 防止XSS攻击的过滤器
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import com.core.common.utils.StringUtils;
|
||||||
import java.io.IOException;
|
import com.core.common.utils.html.EscapeUtil;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
import javax.servlet.ReadListener;
|
import javax.servlet.ReadListener;
|
||||||
import javax.servlet.ServletInputStream;
|
import javax.servlet.ServletInputStream;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
import org.apache.commons.io.IOUtils;
|
import java.io.IOException;
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
import com.core.common.utils.html.EscapeUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XSS过滤处理
|
* XSS过滤处理
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ public final class AgeCalculatorUtil {
|
|||||||
* 当前年龄取得(床位列表表示年龄用)
|
* 当前年龄取得(床位列表表示年龄用)
|
||||||
*/
|
*/
|
||||||
public static String getAge(Date date) {
|
public static String getAge(Date date) {
|
||||||
|
// 添加空值检查
|
||||||
|
if (date == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
// 将 Date 转换为 LocalDateTime
|
// 将 Date 转换为 LocalDateTime
|
||||||
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|||||||
@@ -3,16 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.constant.CacheConstants;
|
||||||
import java.util.List;
|
import com.core.common.core.redis.RedisCache;
|
||||||
|
import com.core.common.exception.UtilException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.core.common.constant.CacheConstants;
|
import java.util.ArrayList;
|
||||||
import com.core.common.core.redis.RedisCache;
|
import java.util.List;
|
||||||
import com.core.common.exception.UtilException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排番组件
|
* 排番组件
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -9,8 +11,6 @@ import java.time.format.DateTimeParseException;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 时间工具类
|
* 时间工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.core.domain.entity.SysDictData;
|
import com.core.common.core.domain.entity.SysDictData;
|
||||||
import com.core.common.core.redis.RedisCache;
|
import com.core.common.core.redis.RedisCache;
|
||||||
import com.core.common.utils.spring.SpringUtils;
|
import com.core.common.utils.spring.SpringUtils;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典工具类
|
* 字典工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 错误信息处理类。
|
* 错误信息处理类。
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import com.core.common.utils.spring.SpringUtils;
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
|
||||||
import com.core.common.utils.spring.SpringUtils;
|
|
||||||
import org.springframework.lang.Nullable;
|
import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.io.*;
|
import com.core.common.annotation.Excel;
|
||||||
import java.lang.reflect.Field;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import java.lang.reflect.Method;
|
import com.core.common.annotation.Excel.Type;
|
||||||
import java.lang.reflect.ParameterizedType;
|
import com.core.common.annotation.ExcelExtra;
|
||||||
import java.math.BigDecimal;
|
import com.core.common.annotation.Excels;
|
||||||
import java.text.DecimalFormat;
|
import com.core.common.config.CoreConfig;
|
||||||
import java.time.LocalDate;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import java.time.LocalDateTime;
|
import com.core.common.core.text.Convert;
|
||||||
import java.util.*;
|
import com.core.common.exception.UtilException;
|
||||||
import java.util.stream.Collectors;
|
import com.core.common.utils.file.FileTypeUtils;
|
||||||
|
import com.core.common.utils.file.FileUtils;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.core.common.utils.file.ImageUtils;
|
||||||
|
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
||||||
|
import com.core.common.utils.reflect.ReflectUtils;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.RegExUtils;
|
import org.apache.commons.lang3.RegExUtils;
|
||||||
import org.apache.commons.lang3.reflect.FieldUtils;
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
@@ -29,20 +30,17 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import java.io.*;
|
||||||
import com.core.common.annotation.Excel.Type;
|
import java.lang.reflect.Field;
|
||||||
import com.core.common.annotation.ExcelExtra;
|
import java.lang.reflect.Method;
|
||||||
import com.core.common.annotation.Excels;
|
import java.lang.reflect.ParameterizedType;
|
||||||
import com.core.common.config.CoreConfig;
|
import java.math.BigDecimal;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import java.text.DecimalFormat;
|
||||||
import com.core.common.core.text.Convert;
|
import java.time.LocalDate;
|
||||||
import com.core.common.exception.UtilException;
|
import java.time.LocalDateTime;
|
||||||
import com.core.common.utils.file.FileTypeUtils;
|
import java.util.*;
|
||||||
import com.core.common.utils.file.FileUtils;
|
import java.util.stream.Collectors;
|
||||||
import com.core.common.utils.file.ImageUtils;
|
|
||||||
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
|
||||||
import com.core.common.utils.reflect.ReflectUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel相关处理
|
* Excel相关处理
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import org.springframework.security.core.Authentication;
|
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
|
||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
||||||
import org.springframework.util.PatternMatchUtils;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
import com.core.common.core.domain.entity.SysRole;
|
import com.core.common.core.domain.entity.SysRole;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.exception.ServiceException;
|
import com.core.common.exception.ServiceException;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
import org.springframework.util.PatternMatchUtils;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全服务工具类
|
* 安全服务工具类
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.core.text.Convert;
|
||||||
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
|
import javax.servlet.ServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
@@ -8,18 +18,6 @@ import java.util.Collections;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
import org.springframework.web.context.request.RequestAttributes;
|
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
|
||||||
import com.core.common.core.text.Convert;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户端工具类
|
* 客户端工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import org.springframework.util.AntPathMatcher;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.core.text.StrFormatter;
|
import com.core.common.core.text.StrFormatter;
|
||||||
|
import org.springframework.util.AntPathMatcher;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符串工具类
|
* 字符串工具类
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.concurrent.*;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.concurrent.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线程相关工具类.
|
* 线程相关工具类.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.lang.management.ManagementFactory;
|
import java.time.LocalTime;
|
||||||
import java.text.ParseException;
|
import java.time.ZoneId;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.time.*;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.time.format.DateTimeParseException;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
package com.core.common.utils.bean;
|
package com.core.common.utils.bean;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.validation.ConstraintViolation;
|
import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.ConstraintViolationException;
|
import javax.validation.ConstraintViolationException;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bean对象属性验证
|
* bean对象属性验证
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件类型工具类
|
* 文件类型工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.exception.file.FileNameLengthLimitExceededException;
|
import com.core.common.exception.file.FileNameLengthLimitExceededException;
|
||||||
@@ -16,6 +8,13 @@ import com.core.common.exception.file.InvalidExtensionException;
|
|||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.uuid.Seq;
|
import com.core.common.utils.uuid.Seq;
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件上传工具类
|
* 文件上传工具类
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.uuid.IdUtils;
|
import com.core.common.utils.uuid.IdUtils;
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件处理工具类
|
* 文件处理工具类
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
|
import com.core.common.config.CoreConfig;
|
||||||
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.apache.poi.util.IOUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -7,14 +14,6 @@ import java.net.URL;
|
|||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.apache.poi.util.IOUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
|
||||||
import com.core.common.constant.Constants;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片处理工具类
|
* 图片处理工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.core.common.utils.http;
|
package com.core.common.utils.http;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.servlet.ServletRequest;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用http工具封装
|
* 通用http工具封装
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.core.common.utils.http;
|
package com.core.common.utils.http;
|
||||||
|
|
||||||
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.net.ssl.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
@@ -8,14 +14,6 @@ import java.net.URLConnection;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
|
|
||||||
import javax.net.ssl.*;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用http发送方法
|
* 通用http发送方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
package com.core.common.utils.ip;
|
package com.core.common.utils.ip;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.http.HttpUtils;
|
import com.core.common.utils.http.HttpUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取地址类
|
* 获取地址类
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.core.common.utils.ip;
|
package com.core.common.utils.ip;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import com.core.common.utils.ServletUtils;
|
import com.core.common.utils.ServletUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取IP方法
|
* 获取IP方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,33 +1,5 @@
|
|||||||
package com.core.common.utils.poi;
|
package com.core.common.utils.poi;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.lang.reflect.ParameterizedType;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.apache.commons.lang3.RegExUtils;
|
|
||||||
import org.apache.commons.lang3.reflect.FieldUtils;
|
|
||||||
import org.apache.poi.hssf.usermodel.*;
|
|
||||||
import org.apache.poi.ooxml.POIXMLDocumentPart;
|
|
||||||
import org.apache.poi.ss.usermodel.*;
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
|
||||||
import org.apache.poi.util.IOUtils;
|
|
||||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
|
||||||
import org.apache.poi.xssf.usermodel.*;
|
|
||||||
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.annotation.Excel.Type;
|
import com.core.common.annotation.Excel.Type;
|
||||||
@@ -43,6 +15,32 @@ import com.core.common.utils.file.FileTypeUtils;
|
|||||||
import com.core.common.utils.file.FileUtils;
|
import com.core.common.utils.file.FileUtils;
|
||||||
import com.core.common.utils.file.ImageUtils;
|
import com.core.common.utils.file.ImageUtils;
|
||||||
import com.core.common.utils.reflect.ReflectUtils;
|
import com.core.common.utils.reflect.ReflectUtils;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.apache.commons.lang3.RegExUtils;
|
||||||
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
|
import org.apache.poi.hssf.usermodel.*;
|
||||||
|
import org.apache.poi.ooxml.POIXMLDocumentPart;
|
||||||
|
import org.apache.poi.ss.usermodel.*;
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||||
|
import org.apache.poi.util.IOUtils;
|
||||||
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||||
|
import org.apache.poi.xssf.usermodel.*;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel相关处理
|
* Excel相关处理
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.common.utils.reflect;
|
package com.core.common.utils.reflect;
|
||||||
|
|
||||||
import java.lang.reflect.*;
|
import com.core.common.core.text.Convert;
|
||||||
import java.util.Date;
|
import com.core.common.utils.DateUtils;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.apache.poi.ss.usermodel.DateUtil;
|
import org.apache.poi.ss.usermodel.DateUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.core.common.core.text.Convert;
|
import java.lang.reflect.*;
|
||||||
import com.core.common.utils.DateUtils;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.core.common.utils.sign;
|
package com.core.common.utils.sign;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.security.MessageDigest;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Md5加密方法
|
* Md5加密方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.core.common.utils.spring;
|
package com.core.common.utils.spring;
|
||||||
|
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
import org.springframework.aop.framework.AopContext;
|
import org.springframework.aop.framework.AopContext;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||||
@@ -9,8 +10,6 @@ import org.springframework.context.ApplicationContext;
|
|||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spring工具类 方便在非spring管理环境中获取bean
|
* spring工具类 方便在非spring管理环境中获取bean
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.utils.uuid;
|
package com.core.common.utils.uuid;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author system 序列生成类
|
* @author system 序列生成类
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.core.common.utils.uuid;
|
package com.core.common.utils.uuid;
|
||||||
|
|
||||||
|
import com.core.common.exception.UtilException;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
import com.core.common.exception.UtilException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提供通用唯一识别码(universally unique identifier)(UUID)实现
|
* 提供通用唯一识别码(universally unique identifier)(UUID)实现
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.core.common.xss;
|
package com.core.common.xss;
|
||||||
|
|
||||||
|
import javax.validation.Constraint;
|
||||||
|
import javax.validation.Payload;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
import javax.validation.Constraint;
|
|
||||||
import javax.validation.Payload;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义xss校验注解
|
* 自定义xss校验注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
package com.core.common.xss;
|
package com.core.common.xss;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
import com.core.common.utils.StringUtils;
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
import javax.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
import com.core.common.utils.StringUtils;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义xss校验注解实现
|
* 自定义xss校验注解实现
|
||||||
|
|||||||
@@ -22,10 +22,11 @@ import com.core.common.utils.StringUtils;
|
|||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
public class FilterConfig {
|
public class FilterConfig {
|
||||||
@Value("${xss.excludes}")
|
// 添加默认值,避免配置不存在时启动失败
|
||||||
|
@Value("${xss.excludes:/system/notice}")
|
||||||
private String excludes;
|
private String excludes;
|
||||||
|
|
||||||
@Value("${xss.urlPatterns}")
|
@Value("${xss.urlPatterns:/system/*,/monitor/*,/tool/*}")
|
||||||
private String urlPatterns;
|
private String urlPatterns;
|
||||||
|
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
|
|||||||
@@ -116,22 +116,23 @@ public class MybatisPlusConfig {
|
|||||||
* 获取当前租户 ID
|
* 获取当前租户 ID
|
||||||
*/
|
*/
|
||||||
private Integer getCurrentTenantId() {
|
private Integer getCurrentTenantId() {
|
||||||
|
Integer result = null;
|
||||||
|
|
||||||
// 首先尝试从线程局部变量中获取租户ID(适用于定时任务等场景)
|
// 首先尝试从线程局部变量中获取租户ID(适用于定时任务等场景)
|
||||||
Integer threadLocalTenantId = TenantContext.getCurrentTenant();
|
Integer threadLocalTenantId = TenantContext.getCurrentTenant();
|
||||||
if (threadLocalTenantId != null) {
|
if (threadLocalTenantId != null) {
|
||||||
return threadLocalTenantId;
|
result = threadLocalTenantId;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
// 获取当前登录用户的租户ID(优先使用SecurityUtils中储存的LoginUser的租户ID)
|
// 获取当前登录用户的租户ID(优先使用SecurityUtils中储存的LoginUser的租户ID)
|
||||||
try {
|
try {
|
||||||
if (SecurityUtils.getAuthentication() != null) {
|
if (SecurityUtils.getAuthentication() != null) {
|
||||||
return SecurityUtils.getLoginUser().getTenantId();
|
result = SecurityUtils.getLoginUser().getTenantId();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return 1; // 默认租户ID
|
result = 1; // 默认租户ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result == null) {
|
||||||
// 尝试从请求头中获取租户ID
|
// 尝试从请求头中获取租户ID
|
||||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||||
if (attributes != null) {
|
if (attributes != null) {
|
||||||
@@ -142,11 +143,13 @@ public class MybatisPlusConfig {
|
|||||||
// 登录
|
// 登录
|
||||||
if ("login".equals(requestMethodName)) {
|
if ("login".equals(requestMethodName)) {
|
||||||
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
||||||
return Integer.parseInt(tenantIdHeader);
|
result = Integer.parseInt(tenantIdHeader);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1; // 默认租户ID
|
return result != null ? result : 1; // 默认租户ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import org.springframework.http.HttpMethod;
|
|||||||
import org.springframework.security.authentication.AuthenticationManager;
|
import org.springframework.security.authentication.AuthenticationManager;
|
||||||
import org.springframework.security.authentication.ProviderManager;
|
import org.springframework.security.authentication.ProviderManager;
|
||||||
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
|
import org.springframework.security.authentication.dao.DaoAuthenticationProvider;
|
||||||
import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
|
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
@@ -27,7 +27,7 @@ import com.core.framework.security.handle.LogoutSuccessHandlerImpl;
|
|||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
@EnableMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
||||||
@Configuration
|
@Configuration
|
||||||
public class SecurityConfig {
|
public class SecurityConfig {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,12 +2,17 @@ package com.core.framework.handler;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.ibatis.reflection.MetaObject;
|
import org.apache.ibatis.reflection.MetaObject;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.core.framework.config.TenantContext;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class MybastisColumnsHandler implements MetaObjectHandler {
|
public class MybastisColumnsHandler implements MetaObjectHandler {
|
||||||
@@ -47,10 +52,40 @@ public class MybastisColumnsHandler implements MetaObjectHandler {
|
|||||||
* 获取当前租户 ID
|
* 获取当前租户 ID
|
||||||
*/
|
*/
|
||||||
private Integer getCurrentTenantId() {
|
private Integer getCurrentTenantId() {
|
||||||
// 获取当前登录用户的租户 ID
|
Integer result = null;
|
||||||
|
|
||||||
|
// 首先尝试从线程局部变量中获取租户ID(适用于定时任务等场景)
|
||||||
|
Integer threadLocalTenantId = TenantContext.getCurrentTenant();
|
||||||
|
if (threadLocalTenantId != null) {
|
||||||
|
result = threadLocalTenantId;
|
||||||
|
} else {
|
||||||
|
// 获取当前登录用户的租户ID(优先使用SecurityUtils中储存的LoginUser的租户ID)
|
||||||
|
try {
|
||||||
if (SecurityUtils.getAuthentication() != null) {
|
if (SecurityUtils.getAuthentication() != null) {
|
||||||
return SecurityUtils.getLoginUser().getTenantId();
|
result = SecurityUtils.getLoginUser().getTenantId();
|
||||||
}
|
}
|
||||||
return 0;
|
} catch (Exception e) {
|
||||||
|
result = 1; // 默认租户ID
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == null) {
|
||||||
|
// 尝试从请求头中获取租户ID
|
||||||
|
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||||
|
if (attributes != null) {
|
||||||
|
HttpServletRequest request = attributes.getRequest();
|
||||||
|
// 从请求头获取租户ID,假设header名称为"X-Tenant-ID" ; 登录接口前端把租户id放到请求头里
|
||||||
|
String tenantIdHeader = request.getHeader("X-Tenant-ID");
|
||||||
|
String requestMethodName = request.getHeader("Request-Method-Name");
|
||||||
|
// 登录
|
||||||
|
if ("login".equals(requestMethodName)) {
|
||||||
|
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
||||||
|
result = Integer.parseInt(tenantIdHeader);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result != null ? result : 1; // 默认租户ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,12 @@ public class UserDetailsServiceImpl implements UserDetailsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public UserDetails createLoginUser(SysUser user) {
|
public UserDetails createLoginUser(SysUser user) {
|
||||||
return new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user));
|
LoginUser loginUser = new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user));
|
||||||
|
// 设置所属医院ID
|
||||||
|
loginUser.setOrgId(user.getOrgId());
|
||||||
|
if (user.getOrgId() != null) {
|
||||||
|
loginUser.setHospitalId(userService.getHospitalIdByOrgId(user.getOrgId()));
|
||||||
|
}
|
||||||
|
return loginUser;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public class GenController extends BaseController {
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo genList(GenTable genTable) {
|
public TableDataInfo genList(GenTable genTable) {
|
||||||
startPage();
|
startPage();
|
||||||
|
|
||||||
List<GenTable> list = genTableService.selectGenTableList(genTable);
|
List<GenTable> list = genTableService.selectGenTableList(genTable);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
@@ -251,12 +252,10 @@ public class GenController extends BaseController {
|
|||||||
InputStream is = file.getInputStream();
|
InputStream is = file.getInputStream();
|
||||||
Workbook wb = WorkbookFactory.create(is);
|
Workbook wb = WorkbookFactory.create(is);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
// 遍历每个sheet页(每个表)
|
// 遍历每个sheet页(每个表)
|
||||||
for (int i = 0; i < wb.getNumberOfSheets(); i++) {
|
for (int i = 0; i < wb.getNumberOfSheets(); i++) {
|
||||||
sb.append("-- ----------------------------------------------------------------------------------\n");
|
sb.append("-- ----------------------------------------------------------------------------------\n");
|
||||||
Sheet st = wb.getSheetAt(i);
|
Sheet st = wb.getSheetAt(i);
|
||||||
|
|
||||||
// 从第一行读取表名表注释
|
// 从第一行读取表名表注释
|
||||||
Row row0 = st.getRow(0);// 表名
|
Row row0 = st.getRow(0);// 表名
|
||||||
String tableName = row0.getCell(4).toString();// 表名
|
String tableName = row0.getCell(4).toString();// 表名
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.quartz.util;
|
package com.core.quartz.util;
|
||||||
|
|
||||||
|
import org.quartz.CronExpression;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.quartz.CronExpression;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cron表达式工具类
|
* cron表达式工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,6 +16,11 @@
|
|||||||
system系统模块
|
system系统模块
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<fastjson2.version>2.0.43</fastjson2.version>
|
||||||
|
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- 通用工具-->
|
<!-- 通用工具-->
|
||||||
@@ -23,11 +28,34 @@
|
|||||||
<groupId>com.core</groupId>
|
<groupId>com.core</groupId>
|
||||||
<artifactId>core-common</artifactId>
|
<artifactId>core-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- FastJSON2 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.fastjson2</groupId>
|
||||||
|
<artifactId>fastjson2</artifactId>
|
||||||
|
<version>${fastjson2.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 如果还需要FastJSON,建议移除或替换为FastJSON2 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>1.2.83</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- pinyin4j -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.belerweb</groupId>
|
||||||
|
<artifactId>pinyin4j</artifactId>
|
||||||
|
<version>${pinyin4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- swagger注解 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user