Compare commits
381 Commits
wangjunpin
...
5f600209b8
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 |
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
|
||||
|
||||
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
|
||||
|
||||
68467
20251224init脚本(使用Navicat Premium 17导入).sql
Normal file
68467
20251224init脚本(使用Navicat Premium 17导入).sql
Normal file
File diff suppressed because one or more lines are too long
@@ -8,7 +8,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
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 取消汇总
|
||||
*
|
||||
* @param summaryNo 汇总单号
|
||||
* @return 处理结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> cancelSummary(String summaryNo) {
|
||||
// 取消汇总申请(软删除)
|
||||
List<Long> requestIdList = supplyRequestService.cancelSummarySupplyRequest(List.of(summaryNo));
|
||||
if (requestIdList.isEmpty()) {
|
||||
return R.fail("取消汇总申请失败");
|
||||
}
|
||||
// 软删除汇总发放
|
||||
supplyDeliveryService.deleteSupplyDeliveryByReqId(requestIdList);
|
||||
// 取消药品汇总
|
||||
boolean result = medicationDispenseService.cancelMedicationSummary(List.of(summaryNo));
|
||||
if (!result) {
|
||||
return R.fail("取消汇总申请失败");
|
||||
}
|
||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"取消"}));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
@Resource
|
||||
private IMedicationDispenseService medicationDispenseService;
|
||||
|
||||
@Resource
|
||||
private ReturnMedicineMapper returnMedicineMapper;
|
||||
|
||||
@Resource
|
||||
private ISupplyRequestService supplyRequestService;
|
||||
|
||||
@Resource
|
||||
private ISupplyDeliveryService supplyDeliveryService;
|
||||
|
||||
@Resource
|
||||
private ITraceNoManageService traceNoManageService;
|
||||
|
||||
@Resource
|
||||
private IInventoryItemService inventoryItemService;
|
||||
|
||||
@Resource
|
||||
private IMedicationDefinitionService medicationDefinitionService;
|
||||
|
||||
@Resource
|
||||
private ReceiptApprovalAppServiceImpl receiptApprovalAppService;
|
||||
|
||||
@Resource
|
||||
private WesternMedicineDispenseAppServiceImpl westernMedicineDispenseAppService;
|
||||
|
||||
@Resource
|
||||
private WesternMedicineDispenseMapper westernMedicineDispenseMapper;
|
||||
|
||||
@Resource
|
||||
private IOrganizationService organizationService;
|
||||
|
||||
@Resource
|
||||
private AdviceProcessAppMapper adviceProcessAppMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
private MedicationRequestServiceImpl medicationRequestService;
|
||||
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>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
<!-- lombok -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger3-->
|
||||
<dependency>
|
||||
@@ -36,11 +41,13 @@
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
@@ -66,45 +73,13 @@
|
||||
<groupId>com.core</groupId>
|
||||
<artifactId>core-flowable</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.core</groupId>
|
||||
<artifactId>core-common</artifactId>
|
||||
</dependency>
|
||||
</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>
|
||||
@@ -62,11 +62,12 @@ public class SysDictDataController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据信息
|
||||
* 根据字典类型查询字典数据信息(支持拼音搜索)
|
||||
*/
|
||||
@GetMapping(value = "/type/{dictType}")
|
||||
public AjaxResult dictType(@PathVariable String dictType) {
|
||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||
public AjaxResult dictType(@PathVariable String dictType,
|
||||
@RequestParam(value = "searchKey", required = false) String searchKey) {
|
||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType, searchKey);
|
||||
if (StringUtils.isNull(data)) {
|
||||
data = new ArrayList<SysDictData>();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.core.web.util;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.enums.TenantOptionDict;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* 租户配置工具类
|
||||
@@ -30,7 +31,12 @@ public class TenantOptionUtil {
|
||||
if (loginUser.getOptionMap() == null || loginUser.getOptionMap().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return loginUser.getOptionMap().get(optionDict.getCode());
|
||||
// return loginUser.getOptionMap().get(optionDict.getCode());
|
||||
|
||||
// TODO:2025/10/17 李永兴提出的sys_option切换TenantOption临时防止报错方案,最晚2025年11月底删除
|
||||
String newValue = loginUser.getOptionMap().get(optionDict.getCode());
|
||||
String oldValue = loginUser.getOptionJson().getString(optionDict.getCode());
|
||||
return StringUtils.isEmpty(newValue) ? oldValue : newValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,10 +77,6 @@
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- io常用工具类 -->
|
||||
<dependency>
|
||||
@@ -140,6 +136,17 @@
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.core.common.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* Excel额外表头信息注解
|
||||
*
|
||||
* @author swb
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface ExcelExtra {
|
||||
/**
|
||||
* 表头名称
|
||||
*/
|
||||
String name();
|
||||
|
||||
/**
|
||||
* 日期格式,如:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
String dateFormat() default "";
|
||||
|
||||
/**
|
||||
* 排序(越小越靠前)
|
||||
*/
|
||||
int sort() default 0;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*/
|
||||
String defaultValue() default "";
|
||||
|
||||
/**
|
||||
* 是否导出
|
||||
*/
|
||||
boolean isExport() default true;
|
||||
}
|
||||
@@ -53,6 +53,9 @@ public class SysDictData extends BaseEntity {
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 拼音首字母 */
|
||||
private String pyStr;
|
||||
|
||||
public Long getDictCode() {
|
||||
return dictCode;
|
||||
}
|
||||
@@ -136,13 +139,21 @@ public class SysDictData extends BaseEntity {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getPyStr() {
|
||||
return pyStr;
|
||||
}
|
||||
|
||||
public void setPyStr(String pyStr) {
|
||||
this.pyStr = pyStr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("dictCode", getDictCode())
|
||||
.append("dictSort", getDictSort()).append("dictLabel", getDictLabel()).append("dictValue", getDictValue())
|
||||
.append("dictType", getDictType()).append("cssClass", getCssClass()).append("listClass", getListClass())
|
||||
.append("isDefault", getIsDefault()).append("status", getStatus()).append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
|
||||
.append("isDefault", getIsDefault()).append("status", getStatus()).append("pyStr", getPyStr())
|
||||
.append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.core.common.enums;
|
||||
|
||||
/**
|
||||
* Desc: 调价类型枚举
|
||||
* @Author raymond
|
||||
* @Date 09:14 2025/10/16
|
||||
* @return
|
||||
**/
|
||||
public enum AdjustPriceEnum {
|
||||
|
||||
MEDICINE(0, "药品"),
|
||||
CONSUMABLES(1, "耗材"),
|
||||
DIAGNOSIS(2, "诊疗"),
|
||||
REGISTER(3, "挂号");
|
||||
|
||||
|
||||
private final Integer code;
|
||||
private final String info;
|
||||
|
||||
AdjustPriceEnum(Integer code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.openhis.common.enums;
|
||||
package com.core.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 删除标识
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
@Getter
|
||||
public enum DelFlag {
|
||||
/**
|
||||
* 未删除
|
||||
@@ -25,24 +28,12 @@ public enum DelFlag {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static DelFlag getByValue(Integer value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (DelFlag val : values()) {
|
||||
if (val.getValue().equals(value)) {
|
||||
if (val.value.equals(value)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.core.common.enums;
|
||||
|
||||
/**
|
||||
* 删除标志
|
||||
*
|
||||
* @author system
|
||||
*/
|
||||
public enum DeleteFlag {
|
||||
NOT_DELETED("0", "未删除"), DELETED("1", "已删除");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
DeleteFlag(String code, String info) {
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
}
|
||||
@@ -6,98 +6,39 @@ package com.core.common.enums;
|
||||
* @author system
|
||||
*/
|
||||
public enum TenantOptionDict {
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
HOSPITAL_NAME("hospitalName", "医院名称", 0),
|
||||
YB_HOSPITAL_NAME("hospitalName", "医保-医院名称", 0),
|
||||
/**
|
||||
* 医疗机构等级
|
||||
* 医保-医疗机构等级(3101接口)
|
||||
*/
|
||||
MEDINS_LV("medinsLv", "医疗机构等级", 1),
|
||||
YB_MEDINS_LV("medinsLv", "医保_医疗机构等级", 1),
|
||||
/**
|
||||
* 定点医药机构编号
|
||||
*/
|
||||
FIXMEDINS_CODE("fixmedinsCode", "定点医药机构编号", 2),
|
||||
YB_FIXMEDINS_CODE("fixmedinsCode", "医保_定点医药机构编号", 2),
|
||||
/**
|
||||
* 电子发票appid
|
||||
*/
|
||||
APP_ID("app_id", "电子发票appid", 3),
|
||||
EINVOICE_APP_ID("app_id", "电子发票-appid", 3),
|
||||
/**
|
||||
* 电子发票key
|
||||
*/
|
||||
KEY("key", "电子发票key", 4),
|
||||
EINVOICE_KEY("key", "电子发票-key", 4),
|
||||
/**
|
||||
* 电子发票url
|
||||
*/
|
||||
URL("url", "电子发票url", 5),
|
||||
EINVOICE_URL("url", "电子发票-url", 5),
|
||||
/**
|
||||
* 医保开关
|
||||
*/
|
||||
YB_SWITCH("yb_switch", "医保开关", 6),
|
||||
/**
|
||||
* 客户端私钥
|
||||
*/
|
||||
CLI_PRV_KEY("cliPrvKey", "客户端私钥", 7),
|
||||
/**
|
||||
* 客户端公钥
|
||||
*/
|
||||
CLI_PUB_KEY("cliPubKey", "客户端公钥", 8),
|
||||
/**
|
||||
* 服务端公钥
|
||||
*/
|
||||
SERVER_PUB_KEY("serverPubKey", "服务端公钥", 9),
|
||||
/**
|
||||
* 定点医药机构名称
|
||||
*/
|
||||
FIXMEDINS_NAME("fixmedinsName", "定点医药机构名称", 10),
|
||||
/**
|
||||
* 行政区划
|
||||
*/
|
||||
ADMVS("admvs", "行政区划", 11),
|
||||
/**
|
||||
* 授权范围
|
||||
*/
|
||||
SCOPE("scope", "授权范围", 12),
|
||||
/**
|
||||
* 授权类型
|
||||
*/
|
||||
GRANT_TYPE("grantType", "授权类型", 13),
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
PASSWORD("password", "密码", 14),
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
USERNAME("username", "用户名", 15),
|
||||
/**
|
||||
* 客户端安全码
|
||||
*/
|
||||
CLIENT_SECRET("clientSecret", "客户端安全码", 16),
|
||||
/**
|
||||
* 客户端ID
|
||||
*/
|
||||
CLIENT_ID("clientId", "客户端ID", 17),
|
||||
/**
|
||||
* 生产环境客户端公钥
|
||||
*/
|
||||
PROD_CLI_PUB_KEY("prod_cliPubKey", "生产环境客户端公钥", 18),
|
||||
/**
|
||||
* 生产环境客户端私钥
|
||||
*/
|
||||
PROD_CLI_PRV_KEY("prod_cliPrvKey", "生产环境客户端私钥", 19),
|
||||
/**
|
||||
* 生产环境客户端ID
|
||||
*/
|
||||
PROD_CLIENT_ID("prod_clientId", "生产环境客户端ID", 20),
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
FILE_PATH("filePath", "文件路径", 21),
|
||||
/**
|
||||
* 电子地址
|
||||
*/
|
||||
ELE_ADDRESS("eleAddress", "电子地址", 22),
|
||||
ELE_ADDRESS("eleAddress", "电子处方-请求地址", 22),
|
||||
/**
|
||||
* 服务地址
|
||||
*/
|
||||
@@ -109,63 +50,35 @@ public enum TenantOptionDict {
|
||||
/**
|
||||
* 是否加密
|
||||
*/
|
||||
IS_ENCRYPT("isEncrypt", "是否加密", 25),
|
||||
YB_IS_ENCRYPT("isEncrypt", "医保-是否加密", 25),
|
||||
/**
|
||||
* 医保区划
|
||||
*/
|
||||
INSUPLC_ADMDVS("insuplc_admdvs", "医保区划", 26),
|
||||
YB_INSUPLC_ADMDVS("insuplc_admdvs", "医保-区划", 26),
|
||||
/**
|
||||
* 电子处方appId
|
||||
*/
|
||||
PRE_APP_ID("pre_app_id", "电子处方appId", 27),
|
||||
ELE_PRE_APP_ID("pre_app_id", "电子处方-appId", 27),
|
||||
/**
|
||||
* 电子处方appSecret
|
||||
*/
|
||||
PRE_APP_SECRET("pre_app_secret", "电子处方appSecret", 28),
|
||||
ELE_PRE_APP_SECRET("pre_app_secret", "电子处方-appSecret", 28),
|
||||
/**
|
||||
* 电子处方私钥
|
||||
*/
|
||||
APP_PRVKEY("APP_PRVKEY", "电子处方私钥", 29),
|
||||
ELE_APP_PRVKEY("APP_PRVKEY", "电子处方-私钥", 29),
|
||||
/**
|
||||
* 电子处方公钥
|
||||
*/
|
||||
PLAF_PUBKEY("PLAF_PUBKEY", "电子处方公钥", 30),
|
||||
/**
|
||||
* 医保客户端ID
|
||||
*/
|
||||
YB_CLIENT_ID("ybClientId", "医保客户端ID", 31),
|
||||
/**
|
||||
* 医保客户端安全码
|
||||
*/
|
||||
YB_CLIENT_SECRET("ybClientSecret", "医保客户端安全码", 32),
|
||||
/**
|
||||
* 医保用户名
|
||||
*/
|
||||
YB_USERNAME("ybUsername", "医保用户名", 33),
|
||||
/**
|
||||
* 医保密码
|
||||
*/
|
||||
YB_PASSWORD("ybPassword", "医保密码", 34),
|
||||
/**
|
||||
* 医保授权类型
|
||||
*/
|
||||
YB_GRANT_TYPE("ybGrantType", "医保授权类型", 35),
|
||||
/**
|
||||
* 医保授权范围
|
||||
*/
|
||||
YB_SCOPE("ybScope", "医保授权范围", 36),
|
||||
/**
|
||||
* 医保密钥
|
||||
*/
|
||||
YB_CLI_PRV_KEY("ybCliPrvKey", "医保密钥", 37),
|
||||
/**
|
||||
* 医保服务URL
|
||||
*/
|
||||
YB_URL("ybUrl", "医保服务URL", 38),
|
||||
ELE_PLAF_PUBKEY("PLAF_PUBKEY", "电子处方-公钥", 30),
|
||||
/**
|
||||
* 医院等级
|
||||
*/
|
||||
HOSPITAL_LV("hospital_lv", "医院等级", 39),
|
||||
EINVOICE_HOSPITAL_LV("hospital_lv", "电子发票-医院等级", 39),
|
||||
/**
|
||||
* 无视LIS&PACS报错
|
||||
*/
|
||||
LIS_PACS_ERROR_IGNORE("lisPacsErrorIgnore", "无视LIS&PACS报错", 40),
|
||||
/**
|
||||
* LIS接口地址
|
||||
*/
|
||||
@@ -191,13 +104,13 @@ public enum TenantOptionDict {
|
||||
*/
|
||||
PACS_APP_SECRET("pacsAppSecret", "PACSAppSecret", 45),
|
||||
/**
|
||||
* PACSAppSecret
|
||||
* 电子发票-中转服务的路径
|
||||
*/
|
||||
INVOICE_URL("invoiceUrl", "电子发票中转服务的路径", 46),
|
||||
INVOICE_FORWARD_URL("invoiceUrl", "电子发票-中转服务的路径", 46),
|
||||
/**
|
||||
* PACSAppSecret
|
||||
* 电子发票-中转服务开关
|
||||
*/
|
||||
FORWARD_SWITCH("forwardSwitch", "电子发票中转服务开关", 47),
|
||||
FORWARD_SWITCH("forwardSwitch", "电子发票-中转服务开关", 47),
|
||||
/**
|
||||
* 食源性开关
|
||||
*/
|
||||
@@ -229,7 +142,164 @@ public enum TenantOptionDict {
|
||||
/**
|
||||
* BPC请求URL
|
||||
*/
|
||||
BPC_REQUEST_URL("bpcRequestUrl", "BPC请求URL", 55);
|
||||
BPC_REQUEST_URL("bpcRequestUrl", "BPC请求URL", 55),
|
||||
/**
|
||||
* 电子发票开关
|
||||
*/
|
||||
INVOICE_SWITCH("invoiceSwitch", "电子发票开关", 56),
|
||||
/**
|
||||
* 医嘱定价来源
|
||||
*/
|
||||
ORDER_PRICING_SOURCE("orderPricingSource", "定价来源 batchSellingPrice/retailPrice", 57),
|
||||
/**
|
||||
* 三方支付(签到)
|
||||
*/
|
||||
THREE_PART_SIGN_URL("threePartSignUrl", "三方支付【签到】请求路径", 58),
|
||||
/**
|
||||
* 三方支付(签到)
|
||||
*/
|
||||
THREE_PART_SIGN_STATIC_PARAM("threePartSignStaticParam", "三方支付【签到】固定参数", 59),
|
||||
/**
|
||||
* 三方支付(签到)
|
||||
*/
|
||||
THREE_PART_SIGN_ACTIVE_PARAM("threePartSignActiveParam", "三方支付【签到】可变参数", 60),
|
||||
/**
|
||||
* 三方支付(签到)
|
||||
*/
|
||||
THREE_PART_SIGN_MAPPING_METHOD("threePartSignMappingMethod", "三方支付【签到】请求方式", 61),
|
||||
/**
|
||||
* 三方支付(消费)
|
||||
*/
|
||||
THREE_PART_PAY_URL("threePartPayUrl", "三方支付【消费】请求路径", 62),
|
||||
/**
|
||||
* 三方支付(消费)
|
||||
*/
|
||||
THREE_PART_PAY_STATIC_PARAM("threePartPayStaticParam", "三方支付【消费】固定参数", 63),
|
||||
/**
|
||||
* 三方支付(消费)
|
||||
*/
|
||||
THREE_PART_PAY_ACTIVE_PARAM("threePartPayActiveParam", "三方支付【消费】可变参数", 64),
|
||||
/**
|
||||
* 三方支付(消费)
|
||||
*/
|
||||
THREE_PART_PAY_MAPPING_METHOD("threePartPayMappingMethod", "三方支付【消费】请求方式", 65),
|
||||
/**
|
||||
* 三方支付(退费)
|
||||
*/
|
||||
THREE_PART_RETURN_URL("threePartReturnUrl", "三方支付【退费】请求路径", 66),
|
||||
/**
|
||||
* 三方支付(退费)
|
||||
*/
|
||||
THREE_PART_RETURN_STATIC_PARAM("threePartReturnStaticParam", "三方支付【退费】固定参数", 67),
|
||||
/**
|
||||
* 三方支付(退费)
|
||||
*/
|
||||
THREE_PART_RETURN_ACTIVE_PARAM("threePartReturnActiveParam", "三方支付【退费】可变参数", 68),
|
||||
/**
|
||||
* 三方支付(退费)
|
||||
*/
|
||||
THREE_PART_RETURN_MAPPING_METHOD("threePartReturnMappingMethod", "三方支付【退费】请求方式", 69),
|
||||
/**
|
||||
* 三方支付(隔天退费)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_URL("threePartNextDayReturnUrl", "三方支付【隔天退费】请求路径", 70),
|
||||
/**
|
||||
* 三方支付(隔天退费)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_STATIC_PARAM("threePartNextDayReturnStaticParam", "三方支付【隔天退费】固定参数", 71),
|
||||
/**
|
||||
* 三方支付(隔天退费)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_ACTIVE_PARAM("threePartNextDayReturnActiveParam", "三方支付【隔天退费】可变参数", 72),
|
||||
/**
|
||||
* 三方支付(隔天退费)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_MAPPING_METHOD("threePartNextDayReturnMappingMethod", "三方支付【隔天退费】请求方式", 73),
|
||||
/**
|
||||
* 三方支付路径(支付结果查询)
|
||||
*/
|
||||
THREE_PART_PAY_QUERY_URL("threePartPayQueryUrl", "三方支付【支付结果查询】请求路径", 74),
|
||||
/**
|
||||
* 三方支付(支付结果查询)
|
||||
*/
|
||||
THREE_PART_PAY_QUERY_STATIC_PARAM("threePartPayQueryStaticParam", "三方支付【支付结果查询】固定参数", 75),
|
||||
/**
|
||||
* 三方支付(支付结果查询)
|
||||
*/
|
||||
THREE_PART_PAY_QUERY_ACTIVE_PARAM("threePartPayQueryActiveParam", "三方支付【支付结果查询】可变参数", 76),
|
||||
/**
|
||||
* 三方支付(支付结果查询)
|
||||
*/
|
||||
THREE_PART_PAY_QUERY_MAPPING_METHOD("threePartPayQueryMappingMethod", "三方支付【支付结果查询】请求方式", 77),
|
||||
/**
|
||||
* 三方支付路径(退费结果查询)
|
||||
*/
|
||||
THREE_PART_RETURN_QUERY_URL("threePartReturnQueryUrl", "三方支付【退费结果查询】请求路径", 78),
|
||||
/**
|
||||
* 三方支付(退费结果查询)
|
||||
*/
|
||||
THREE_PART_RETURN_QUERY_STATIC_PARAM("threePartReturnQueryStaticParam", "三方支付【退费结果查询】固定参数", 79),
|
||||
/**
|
||||
* 三方支付(退费结果查询)
|
||||
*/
|
||||
THREE_PART_RETURN_QUERY_ACTIVE_PARAM("threePartReturnQueryActiveParam", "三方支付【退费结果查询】可变参数", 80),
|
||||
/**
|
||||
* 三方支付(退费结果查询)
|
||||
*/
|
||||
THREE_PART_RETURN_QUERY_MAPPING_METHOD("threePartReturnQueryMappingMethod", "三方支付【退费结果查询】请求方式", 81),
|
||||
/**
|
||||
* 三方支付路径(隔天退费结果查询)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_QUERY_URL("threePartNextDayReturnQueryUrl", "三方支付【隔天退费结果查询】请求路径", 82),
|
||||
/**
|
||||
* 三方支付(隔天退费结果查询)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_QUERY_STATIC_PARAM("threePartNextDayReturnQueryStaticParam", "三方支付【隔天退费结果查询】固定参数", 83),
|
||||
/**
|
||||
* 三方支付(隔天退费结果查询)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_QUERY_ACTIVE_PARAM("threePartNextDayReturnQueryActiveParam", "三方支付【隔天退费结果查询】可变参数", 84),
|
||||
/**
|
||||
* 三方支付(隔天退费结果查询)
|
||||
*/
|
||||
THREE_PART_NEXT_DAY_RETURN_QUERY_MAPPING_METHOD("threePartNextDayReturnQueryMappingMethod", "三方支付【隔天退费结果查询】请求方式",
|
||||
85),
|
||||
/**
|
||||
* 三方支付(签出)
|
||||
*/
|
||||
THREE_PART_SIGN_OUT_URL("threePartSignOutUrl", "三方支付【签出】请求路径", 86),
|
||||
/**
|
||||
* 三方支付(签出)
|
||||
*/
|
||||
THREE_PART_SIGN_OUT_STATIC_PARAM("threePartSignOutStaticParam", "三方支付【签出】固定参数", 87),
|
||||
/**
|
||||
* 三方支付(签出)
|
||||
*/
|
||||
THREE_PART_SIGN_OUT_ACTIVE_PARAM("threePartSignOutActiveParam", "三方支付【签出】可变参数", 88),
|
||||
/**
|
||||
* 三方支付(签出)
|
||||
*/
|
||||
THREE_PART_SIGN_OUT_MAPPING_METHOD("threePartSignOutMappingMethod", "三方支付【签出】请求方式", 89),
|
||||
/**
|
||||
* 三方支付(签出)
|
||||
*/
|
||||
YB_INPATIENT_SETTLEMENT_UP_URL("ybInpatientSetlUp", "选填4101或4101A", 90),
|
||||
/**
|
||||
* PACS查看报告地址
|
||||
*/
|
||||
PACS_REPORT_URL("pacsReportUrl", "PACS查看报告地址", 91),
|
||||
/**
|
||||
* LIS查看报告地址
|
||||
*/
|
||||
LIS_REPORT_URL("lisReportUrl", "LIS查看报告地址", 92),
|
||||
/**
|
||||
* 开药时药房允许多选开关
|
||||
*/
|
||||
PHARMACY_MULTIPLE_CHOICE_SWITCH("pharmacyMultipleChoiceSwitch", "开药时药房允许多选开关", 93),
|
||||
/**
|
||||
* PEIS服务地址
|
||||
*/
|
||||
PEIS_SERVER_URL("peisServerUrl", "PEIS服务地址", 94);
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
@@ -241,18 +311,6 @@ public enum TenantOptionDict {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public static TenantOptionDict getByCode(String code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
@@ -264,4 +322,16 @@ public enum TenantOptionDict {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ public final class AgeCalculatorUtil {
|
||||
* 当前年龄取得(床位列表表示年龄用)
|
||||
*/
|
||||
public static String getAge(Date date) {
|
||||
// 添加空值检查
|
||||
if (date == null) {
|
||||
return "";
|
||||
}
|
||||
// 将 Date 转换为 LocalDateTime
|
||||
LocalDateTime dateTime = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -55,6 +55,17 @@ public class SecurityUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户昵称
|
||||
**/
|
||||
public static String getNickName() {
|
||||
try {
|
||||
return getLoginUser().getUser().getNickName();
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("获取用户昵称异常", HttpStatus.UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户
|
||||
**/
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
<dependency>
|
||||
<groupId>com.googlecode.aviator</groupId>
|
||||
<artifactId>aviator</artifactId>
|
||||
<version>5.3.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -22,10 +22,11 @@ import com.core.common.utils.StringUtils;
|
||||
*/
|
||||
@Configuration
|
||||
public class FilterConfig {
|
||||
@Value("${xss.excludes}")
|
||||
// 添加默认值,避免配置不存在时启动失败
|
||||
@Value("${xss.excludes:/system/notice}")
|
||||
private String excludes;
|
||||
|
||||
@Value("${xss.urlPatterns}")
|
||||
@Value("${xss.urlPatterns:/system/*,/monitor/*,/tool/*}")
|
||||
private String urlPatterns;
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
|
||||
@@ -99,7 +99,7 @@ public class MybatisPlusConfig {
|
||||
"med_medication_definition", "med_medication_dispense", "med_medication_request",
|
||||
"wor_activity_definition", "wor_device_dispense", "wor_device_request", "wor_inventory_item",
|
||||
"wor_service_request", "wor_service_request_detail", "wor_supply_delivery", "wor_supply_request",
|
||||
"sys_operation_record"));
|
||||
"sys_operation_record","doc_inventory_item_static"));
|
||||
|
||||
@Override
|
||||
public boolean ignoreTable(String tableName) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.ValueOperations;
|
||||
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
|
||||
@@ -45,6 +46,11 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
return redisScript;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ValueOperations<Object, Object> valueOperations(RedisTemplate<Object, Object> redisTemplate) {
|
||||
return redisTemplate.opsForValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* 限流脚本
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
package com.core.framework.config;
|
||||
|
||||
import com.core.framework.config.properties.PermitAllUrlProperties;
|
||||
import com.core.framework.security.filter.JwtAuthenticationTokenFilter;
|
||||
import com.core.framework.security.handle.AuthenticationEntryPointImpl;
|
||||
import com.core.framework.security.handle.LogoutSuccessHandlerImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -21,6 +17,11 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
|
||||
import org.springframework.security.web.authentication.logout.LogoutFilter;
|
||||
import org.springframework.web.filter.CorsFilter;
|
||||
|
||||
import com.core.framework.config.properties.PermitAllUrlProperties;
|
||||
import com.core.framework.security.filter.JwtAuthenticationTokenFilter;
|
||||
import com.core.framework.security.handle.AuthenticationEntryPointImpl;
|
||||
import com.core.framework.security.handle.LogoutSuccessHandlerImpl;
|
||||
|
||||
/**
|
||||
* spring security配置
|
||||
*
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Optional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.core.common.enums.DelFlag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
@@ -23,7 +24,6 @@ import com.core.common.core.domain.entity.SysUser;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.core.domain.model.LoginUserExtend;
|
||||
import com.core.common.core.redis.RedisCache;
|
||||
import com.core.common.enums.DeleteFlag;
|
||||
import com.core.common.enums.TenantStatus;
|
||||
import com.core.common.exception.ServiceException;
|
||||
import com.core.common.exception.user.*;
|
||||
@@ -281,7 +281,7 @@ public class SysLoginService {
|
||||
throw new ServiceException("所属医院停用");
|
||||
}
|
||||
// 租户删除状态校验
|
||||
if (DeleteFlag.DELETED.getCode().equals(currentTenant.getDeleteFlag())) {
|
||||
if (DelFlag.YES.getCode().equals(currentTenant.getDeleteFlag())) {
|
||||
throw new ServiceException("所属医院不存在");
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,12 @@ public class UserDetailsServiceImpl implements UserDetailsService {
|
||||
}
|
||||
|
||||
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")
|
||||
public TableDataInfo genList(GenTable genTable) {
|
||||
startPage();
|
||||
|
||||
List<GenTable> list = genTableService.selectGenTableList(genTable);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@@ -251,12 +252,10 @@ public class GenController extends BaseController {
|
||||
InputStream is = file.getInputStream();
|
||||
Workbook wb = WorkbookFactory.create(is);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
// 遍历每个sheet页(每个表)
|
||||
for (int i = 0; i < wb.getNumberOfSheets(); i++) {
|
||||
sb.append("-- ----------------------------------------------------------------------------------\n");
|
||||
Sheet st = wb.getSheetAt(i);
|
||||
|
||||
// 从第一行读取表名表注释
|
||||
Row row0 = st.getRow(0);// 表名
|
||||
String tableName = row0.getCell(4).toString();// 表名
|
||||
|
||||
@@ -52,6 +52,9 @@ public class GenUtils {
|
||||
case "yb":
|
||||
genTable.setPackageName(GenConfig.getPackageName() + ".ybcatalog");
|
||||
break;
|
||||
case "lab":
|
||||
genTable.setPackageName(GenConfig.getPackageName() + ".lab");
|
||||
break;
|
||||
default:
|
||||
genTable.setPackageName(GenConfig.getPackageName() + ".errortable");
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ gen:
|
||||
# 自动去除表前缀,默认是false
|
||||
autoRemovePre: true
|
||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||
tablePrefix: cod_,adm_,cli_,dia_,med_,wor_,fin_,def_,doc_,yb_
|
||||
tablePrefix: cod_,adm_,cli_,dia_,med_,wor_,fin_,def_,doc_,yb_,lab_
|
||||
@@ -99,14 +99,15 @@
|
||||
|
||||
<select id="selectDbTableList" parameterType="map" resultMap="GenTableResult">
|
||||
SELECT
|
||||
T1.table_name,
|
||||
T2.description AS table_comment
|
||||
T1.table_name
|
||||
--,
|
||||
--T2.description AS table_comment
|
||||
-- 移除 create_time,因为它在 information_schema.tables 中通常不存在
|
||||
-- 移除 update_time,因为它在 information_schema.tables 中通常不存在
|
||||
FROM information_schema.tables T1
|
||||
LEFT JOIN pg_description T2
|
||||
ON T2.objsubid = 0
|
||||
AND T2.objoid = T1.table_name::regclass::oid
|
||||
-- LEFT JOIN pg_description T2
|
||||
-- ON T2.objsubid = 0
|
||||
--AND T2.objoid = T1.table_name::regclass::oid
|
||||
WHERE table_schema = current_schema()
|
||||
AND table_name NOT LIKE 'qrtz\_%'
|
||||
AND table_name NOT LIKE 'gen\_%'
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
system系统模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<fastjson2.version>2.0.43</fastjson2.version>
|
||||
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
@@ -24,10 +29,37 @@
|
||||
<artifactId>core-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</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>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- postgresql -->
|
||||
|
||||
@@ -66,4 +66,6 @@ public class SysTenantOption implements Serializable {
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -28,6 +28,18 @@ public interface SysDictDataMapper {
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据字典类型和搜索关键字查询字典数据(支持拼音搜索)
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param searchKey 搜索关键字(支持名称和拼音首字母搜索)
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByTypeWithSearch(@Param("dictType") String dictType, @Param("searchKey") String searchKey);
|
||||
|
||||
|
||||
/**
|
||||
* 根据字典类型和字典键值查询字典数据信息
|
||||
*
|
||||
|
||||
@@ -84,6 +84,14 @@ public interface SysMenuMapper {
|
||||
*/
|
||||
public SysMenu selectMenuById(Long menuId);
|
||||
|
||||
/**
|
||||
* 根据路径Path查询信息
|
||||
*
|
||||
* @param path 路径
|
||||
* @return 菜单信息
|
||||
*/
|
||||
public SysMenu selectMenuByPath(String path);
|
||||
|
||||
/**
|
||||
* 是否存在菜单子节点
|
||||
*
|
||||
|
||||
@@ -34,6 +34,15 @@ public interface ISysDictTypeService {
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType);
|
||||
|
||||
/**
|
||||
* 根据字典类型和搜索关键字查询字典数据(支持拼音搜索)
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param searchKey 搜索关键字(支持名称和拼音首字母搜索),可为null
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType, String searchKey);
|
||||
|
||||
/**
|
||||
* 根据字典类型ID查询信息
|
||||
*
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
import com.core.common.core.domain.entity.SysDictData;
|
||||
import com.core.common.utils.DictUtils;
|
||||
import com.core.system.mapper.SysDictDataMapper;
|
||||
import com.core.common.utils.ChineseConvertUtils;
|
||||
import com.core.system.service.ISysDictDataService;
|
||||
|
||||
/**
|
||||
@@ -88,6 +89,10 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
|
||||
*/
|
||||
@Override
|
||||
public int insertDictData(SysDictData data) {
|
||||
// 自动计算拼音首字母
|
||||
if (data.getDictLabel() != null && !data.getDictLabel().isEmpty()) {
|
||||
data.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(data.getDictLabel()));
|
||||
}
|
||||
int row = dictDataMapper.insertDictData(data);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
@@ -104,6 +109,10 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
|
||||
*/
|
||||
@Override
|
||||
public int updateDictData(SysDictData data) {
|
||||
// 如果字典标签有变化,重新计算拼音首字母
|
||||
if (data.getDictLabel() != null && !data.getDictLabel().isEmpty()) {
|
||||
data.setPyStr(ChineseConvertUtils.toPinyinFirstLetter(data.getDictLabel()));
|
||||
}
|
||||
int row = dictDataMapper.updateDictData(data);
|
||||
if (row > 0) {
|
||||
List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(data.getDictType());
|
||||
|
||||
@@ -71,6 +71,24 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService {
|
||||
*/
|
||||
@Override
|
||||
public List<SysDictData> selectDictDataByType(String dictType) {
|
||||
return selectDictDataByType(dictType, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型和搜索关键字查询字典数据(支持拼音搜索)
|
||||
*
|
||||
* @param dictType 字典类型
|
||||
* @param searchKey 搜索关键字(支持名称和拼音首字母搜索),可为null
|
||||
* @return 字典数据集合信息
|
||||
*/
|
||||
public List<SysDictData> selectDictDataByType(String dictType, String searchKey) {
|
||||
// 如果有搜索关键字,使用带搜索的SQL查询
|
||||
if (StringUtils.isNotEmpty(searchKey) && !searchKey.trim().isEmpty()) {
|
||||
String trimmedKey = searchKey.trim();
|
||||
return dictDataMapper.selectDictDataByTypeWithSearch(dictType, trimmedKey);
|
||||
}
|
||||
|
||||
// 否则使用原有方法(带缓存)
|
||||
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
|
||||
if (StringUtils.isNotEmpty(dictDatas)) {
|
||||
return dictDatas;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.core.system.service.impl;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -266,6 +267,11 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
*/
|
||||
@Override
|
||||
public int insertMenu(SysMenu menu) {
|
||||
//路径Path唯一性判断
|
||||
SysMenu sysMenu = menuMapper.selectMenuByPath(menu.getPath());
|
||||
if (sysMenu != null){
|
||||
return -1;
|
||||
}
|
||||
return menuMapper.insertMenu(menu);
|
||||
}
|
||||
|
||||
@@ -277,6 +283,16 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
*/
|
||||
@Override
|
||||
public int updateMenu(SysMenu menu) {
|
||||
//路径Path唯一性判断
|
||||
String path = menu.getPath();
|
||||
if (StringUtils.isNotBlank(path)) {
|
||||
SysMenu sysMenu = menuMapper.selectMenuByPath(menu.getPath());
|
||||
// 先判断sysMenu是否不为null,再比较menuId
|
||||
if (sysMenu != null && !menu.getMenuId().equals(sysMenu.getMenuId())) {
|
||||
return -1; // 路由地址已存在
|
||||
}
|
||||
}
|
||||
// 执行更新
|
||||
return menuMapper.updateMenu(menu);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.core.common.core.domain.R;
|
||||
import com.core.common.core.domain.entity.SysUser;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.core.common.core.redis.RedisCache;
|
||||
import com.core.common.enums.DeleteFlag;
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.core.common.enums.TenantStatus;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
@@ -76,7 +76,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
lambdaQueryWrapper.eq(SysTenant::getStatus, status);
|
||||
}
|
||||
// 未删除
|
||||
lambdaQueryWrapper.eq(SysTenant::getDeleteFlag, DeleteFlag.NOT_DELETED.getCode());
|
||||
lambdaQueryWrapper.eq(SysTenant::getDeleteFlag, DelFlag.NO.getCode());
|
||||
lambdaQueryWrapper.orderByDesc(SysTenant::getId);
|
||||
return R.ok(baseMapper.selectPage(new Page<>(pageNum, pageSize), lambdaQueryWrapper));
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
return R.fail("该租户还存在绑定的用户,请确认");
|
||||
}
|
||||
baseMapper.update(new SysTenant(), new LambdaUpdateWrapper<SysTenant>()
|
||||
.set(SysTenant::getDeleteFlag, DeleteFlag.DELETED.getCode()).in(SysTenant::getId, tenantIdList));
|
||||
.set(SysTenant::getDeleteFlag, DelFlag.YES.getCode()).in(SysTenant::getId, tenantIdList));
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
@@ -209,7 +209,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
if (StringUtils.isNotEmpty(userName)) {
|
||||
lambdaQueryWrapper.like(SysUser::getUserName, userName);
|
||||
}
|
||||
lambdaQueryWrapper.eq(SysUser::getDeleteFlag, DeleteFlag.NOT_DELETED.getCode());
|
||||
lambdaQueryWrapper.eq(SysUser::getDeleteFlag, DelFlag.NO.getCode());
|
||||
lambdaQueryWrapper.orderByDesc(SysUser::getUserId);
|
||||
return R.ok(sysUserMapper.selectPage(new Page<>(pageNum, pageSize), lambdaQueryWrapper));
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<result property="listClass" column="list_class"/>
|
||||
<result property="isDefault" column="is_default"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="pyStr" column="py_str"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
@@ -30,6 +31,7 @@
|
||||
list_class,
|
||||
is_default,
|
||||
status,
|
||||
py_str,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
@@ -56,6 +58,19 @@
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
<select id="selectDictDataByTypeWithSearch" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0'
|
||||
and dict_type = #{dictType}
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
and (
|
||||
(dict_label is not null and dict_label like concat('%', #{searchKey}, '%'))
|
||||
or (py_str is not null and py_str like concat('%', #{searchKey}, '%'))
|
||||
)
|
||||
</if>
|
||||
order by dict_sort asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDictLabel" resultType="String">
|
||||
select dict_label
|
||||
@@ -105,6 +120,7 @@
|
||||
<if test="listClass != null">list_class = #{listClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="pyStr !=null">pyStr = #{pyStr}</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = now()
|
||||
@@ -128,6 +144,7 @@
|
||||
<if test="listClass != null and listClass != ''">list_class,</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="pyStr !=null and pyStr !=null ''" >py_str,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
@@ -140,6 +157,7 @@
|
||||
<if test="listClass != null and listClass != ''">#{listClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="pyStr !=null and pyStr !=''" >{pystr},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
now()
|
||||
|
||||
@@ -174,6 +174,11 @@
|
||||
and rm.role_id = #{roleId}
|
||||
</select>
|
||||
|
||||
<select id="selectMenuByPath" parameterType="String" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
where path = #{path}
|
||||
</select>
|
||||
|
||||
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
where menu_id = #{menuId}
|
||||
|
||||
@@ -16,6 +16,17 @@
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring 配置 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -23,21 +34,18 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 领域-->
|
||||
<dependency>
|
||||
<groupId>com.openhis</groupId>
|
||||
<artifactId>openhis-domain</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- liteflow-->
|
||||
<dependency>
|
||||
<groupId>com.yomahub</groupId>
|
||||
<artifactId>liteflow-spring-boot-starter</artifactId>
|
||||
<version>2.12.4.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- junit-->
|
||||
@@ -46,15 +54,21 @@
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>2.0.43</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<!-- rabbitMQ -->
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -63,6 +77,7 @@
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
@@ -77,12 +92,22 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven-war-plugin.version}</version>
|
||||
<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>
|
||||
<version>3.13.0</version>
|
||||
<configuration>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.openhis.web.ybmanage.config.YbServiceConfig;
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
* @author system
|
||||
* @author system 1
|
||||
*/
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.core", "com.openhis"})
|
||||
@EnableConfigurationProperties(YbServiceConfig.class)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.quartz.task;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.core.framework.config.TenantContext;
|
||||
import com.openhis.web.inhospitalnursestation.appservice.IEncounterAutoRollAppService;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 自动滚方定时任务(每日执行)
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("AutoRollTask")
|
||||
public class AutoRollTask {
|
||||
|
||||
@Resource
|
||||
private IEncounterAutoRollAppService encounterAutoRollAppService;
|
||||
|
||||
/**
|
||||
* 护理费
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param orderPricing 医嘱定价来源 | 定时任务调用时传参
|
||||
*/
|
||||
public void autoRollNursingFee(Integer tenantId, String orderPricing) {
|
||||
// 设置当前线程的租户ID
|
||||
TenantContext.setCurrentTenant(tenantId);
|
||||
// 滚护理费
|
||||
encounterAutoRollAppService.autoRollNursingFee(tenantId, orderPricing);
|
||||
}
|
||||
|
||||
/**
|
||||
* 基础服务费 | 取暖费,床位费 等
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param orderPricing 医嘱定价来源 | 定时任务调用时传参
|
||||
*/
|
||||
public void autoRollBasicService(Integer tenantId, String orderPricing) {
|
||||
// 设置当前线程的租户ID
|
||||
TenantContext.setCurrentTenant(tenantId);
|
||||
// 滚基础服务费
|
||||
encounterAutoRollAppService.autoRollBasicService(tenantId, orderPricing);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.quartz.task;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.core.framework.config.TenantContext;
|
||||
import com.openhis.common.enums.AssignSeqEnum;
|
||||
import com.openhis.document.domain.DocInventoryItemStatic;
|
||||
import com.openhis.document.service.IDocInventoryItemStaticService;
|
||||
import com.openhis.web.inventorymanage.appservice.IProductDetailAppService;
|
||||
import com.openhis.web.inventorymanage.dto.ProductDetailPageDto;
|
||||
import com.openhis.web.inventorymanage.dto.ProductDetailSearchParam;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 库存备份定时任务(每日执行)
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-11-12
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("InventoryBackupTask")
|
||||
public class InventoryBackupTask {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(InventoryBackupTask.class);
|
||||
|
||||
@Resource
|
||||
private IProductDetailAppService productDetailAppService;
|
||||
|
||||
@Resource
|
||||
private IDocInventoryItemStaticService docInventoryItemStaticService;
|
||||
|
||||
@Resource
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
|
||||
private static final AtomicBoolean isRunning = new AtomicBoolean(false);
|
||||
|
||||
/**
|
||||
* 库存备份
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
*/
|
||||
public void inventoryBackup(Integer tenantId) {
|
||||
|
||||
// 添加执行锁,防止重复执行
|
||||
if (!isRunning.compareAndSet(false, true)) {
|
||||
logger.warn("库存备份任务正在执行中,跳过本次执行");
|
||||
return;
|
||||
}
|
||||
|
||||
// 定时任务指定租户id
|
||||
try {
|
||||
logger.info("库存备份START:{}", DateUtils.getNowDate());
|
||||
// 设置当前线程的租户ID
|
||||
TenantContext.setCurrentTenant(tenantId);
|
||||
String now = DateUtils.dateTime();
|
||||
// 查询当天是否已经执行过一次库存备份
|
||||
List<DocInventoryItemStatic> hisDocInventoryItemStaticList = docInventoryItemStaticService
|
||||
.list(new LambdaQueryWrapper<DocInventoryItemStatic>()
|
||||
.eq(DocInventoryItemStatic::getDeleteFlag, DelFlag.NO.getCode())
|
||||
.eq(DocInventoryItemStatic::getTenantId, tenantId))
|
||||
.stream().filter(item -> item.getBusNo() != null && item.getBusNo().length() >= 11
|
||||
&& now.equals(item.getBusNo().substring(3, 11)))
|
||||
.toList();
|
||||
if (!hisDocInventoryItemStaticList.isEmpty()) {
|
||||
logger.warn("库存备份任务已执行过,跳过本次执行");
|
||||
return;
|
||||
}
|
||||
// 生成备份编号
|
||||
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.AUTO_BACKUP_NO.getPrefix(), 2);
|
||||
// 获取库存商品明细
|
||||
Page<ProductDetailPageDto> productDetailPage = productDetailAppService
|
||||
.getProductDetailPage(new ProductDetailSearchParam(), 1, 9999, null, null).getData();
|
||||
List<DocInventoryItemStatic> docInventoryItemStaticList = new ArrayList<>();
|
||||
if (productDetailPage != null && productDetailPage.getTotal() > 0) {
|
||||
List<ProductDetailPageDto> productDetailList = productDetailPage.getRecords();
|
||||
for (ProductDetailPageDto productDetail : productDetailList) {
|
||||
DocInventoryItemStatic docInventoryItemStatic = new DocInventoryItemStatic();
|
||||
docInventoryItemStatic
|
||||
// 库存状态枚举
|
||||
.setInventoryStatusEnum(productDetail.getInventoryStatusEnum())
|
||||
// 备份编号
|
||||
.setBusNo(busNo)
|
||||
// 库存id
|
||||
.setInventoryId(productDetail.getInventoryId())
|
||||
// 医保等级
|
||||
.setChrgitmLv(productDetail.getChrgitmLv())
|
||||
// 耗材类型
|
||||
.setDevCategoryCode(productDetail.getDevCategoryCode())
|
||||
// 项目id
|
||||
.setItemId(productDetail.getItemId())
|
||||
// 项目名称
|
||||
.setName(productDetail.getItemName())
|
||||
// 项目编号
|
||||
.setItemNo(productDetail.getBusNo())
|
||||
// 药品类别
|
||||
.setMedCategoryCode(productDetail.getMedCategoryCode())
|
||||
// 项目所在表
|
||||
.setItemTable(productDetail.getItemTable())
|
||||
// 所在位置
|
||||
.setLocationId(productDetail.getLocationId())
|
||||
// 位置名称
|
||||
.setLocationName(productDetail.getLocationName())
|
||||
// 所在货位
|
||||
.setLocationStoreId(productDetail.getLocationStoreId())
|
||||
// 货位名称
|
||||
.setLocationStoreName(productDetail.getLocationStoreName())
|
||||
// 厂家
|
||||
.setManufacturerText(productDetail.getManufacturerText())
|
||||
// 最小单位
|
||||
.setMinUnitCode(productDetail.getMinUnitCode())
|
||||
// 拆零比
|
||||
.setPartPercent(productDetail.getPartPercent())
|
||||
// 采购价
|
||||
.setPrice(productDetail.getPurchasePrice())
|
||||
// 生产日期
|
||||
.setProductionDate(productDetail.getProductionDate())
|
||||
// 到期日期
|
||||
.setExpirationDate(productDetail.getExpirationDate())
|
||||
// 库存数量
|
||||
.setQuantity(productDetail.getQuantity())
|
||||
// 销售价
|
||||
.setSalePrice(productDetail.getSalePrice())
|
||||
// 采购总价
|
||||
.setTotalPrice(productDetail.getTotalPurchasePrice())
|
||||
// 销售总价
|
||||
.setTotalSalePrice(productDetail.getTotalSalePrice())
|
||||
// 规格
|
||||
.setTotalVolume(productDetail.getTotalVolume())
|
||||
// 单位
|
||||
.setUnitCode(productDetail.getUnitCode())
|
||||
// 五笔码
|
||||
.setWbStr(productDetail.getWbStr())
|
||||
// 拼音码
|
||||
.setPyStr(productDetail.getPyStr())
|
||||
// 供应商id
|
||||
.setSupplierId(productDetail.getSupplierId())
|
||||
// 供应商名称
|
||||
.setSupplierName(productDetail.getSupplierName())
|
||||
// 剩余过期天数
|
||||
.setRemainingDays(productDetail.getRemainingDays())
|
||||
// 包装数量(整数)
|
||||
.setNumber(productDetail.getNumber())
|
||||
// 包装数量(小数)
|
||||
.setRemainder(productDetail.getRemainder())
|
||||
// 医保码
|
||||
.setYbNo(productDetail.getYbNo())
|
||||
// 批准文号
|
||||
.setApprovalNumber(productDetail.getApprovalNumber())
|
||||
// 批次号
|
||||
.setLotNumber(productDetail.getLotNumber());
|
||||
docInventoryItemStatic.setTenantId(tenantId);
|
||||
docInventoryItemStaticList.add(docInventoryItemStatic);
|
||||
}
|
||||
docInventoryItemStaticService.saveBatch(docInventoryItemStaticList);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("库存备份失败:", e);
|
||||
} finally {
|
||||
// 清除线程局部变量,防止内存泄漏
|
||||
TenantContext.clear();
|
||||
// 释放执行锁
|
||||
isRunning.set(false);
|
||||
logger.info("库存备份END:{}", DateUtils.getNowDate());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.openhis.quartz.task;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.DateUtils;
|
||||
import com.openhis.web.inventorymanage.appservice.IProductStocktakingAppService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.core.framework.config.TenantContext;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.service.ILocationService;
|
||||
|
||||
/**
|
||||
* 批量盘点定时任务
|
||||
*
|
||||
* @author yuxj
|
||||
*/
|
||||
@Component("stocktakingBatchTask")
|
||||
public class StocktakingBatchTask {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(StocktakingBatchTask.class);
|
||||
@Resource
|
||||
IProductStocktakingAppService productStocktakingAppService;
|
||||
|
||||
public void autoStocktakingBatch(Integer tenantId) {
|
||||
// 定时任务指定租户id,示例
|
||||
try {
|
||||
// 在控制台打印当前时间加执行的功能名
|
||||
System.out.println("执行自动批量盘点START:" + DateUtils.getNowDate());
|
||||
logger.info("执行自动批量盘点START:" + DateUtils.getNowDate());
|
||||
|
||||
// 设置当前线程的租户ID
|
||||
TenantContext.setCurrentTenant(tenantId);
|
||||
//执行自动盘点
|
||||
productStocktakingAppService.autoStocktakingBatch();
|
||||
|
||||
logger.info("执行自动批量盘点END:" + DateUtils.getNowDate());
|
||||
// 在控制台打印当前时间加执行的功能名
|
||||
System.out.println("执行自动批量盘点END:" + DateUtils.getNowDate());
|
||||
} finally {
|
||||
// 清除线程局部变量,防止内存泄漏
|
||||
TenantContext.clear();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.openhis.web.Inspection.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.Device;
|
||||
import com.openhis.administration.domain.Instrument;
|
||||
import com.openhis.web.Inspection.dto.InstrumentSelParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/18 15:38
|
||||
*/
|
||||
public interface IInstrumentManageAppService {
|
||||
|
||||
|
||||
R<?> getManageInit();
|
||||
|
||||
|
||||
R<?> getInstrumentPage(InstrumentSelParam InstrumentSelParam, String searchKey, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
|
||||
R<?> updateOrAddInstrument(Instrument instrument);
|
||||
|
||||
R<?> getInstrumentOne(Long id);
|
||||
|
||||
R<?> editInstrumentStatus(List<Long> ids, Integer status);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.openhis.web.Inspection.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.Inspection.dto.ReportResultManageDto;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectManageDto;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectStatusRequest;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/16 15:36
|
||||
*/
|
||||
public interface ILaboratoryManageAppService {
|
||||
|
||||
R<?> getReportResultList(ReportResultManageDto reportResultManageDto, Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request);
|
||||
|
||||
|
||||
R<?> getReportById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.openhis.web.Inspection.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.Inspection.dto.LisConfigManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/29 16:00
|
||||
*/
|
||||
public interface ILisConfigManageAppService {
|
||||
|
||||
R<?> getDiseaseTreatmentPage(DiagnosisTreatmentSelParam DiagnosisTreatmentSelParam, String searchKey,
|
||||
Integer pageNo, Integer pageSize, HttpServletRequest request);
|
||||
|
||||
|
||||
R<?> getInfoList(String searchKey,String type);
|
||||
|
||||
R<?> getInfoDetail(Long id);
|
||||
|
||||
R<?> saveAll(LisConfigManageDto manageDto);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param patientId 患者id
|
||||
* @param ServiceId 服务id
|
||||
* @param itemId 检验项目id
|
||||
* @return
|
||||
*/
|
||||
R<?>createAll(Long patientId,Long ServiceId, Long itemId);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.openhis.web.Inspection.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.ObservationDefinition;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefSelParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/23 16:32
|
||||
*/
|
||||
public interface IObservationManageAppService {
|
||||
|
||||
R<?> getManageInit();
|
||||
|
||||
|
||||
R<?> getObservationDefPage(ObservationDefSelParam ObservationDefSelParam, String searchKey, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
|
||||
R<?> updateOrAddObservationDef(ObservationDefinition Observation);
|
||||
|
||||
R<?> getObservationDefOne(Long id);
|
||||
|
||||
R<?> editObservationDefStatus(List<Long> ids, Integer status);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.openhis.web.Inspection.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectManageDto;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectStatusRequest;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/16 15:36
|
||||
*/
|
||||
public interface ISampleCollectAppManageAppService {
|
||||
|
||||
R<?> getSampleCollectList(SampleCollectManageDto sampleCollectManageDto, Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request);
|
||||
|
||||
|
||||
R<?>updateSampleStatus(SampleCollectStatusRequest statusRequest);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.openhis.web.Inspection.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.SpecimenDefinition;
|
||||
import com.openhis.web.Inspection.dto.SpecimenDefSelParam;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/9 16:46
|
||||
*/
|
||||
public interface ISpecimenManageAppService {
|
||||
|
||||
|
||||
|
||||
R<?> getManageInit();
|
||||
|
||||
|
||||
R<?> getSpecimenPage(SpecimenDefSelParam specimenDefSelParam, String searchKey, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
|
||||
R<?> updateOrAddSpecimen(SpecimenDefinition specimenDefinition);
|
||||
|
||||
R<?> getSpecimenOne(Long id);
|
||||
|
||||
R<?> editSpecimenStatus(List<Long> ids,Integer status);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.openhis.web.Inspection.appservice.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.Instrument;
|
||||
import com.openhis.administration.mapper.InstrumentMapper;
|
||||
import com.openhis.administration.service.IInstrumentService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.InstrumentCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.Inspection.appservice.IInstrumentManageAppService;
|
||||
import com.openhis.web.Inspection.dto.InstrumentManageDto;
|
||||
import com.openhis.web.Inspection.dto.InstrumentManageInitDto;
|
||||
import com.openhis.web.Inspection.dto.InstrumentSelParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Description 仪器信息
|
||||
* @Author
|
||||
* @Date 2025/9/18
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class InstrumentManageAppServiceImpl implements IInstrumentManageAppService {
|
||||
|
||||
private final IInstrumentService instrumentService ;
|
||||
private final InstrumentMapper instrumentMapper ;
|
||||
|
||||
|
||||
@Override
|
||||
public R<?> getManageInit() {
|
||||
InstrumentManageInitDto instrumentManageInitDto = new InstrumentManageInitDto();
|
||||
// 获取状态
|
||||
List<InstrumentManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new InstrumentManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
instrumentManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
// 获取仪器种类
|
||||
List<InstrumentManageInitDto.InstrumentType> typeList = Stream.of(com.openhis.common.enums.InstrumentCategory.values())
|
||||
.map(status -> new InstrumentManageInitDto.InstrumentType(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
instrumentManageInitDto.setInstrumentTypeList(typeList);
|
||||
// 获取仪器状态
|
||||
List<InstrumentManageInitDto.InstrumentStatusEnumOption> InstrumentStatusEnumOptions = Stream.of(com.openhis.common.enums.InstrumentStatus.values())
|
||||
.map(status -> new InstrumentManageInitDto.InstrumentStatusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
instrumentManageInitDto.setInstrumentStatusEnumList(InstrumentStatusEnumOptions);
|
||||
|
||||
return R.ok(instrumentManageInitDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> getInstrumentPage(InstrumentSelParam InstrumentSelParam, String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
QueryWrapper<Instrument> queryWrapper = HisQueryUtils.buildQueryWrapper(InstrumentSelParam,
|
||||
searchKey, new HashSet<>(Arrays.asList( "instrument_name", "instrument_name")), request);
|
||||
Page<InstrumentManageDto> instrumentPage = HisPageUtils.selectPage(instrumentMapper, queryWrapper, pageNo, pageSize,InstrumentManageDto.class);
|
||||
instrumentPage.getRecords().forEach(instrumentManageDto -> {
|
||||
instrumentManageDto.setInstrumentTypeEnumText(EnumUtils.getInfoByValue(InstrumentCategory.class, instrumentManageDto.getInstrumentTypeEnum())) ;
|
||||
});
|
||||
|
||||
return R.ok(instrumentPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> updateOrAddInstrument(Instrument instrument) {
|
||||
instrumentService.saveOrUpdate( instrument);
|
||||
return R.ok();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> getInstrumentOne(Long id)
|
||||
{
|
||||
Instrument byId = instrumentService.getById(id);
|
||||
InstrumentManageDto dto = new InstrumentManageDto();
|
||||
BeanUtils.copyProperties(byId,dto);
|
||||
return R.ok(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> editInstrumentStatus(List<Long> ids, Integer status) {
|
||||
List<Instrument> instrumentList = new CopyOnWriteArrayList<>();
|
||||
for (Long detail : ids) {
|
||||
Instrument instrument = new Instrument();
|
||||
instrument.setId(detail);
|
||||
instrument.setUsageStatusEnum(status);
|
||||
instrumentList.add(instrument);
|
||||
}
|
||||
return instrumentService.updateBatchById(instrumentList) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"仪器信息"})) : R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.openhis.web.Inspection.appservice.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.Inspection.appservice.ILaboratoryManageAppService;
|
||||
import com.openhis.web.Inspection.dto.ReportResultManageDto;
|
||||
import com.openhis.web.Inspection.mapper.LisReportMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 样本采集
|
||||
* @Author
|
||||
* @Date 2025/10/16
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class LaboratoryManageAppService implements ILaboratoryManageAppService {
|
||||
|
||||
private final LisReportMapper reportMapper;
|
||||
@Override
|
||||
public R<?> getReportResultList(ReportResultManageDto reportResultManageDto, Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||
QueryWrapper<ReportResultManageDto> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(reportResultManageDto,
|
||||
searchKey, new HashSet<>(Arrays.asList( "patient_name", "charge_name")), request);
|
||||
IPage<ReportResultManageDto> reportResultList = reportMapper.getReportResultList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
Long total = reportMapper.getReportResultListTotal(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
reportResultList.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
});
|
||||
if(total == null){
|
||||
//总条数为null
|
||||
total = 0L;
|
||||
}
|
||||
reportResultList.setTotal(total);
|
||||
return R.ok(reportResultList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> getReportById(Long id) {
|
||||
//根据id查询所有观测值
|
||||
List<ReportResultManageDto> list = reportMapper.getReportListById(new QueryWrapper<ReportResultManageDto>().eq("id", id));
|
||||
//打印组件配置
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
package com.openhis.web.Inspection.appservice.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.administration.domain.Device;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.domain.ObservationDefinition;
|
||||
import com.openhis.administration.domain.SpecimenDefinition;
|
||||
import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
import com.openhis.administration.service.IDeviceService;
|
||||
import com.openhis.administration.service.IObservationDefinitionService;
|
||||
import com.openhis.administration.service.ISpecimenDefinitionService;
|
||||
import com.openhis.common.enums.SpecCollectStatus;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.lab.domain.*;
|
||||
import com.openhis.lab.mapper.ActivityDefDeviceDefMapper;
|
||||
import com.openhis.lab.mapper.ActivityDefObservationDefMapper;
|
||||
import com.openhis.lab.mapper.ActivityDefSpecimenDefMapper;
|
||||
import com.openhis.lab.service.IObservationService;
|
||||
import com.openhis.lab.service.ISpecimenService;
|
||||
import com.openhis.web.Inspection.appservice.ILisConfigManageAppService;
|
||||
import com.openhis.web.Inspection.dto.LisConfigManageDto;
|
||||
import com.openhis.web.Inspection.dto.LisConfigManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
import com.openhis.web.datadictionary.mapper.ActivityDefinitionManageMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.val;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/29
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class LisConfigManageAppServiceImpl implements ILisConfigManageAppService {
|
||||
|
||||
@Resource
|
||||
private ActivityDefinitionManageMapper activityDefinitionManageMapper;
|
||||
@Resource
|
||||
private ActivityDefDeviceDefMapper activityDefDeviceDefMapper;
|
||||
@Resource
|
||||
private ActivityDefObservationDefMapper activityDefObservationDefMapper;
|
||||
@Resource
|
||||
private ActivityDefSpecimenDefMapper activityDefSpecimenDefMapper;
|
||||
@Resource
|
||||
private IDeviceDefinitionService deviceDefinitionService;
|
||||
@Resource
|
||||
private ISpecimenDefinitionService specimenDefinitionService;
|
||||
@Resource
|
||||
private IObservationDefinitionService observationDefinitionService;
|
||||
@Resource
|
||||
private IObservationService observationService;
|
||||
@Resource
|
||||
private ISpecimenService specimenService;
|
||||
@Resource
|
||||
private IDeviceService deviceService;
|
||||
|
||||
|
||||
@Override
|
||||
public R<?> getDiseaseTreatmentPage(DiagnosisTreatmentSelParam DiagnosisTreatmentSelParam, String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<DiagnosisTreatmentDto> queryWrapper = HisQueryUtils.buildQueryWrapper(DiagnosisTreatmentSelParam,
|
||||
searchKey, new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
|
||||
// 分页查询
|
||||
IPage<DiagnosisTreatmentDto> diseaseTreatmentPage =
|
||||
activityDefinitionManageMapper.getDiseaseTreatmentPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
|
||||
|
||||
return R.ok(diseaseTreatmentPage);
|
||||
}
|
||||
|
||||
public R<?> getInfoList(String searchKey, String type) {
|
||||
LisConfigManageInitDto initDto = new LisConfigManageInitDto();
|
||||
initDto.setDeviceDefs(deviceDefinitionService.list());
|
||||
initDto.setObservationDefs(observationDefinitionService.list());
|
||||
initDto.setSpecimenDefs(specimenDefinitionService.list());
|
||||
if (searchKey == null || searchKey.isEmpty()) {
|
||||
// 如果searchKey为空,则查询所有
|
||||
return switch (type) {
|
||||
case "device" -> R.ok(deviceDefinitionService.list(new QueryWrapper<DeviceDefinition>().eq("status_enum",2)));
|
||||
case "observation" -> R.ok(observationDefinitionService.list(new QueryWrapper<ObservationDefinition>().eq("status_enum",2) ));
|
||||
case "specimen" -> R.ok(specimenDefinitionService.list(new QueryWrapper<SpecimenDefinition>().eq("status_enum",2)));
|
||||
default -> R.ok(initDto);
|
||||
};
|
||||
} else {
|
||||
// 如果searchKey不为空,则根据name模糊查询
|
||||
return switch (type) {
|
||||
case "device" ->
|
||||
R.ok(deviceDefinitionService.list((new QueryWrapper<DeviceDefinition>().like("name", searchKey).eq("status_enum",2))));
|
||||
case "observation" ->
|
||||
R.ok(observationDefinitionService.list((new QueryWrapper<ObservationDefinition>().like("name", searchKey).eq("status_enum",2))));
|
||||
case "specimen" ->
|
||||
R.ok(specimenDefinitionService.list((new QueryWrapper<SpecimenDefinition>().like("name", searchKey).eq("status_enum",2))));
|
||||
default -> R.ok();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public R<?> getInfoDetail(Long id) {
|
||||
LisConfigManageDto manageDto = new LisConfigManageDto();
|
||||
manageDto.setActivityDefDeviceDefs(activityDefDeviceDefMapper.selectList(new QueryWrapper<ActivityDefDeviceDef>().eq("activity_definition_id", id)));
|
||||
manageDto.setActivityDefObservationDefs(activityDefObservationDefMapper.selectList(new QueryWrapper<ActivityDefObservationDef>().eq("activity_definition_id", id)));
|
||||
manageDto.setActivityDefSpecimenDefs(activityDefSpecimenDefMapper.selectList(new QueryWrapper<ActivityDefSpecimenDef>().eq("activity_definition_id", id)));
|
||||
return R.ok(manageDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> saveAll(LisConfigManageDto manageDto) {
|
||||
//先全部删除项目下详情
|
||||
activityDefDeviceDefMapper.delete(new QueryWrapper<ActivityDefDeviceDef>().eq("activity_definition_id", manageDto.getId()));
|
||||
activityDefObservationDefMapper.delete(new QueryWrapper<ActivityDefObservationDef>().eq("activity_definition_id", manageDto.getId()));
|
||||
activityDefSpecimenDefMapper.delete(new QueryWrapper<ActivityDefSpecimenDef>().eq("activity_definition_id", manageDto.getId()));
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
// 根据ID查询【诊疗目录】详情
|
||||
DiagnosisTreatmentDto diseaseTreatmentOne = activityDefinitionManageMapper.getDiseaseTreatmentOne(manageDto.getId(), tenantId);
|
||||
manageDto.getActivityDefDeviceDefs().forEach(activityDefDeviceDef -> {
|
||||
activityDefDeviceDef.setActivityDefinitionId(manageDto.getId());
|
||||
activityDefDeviceDef.setActivityDefinitionName(diseaseTreatmentOne.getName());
|
||||
activityDefDeviceDefMapper.insert(activityDefDeviceDef);
|
||||
});
|
||||
manageDto.getActivityDefObservationDefs().forEach(activityDefObservationDef -> {
|
||||
activityDefObservationDef.setActivityDefinitionId(manageDto.getId());
|
||||
activityDefObservationDef.setActivityDefinitionName(diseaseTreatmentOne.getName());
|
||||
activityDefObservationDefMapper.insert(activityDefObservationDef);
|
||||
});
|
||||
manageDto.getActivityDefSpecimenDefs().forEach(activityDefSpecimenDef -> {
|
||||
activityDefSpecimenDef.setActivityDefinitionId(manageDto.getId());
|
||||
activityDefSpecimenDef.setActivityDefinitionName(diseaseTreatmentOne.getName());
|
||||
activityDefSpecimenDefMapper.insert(activityDefSpecimenDef);
|
||||
});
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> createAll(Long patientId,Long ServiceId, Long itemId) {
|
||||
// 根据ID查询检查项目详情
|
||||
List<ActivityDefDeviceDef> devices = activityDefDeviceDefMapper.selectList(new QueryWrapper<ActivityDefDeviceDef>().eq("activity_definition_id", itemId));
|
||||
List<ActivityDefObservationDef> observations= activityDefObservationDefMapper.selectList(new QueryWrapper<ActivityDefObservationDef>().eq("activity_definition_id", itemId));
|
||||
List<ActivityDefSpecimenDef> specimens = activityDefSpecimenDefMapper.selectList(new QueryWrapper<ActivityDefSpecimenDef>().eq("activity_definition_id", itemId));
|
||||
devices.forEach(activityDefDeviceDef -> {
|
||||
Device device = new Device();
|
||||
device.setDeviceDefId(activityDefDeviceDef.getDeviceDefinitionId());
|
||||
device.setName(activityDefDeviceDef.getDeviceDefinitionName());
|
||||
//TODO 器材实体待完善,生成器材请求
|
||||
|
||||
});
|
||||
observations.forEach(activityDefObservationDef -> {
|
||||
Observation observation = new Observation();
|
||||
//TODO 初始字段具体观测定义字段待完善
|
||||
observation.setPatientId(patientId);
|
||||
observation.setObservationDefinitionId(activityDefObservationDef.getObservationDefinitionId());
|
||||
observationService.save(observation);
|
||||
});
|
||||
specimens.forEach(activityDefSpecimenDef -> {
|
||||
Specimen specimen = new Specimen();
|
||||
//TODO 初始字段具体标本定义字段待完善
|
||||
specimen.setServiceId(ServiceId);
|
||||
specimen.setSpecimenDefinitionId(activityDefSpecimenDef.getSpecimenDefinitionId());
|
||||
specimen.setPatientId(patientId);
|
||||
specimen.setCollectionStatusEnum(SpecCollectStatus.PENDING.getValue());
|
||||
specimen.setSpecimenUnit(activityDefSpecimenDef.getSpecimenUnit());
|
||||
specimen.setSpecimenVolume(activityDefSpecimenDef.getSpecimenVolume());
|
||||
specimenService.save(specimen);
|
||||
});
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.openhis.web.Inspection.appservice.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.ObservationDefinition;
|
||||
import com.openhis.administration.mapper.ObservationDefinitionMapper;
|
||||
import com.openhis.administration.service.IInstrumentService;
|
||||
import com.openhis.administration.service.IObservationDefinitionService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.ObservationType;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.Inspection.appservice.IObservationManageAppService;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefManageDto;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefManageInitDto;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefSelParam;
|
||||
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/23
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class ObservationManageAppServiceImpl implements IObservationManageAppService
|
||||
{
|
||||
private final ObservationDefinitionMapper observationDefinitionMapper;
|
||||
|
||||
private final IObservationDefinitionService observationDefinitionService;
|
||||
|
||||
private final IInstrumentService instrumentService;
|
||||
|
||||
|
||||
@Override
|
||||
public R<?> getManageInit() {
|
||||
|
||||
ObservationDefManageInitDto observationDefManageInitDto = new ObservationDefManageInitDto();
|
||||
// 获取状态
|
||||
List<ObservationDefManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new ObservationDefManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
observationDefManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
//观测类型
|
||||
List<ObservationDefManageInitDto.ObservationTypeEnumOption> ObservationTypeEnumOptions = Stream.of(com.openhis.common.enums.ObservationType.values())
|
||||
.map(status -> new ObservationDefManageInitDto.ObservationTypeEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
observationDefManageInitDto.setObservationTypeList(ObservationTypeEnumOptions);
|
||||
//仪器列表
|
||||
List<ObservationDefManageInitDto.InstrumentEnumOption> InstrumentEnumOptions = instrumentService.list().stream()
|
||||
.map(status -> new ObservationDefManageInitDto.InstrumentEnumOption(status.getId(), status.getInstrumentName()))
|
||||
.collect(Collectors.toList());
|
||||
observationDefManageInitDto.setInstrumentEnumOptionList(InstrumentEnumOptions);
|
||||
return R.ok(observationDefManageInitDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> getObservationDefPage(ObservationDefSelParam ObservationDefSelParam, String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
QueryWrapper<ObservationDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(ObservationDefSelParam,
|
||||
searchKey, new HashSet<>(Arrays.asList( "name", "code")), request);
|
||||
Page<ObservationDefManageDto> ObservationPage = HisPageUtils.selectPage(observationDefinitionMapper, queryWrapper, pageNo, pageSize, ObservationDefManageDto.class);
|
||||
ObservationPage.getRecords().forEach(item -> {
|
||||
item.setInstrumentId_dictText(instrumentService.getById(item.getInstrumentId()).getInstrumentName());
|
||||
item.setStatusEnumText(EnumUtils.getInfoByValue(PublicationStatus.class, item.getStatusEnum()));
|
||||
item.setObservationTypeEnumText(EnumUtils.getInfoByValue(ObservationType.class, item.getObservationTypeEnum()));
|
||||
});
|
||||
|
||||
return R.ok(ObservationPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> updateOrAddObservationDef(ObservationDefinition Observation) {
|
||||
Observation.setDeleteFlag(DelFlag.NO.getCode());
|
||||
observationDefinitionService.saveOrUpdate(Observation);
|
||||
return R.ok(" 添加成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> getObservationDefOne(Long id) {
|
||||
ObservationDefinition observationDefinition = observationDefinitionService.getById(id);
|
||||
ObservationDefManageDto dto = new ObservationDefManageDto();
|
||||
BeanUtils.copyProperties(observationDefinition,dto);
|
||||
return R.ok(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> editObservationDefStatus(List<Long> ids, Integer status) {
|
||||
List<ObservationDefinition> observationDefinitionList = new CopyOnWriteArrayList<>();
|
||||
for (Long detail : ids) {
|
||||
ObservationDefinition observationDefinition = new ObservationDefinition();
|
||||
observationDefinition.setId(detail);
|
||||
observationDefinition.setStatusEnum(status);
|
||||
observationDefinitionList.add(observationDefinition);
|
||||
}
|
||||
return observationDefinitionService.updateBatchById(observationDefinitionList) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"观测信息"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package com.openhis.web.Inspection.appservice.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.enums.SpecCollectStatus;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.lab.domain.Specimen;
|
||||
import com.openhis.lab.service.ISpecimenService;
|
||||
import com.openhis.web.Inspection.appservice.ISampleCollectAppManageAppService;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectManageDto;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectStatusRequest;
|
||||
import com.openhis.web.Inspection.mapper.SampleCollectMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description 样本采集
|
||||
* @Author
|
||||
* @Date 2025/10/16
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class SampleCollectManageAppService implements ISampleCollectAppManageAppService {
|
||||
|
||||
private final SampleCollectMapper sampleCollectMapper;
|
||||
|
||||
private final ISpecimenService specimenService;
|
||||
|
||||
@Override
|
||||
public R<?> getSampleCollectList(SampleCollectManageDto sampleCollectManageDto, Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||
QueryWrapper<SampleCollectManageDto> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(sampleCollectManageDto,
|
||||
searchKey, new HashSet<>(Arrays.asList( "patient_name", "charge_name")), request);
|
||||
IPage<SampleCollectManageDto> sampleCollectList = sampleCollectMapper.getSampleCollectList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
Long total = sampleCollectMapper.getSampleCollectListTotal(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
sampleCollectList.getRecords().forEach(e -> {
|
||||
// 性别
|
||||
e.setGenderEnumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 采集状态
|
||||
e.setCollectionStatusEnumText(EnumUtils.getInfoByValue(SpecCollectStatus.class, e.getCollectionStatusEnum()));
|
||||
});
|
||||
if(total == null){
|
||||
//总条数为null
|
||||
total = 0L;
|
||||
}
|
||||
sampleCollectList.setTotal(total);
|
||||
return R.ok(sampleCollectList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> updateSampleStatus(SampleCollectStatusRequest statusRequest) {
|
||||
// 根据状态类型设置对应的状态值
|
||||
Integer status = switch (statusRequest.getType()) {
|
||||
case "待采集" -> SpecCollectStatus.PENDING.getValue();
|
||||
case "已采集" -> SpecCollectStatus.COLLECTED.getValue();
|
||||
case "已接收" -> SpecCollectStatus.RECEIVED.getValue();
|
||||
default -> 0;
|
||||
};
|
||||
|
||||
// 批量更新样本状态
|
||||
specimenService.listByIds(statusRequest.getIds()).forEach(specimen -> {
|
||||
Integer currentStatus = specimen.getCollectionStatusEnum(); // 获取当前样本状态
|
||||
// 如果传入状态是已接收,但当前状态是待采集,跳过更新
|
||||
if (Objects.equals(status, SpecCollectStatus.RECEIVED.getValue()) && Objects.equals(currentStatus, SpecCollectStatus.PENDING.getValue())) {
|
||||
return;
|
||||
}
|
||||
// 构建更新条件
|
||||
UpdateWrapper<Specimen> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.in("id", statusRequest.getIds()) // 设置批量更新的条件
|
||||
.set("collection_status_enum", status); // 设置更新的状态字段
|
||||
// 如果状态为已采集,且采集日期不为空,跳过采集日期的更新,仅更新状态
|
||||
if (Objects.equals(status, SpecCollectStatus.COLLECTED.getValue())) {
|
||||
if (specimen.getCollectionDate() == null) {
|
||||
// 如果采集日期为空,则设置当前日期
|
||||
updateWrapper.set("collection_date", new Date());
|
||||
}
|
||||
updateWrapper.set("received_date", null);
|
||||
} else if (Objects.equals(status, SpecCollectStatus.PENDING.getValue())) {
|
||||
updateWrapper.set("collection_date", null); // 清空采集日期
|
||||
} else if (Objects.equals(status, SpecCollectStatus.RECEIVED.getValue())) {
|
||||
updateWrapper.set("received_date", new Date());
|
||||
}
|
||||
// 执行更新
|
||||
specimenService.update(updateWrapper);
|
||||
});
|
||||
if (Objects.equals(status, SpecCollectStatus.RECEIVED.getValue())) {
|
||||
// TODO 接收样本后续逻辑
|
||||
System.err.println("接收样本后!!");
|
||||
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.openhis.web.Inspection.appservice.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.SpecimenDefinition;
|
||||
import com.openhis.administration.mapper.SpecimenDefinitionMapper;
|
||||
import com.openhis.administration.service.ISpecimenDefinitionService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.enums.SpecimenType;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.Inspection.appservice.ISpecimenManageAppService;
|
||||
import com.openhis.web.Inspection.dto.SpecimenDefManageDto;
|
||||
import com.openhis.web.Inspection.dto.SpecimenDefManageInitDto;
|
||||
import com.openhis.web.Inspection.dto.SpecimenDefSelParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author
|
||||
* @Date 2025/9/9
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SpecimenManageAppServiceImpl implements ISpecimenManageAppService {
|
||||
|
||||
private final SpecimenDefinitionMapper specimenDefinitionMapper;
|
||||
|
||||
private final ISpecimenDefinitionService specimenDefinitionService;
|
||||
@Override
|
||||
public R<?> getManageInit() {
|
||||
SpecimenDefManageInitDto specimenDefManageInitDto = new SpecimenDefManageInitDto();
|
||||
|
||||
// 获取状态
|
||||
List<SpecimenDefManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new SpecimenDefManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
specimenDefManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
// 获取录种类
|
||||
List<SpecimenDefManageInitDto.SpecimenType> typeList = Stream.of(SpecimenType.values())
|
||||
.map(status -> new SpecimenDefManageInitDto.SpecimenType(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
specimenDefManageInitDto.setSpecimenTypeList(typeList);
|
||||
|
||||
|
||||
return R.ok(specimenDefManageInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 样本目录查询
|
||||
* @param SpecimenDefSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 查询条件
|
||||
* @param pageSize 查询条件
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public R<?> getSpecimenPage(SpecimenDefSelParam SpecimenDefSelParam, String searchKey, Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
QueryWrapper<SpecimenDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(SpecimenDefSelParam,
|
||||
searchKey, new HashSet<>(Arrays.asList("custom_code", "specimen_name", "py_str", "wb_str")), request);
|
||||
Page<SpecimenDefManageDto> specimenPage = HisPageUtils.selectPage(specimenDefinitionMapper, queryWrapper, pageNo, pageSize, SpecimenDefManageDto.class);
|
||||
specimenPage.getRecords().forEach(specimenDefManageDto -> {
|
||||
specimenDefManageDto.setSpecimenTypeEnumText(EnumUtils.getInfoByValue(SpecimenType.class, specimenDefManageDto.getSpecimenTypeEnum())) ;
|
||||
specimenDefManageDto.setStatusEnumText(EnumUtils.getInfoByValue(PublicationStatus.class, specimenDefManageDto.getStatusEnum()));
|
||||
});
|
||||
return R.ok(specimenPage);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public R<?> updateOrAddSpecimen(SpecimenDefinition specimenDefinition) {
|
||||
specimenDefinitionService.saveOrUpdate(specimenDefinition);
|
||||
return R.ok(" 添加成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> getSpecimenOne(Long id) {
|
||||
SpecimenDefinition specimenDefinition = specimenDefinitionService.getById(id);
|
||||
return R.ok(specimenDefinition);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> editSpecimenStatus(List<Long> ids, Integer status) {
|
||||
List<SpecimenDefinition> specimenDefinitionList = new CopyOnWriteArrayList<>();
|
||||
for (Long detail : ids) {
|
||||
SpecimenDefinition specimenDefinition = new SpecimenDefinition();
|
||||
specimenDefinition.setId(detail);
|
||||
specimenDefinition.setStatusEnum(status);
|
||||
specimenDefinitionList.add(specimenDefinition);
|
||||
}
|
||||
return specimenDefinitionService.updateBatchById(specimenDefinitionList) ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[]{"样本信息"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.openhis.web.Inspection.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.Instrument;
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.web.Inspection.appservice.IInstrumentManageAppService;
|
||||
import com.openhis.web.Inspection.dto.InstrumentSelParam;
|
||||
import com.openhis.web.Inspection.dto.InstrumentStatusRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description 仪器器材信息
|
||||
* @Author
|
||||
* @Date 2025/9/18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/instrument")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class InstrumentController {
|
||||
|
||||
|
||||
private final IInstrumentManageAppService appService;
|
||||
|
||||
|
||||
@GetMapping("/init")
|
||||
public R<?> getDiseaseTreatmentInit() {
|
||||
return appService.getManageInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询样本类型分页列表
|
||||
*
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getInstrumentPage(InstrumentSelParam InstrumentSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return appService.getInstrumentPage(InstrumentSelParam,searchKey, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/information")
|
||||
public R<?> editInstrument(@Validated @RequestBody Instrument instrument) {
|
||||
instrument.setDeleteFlag(DelFlag.NO.getCode());
|
||||
|
||||
return appService.updateOrAddInstrument(instrument);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getInstrument(@RequestParam Long id) {
|
||||
return appService.getInstrumentOne(id);
|
||||
}
|
||||
|
||||
@PostMapping("/information-status")
|
||||
public R<?> updateInstrumentStatus( @RequestBody InstrumentStatusRequest InstrumentStatusRequest ) {
|
||||
//默认停用
|
||||
Integer status = PublicationStatus.RETIRED.getValue();
|
||||
if("启用".equals( InstrumentStatusRequest.getType())){
|
||||
status = PublicationStatus.ACTIVE.getValue();
|
||||
}
|
||||
return appService.editInstrumentStatus(InstrumentStatusRequest.getIds(),status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.openhis.web.Inspection.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.Inspection.appservice.ILaboratoryManageAppService;
|
||||
import com.openhis.web.Inspection.dto.ReportResultManageDto;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectManageDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description 检测中心相关
|
||||
* @Author
|
||||
* @Date 2025/10/24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/laboratory")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class LaboratoryController {
|
||||
private final ILaboratoryManageAppService appService;
|
||||
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getReportResultPage(ReportResultManageDto reportResultManageDto, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||
return appService.getReportResultList( reportResultManageDto, pageNo, pageSize, searchKey, request);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public R<?> getReportById(@PathVariable Long id) {
|
||||
// 调用 ReportService 获取报告数据
|
||||
return appService.getReportById(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.openhis.web.Inspection.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.Inspection.appservice.ILisConfigManageAppService;
|
||||
import com.openhis.web.Inspection.dto.LisConfigManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description 检验定义配置
|
||||
* @Author
|
||||
* @Date 2025/9/29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/lisConfig")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class LisConfigController {
|
||||
|
||||
|
||||
private ILisConfigManageAppService lisConfigManageAppService;
|
||||
|
||||
/**
|
||||
* @Description 获取检验项目列表
|
||||
* @Author
|
||||
* @Date 2025/9/29
|
||||
*/
|
||||
@RequestMapping("/init-page")
|
||||
public R<?> getDiseaseTreatmentList(DiagnosisTreatmentSelParam DiagnosisTreatmentSelParam, String searchKey,
|
||||
Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
return lisConfigManageAppService.getDiseaseTreatmentPage(DiagnosisTreatmentSelParam, searchKey, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据项目id获取详细
|
||||
* @return
|
||||
*/
|
||||
@GetMapping ("/info-detail")
|
||||
public R<?> getInfoDetail(Long id) {
|
||||
return lisConfigManageAppService.getInfoDetail(id);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping ("/init-list")
|
||||
public R<?> getInfoList(String searchKey,String type) {
|
||||
return lisConfigManageAppService.getInfoList(searchKey, type);
|
||||
|
||||
}
|
||||
/**
|
||||
* 修改检验配置
|
||||
* @param
|
||||
* @param manageDto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/saveAll")
|
||||
public R<?> saveInfo(@RequestBody LisConfigManageDto manageDto) {
|
||||
|
||||
return lisConfigManageAppService.saveAll(manageDto);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.openhis.web.Inspection.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.ObservationDefinition;
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.web.Inspection.appservice.IObservationManageAppService;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefSelParam;
|
||||
import com.openhis.web.Inspection.dto.ObservationDefStatusRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description 仪器器材信息
|
||||
* @Author
|
||||
* @Date 2025/9/18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/observation")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class ObservationDefController {
|
||||
|
||||
|
||||
private final IObservationManageAppService appService;
|
||||
|
||||
|
||||
@GetMapping("/init")
|
||||
public R<?> getTreatmentInit() {
|
||||
return appService.getManageInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询样本类型分页列表
|
||||
*
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getObservationPage(ObservationDefSelParam observationDefSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return appService.getObservationDefPage(observationDefSelParam,searchKey, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/information")
|
||||
public R<?> editObservation(@Validated @RequestBody ObservationDefinition observation) {
|
||||
observation.setDeleteFlag(DelFlag.NO.getCode());
|
||||
|
||||
return appService.updateOrAddObservationDef(observation);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getObservation(@RequestParam Long id) {
|
||||
return appService.getObservationDefOne(id);
|
||||
}
|
||||
|
||||
@PostMapping("/information-status")
|
||||
public R<?> updateObservationStatus( @RequestBody ObservationDefStatusRequest observationDefStatusRequest) {
|
||||
//默认停用
|
||||
Integer status = PublicationStatus.RETIRED.getValue();
|
||||
if("启用".equals( observationDefStatusRequest.getType())){
|
||||
status = PublicationStatus.ACTIVE.getValue();
|
||||
}
|
||||
return appService.editObservationDefStatus(observationDefStatusRequest.getIds(),status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.openhis.web.Inspection.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.web.Inspection.appservice.ISampleCollectAppManageAppService;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectManageDto;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectStatusRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description 样本采集
|
||||
* @Author
|
||||
* @Date 2025/10/16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/collection")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class SampleCollectController {
|
||||
|
||||
private final ISampleCollectAppManageAppService appService;
|
||||
|
||||
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getSampleCollectPage(SampleCollectManageDto sampleCollectManageDto,@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||
return appService.getSampleCollectList( sampleCollectManageDto, pageNo, pageSize, searchKey, request);
|
||||
}
|
||||
|
||||
@PostMapping("/information-status")
|
||||
public R<?> editSampleCollectStatus(@RequestBody SampleCollectStatusRequest statusRequest) {
|
||||
return appService.updateSampleStatus(statusRequest);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.openhis.web.Inspection.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.SpecimenDefinition;
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.web.Inspection.appservice.ISpecimenManageAppService;
|
||||
import com.openhis.web.Inspection.dto.SpecimenDefSelParam;
|
||||
import com.openhis.web.Inspection.dto.SpecimenDefStatusRequest;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description 样本定义相关
|
||||
* @Author
|
||||
* @Date 2025/9/9
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inspection/specimen")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class SpecimenDefController {
|
||||
|
||||
private final ISpecimenManageAppService specimenManageAppService;
|
||||
|
||||
|
||||
@GetMapping("/init")
|
||||
public R<?> getDiseaseTreatmentInit() {
|
||||
return specimenManageAppService.getManageInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询样本类型分页列表
|
||||
*
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getSpecimenPage(SpecimenDefSelParam specimenDefSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return specimenManageAppService.getSpecimenPage(specimenDefSelParam,searchKey, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/information")
|
||||
public R<?> editSpecimen(@Validated @RequestBody SpecimenDefinition specimenDefinition) {
|
||||
specimenDefinition.setStatusEnum( PublicationStatus.ACTIVE.getValue());
|
||||
specimenDefinition.setDeleteFlag(DelFlag.NO.getCode());
|
||||
return specimenManageAppService.updateOrAddSpecimen(specimenDefinition);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/information-one")
|
||||
public R<?> getSpecimen(@RequestParam Long id) {
|
||||
return specimenManageAppService.getSpecimenOne(id);
|
||||
}
|
||||
|
||||
@PostMapping("/information-status")
|
||||
public R<?> updateSpecimenStatus( @RequestBody SpecimenDefStatusRequest specimenDefStatusRequest) {
|
||||
//默认停用
|
||||
Integer status = PublicationStatus.RETIRED.getValue();
|
||||
if("启用".equals( specimenDefStatusRequest.getType())){
|
||||
status = PublicationStatus.ACTIVE.getValue();
|
||||
}
|
||||
return specimenManageAppService.editSpecimenStatus(specimenDefStatusRequest.getIds(),status);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description 分页返回
|
||||
* @Author
|
||||
* @Date 2025/9/17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InstrumentManageDto {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 仪器编号,唯一且不能为空 */
|
||||
private String instrumentCode;
|
||||
|
||||
/** 仪器名称,必填项 */
|
||||
private String instrumentName;
|
||||
|
||||
/** 仪器主编号 */
|
||||
private String instrumentMainCode;
|
||||
|
||||
/** 仪器类型,选择项 */
|
||||
private Integer instrumentTypeEnum;
|
||||
private String instrumentTypeEnumText;
|
||||
|
||||
/** 仪器型号 */
|
||||
private String instrumentModel;
|
||||
|
||||
/** 生产厂家 */
|
||||
private String manufacturer;
|
||||
|
||||
/** 仪器序列号 */
|
||||
private String serialNumber;
|
||||
|
||||
/** 购买公司 */
|
||||
private String purchasingCompany;
|
||||
|
||||
/** 联系人员 */
|
||||
private String contactPerson;
|
||||
|
||||
/** 购买日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date purchaseDate;
|
||||
|
||||
/** 原价格 */
|
||||
private BigDecimal originalPrice;
|
||||
|
||||
/** 成交价格 */
|
||||
private BigDecimal transactionPrice;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
/** 安装日期 */
|
||||
private Date installationDate;
|
||||
|
||||
/** 安装人员 */
|
||||
private String installationPerson;
|
||||
|
||||
/** 维护人员 */
|
||||
private String maintenancePerson;
|
||||
|
||||
/** 所属科室 */
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
|
||||
/** 鉴定人员 */
|
||||
private String identificationPerson;
|
||||
|
||||
/** 记录温度 */
|
||||
private String recordedTemperature;
|
||||
|
||||
/** 仪器附件 */
|
||||
private String accessories;
|
||||
|
||||
/** 仪器状态 */
|
||||
private Integer instrumentStatusEnum;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
/** 报损日期 */
|
||||
private Date damageReportDate;
|
||||
|
||||
/** 可复查仪器 是否 */
|
||||
private Integer recheckableInstrumentEnum;
|
||||
|
||||
/** 使用状态,是否 */
|
||||
private Integer usageStatusEnum;
|
||||
|
||||
/** 停用原因 */
|
||||
private String decommissionReason;
|
||||
|
||||
/** 备注 */
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author
|
||||
* @date
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InstrumentManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<InstrumentType> InstrumentTypeList;
|
||||
private List<InstrumentStatusEnumOption> InstrumentStatusEnumList;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class InstrumentStatusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
public InstrumentStatusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class InstrumentType {
|
||||
private Integer value;
|
||||
private String info;
|
||||
public InstrumentType(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 样本定义分页检索条件
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InstrumentSelParam {
|
||||
|
||||
/** 仪器类型 */
|
||||
private Integer instrumentTypeEnum;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/18
|
||||
*/
|
||||
@Data
|
||||
public class InstrumentStatusRequest {
|
||||
private List<Long> ids;
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.lab.domain.ActivityDefDeviceDef;
|
||||
import com.openhis.lab.domain.ActivityDefObservationDef;
|
||||
import com.openhis.lab.domain.ActivityDefSpecimenDef;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/30
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class LisConfigManageDto {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
private List<ActivityDefDeviceDef> activityDefDeviceDefs;
|
||||
|
||||
private List<ActivityDefObservationDef> activityDefObservationDefs;
|
||||
|
||||
private List<ActivityDefSpecimenDef> activityDefSpecimenDefs;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.domain.ObservationDefinition;
|
||||
import com.openhis.administration.domain.SpecimenDefinition;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/10
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class LisConfigManageInitDto {
|
||||
|
||||
private List <DeviceDefinition> deviceDefs;
|
||||
|
||||
private List<ObservationDefinition> observationDefs;
|
||||
|
||||
private List<SpecimenDefinition> specimenDefs;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description 分页返回
|
||||
* @Author
|
||||
* @Date 2025/9/17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ObservationDefManageDto {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
|
||||
/** 观测名称,用于标识观测的具体名称 */
|
||||
private String name;
|
||||
|
||||
/** 观测代码,用于唯一标识一个观测项 */
|
||||
private String code;
|
||||
|
||||
/** 观测类型,例如:实验室、临床症状等 */
|
||||
private Integer observationTypeEnum;
|
||||
private String observationTypeEnumText;
|
||||
|
||||
/** 参考范围,例如:3.0-6.0 mg/dL,用于指示正常范围 */
|
||||
private String referenceRange;
|
||||
|
||||
@Dict(dictTable = "adm_instrument", dictCode = "id", dictText = "instrument_name")
|
||||
/** 观测仪器id */
|
||||
private Long instrumentId;
|
||||
private String instrumentId_dictText;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private String statusEnumText;
|
||||
|
||||
/** 删除状态) */
|
||||
private String deleteFlag;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author
|
||||
* @date
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ObservationDefManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<ObservationTypeEnumOption> ObservationTypeList;
|
||||
private List<InstrumentEnumOption> instrumentEnumOptionList;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ObservationTypeEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
public ObservationTypeEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
@Data
|
||||
public static class InstrumentEnumOption {
|
||||
private Long value;
|
||||
private String info;
|
||||
public InstrumentEnumOption(Long value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 样本定义分页检索条件
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ObservationDefSelParam {
|
||||
|
||||
/** 类型 */
|
||||
private Integer observationTypeEnum;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/18
|
||||
*/
|
||||
@Data
|
||||
public class ObservationDefStatusRequest {
|
||||
private List<Long> ids;
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/17
|
||||
*/
|
||||
@Data
|
||||
public class ReportResultManageDto {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
private String patientName; // 患者名称
|
||||
private String chargeName; // 项目名称
|
||||
private String specimenName; // 样本名称
|
||||
private String doctorName; // 开单医生
|
||||
private String observationName;//观测定义名称
|
||||
private String observationResult; // 观测结果
|
||||
private String referenceRange; // 参考范围
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String observationDate;//观测时间
|
||||
private Integer genderEnum; // 性别
|
||||
private String genderEnumText;// 性别文本
|
||||
private String technicianName;// 检查人员
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String authoredTime; // 开单时间
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import com.core.common.core.domain.entity.SysMenu;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/17
|
||||
*/
|
||||
@Data
|
||||
public class SampleCollectManageDto {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
private String patientName; // 患者名称
|
||||
private String chargeName; // 项目名称
|
||||
private String specimenName; // 样本名称
|
||||
private String doctorName; // 开单医生
|
||||
|
||||
private Integer specimenVolume; //样本量
|
||||
private String specimenUnit; //样本单位
|
||||
|
||||
private Integer genderEnum; // 性别
|
||||
private String genderEnumText;// 性别文本
|
||||
|
||||
private Integer collectionStatusEnum;//采集状态
|
||||
private String collectionStatusEnumText; // 采集状态文本
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date collectionDate; // 采集时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date receivedDate; // 接收时间
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String authoredTime; // 开单时间
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/23
|
||||
*/
|
||||
@Data
|
||||
public class SampleCollectStatusRequest {
|
||||
private List<Long> ids;
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description 分页返回
|
||||
* @Author
|
||||
* @Date 2025/9/17
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SpecimenDefManageDto {
|
||||
/** $column.columnComment */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 样本类型 */
|
||||
private Integer specimenTypeEnum;
|
||||
private String specimenTypeEnumText;
|
||||
|
||||
/** 样本名称 */
|
||||
private String specimenName;
|
||||
|
||||
/** 自定义码 */
|
||||
private String customCode;
|
||||
|
||||
/** 类型顺序 */
|
||||
private Integer typeOrder;
|
||||
|
||||
/** 外部代码 */
|
||||
private String externalCode;
|
||||
|
||||
/** 序号 */
|
||||
private Integer serialNumber;
|
||||
|
||||
/** 全网型 */
|
||||
private String globalType;
|
||||
|
||||
/** 拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔 */
|
||||
private String wbStr;
|
||||
|
||||
/** 样本类 */
|
||||
private String specimenClass;
|
||||
|
||||
/** 扩展类型 */
|
||||
private String extendedType;
|
||||
|
||||
/** WHONET代码 */
|
||||
private String whonetCode;
|
||||
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private String statusEnumText;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author
|
||||
* @date
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SpecimenDefManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<SpecimenType> SpecimenTypeList;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SpecimenType {
|
||||
private Integer value;
|
||||
private String info;
|
||||
List<SpecimenType> children = new ArrayList<>();
|
||||
|
||||
public SpecimenType(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 样本定义分页检索条件
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class SpecimenDefSelParam {
|
||||
|
||||
/** 样本类型 */
|
||||
private Integer specimenTypeEnum;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/9/18
|
||||
*/
|
||||
@Data
|
||||
public class SpecimenDefStatusRequest {
|
||||
private List<Long> ids;
|
||||
private String type;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.openhis.web.Inspection.mapper;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/24 16:40
|
||||
*/
|
||||
public interface GroupRecMapper {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.openhis.web.Inspection.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.Inspection.dto.ReportResultManageDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/11/5 9:36
|
||||
*/
|
||||
@Mapper
|
||||
public interface LisReportMapper {
|
||||
|
||||
IPage<ReportResultManageDto> getReportResultList(@Param("page") Page<ReportResultManageDto> page, @Param(Constants.WRAPPER) QueryWrapper<ReportResultManageDto> queryWrapper);
|
||||
|
||||
Long getReportResultListTotal (@Param("page")Page<ReportResultManageDto> page, @Param(Constants.WRAPPER) QueryWrapper<ReportResultManageDto> queryWrapper);
|
||||
List<ReportResultManageDto> getReportListById(@Param(Constants.WRAPPER) QueryWrapper<ReportResultManageDto> queryWrapper);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.openhis.web.Inspection.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.Inspection.dto.SampleCollectManageDto;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* @Author
|
||||
* @Date 2025/10/17 11:27
|
||||
*/
|
||||
@Mapper
|
||||
public interface SampleCollectMapper {
|
||||
IPage<SampleCollectManageDto> getSampleCollectList(@Param("page")Page<SampleCollectManageDto> page, @Param(Constants.WRAPPER) QueryWrapper<SampleCollectManageDto> queryWrapper);
|
||||
|
||||
|
||||
Long getSampleCollectListTotal (@Param("page")Page<SampleCollectManageDto> page, @Param(Constants.WRAPPER) QueryWrapper<SampleCollectManageDto> queryWrapper);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
package com.openhis.web.adjustprice.appservice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||
|
||||
/**
|
||||
* Desc: 调价业务接口
|
||||
*
|
||||
* @Author raymond
|
||||
* @Date 08:42 2025/10/16
|
||||
* @return
|
||||
**/
|
||||
public interface IAdjustPriceService {
|
||||
/**
|
||||
* Desc: 保存调价数据
|
||||
*
|
||||
* @param dataVoList 前端数据集合
|
||||
* @Author raymond
|
||||
* @Date 08:57 2025/10/16
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> submitChangePriceData(List<AdjustPriceDataVo> dataVoList);
|
||||
|
||||
/**
|
||||
* Desc: 保存并提交审核调价数据
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 16:22 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> submitExamineChangePriceData(List<AdjustPriceDataVo> dataVoList);
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||
*
|
||||
* @param searchKey
|
||||
* @Author raymond
|
||||
* @Date 09:32 2025/10/20
|
||||
* @return java.util.List<?>
|
||||
**/
|
||||
R<?> searchKeyWordDataListByMed(String searchKey);
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||
*
|
||||
* @param searchKey
|
||||
* @Author raymond
|
||||
* @Date 09:32 2025/10/20
|
||||
* @return java.util.List<?>
|
||||
**/
|
||||
R<?> searchKeyWordDataListByDevice(String searchKey);
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词查询 药品|耗材|诊疗 集合的最后价格
|
||||
*
|
||||
* @param searchKey
|
||||
* @Author raymond
|
||||
* @Date 09:32 2025/10/20
|
||||
* @return java.util.List<?>
|
||||
**/
|
||||
R<?> searchKeyWordDataListByActivity(String searchKey);
|
||||
|
||||
/**
|
||||
* Desc: 查询提交的改价数据
|
||||
*
|
||||
* @param adjustPriceManagerSearchParam
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param searchKey
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 23:39 2025/11/1
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam, Integer pageNo,
|
||||
Integer pageSize, String searchKey, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 med
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByMed(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 med
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByDevice(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 Activity
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByActivity(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据busNo 查询调价单详情 Health
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 13:15 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchChangePriceDataByHealth(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 修改调价原因 和 价格
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 15:21 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> cancelChangePriceData(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 查询有挂号信息的科室
|
||||
*
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 16:38 2025/10/22
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchAllOrgData();
|
||||
|
||||
/**
|
||||
* Desc: 根据科室id 加载挂号数据
|
||||
*
|
||||
* @param orgId
|
||||
* @Author raymond
|
||||
* @Date 16:45 2025/10/22
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> searchHealthData(Long orgId);
|
||||
|
||||
/**
|
||||
* Desc: 根据业务单据号 进行单据提交操作
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 09:25 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> updateExamineByApproval(String busNo);
|
||||
|
||||
/**
|
||||
* Desc: 根据药品ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkMedApprovalExist(Long itemId);
|
||||
|
||||
/**
|
||||
* Desc: 根据耗材ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkDeviceApprovalExist(Long itemId);
|
||||
|
||||
/**
|
||||
* Desc: 根据诊疗ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkActivityApprovalExist(Long itemId);
|
||||
|
||||
/**
|
||||
* Desc: 根据挂号ID 是否在审核中
|
||||
*
|
||||
* @param itemId
|
||||
* @Author raymond
|
||||
* @Date 17:48 2025/11/3
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
R<?> checkHealthApprovalExist(Long itemId);
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.openhis.web.adjustprice.appservice;
|
||||
|
||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* @Author raymond
|
||||
* @Date 16:09 2025/10/15
|
||||
* @return
|
||||
**/
|
||||
public interface ISupplyService {
|
||||
/**
|
||||
* Desc:
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 17:10 2025/10/15
|
||||
* @return java.util.List<com.openhis.web.paymentmanage.dto.SupplyListDto>
|
||||
**/
|
||||
List<SupplyListDto> searchAllSupplyList();
|
||||
}
|
||||
@@ -0,0 +1,594 @@
|
||||
package com.openhis.web.adjustprice.appservice.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.core.domain.entity.SysDictData;
|
||||
import com.core.common.enums.AdjustPriceEnum;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.system.service.ISysDictDataService;
|
||||
import com.openhis.administration.domain.ChangePriceRecord;
|
||||
import com.openhis.administration.dto.ChangePriceDataDto;
|
||||
import com.openhis.administration.dto.ChargeItemDefDetailPriceDto;
|
||||
import com.openhis.administration.dto.HealthcareDto;
|
||||
import com.openhis.administration.dto.OrgDataDto;
|
||||
import com.openhis.administration.service.*;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.common.utils.RedisKeys;
|
||||
import com.openhis.common.utils.RedisUtil;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||
import com.openhis.web.adjustprice.dto.ChangePricePageDto;
|
||||
import com.openhis.web.adjustprice.mapper.AdjustPriceMapper;
|
||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||
import com.openhis.workflow.dto.ActivityDto;
|
||||
import com.openhis.workflow.dto.AdjustPriceDto;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
import com.openhis.workflow.service.IInventoryItemService;
|
||||
|
||||
/**
|
||||
* @ClassName AdjustPriceServiceImpl
|
||||
* @Description 调价业务实现
|
||||
* @Author raymond
|
||||
* @Date 2025/10/15 16:10
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Service
|
||||
public class AdjustPriceServiceImpl implements IAdjustPriceService {
|
||||
@Resource
|
||||
private IInventoryItemService inventoryItemService;
|
||||
@Resource
|
||||
private IActivityDefinitionService activityDefinitionService;
|
||||
@Resource
|
||||
private IHealthcareServiceService healthcareServiceService;
|
||||
@Resource
|
||||
private IMedicationService medicationService;
|
||||
@Resource
|
||||
private AdjustPriceMapper adjustPriceMapper;
|
||||
@Resource
|
||||
private IDeviceDefinitionService deviceDefinitionService;
|
||||
@Resource
|
||||
private IOrganizationService organizationService;
|
||||
@Resource
|
||||
private IChargeItemDefinitionService chargeItemDefinitionService;
|
||||
@Resource
|
||||
private IChangePriceRecordService changePriceRecordService;
|
||||
@Resource
|
||||
private ISysDictDataService sysDictDataService;
|
||||
@Resource
|
||||
private AssignSeqUtil assignSeqUtil;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public R<?> submitChangePriceData(List<AdjustPriceDataVo> dataVoList) {
|
||||
if (dataVoList.isEmpty()) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00001, null));
|
||||
}
|
||||
if (dataVoList.stream()
|
||||
.anyMatch(data -> this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString())))) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
//获取数据中的类型
|
||||
Integer categoryType = dataVoList.get(0).getCategoryType();
|
||||
// 单据号
|
||||
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||
// 当前人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
// 根据表单提交的tab 进入不同的 execute
|
||||
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||
//如果是 药品或者是耗材 因为药品和耗材的价格取的是 charge_detail表
|
||||
this.executeChangePriceForMedication(dataVoList, busNo, practitionerId, categoryType);
|
||||
} else if (AdjustPriceEnum.DIAGNOSIS.getCode().equals(categoryType)) {
|
||||
//如果是 如果是 诊疗, 取价格主表
|
||||
this.executeChangePriceForActivity(dataVoList, busNo, practitionerId);
|
||||
} else {
|
||||
//如果是 如果是 挂号, 取价格主表
|
||||
this.executeChangePriceForHealth(dataVoList, busNo, practitionerId);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> submitExamineChangePriceData(List<AdjustPriceDataVo> dataVoList) {
|
||||
if (dataVoList.isEmpty()) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00001, null));
|
||||
}
|
||||
if (dataVoList.stream()
|
||||
.anyMatch(data -> this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString())))) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
//获取数据中的类型
|
||||
Integer categoryType = dataVoList.get(0).getCategoryType();
|
||||
// 单据号
|
||||
String busNo = assignSeqUtil.getSeqByDay(AssignSeqEnum.CHANGE_PRICE_BUZ.getPrefix());
|
||||
// 当前人
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
// 根据表单提交的tab 进入不同的 execute
|
||||
if (AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
|| AdjustPriceEnum.CONSUMABLES.getCode().equals(categoryType)) {
|
||||
this.executeChangePriceForMedicationExamine(dataVoList, busNo, practitionerId, categoryType);
|
||||
} else if (AdjustPriceEnum.DIAGNOSIS.getCode().equals(categoryType)) {
|
||||
this.executeChangePriceForActivityExamine(dataVoList, busNo, practitionerId);
|
||||
} else {
|
||||
this.executeChangePriceForHealthExamine(dataVoList, busNo, practitionerId);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchKeyWordDataListByMed(String searchKey) {
|
||||
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||
return R.ok(this.medicationService.searchMedListByKeyWord(searchKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchKeyWordDataListByDevice(String searchKey) {
|
||||
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||
return R.ok(this.deviceDefinitionService.searchDeviceListByKeyWord(searchKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchKeyWordDataListByActivity(String searchKey) {
|
||||
//如果 searchKey == null 默认返回10条,反则 查询所有
|
||||
return R.ok(this.activityDefinitionService.searchActivityListByKeyWord(searchKey));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceSubmitDataToPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam,
|
||||
Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
HashSet<String> searchFields = new HashSet<>();
|
||||
searchFields.add(CommonConstants.FieldName.BusNo);
|
||||
// 构建查询条件
|
||||
QueryWrapper<InventorySearchParam> queryWrapper =
|
||||
HisQueryUtils.buildQueryWrapper(adjustPriceManagerSearchParam, searchKey, searchFields, request);
|
||||
// 查询入库单据分页列表
|
||||
Page<ChangePricePageDto> changePricePageDtoPage = this.adjustPriceMapper.searchChangePriceDataToPage(
|
||||
new Page<>(pageNo, pageSize), queryWrapper, SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(),
|
||||
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(),
|
||||
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), practitionerId);
|
||||
changePricePageDtoPage.getRecords().forEach(e -> {
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(SupplyStatus.class, e.getStatusEnum()));
|
||||
e.setCategoryEnum_enumText(EnumUtils.getInfoByValue(SupplyType.class, e.getItemCategoryEnum()));
|
||||
});
|
||||
return R.ok(changePricePageDtoPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByMed(String busNo) {
|
||||
// 根据 单据号 查询 药品详情
|
||||
List<ChangePriceDataDto> dataList = this.changePriceRecordService.searchMedChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(), null);
|
||||
// 获取 药品的单位
|
||||
for (ChangePriceDataDto changePriceDataDto : dataList) {
|
||||
SysDictData sysDictData =
|
||||
sysDictDataService.selectDictInfo(CommonConstants.FieldName.UnitCode, changePriceDataDto.getUnitCode());
|
||||
changePriceDataDto.setLabel(sysDictData.getDictLabel());
|
||||
}
|
||||
return R.ok(dataList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByDevice(String busNo) {
|
||||
//根据 单据号 耗材调价单详情
|
||||
return R.ok(this.changePriceRecordService.searchDeviceChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByActivity(String busNo) {
|
||||
//根据 单据号 查询 诊疗调价单详情
|
||||
return R.ok(this.changePriceRecordService.searchActivityChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(), null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchChangePriceDataByHealth(String busNo) {
|
||||
//根据 单据号 挂号调价单详情
|
||||
return R.ok(this.changePriceRecordService.searchHealthChangePriceByBusNo(busNo,
|
||||
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> cancelChangePriceData(String busNo) {
|
||||
//根据 单据号查询出 当前所有请求调价的数据集
|
||||
List<ChangePriceRecord> changePriceRecordList =
|
||||
this.changePriceRecordService.searchChangePriceDataForBusNo(busNo);
|
||||
//循环数据集合,将状态修改为 无效状态
|
||||
for (ChangePriceRecord data : changePriceRecordList) {
|
||||
ChangePriceRecord changePriceRecord = this.changePriceRecordService.getById(data.getId());
|
||||
changePriceRecord.setStatusEnum(SupplyStatus.EXPIRED_INVALIDATED.getValue());
|
||||
this.changePriceRecordService.updateById(changePriceRecord);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchAllOrgData() {
|
||||
//查询所有科室
|
||||
List<OrgDataDto> orgDataList = this.organizationService.searchOrgDataByHealth();
|
||||
return R.ok(orgDataList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> searchHealthData(Long orgId) {
|
||||
//根据科室ID 查询所有号源
|
||||
return R.ok(this.healthcareServiceService.searchAllHeathData(orgId,PublicationStatus.ACTIVE.getValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> updateExamineByApproval(String busNo) {
|
||||
//根据调价单编号 查询 分组后的 数据
|
||||
List<ChangePriceRecord> changePriceRecordList =
|
||||
this.changePriceRecordService.searchChangePriceDataGroupByBusNo(busNo);
|
||||
if (!changePriceRecordList.isEmpty()) {
|
||||
// 循环将数据进行填充
|
||||
for (ChangePriceRecord data : changePriceRecordList) {
|
||||
//提交 审批时,查看是否有正在审核中的 货品数据 。根据 货品ID 从redis中查询
|
||||
if (this.redisUtil.hasKey(RedisKeys.getProductsKey(data.getItemId().toString()))) {
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
//如果不存在,向redis中插入 药品信息 = 给当前 货品上锁 。审批通过或驳回后 释放
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//根据 busNo 修改调价单状态
|
||||
this.changePriceRecordService.submitApproval(busNo);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkMedApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchMedChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkDeviceApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchDeviceChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkActivityApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchActivityChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> checkHealthApprovalExist(Long itemId) {
|
||||
//添加 货品调价时,先查询 当前货品是否在 审核中,如果在,不允许改价。
|
||||
return this.changePriceRecordService.searchHealthChangePriceByItemId(itemId,
|
||||
SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue(), SupplyStatus.APPROVAL.getValue()).isEmpty() ? R.ok()
|
||||
: R.fail(MessageUtils.createMessage(PromptMsgConstant.AdjustPrice.M00002, null));
|
||||
}
|
||||
|
||||
public boolean executeChangePriceForMedication(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId, Integer categoryType) {
|
||||
// 有库存的药品或耗材集合
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
// 从map中将表单集合取出
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
//根据表单中的id数组 加载库存集合
|
||||
List<AdjustPriceDto> inventoryItemList =
|
||||
this.inventoryItemService.searchResultDataList(this.executeItemIds(dataVoList));
|
||||
for (AdjustPriceDto data : inventoryItemList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setTotalQuantity(data.getTotalCount());
|
||||
dataVo.setItemTable(data.getItemTable());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setUnitCode(dataVoMap.get(data.getItemId()).getUnitCode());
|
||||
dataVo.setLotNumber(data.getLotNumber());
|
||||
dataVo.setLocationId(data.getLocationId());
|
||||
resultList.add(dataVo);
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords =
|
||||
this.executeChangePriceData(busNo, practitionerId, resultList, SupplyStatus.PENDING_APPROVAL.getValue(),
|
||||
AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
? SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue()
|
||||
: SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
public boolean executeChangePriceForMedicationExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId, Integer categoryType) {
|
||||
// 有库存的药品或耗材集合
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
List<AdjustPriceDto> inventoryItemList =
|
||||
this.inventoryItemService.searchResultDataList(this.executeItemIds(dataVoList));
|
||||
for (AdjustPriceDto data : inventoryItemList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setTotalQuantity(data.getTotalCount());
|
||||
dataVo.setItemTable(data.getItemTable());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setUnitCode(dataVoMap.get(data.getItemId()).getUnitCode());
|
||||
dataVo.setLotNumber(data.getLotNumber());
|
||||
dataVo.setLocationId(data.getLocationId());
|
||||
resultList.add(dataVo);
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords =
|
||||
this.executeChangePriceData(busNo, practitionerId, resultList, SupplyStatus.APPROVAL.getValue(),
|
||||
AdjustPriceEnum.MEDICINE.getCode().equals(categoryType)
|
||||
? SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue()
|
||||
: SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
public boolean executeChangePriceForActivity(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId) {
|
||||
List<ActivityDto> dataDtoList =
|
||||
this.activityDefinitionService.searchActivityDefinitionByIds(this.executeItemIds(dataVoList));
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
for (ActivityDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.PENDING_APPROVAL.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 处理申请 诊疗改价业务申请
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 11:19 2025/10/18
|
||||
* @return boolean
|
||||
**/
|
||||
public boolean executeChangePriceForActivityExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId) {
|
||||
List<ActivityDto> dataDtoList =
|
||||
this.activityDefinitionService.searchActivityDefinitionByIds(this.executeItemIds(dataVoList));
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
for (ActivityDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION);
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.APPROVAL.getValue(), SupplyType.REQUEST_ACTIVITY_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 处理申请 挂号改价业务
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 11:20 2025/10/18
|
||||
* @return boolean
|
||||
**/
|
||||
public boolean executeChangePriceForHealth(List<AdjustPriceDataVo> dataVoList, String busNo, Long practitionerId) {
|
||||
List<HealthcareDto> dataDtoList =
|
||||
this.healthcareServiceService.searchHealthByIds(this.executeItemIds(dataVoList));
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
for (HealthcareDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加 supply_request表共享了 审核状态和 category 枚举
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.PENDING_APPROVAL.getValue(), SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 处理申请 挂号改价业务
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 11:20 2025/10/18
|
||||
* @return boolean
|
||||
**/
|
||||
public boolean executeChangePriceForHealthExamine(List<AdjustPriceDataVo> dataVoList, String busNo,
|
||||
Long practitionerId) {
|
||||
List<HealthcareDto> dataDtoList =
|
||||
this.healthcareServiceService.searchHealthByIds(this.executeItemIds(dataVoList));
|
||||
List<AdjustPriceDataVo> resultList = new LinkedList<>();
|
||||
Map<Long, AdjustPriceDataVo> dataVoMap = this.executeMap(dataVoList);
|
||||
for (HealthcareDto data : dataDtoList) {
|
||||
AdjustPriceDataVo dataVo = new AdjustPriceDataVo();
|
||||
dataVo.setItemTable(CommonConstants.TableName.ADM_HEALTHCARE_SERVICE);
|
||||
dataVo.setItemId(data.getItemId());
|
||||
dataVo.setName(data.getName());
|
||||
dataVo.setNewBuyingPrice(dataVoMap.get(data.getItemId()).getNewBuyingPrice());
|
||||
dataVo.setNewRetailPrice(dataVoMap.get(data.getItemId()).getNewRetailPrice());
|
||||
dataVo.setReason(dataVoMap.get(data.getItemId()).getReason());
|
||||
dataVo.setLotNumber(dataVoMap.get(data.getItemId()).getLotNumber());
|
||||
resultList.add(dataVo);
|
||||
this.redisUtil.set(RedisKeys.getProductsKey(data.getItemId().toString()), data.getItemId());
|
||||
}
|
||||
//填充 ChangePriceRecord 对象,返回list进行批量添加 supply_request表共享了 审核状态和 category 枚举
|
||||
List<ChangePriceRecord> changePriceRecords = this.executeChangePriceData(busNo, practitionerId, resultList,
|
||||
SupplyStatus.APPROVAL.getValue(), SupplyType.REQUEST_HEALTH_CHANGE_PRICE.getValue());
|
||||
return this.changePriceRecordService.saveOrUpdateBatch(changePriceRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 封装对象数据
|
||||
*
|
||||
* @param busNo
|
||||
* @param curUserId
|
||||
* @param itemList
|
||||
* @Author raymond
|
||||
* @Date 09:35 2025/10/18
|
||||
* @return java.util.List<com.openhis.workflow.domain.ChangePriceRecord>
|
||||
**/
|
||||
public List<ChangePriceRecord> executeChangePriceData(String busNo, Long curUserId,
|
||||
List<AdjustPriceDataVo> itemList, Integer statusEnum, Integer categoryEnum) {
|
||||
List<ChangePriceRecord> srList = new LinkedList<>();
|
||||
for (AdjustPriceDataVo dataVo : itemList) {
|
||||
ChangePriceRecord cpr = new ChangePriceRecord();
|
||||
//如果是 药品调价
|
||||
if (SupplyType.REQUEST_MEDICATION_CHANGE_PRICE.getValue().equals(categoryEnum)) {
|
||||
// 获取当前进货价
|
||||
ChargeItemDefDetailPriceDto buyingPriceDto = this.chargeItemDefinitionService
|
||||
.getMedPriceByParam(ConditionCode.LOT_NUMBER_COST.getCode(), dataVo.getItemId());
|
||||
// 获取当前零售价
|
||||
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||
.getMedPriceByParam(ConditionCode.LOT_NUMBER_PRICE.getCode(), dataVo.getItemId());
|
||||
if (buyingPriceDto != null || retailPriceDto != null) {
|
||||
// 库存 以最小单位存储,以货品最小单位进行计算
|
||||
BigDecimal partPercent =
|
||||
dataVo.getTotalQuantity().divide(buyingPriceDto.getPartPercent(), 6, RoundingMode.HALF_UP);
|
||||
//进货价盈负差
|
||||
BigDecimal buyingDiffPrice =
|
||||
dataVo.getNewBuyingPrice().subtract(buyingPriceDto.getPrice()).multiply(partPercent);
|
||||
// 零售价盈负差
|
||||
BigDecimal retailDiffPrice =
|
||||
dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice()).multiply(partPercent);
|
||||
//填充 change_price_record表数据
|
||||
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId())
|
||||
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||
.setOriginBuyingPrice(buyingPriceDto.getPrice()).setOriginRetailPrice(retailPriceDto.getPrice())
|
||||
.setDifferenceBuyingPrice(buyingDiffPrice).setDifferenceRetailPrice(retailDiffPrice)
|
||||
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||
srList.add(cpr);
|
||||
} //如果是 耗材调价
|
||||
} else if (SupplyType.REQUEST_DEVICE_CHANGE_PRICE.getValue().equals(categoryEnum)) {
|
||||
// 获取当前进货价
|
||||
ChargeItemDefDetailPriceDto buyingPriceDto = this.chargeItemDefinitionService
|
||||
.getDevicePriceByParam(ConditionCode.LOT_NUMBER_COST.getCode(), dataVo.getItemId());
|
||||
// 获取当前零售价
|
||||
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||
.getDevicePriceByParam(ConditionCode.LOT_NUMBER_PRICE.getCode(), dataVo.getItemId());
|
||||
if (buyingPriceDto != null || retailPriceDto != null) {
|
||||
// 库存 以最小单位存储,以货品最小单位进行计算
|
||||
BigDecimal partPercent =
|
||||
dataVo.getTotalQuantity().divide(buyingPriceDto.getPartPercent(), 6, RoundingMode.HALF_UP);
|
||||
//进货价盈负差
|
||||
BigDecimal buyingDiffPrice =
|
||||
dataVo.getNewBuyingPrice().subtract(buyingPriceDto.getPrice()).multiply(partPercent);
|
||||
// 零售价盈负差
|
||||
BigDecimal retailDiffPrice =
|
||||
dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice()).multiply(partPercent);
|
||||
//填充 change_price_record表数据
|
||||
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId()).setLocationId(dataVo.getLocationId())
|
||||
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||
.setOriginBuyingPrice(buyingPriceDto.getPrice()).setOriginRetailPrice(retailPriceDto.getPrice())
|
||||
.setDifferenceBuyingPrice(buyingDiffPrice).setDifferenceRetailPrice(retailDiffPrice)
|
||||
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||
srList.add(cpr);
|
||||
}
|
||||
} else {//如果是 诊疗或者挂号调价,诊疗和耗材 没有库存
|
||||
ChargeItemDefDetailPriceDto retailPriceDto = this.chargeItemDefinitionService
|
||||
.getProductPrice(PublicationStatus.ACTIVE.getValue(), dataVo.getItemId());
|
||||
if (retailPriceDto != null) {
|
||||
//新价格 - 原价格
|
||||
BigDecimal retailDiffPrice = dataVo.getNewRetailPrice().subtract(retailPriceDto.getPrice());
|
||||
//填充 change_price_record表数据
|
||||
cpr.setNewBuyingPrice(dataVo.getNewBuyingPrice()).setNewRetailPrice(dataVo.getNewRetailPrice())
|
||||
.setItemQuantity(dataVo.getTotalQuantity()).setItemId(dataVo.getItemId())
|
||||
.setItemTable(dataVo.getItemTable()).setReason(dataVo.getReason()).setBusNo(busNo)
|
||||
.setApplicantId(curUserId).setStatusEnum(statusEnum).setItemCategoryEnum(categoryEnum)
|
||||
.setLotNumber(dataVo.getLotNumber()).setUnitCode(dataVo.getUnitCode())
|
||||
.setOriginRetailPrice(retailPriceDto.getPrice()).setDifferenceRetailPrice(retailDiffPrice)
|
||||
.setApplicantTime(SupplyStatus.APPROVAL.getValue().equals(statusEnum) ? new Date() : null);
|
||||
srList.add(cpr);
|
||||
}
|
||||
}
|
||||
}
|
||||
return srList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 封装获取药品和耗材的id数组
|
||||
*
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 08:03 2025/10/18
|
||||
* @return java.util.List<java.lang.Long>
|
||||
**/
|
||||
public List<Long> executeItemIds(List<AdjustPriceDataVo> dataVoList) {
|
||||
List<Long> itemIds = new LinkedList<>();
|
||||
for (AdjustPriceDataVo data : dataVoList) {
|
||||
itemIds.add(data.getItemId());
|
||||
}
|
||||
return itemIds;
|
||||
}
|
||||
/**
|
||||
* Desc: 存储表单数据
|
||||
* @param dataVoList
|
||||
* @Author raymond
|
||||
* @Date 10:28 2025/11/5
|
||||
* @return java.util.Map<java.lang.Long,com.openhis.web.adjustprice.dto.AdjustPriceDataVo>
|
||||
**/
|
||||
public Map<Long, AdjustPriceDataVo> executeMap(List<AdjustPriceDataVo> dataVoList) {
|
||||
Map<Long, AdjustPriceDataVo> map = new ConcurrentHashMap<>();
|
||||
for (AdjustPriceDataVo data : dataVoList) {
|
||||
map.put(data.getItemId(), data);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.openhis.web.adjustprice.appservice.impl;
|
||||
|
||||
import com.openhis.web.adjustprice.appservice.ISupplyService;
|
||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
||||
import com.openhis.web.adjustprice.mapper.SupplyMapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePriceImpl
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/15 16:10
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Component
|
||||
public class SupplyServiceImpl implements ISupplyService {
|
||||
|
||||
@Resource
|
||||
private SupplyMapper supplyMapper;
|
||||
|
||||
@Override
|
||||
public List<SupplyListDto> searchAllSupplyList() {
|
||||
return this.supplyMapper.searchAllSupplyList();
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
package com.openhis.web.adjustprice.controller;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.enums.TenantOptionDict;
|
||||
import com.core.web.util.TenantOptionUtil;
|
||||
import com.openhis.common.enums.OrderPricingSource;
|
||||
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.adjustprice.appservice.ISupplyService;
|
||||
import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName ChargePriceController
|
||||
@@ -19,94 +21,163 @@ import com.openhis.web.datadictionary.dto.MedicationSearchParam;
|
||||
@RestController
|
||||
@RequestMapping("/change/price")
|
||||
public class ChangePriceController {
|
||||
|
||||
@Resource
|
||||
private ISupplyService supplyService;
|
||||
private IAdjustPriceService adjustPriceService;
|
||||
|
||||
/**
|
||||
* Desc: 查询所有供应商集合
|
||||
* Desc: 根据关键词搜索数据
|
||||
*
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 16:55 2025/10/15
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 09:26 2025/10/20
|
||||
**/
|
||||
@GetMapping(value = "searchAllSupply")
|
||||
public R<?> searchAllSupply() {
|
||||
return R.ok(this.supplyService.searchAllSupplyList());
|
||||
@PostMapping(value = "searchKeyWordDataListByMed")
|
||||
public R<?> searchKeyWordDataListByMed(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByMed(searchKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词搜索数据
|
||||
*
|
||||
* @param
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 09:26 2025/10/20
|
||||
**/
|
||||
@PostMapping(value = "searchKeyWordDataListByDevice")
|
||||
public R<?> searchKeyWordDataListByDevice(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByDevice(searchKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据关键词搜索数据
|
||||
*
|
||||
* @param
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 09:26 2025/10/20
|
||||
**/
|
||||
@PostMapping(value = "searchKeyWordDataListByActivity")
|
||||
public R<?> searchKeyWordDataListByActivity(@RequestParam(name = "searchKey", required = false) String searchKey) {
|
||||
return R.ok(this.adjustPriceService.searchKeyWordDataListByActivity(searchKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 查询所有 有挂号信息的科室
|
||||
*
|
||||
* @param
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 08:38 2025/10/22
|
||||
**/
|
||||
@PostMapping(value = "searchAllOrgData")
|
||||
public R<?> searchAllOrgData() {
|
||||
return this.adjustPriceService.searchAllOrgData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据科室id 加载 挂号信息
|
||||
*
|
||||
* @param orgId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 16:46 2025/10/22
|
||||
**/
|
||||
@PostMapping(value = "searchHealthData")
|
||||
public R<?> searchHealthData(@RequestParam Long orgId) {
|
||||
return this.adjustPriceService.searchHealthData(orgId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 保存 改价数据
|
||||
*
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 08:47 2025/10/15
|
||||
**/
|
||||
@PostMapping(value = "commitChangePriceData")
|
||||
public R<?> commitChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||
return adjustPriceService.submitChangePriceData(dataVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据供应商和药品名称加载要修改的药品数据
|
||||
*
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 08:47 2025/10/15
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchMedicineListToPage")
|
||||
public R<?> searchMedicineListToPage() {
|
||||
return R.ok();
|
||||
@PostMapping(value = "submitExamineChangePriceData")
|
||||
public R<?> submitExamineChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||
return adjustPriceService.submitExamineChangePriceData(dataVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param medicationSearchParam
|
||||
* @param searchKey
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 13:41 2025/10/15
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "searchConsumablesListToPage")
|
||||
public R<?> searchConsumablesListToPage(MedicationSearchParam medicationSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
return null;
|
||||
@PostMapping(value = "checkMedApprovalExist")
|
||||
public R<?> checkMedApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkMedApprovalExist(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param medicationSearchParam
|
||||
* @param searchKey
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 13:41 2025/10/15
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "searchDiagnosisListToPage")
|
||||
public R<?> searchDiagnosisListToPage(MedicationSearchParam medicationSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
return null;
|
||||
@PostMapping(value = "checkDeviceApprovalExist")
|
||||
public R<?> checkDeviceApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkDeviceApprovalExist(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param medicationSearchParam
|
||||
* @param searchKey
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 13:41 2025/10/15
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "searchHealthCareListToPage")
|
||||
public R<?> searchRegisterListToPage(MedicationSearchParam medicationSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
@PostMapping(value = "checkActivityApprovalExist")
|
||||
public R<?> checkActivityApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkActivityApprovalExist(itemId);
|
||||
}
|
||||
|
||||
return null;
|
||||
/**
|
||||
* Desc: 根据货品ID 查询是否有审核中的药品数据
|
||||
*
|
||||
* @param itemId
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
* @Author raymond
|
||||
* @Date 17:32 2025/11/3
|
||||
**/
|
||||
@PostMapping(value = "checkHealthApprovalExist")
|
||||
public R<?> checkHealthApprovalExist(@RequestParam Long itemId) {
|
||||
return this.adjustPriceService.checkHealthApprovalExist(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 查询调价控制开关状态接口
|
||||
*
|
||||
* @return true:统一零售价 , false:按批次号售卖
|
||||
**/
|
||||
@GetMapping(value = "getAdjustPriceSwitchState")
|
||||
public R<?> getAdjustPriceSwitchState() {
|
||||
// 医嘱定价来源
|
||||
String orderPricingSource = TenantOptionUtil.getOptionContent(TenantOptionDict.ORDER_PRICING_SOURCE);
|
||||
if (OrderPricingSource.RETAIL_PRICE.getCode().equals(orderPricingSource)) {
|
||||
return R.ok(true);
|
||||
}
|
||||
return R.ok(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.openhis.web.adjustprice.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.openhis.web.adjustprice.appservice.IAdjustPriceService;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceDataVo;
|
||||
import com.openhis.web.adjustprice.dto.AdjustPriceManagerSearchParam;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePriceListPageController
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/23 15:16
|
||||
* @Version 1.0
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/change/price/list")
|
||||
public class ChangePriceDataListPageController {
|
||||
|
||||
@Resource
|
||||
private IAdjustPriceService adjustPriceService;
|
||||
|
||||
/**
|
||||
* Desc: 查询 调价管理列表页面 分页查询当前人 提交的调价单
|
||||
*
|
||||
* @param adjustPriceManagerSearchParam
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param searchKey
|
||||
* @param request
|
||||
* @Author raymond
|
||||
* @Date 15:47 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@GetMapping(value = "getPage")
|
||||
public R<?> getPage(AdjustPriceManagerSearchParam adjustPriceManagerSearchParam,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||
return this.adjustPriceService.searchChangePriceSubmitDataToPage(adjustPriceManagerSearchParam, pageNo,
|
||||
pageSize, searchKey, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据单据号 进行提交审核操作
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 09:38 2025/10/23
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "updateStatusByApproval")
|
||||
public R<?> updateStatusByApproval(@RequestParam String busNo) {
|
||||
return this.adjustPriceService.updateExamineByApproval(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 作废 调价单数据
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 14:47 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "cancelChangePriceData")
|
||||
public R<?> cancelChangePriceData(@RequestParam String busNo) {
|
||||
return this.adjustPriceService.cancelChangePriceData(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据供应商和药品名称加载要修改的药品数据
|
||||
*
|
||||
*
|
||||
* @Author raymond
|
||||
* @Date 08:47 2025/10/15
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "submitChangePriceData")
|
||||
public R<?> submitChangePriceData(@RequestBody List<AdjustPriceDataVo> dataVoList) {
|
||||
return adjustPriceService.submitChangePriceData(dataVoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 药品调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByMed")
|
||||
public R<?> searchChangePriceDataByMed(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByMed(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 耗材调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByDevice")
|
||||
public R<?> searchChangePriceDataByDevice(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByDevice(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 诊疗调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByActivity")
|
||||
public R<?> searchChangePriceDataByActivity(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByActivity(busNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Desc: 根据 单据号 挂号调价单 查询详情
|
||||
*
|
||||
* @param busNo
|
||||
* @Author raymond
|
||||
* @Date 12:01 2025/10/21
|
||||
* @return com.core.common.core.domain.R<?>
|
||||
**/
|
||||
@PostMapping(value = "searchChangePriceDataByHealth")
|
||||
public R<?> searchChangePriceDataByHealth(@RequestParam String busNo) {
|
||||
if (StringUtils.isEmpty(busNo)) {
|
||||
return R.fail();
|
||||
}
|
||||
return this.adjustPriceService.searchChangePriceDataByHealth(busNo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName AdjustPriceDataVo
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/16 08:31
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class AdjustPriceDataVo {
|
||||
/**
|
||||
* 表ID
|
||||
*/
|
||||
private Long itemId;
|
||||
/**
|
||||
* 分类 0、药品;1、耗材;2、诊疗;3、挂号
|
||||
*/
|
||||
private Integer categoryType;
|
||||
/**
|
||||
* 改价原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 新进货价
|
||||
*/
|
||||
private BigDecimal newBuyingPrice;
|
||||
/**
|
||||
* 新售价
|
||||
*/
|
||||
private BigDecimal newRetailPrice;
|
||||
/**
|
||||
* 经手人
|
||||
*/
|
||||
private Long practitionerId;
|
||||
/**
|
||||
* 每个批次影响数量
|
||||
*/
|
||||
private BigDecimal quantity;
|
||||
/**
|
||||
* 总数量
|
||||
*/
|
||||
private BigDecimal totalQuantity;
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String itemTable;
|
||||
/**
|
||||
* 单据号
|
||||
*/
|
||||
private String busNo;
|
||||
|
||||
private String name;
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private String lotNumber;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unitCode;
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
private Long locationId;
|
||||
|
||||
private BigDecimal finalTotalQuantity;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @ClassName AdjustPriceManagerSearchParam
|
||||
* @Description 改价管理 查询条件
|
||||
* @Author raymond
|
||||
* @Date 2025/10/24 16:23
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AdjustPriceManagerSearchParam {
|
||||
|
||||
/** 审核状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 单据类型 */
|
||||
private Integer itemCategoryEnum;
|
||||
/**
|
||||
* 单据时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date applicantTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePricePageDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/31 17:35
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class ChangePriceDataDto {
|
||||
|
||||
/** 批次号 */
|
||||
private String originLotNumber;
|
||||
|
||||
/** 改价申请人id */
|
||||
private Long applicantId;
|
||||
|
||||
/** 目标枚举 药品、耗材、诊疗、挂号 */
|
||||
private Integer itemCategoryEnum;
|
||||
private String itemCategoryEnum_Text;
|
||||
|
||||
/** 药品ID、耗材ID、诊疗ID、挂号ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long itemId;
|
||||
/**
|
||||
* 获取名称
|
||||
*/
|
||||
private String itemName;
|
||||
/** 原进货价 */
|
||||
private BigDecimal originBuyingPrice;
|
||||
|
||||
/** 原零售价价格 */
|
||||
private BigDecimal originRetailPrice;
|
||||
|
||||
/** 当前品库存量 */
|
||||
private BigDecimal itemQuantity;
|
||||
|
||||
/** 当前业务批次号 */
|
||||
private String busNo;
|
||||
|
||||
/** 改价申请时间 */
|
||||
private Date applicantTime;
|
||||
|
||||
/** 新进货价 */
|
||||
private BigDecimal newBuyingPrice;
|
||||
|
||||
/** 新零售价 */
|
||||
private BigDecimal newRetailPrice;
|
||||
|
||||
/** 物品计量单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 审批状态 */
|
||||
private Integer statusEnum;
|
||||
private Integer statusEnum_Text;
|
||||
|
||||
/** 批次号 */
|
||||
private String lotNumber;
|
||||
|
||||
/** 条件理由 */
|
||||
private String reason;
|
||||
|
||||
/** 零售价盈负差*/
|
||||
private BigDecimal differenceRetailPrice;
|
||||
/**进货价盈负差*/
|
||||
private BigDecimal differenceBuyingPrice;
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String orgName;
|
||||
/**
|
||||
* 价格主表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long chargeId;
|
||||
/**
|
||||
* 调价表ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long changePriceRecordId;
|
||||
|
||||
private String label;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String totalVolume;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName ChangePricePageDto
|
||||
* @Description 改价业务分页dto
|
||||
* @Author raymond
|
||||
* @Date 2025/11/1 22:53
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class ChangePricePageDto {
|
||||
|
||||
/** 单据号 */
|
||||
private String busNo;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/** 审批人 */
|
||||
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||
private Long approverId;
|
||||
private String approverId_dictText;
|
||||
|
||||
/** 审批时间 */
|
||||
private Date approvalTime;
|
||||
|
||||
/** 申请人 */
|
||||
@Dict(dictCode = "id", dictText = "name", dictTable = "adm_practitioner")
|
||||
private Long applicantId;
|
||||
private String applicantId_dictText;
|
||||
|
||||
/** 申请时间 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date applicantTime;
|
||||
|
||||
/** 制单日期 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 备注 */
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 24、药品
|
||||
*/
|
||||
private Integer itemCategoryEnum;
|
||||
private String categoryEnum_enumText;
|
||||
|
||||
private BigDecimal originRetailPrice;
|
||||
private BigDecimal originBuyingPrice;
|
||||
private BigDecimal newBuyingPrice;
|
||||
private BigDecimal newRetailPrice;
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.openhis.web.adjustprice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName SupplyListDto
|
||||
* @Description TODO
|
||||
* @Author raymond
|
||||
* @Date 2025/10/15 16:56
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class SupplyListDto {
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
private Long supplyId;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplyName;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.openhis.web.adjustprice.mapper;
|
||||
|
||||
import com.openhis.web.adjustprice.dto.ChangePriceDataDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.adjustprice.dto.ChangePricePageDto;
|
||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||
import com.openhis.web.inventorymanage.dto.ReceiptPageDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
*
|
||||
* @Author raymond
|
||||
* @Date 14:37 2025/10/15
|
||||
* @return
|
||||
**/
|
||||
@Component
|
||||
public interface AdjustPriceMapper {
|
||||
/**
|
||||
* Desc: 查询单据审批分页列表
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param medTypeEnum
|
||||
* @param deviceTypeEnum
|
||||
* @param activityTypeEnum
|
||||
* @param healthTypeEnum
|
||||
* @Author raymond
|
||||
* @Date 16:01 2025/10/24
|
||||
* @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.openhis.web.inventorymanage.dto.ReceiptPageDto>
|
||||
**/
|
||||
Page<ReceiptPageDto> selectInventoryReceiptPage(@Param("page") Page<ReceiptPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
||||
@Param("medTypeEnum") Integer medTypeEnum, @Param("deviceTypeEnum") Integer deviceTypeEnum,
|
||||
@Param("activityTypeEnum") Integer activityTypeEnum, @Param("healthTypeEnum") Integer healthTypeEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据当前人 ID 查询提交的调价申请记录
|
||||
*
|
||||
* @param page
|
||||
* @param queryWrapper
|
||||
* @param medCategory
|
||||
* @param deviceCategory
|
||||
* @param activityCategory
|
||||
* @param healthCategory
|
||||
* @param applicantId
|
||||
* @Author raymond
|
||||
* @Date 00:59 2025/11/2
|
||||
* @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.openhis.web.adjustprice.dto.ChangePricePageDto>
|
||||
**/
|
||||
Page<ChangePricePageDto> searchChangePriceDataToPage(@Param("page") Page<ReceiptPageDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<InventorySearchParam> queryWrapper,
|
||||
@Param("medCategory") Integer medCategory, @Param("deviceCategory") Integer deviceCategory,
|
||||
@Param("activityCategory") Integer activityCategory, @Param("healthCategory") Integer healthCategory,
|
||||
@Param("applicantId") Long applicantId);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByBusNo(@Param("busNo") String busNo, @Param("categoryEnum") Integer categoryEnum, @Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 药品调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:34 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchMedChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 耗材调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:33 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchDeviceChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 诊疗调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:32 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchActivityChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
* @param busNo
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 09:46 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByBusNo(@Param("busNo") String busNo,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 挂号调价单
|
||||
* @param itemId
|
||||
* @param categoryEnum
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 07:31 2025/11/4
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchHealthChangePriceByItemId(@Param("itemId") Long itemId,@Param("categoryEnum") Integer categoryEnum,@Param("statusEnum") Integer statusEnum);
|
||||
/**
|
||||
* Desc: 根据条件 查询 审批单 审核中的数据
|
||||
* @param busNo
|
||||
* @param statusEnum
|
||||
* @Author raymond
|
||||
* @Date 10:36 2025/11/2
|
||||
* @return java.util.List<com.openhis.administration.dto.ChangePriceDataDto>
|
||||
**/
|
||||
List<ChangePriceDataDto> searchChangePriceRecordDataByBusNo(@Param("busNo") String busNo,@Param("statusEnum") Integer statusEnum);
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.openhis.web.adjustprice.mapper;
|
||||
|
||||
import com.openhis.web.adjustprice.dto.SupplyListDto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Desc:
|
||||
* @Author raymond
|
||||
* @Date 14:37 2025/10/15
|
||||
* @return
|
||||
**/
|
||||
@Component
|
||||
public interface SupplyMapper {
|
||||
/**
|
||||
* Desc:
|
||||
* @param
|
||||
* @Author raymond
|
||||
* @Date 17:10 2025/10/15
|
||||
* @return java.util.List<com.openhis.web.paymentmanage.dto.SupplyListDto>
|
||||
**/
|
||||
List<SupplyListDto> searchAllSupplyList();
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user