Compare commits
38 Commits
7f2f612e58
...
fix-668-te
| Author | SHA1 | Date | |
|---|---|---|---|
| e9a8f6eedc | |||
| fd83ac9621 | |||
| 704a1105cf | |||
| 20af7351a0 | |||
| e4fe900618 | |||
| a963ad8fdc | |||
|
|
bbf4c8441b | ||
| e9d09e69c9 | |||
| e5fb8a3350 | |||
| b55fa84b85 | |||
| 5f00dab7ad | |||
| 8c42cf11b5 | |||
| ada67eb9c0 | |||
| 7b1777a91e | |||
| af6fdbf7d6 | |||
| 6c80673427 | |||
|
|
cbb3f618be | ||
| babf62083a | |||
| 68cfa48820 | |||
|
|
d47c83eec5 | ||
|
|
2915915881 | ||
| 68b92dfe31 | |||
| c9e8729d07 | |||
| 207640f4ef | |||
| 566ce61293 | |||
|
|
a04fa368b1 | ||
| f940078208 | |||
| 06363ec191 | |||
|
|
3c8d5e94a3 | ||
|
|
6f7f6dc9f5 | ||
|
|
376ddd46ff | ||
| e1ab9fba23 | |||
| f458835183 | |||
|
|
57f591e1c0 | ||
|
|
a98a03e00a | ||
| fddf1c2d03 | |||
|
|
c7f85ff20d | ||
|
|
72ab38f5d0 |
18
.gitignore
vendored
18
.gitignore
vendored
@@ -416,3 +416,21 @@
|
|||||||
/node_modules/proxy-from-env/package.json
|
/node_modules/proxy-from-env/package.json
|
||||||
/node_modules/proxy-from-env/README.md
|
/node_modules/proxy-from-env/README.md
|
||||||
/node_modules/.package-lock.json
|
/node_modules/.package-lock.json
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_5_16_37_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_07_53_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_07_58_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_09_03_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_09_07_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_09_17_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/_2026_6_5_16_37____.xml
|
||||||
|
/.idea/shelf/_2026_6_6_07_53____.xml
|
||||||
|
/.idea/shelf/_2026_6_6_07_58____.xml
|
||||||
|
/.idea/shelf/_2026_6_6_09_03____.xml
|
||||||
|
/.idea/shelf/_2026_6_6_09_07____.xml
|
||||||
|
/.idea/shelf/_2026_6_6_09_17____.xml
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_5_16_37_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_07_53_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_07_58_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_09_03_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_09_07_取消提交了更改_[更改]/shelved.patch
|
||||||
|
/.idea/shelf/在进行更新之前于_2026_6_6_09_17_取消提交了更改_[更改]/shelved.patch
|
||||||
|
|||||||
566
.idea/shelf/在进行更新之前于_2026_6_5_16_37_取消提交了更改_[更改]/shelved.patch
generated
Normal file
566
.idea/shelf/在进行更新之前于_2026_6_5_16_37_取消提交了更改_[更改]/shelved.patch
generated
Normal file
File diff suppressed because one or more lines are too long
566
.idea/shelf/在进行更新之前于_2026_6_6_07_53_取消提交了更改_[更改]/shelved.patch
generated
Normal file
566
.idea/shelf/在进行更新之前于_2026_6_6_07_53_取消提交了更改_[更改]/shelved.patch
generated
Normal file
File diff suppressed because one or more lines are too long
566
.idea/shelf/在进行更新之前于_2026_6_6_07_58_取消提交了更改_[更改]/shelved.patch
generated
Normal file
566
.idea/shelf/在进行更新之前于_2026_6_6_07_58_取消提交了更改_[更改]/shelved.patch
generated
Normal file
File diff suppressed because one or more lines are too long
566
.idea/shelf/在进行更新之前于_2026_6_6_09_03_取消提交了更改_[更改]/shelved.patch
generated
Normal file
566
.idea/shelf/在进行更新之前于_2026_6_6_09_03_取消提交了更改_[更改]/shelved.patch
generated
Normal file
File diff suppressed because one or more lines are too long
566
.idea/shelf/在进行更新之前于_2026_6_6_09_07_取消提交了更改_[更改]/shelved.patch
generated
Normal file
566
.idea/shelf/在进行更新之前于_2026_6_6_09_07_取消提交了更改_[更改]/shelved.patch
generated
Normal file
File diff suppressed because one or more lines are too long
566
.idea/shelf/在进行更新之前于_2026_6_6_09_17_取消提交了更改_[更改]/shelved.patch
generated
Normal file
566
.idea/shelf/在进行更新之前于_2026_6_6_09_17_取消提交了更改_[更改]/shelved.patch
generated
Normal file
File diff suppressed because one or more lines are too long
26
AGENTS.md
26
AGENTS.md
@@ -106,6 +106,32 @@
|
|||||||
- 每次修改后必须 `mvn clean compile -DskipTests` 验证
|
- 每次修改后必须 `mvn clean compile -DskipTests` 验证
|
||||||
- **违规判定**: 因修改导致原有代码编译失败或运行报错,视为违反铁律18,必须立即回滚修复
|
- **违规判定**: 因修改导致原有代码编译失败或运行报错,视为违反铁律18,必须立即回滚修复
|
||||||
|
|
||||||
|
|
||||||
|
**铁律19: 编译错误不区分来源(Bug #698 教训)**
|
||||||
|
- `mvn compile`、`vite build`、`vue-tsc` 等构建命令报错 = 不过关,**不管是自己引入的还是历史遗留的**
|
||||||
|
- 禁止说"这是预存问题""不是我改的""原有bug"——构建通不过就不能宣称完成
|
||||||
|
- 正确做法:定位错误 → 修复 → 重新构建确认通过 → 然后才能继续
|
||||||
|
- **违规判定**: 构建命令有 ERROR 但未修复就报告"编译通过",视为违反铁律
|
||||||
|
|
||||||
|
**铁律20: 数据来源必须验证(Bug #698 教训)**
|
||||||
|
- 涉及数据查询/提取时,必须先确认数据实际存储位置,不能假设
|
||||||
|
- 案例:从 `raw_steps_html` 提取 fileID,而不是从 `steps`(纯文本,已被 strip)
|
||||||
|
- 修复前必须:打印/检查原始数据结构 → 确认字段存在 → 再写提取逻辑
|
||||||
|
- 禁止:凭代码推断数据位置、假设"应该在这里"
|
||||||
|
|
||||||
|
**铁律21: 外部配置值必须实测验证(Bug #698 教训)**
|
||||||
|
- 使用外部服务(API、模型、数据库)的配置值,必须实际调用验证,不能仅凭记忆或推测
|
||||||
|
- 案例:模型名 `mino-v2.5` 应为 `mimo-v2.5`,拼写错误导致 400
|
||||||
|
- 配置变更后必须:发起一次真实请求 → 确认返回 200 → 再宣称配置正确
|
||||||
|
- 禁止:改完配置不测试、假设"应该能用"
|
||||||
|
|
||||||
|
**铁律22: 端到端验证必须有实际输出证据(Bug #698 教训)**
|
||||||
|
- 声称功能生效前,必须有实际的端到端输出证据
|
||||||
|
- 不能仅凭代码路径推断"应该走了 vision"——必须看到实际返回内容
|
||||||
|
- 验证方式:运行命令 → 检查输出中包含预期关键词(如 vision 分析结果、图片识别文字)
|
||||||
|
- 禁止:只检查代码路径可达就算"验证通过"
|
||||||
|
|
||||||
|
|
||||||
### 🟡 P1 铁律 — 强烈建议
|
### 🟡 P1 铁律 — 强烈建议
|
||||||
|
|
||||||
**铁律9: 先分解再行动**
|
**铁律9: 先分解再行动**
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# 前端发布前检查清单
|
# 前端发布前检查清单
|
||||||
|
|
||||||
> **文档类型**: 技术规范
|
> **文档类型**: 技术规范
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"test_time": "2026-06-08T09:11:33.934379",
|
"test_time": "2026-06-08T11:20:49.248056",
|
||||||
"environment": "http://localhost:18082/healthlink-his",
|
"environment": "http://localhost:18082/healthlink-his",
|
||||||
"total": 125,
|
"total": 125,
|
||||||
"passed": 125,
|
"passed": 125,
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
"id": "OP-PHARM",
|
"id": "OP-PHARM",
|
||||||
"name": "待发药列表",
|
"name": "待发药列表",
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"detail": "待发药=534"
|
"detail": "待发药=532"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "OP-WEST",
|
"id": "OP-WEST",
|
||||||
@@ -377,13 +377,13 @@
|
|||||||
"id": "INS-3D",
|
"id": "INS-3D",
|
||||||
"name": "3D重建任务",
|
"name": "3D重建任务",
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"detail": "任务=0"
|
"detail": "任务=14"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "INS-3D-RPT",
|
"id": "INS-3D-RPT",
|
||||||
"name": "3D重建报告",
|
"name": "3D重建报告",
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"detail": "报告=0"
|
"detail": "报告=11"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "INS-RAD-RPT",
|
"id": "INS-RAD-RPT",
|
||||||
@@ -695,7 +695,7 @@
|
|||||||
"id": "MR-05-PHARM",
|
"id": "MR-05-PHARM",
|
||||||
"name": "药师→待发药",
|
"name": "药师→待发药",
|
||||||
"ok": true,
|
"ok": true,
|
||||||
"detail": "待发药=534"
|
"detail": "待发药=532"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "MR-06-CHARGE",
|
"id": "MR-06-CHARGE",
|
||||||
|
|||||||
1
healthlink-his-server/.mvn/jvm.config
Normal file
1
healthlink-his-server/.mvn/jvm.config
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--sun-misc-unsafe-memory-access=allow
|
||||||
@@ -1,29 +1,438 @@
|
|||||||
# HealthLink-HIS 后端开发规范
|
# HealthLink-HIS — AI 开发规范
|
||||||
|
|
||||||
> 🤖 本文件供 AI 工具自动读取。完整规范见 **[../../RULES.md](../../RULES.md)**
|
> 🤖 本文件供所有 AI 编码工具自动读取。进入本项目后必须遵守以下规范。
|
||||||
|
>
|
||||||
|
> **模型决定上限,Harness 决定底线。**
|
||||||
|
|
||||||
## 铁律速查
|
---
|
||||||
|
|
||||||
1. **修改完必须测试** — `mvn clean compile -DskipTests`
|
## 一、项目概览
|
||||||
2. **Flyway 迁移** — 新建表/字段必须走 Flyway
|
|
||||||
3. **测试通过才提交** — 编译+测试全通过才能 commit
|
|
||||||
4. **API路径对齐** — `/healthlink-his/api/v1/`
|
|
||||||
5. **先分解再行动** — 非平凡任务先出计划
|
|
||||||
6. **文档在 MD 目录** — 大写下划线命名
|
|
||||||
7. **铁律18: 禁止破坏原有功能** — 完善功能时不能破坏已有功能
|
|
||||||
|
|
||||||
## 快速命令
|
| 属性 | 值 |
|
||||||
|
|------|------|
|
||||||
|
| 项目名 | HealthLink-HIS(医院信息系统) |
|
||||||
|
| 后端路径 | `healthlink-his-server/` |
|
||||||
|
| 前端路径 | `healthlink-his-ui/` |
|
||||||
|
| 文档路径 | `MD/` |
|
||||||
|
| JDK | 25 (OpenJDK) |
|
||||||
|
| Spring Boot | 4.0.6 |
|
||||||
|
| MyBatis-Plus | 3.5.16 |
|
||||||
|
| Vue | 3.x + Vite + Element Plus |
|
||||||
|
| 数据库 | PostgreSQL 15+ |
|
||||||
|
| 包名 | `com.healthlink.his` |
|
||||||
|
| 后端端口 | 18082 |
|
||||||
|
| 前端端口 | 81 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 二、铁律(必须遵守,违反即失败)
|
||||||
|
|
||||||
|
### 🔴 P0 铁律 — 不可违反
|
||||||
|
|
||||||
|
**铁律1: 修改完必须测试**
|
||||||
|
```
|
||||||
|
后端: mvn clean compile -DskipTests → mvn install -DskipTests → mvn test
|
||||||
|
前端: npm run build:dev → npm run lint
|
||||||
|
```
|
||||||
|
- 白盒:编译通过,无 ERROR
|
||||||
|
- 黑盒:关键接口返回 `{code:200, data:...}`,验证业务逻辑
|
||||||
|
- 冒烟:应用正常启动,核心流程通畅
|
||||||
|
|
||||||
|
**铁律2: Flyway 数据库迁移**
|
||||||
|
- 凡是新建表、新增字段,必须创建 Flyway 迁移脚本
|
||||||
|
- 路径:`healthlink-his-domain/src/main/resources/db/migration/`
|
||||||
|
- 命名:`V{版本号}__{描述}.sql`(双下划线)
|
||||||
|
|
||||||
|
**铁律3: 测试通过后才提交**
|
||||||
|
- 编译 + 测试全部通过后才能 git commit
|
||||||
|
- 不提交未完成的功能、调试代码、临时文件
|
||||||
|
|
||||||
|
**铁律4: 前后端API路径对齐**
|
||||||
|
- 后端前缀:`/healthlink-his/api/v1/`
|
||||||
|
- 前端 `request.js` 的 baseURL 必须与后端匹配
|
||||||
|
|
||||||
|
**铁律5: 状态值一致性(Bug #574 教训)**
|
||||||
|
- 修改任何状态值前,必须先列出完整的状态流转链路
|
||||||
|
- 检查项:枚举定义 → Service 设置 → 查询映射 → 前端 STATUS_CLASS_MAP → 前端 v-if → 统计SQL
|
||||||
|
- 禁止:只改一端不检查其他端
|
||||||
|
|
||||||
|
**铁律6: 禁止删除源文件(Bug #574 教训)**
|
||||||
|
- 绝对禁止删除项目中已有的 Java/Vue/SQL 源文件
|
||||||
|
- 编译错误 → 修复错误;重复文件 → 重构合并
|
||||||
|
- AI 幻觉文件 → 检查 `git ls-tree baseline -- <file>` 确认后再删除
|
||||||
|
- 唯一例外:明确由人类确认删除的文件
|
||||||
|
|
||||||
|
**铁律7: 禁止修改已有公开方法签名**
|
||||||
|
- 不能删除/重命名已有的 public 方法,不能修改参数列表
|
||||||
|
- 需要新功能 → 添加重载方法;需要改行为 → 修改内部实现
|
||||||
|
|
||||||
|
**铁律8: 验证后才宣称完成(Verification Before Completion)**
|
||||||
|
- **没有跑过验证命令,就不能说"完成了""通过了""没问题"**
|
||||||
|
- 禁止使用"应该可以""大概没问题""看起来正确"
|
||||||
|
- 必须:运行命令 → 读取输出 → 确认结果 → 才能宣称
|
||||||
|
- 这是诚实原则,不是效率问题
|
||||||
|
|
||||||
|
**铁律9: 开发前必须审核原有代码(P0 — 铁律)**
|
||||||
|
- **任何新功能开发前,必须先搜索项目中是否已有相关代码**
|
||||||
|
- 搜索路径:Controller / AppService / Service / Mapper / Entity / 前端页面 / API接口
|
||||||
|
- 如果已有部分功能 → 在原有代码基础上**升级优化完善**,禁止另起炉灶
|
||||||
|
- 如果已有接口但前端缺失 → 只补前端,不重复建后端
|
||||||
|
- 如果已有前端但后端缺失 → 只补后端,不重写前端
|
||||||
|
- 搜索命令:`rg -l "关键词" healthlink-his-server/ healthlink-his-ui/src/`
|
||||||
|
- 禁止:不看代码就新建模块、重复实现已有功能、废弃原有代码另写一套
|
||||||
|
|
||||||
|
**铁律10: 状态变更影响面分析(Bug #574→575 教训)**
|
||||||
|
- 改任何状态枚举值前,**必须**执行影响面分析
|
||||||
|
- `rg "原状态枚举名" --type java` 列出所有引用文件
|
||||||
|
- 逐个检查:设置值?查询过滤?显示映射?统计聚合?
|
||||||
|
- 检查逆向流程:退号、取消、停诊是否兼容新状态
|
||||||
|
- 检查 XML mapper 中所有查询过滤条件
|
||||||
|
- 检查前端所有 v-if/v-for/disabled 条件
|
||||||
|
- **禁止**:只改正向流程不验逆向流程
|
||||||
|
|
||||||
|
**铁律11: 逆向流程验证(Bug #575 教训)**
|
||||||
|
- 涉及状态流转的 Bug,验证时**必须**覆盖:
|
||||||
|
- 正向:预约→签到→就诊→完成
|
||||||
|
- 逆向:退号、取消预约、停诊、退费
|
||||||
|
- 边界:并发操作、重复操作、异常中断
|
||||||
|
- **禁止**:只测正向流程就标记"修复完成"
|
||||||
|
|
||||||
|
**铁律12: 全链路 6 环分析**
|
||||||
|
- 涉及数据库字段的 Bug/需求 必须走完整链路
|
||||||
|
```
|
||||||
|
前端/页面 → Controller → Service → Mapper → DB/SQL → 关联模块
|
||||||
|
①录入 ②验证 ③业务 ④持久化 ⑤存储 ⑥联动
|
||||||
|
```
|
||||||
|
- ①录入:前端有无输入入口(弹窗、表格行编辑、表单)
|
||||||
|
- ②验证:Controller 参数校验、@Valid、权限控制
|
||||||
|
- ③业务:Service 业务逻辑、事务边界、多个 Service 实现类入口
|
||||||
|
- ④持久化:Mapper XML、DTO 字段映射、类型转换
|
||||||
|
- ⑤存储:数据库表结构、索引、NOT NULL 约束
|
||||||
|
- ⑥联动:上游(医嘱→护士站)、下游(打印、计费、报表)是否同步
|
||||||
|
|
||||||
|
**铁律13: 全链路验证(状态流转 Bug 必做)**
|
||||||
|
- 修复后按以下顺序验证,**编译通过不等于修复完成**
|
||||||
|
```
|
||||||
|
① 数据库:SELECT status FROM table WHERE id = ? → 确认写入正确
|
||||||
|
② 后端接口:检查所有 if/switch 分支 → 确认映射正确
|
||||||
|
③ 前端显示:检查 STATUS_CLASS_MAP → 确认文本正确
|
||||||
|
④ 前端交互:检查 v-if/v-for/disabled → 确认按钮状态正确
|
||||||
|
⑤ 统计数据:检查聚合 SQL → 确认统计包含新状态
|
||||||
|
```
|
||||||
|
|
||||||
|
**铁律14: 池/统计表同步(Bug #574 教训)**
|
||||||
|
- **任何状态变更必须同步更新关联统计表**
|
||||||
|
- 检查清单:
|
||||||
|
1. 状态变更后,哪些统计字段需要更新?
|
||||||
|
2. 是原子递增/递减,还是全量重算?
|
||||||
|
3. 并发安全:用 `SET field = field + 1` 还是先查后改?
|
||||||
|
4. 逆向操作(退号/取消)是否正确回滚统计?
|
||||||
|
- **禁止**:只改状态不改统计,或只改统计不改状态
|
||||||
|
|
||||||
|
**铁律15: 统计变更必须验证实际值(Bug #575 教训)**
|
||||||
|
- 修改统计逻辑后,**必须查数据库验证实际值**
|
||||||
|
- 对比操作前后的值,确认统计正确
|
||||||
|
- **禁止**:改了统计逻辑不查数据库验证
|
||||||
|
|
||||||
|
**铁律16: 搜索所有相关代码路径**
|
||||||
|
- 修复前必须用 `rg` 搜索所有引用
|
||||||
|
```
|
||||||
|
rg "状态枚举名|相关方法名|相关字段名" --type java --type vue
|
||||||
|
```
|
||||||
|
- 确保不遗漏任何引用路径
|
||||||
|
|
||||||
|
**铁律17: 数据库铁律**
|
||||||
|
- **修前必须查询真实数据库** — 确认表结构、字段约束、索引
|
||||||
|
- **禁止凭猜测写 SQL** — 先查看表结构
|
||||||
|
- **修改 SQL 后必须验证** — `EXPLAIN` 或实际查询验证语法
|
||||||
|
- **NOT NULL 约束必须检查** — INSERT/UPDATE 前先查 `is_nullable`
|
||||||
|
- **关联表必须查完整** — 涉及 JOIN 查所有关联表结构和外键
|
||||||
|
|
||||||
|
**铁律18: 禁止破坏原有功能(P0绝对铁律)**
|
||||||
|
- **完善增加功能和流程时,绝对不能破坏或者让原有功能不能用**
|
||||||
|
- 修改已有实体前必须对比原始文件(`git show HEAD~N:./file.java`),保留所有原有字段和方法
|
||||||
|
- 新增字段只能追加,不能删除或重命名已有字段
|
||||||
|
- SQL迁移只允许 `ALTER TABLE ADD COLUMN`,不允许 `DROP COLUMN` 或 `RENAME COLUMN`
|
||||||
|
- Controller新端点不能修改已有端点的路径或参数
|
||||||
|
- 前端新页面不能修改已有页面的组件结构
|
||||||
|
- 每次修改后必须 `mvn clean compile -DskipTests` 验证
|
||||||
|
|
||||||
|
**铁律19: 编译错误不区分来源(Bug #698 教训)**
|
||||||
|
- `mvn compile`、`vite build`、`vue-tsc` 等构建命令报错 = 不过关,**不管是自己引入的还是历史遗留的**
|
||||||
|
- 禁止说"这是预存问题""不是我改的""原有bug"——构建通不过就不能宣称完成
|
||||||
|
- 正确做法:定位错误 → 修复 → 重新构建确认通过 → 然后才能继续
|
||||||
|
|
||||||
|
**铁律20: 数据来源必须验证(Bug #698 教训)**
|
||||||
|
- 涉及数据查询/提取时,必须先确认数据实际存储位置,不能假设
|
||||||
|
- 修复前必须:打印/检查原始数据结构 → 确认字段存在 → 再写提取逻辑
|
||||||
|
- 禁止:凭代码推断数据位置、假设"应该在这里"
|
||||||
|
|
||||||
|
**铁律21: 外部配置值必须实测验证(Bug #698 教训)**
|
||||||
|
- 使用外部服务(API、模型、数据库)的配置值,必须实际调用验证
|
||||||
|
- 配置变更后必须:发起一次真实请求 → 确认返回 200 → 再宣称配置正确
|
||||||
|
- 禁止:改完配置不测试、假设"应该能用"
|
||||||
|
|
||||||
|
**铁律22: 端到端验证必须有实际输出证据(Bug #698 教训)**
|
||||||
|
- 声称功能生效前,必须有实际的端到端输出证据
|
||||||
|
- 验证方式:运行命令 → 检查输出中包含预期关键词
|
||||||
|
- 禁止:只检查代码路径可达就算"验证通过"
|
||||||
|
|
||||||
|
**铁律23: 文件读写强制 UTF-8 编码(必遵守)**
|
||||||
|
- **禁止**使用 PowerShell Get-Content -Raw(不带 -Encoding UTF8)读取源文件
|
||||||
|
- **禁止**使用 Out-File -Encoding utf8(会写 BOM)
|
||||||
|
- **正确写法**:
|
||||||
|
- 读取:`[System.IO.File]::ReadAllText($path, [System.Text.Encoding]::UTF8)`
|
||||||
|
- 写入:`[System.IO.File]::WriteAllText($path, $content, [System.Text.UTF8Encoding]::new(False))`
|
||||||
|
- **原因**:Windows PowerShell 5.1 默认用系统 locale(GBK/CP936)读写,会把 UTF-8 中文变成乱码
|
||||||
|
|
||||||
|
**铁律24: 禁止硬编码业务默认值(Bug #617 教训)**
|
||||||
|
- **禁止**在提交参数中硬编码业务默认值(如 `contractNo: '0000'`)
|
||||||
|
- 必须使用用户在表单中选择的值,硬编码值仅作为 fallback
|
||||||
|
- 检查清单:
|
||||||
|
1. 表单字段是否有 `v-model` 绑定?
|
||||||
|
2. 构建提交参数时是否使用了绑定值?
|
||||||
|
3. 提交后是否覆盖了用户选择?
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 🟡 P1 铁律 — 强烈建议
|
||||||
|
|
||||||
|
**铁律25: 先分解再行动**
|
||||||
|
- 修改超过3个文件、涉及多模块、数据库变更,必须先制定计划
|
||||||
|
|
||||||
|
**铁律26: 验证后信**
|
||||||
|
- 每次修改后必须验证编译通过,不信记忆
|
||||||
|
|
||||||
|
**铁律27: 文档统一管理**
|
||||||
|
- 所有文档存储在 `MD/` 目录
|
||||||
|
- 文件名:大写英文+下划线(如 `BACKEND_CHECKLIST.md`)
|
||||||
|
- 文档头部必须包含元数据块(文档类型、版本、日期)
|
||||||
|
|
||||||
|
**铁律28: 设计文档必须包含UI设计和调用流程**
|
||||||
|
- 所有新模块/页面的设计文档必须包含:UI布局描述、交互效果清单、前后端调用流程
|
||||||
|
- 没有明确UI设计的模块,禁止直接编码
|
||||||
|
- 设计文档必须写清楚:系统调用关系、方法函数调用关系、完整业务流程
|
||||||
|
- 设计文档中每个用户操作必须对应:前端事件 → API调用 → 后端处理链路 → 返回数据 → UI渲染
|
||||||
|
|
||||||
|
**铁律29: 设计文档确认后自主开发(铁律)**
|
||||||
|
- 设计文档一旦确认,后续开发**必须按文档自主执行**
|
||||||
|
- **禁止反复询问"是否继续""下一步做什么""是否开始"**——直接按计划推进
|
||||||
|
- 每完成一个 Sprint,自动提交推送,然后立即开始下一个 Sprint
|
||||||
|
- 只在遇到**无法解决的阻塞**时才暂停询问
|
||||||
|
|
||||||
|
**铁律30: 前端验证铁律**
|
||||||
|
- **提交前必须编译前端** — `npm run build:dev` 或 `npx vite build` 通过才算完成
|
||||||
|
- **禁止只改 .vue 文件不验证编译** — 改完必须跑一次编译确认无报错
|
||||||
|
- **SCSS 括号闭合必须检查** — `<style lang="scss" scoped>` 内的所有 `{}` 必须成对闭合
|
||||||
|
- **编译报错必须当场修复** — 看到 error 立即修,不要留到下一步
|
||||||
|
|
||||||
|
**铁律31: 提交前验证铁律**
|
||||||
|
- **后端**: `mvn compile` 通过 + 无新增 warning
|
||||||
|
- **前端**: `npm run build:dev` 通过 + 无 SCSS 错误
|
||||||
|
- **禁止跳过编译直接提交** — 编译失败的代码不允许进仓库
|
||||||
|
- **提交信息格式**: `type(scope): description`(如 `fix(registration): 修复退号金额计算`)
|
||||||
|
|
||||||
|
**铁律32: 修复流程**
|
||||||
|
- **一次只修一个 Bug**,不扩大范围
|
||||||
|
- **修前必须完整获取 Bug 全部信息** — 描述、复现步骤、所有截图/附件、所有备注历史。禁止只看标题就写代码
|
||||||
|
- **修复前必须读 AGENTS.md**
|
||||||
|
- **修复后必须验证编译** — `mvn compile` / `vue-tsc --noEmit` 0 error
|
||||||
|
- **commit 前必须验证** — 编译通过 + 无新增 lint 警告
|
||||||
|
|
||||||
|
**铁律33: Bug 状态管理**
|
||||||
|
- **已关闭/已解决的 Bug 禁止处理** — 处理前检查状态,resolved/closed 直接跳过
|
||||||
|
- **人类提的 Bug 只加备注不改状态** — 不改 status、不改 assignedTo
|
||||||
|
- **智能体提的 Bug 可改分配和加备注** — 状态变更等测试通过后由华佗确认
|
||||||
|
- **每个修复必须有 git commit** — 格式: `fix(#bug_id): 简要描述`
|
||||||
|
|
||||||
|
**铁律34: 质量门禁**
|
||||||
|
- L1: 编译通过
|
||||||
|
- L2: 测试通过
|
||||||
|
- L3: DB审查通过
|
||||||
|
- L4: 验收通过
|
||||||
|
- L5: 归档完成
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 三、Karpathy 编码准则
|
||||||
|
|
||||||
|
> 减少 LLM 常见编码错误。偏向谨慎而非速度。
|
||||||
|
|
||||||
|
### 3.1 先想再写
|
||||||
|
- 明确陈述假设,不确定就问
|
||||||
|
- 多种解读时都列出来,不要默默选一种
|
||||||
|
- 有更简单的方案就说出来,该推回就推回
|
||||||
|
- 不清楚的地方停下来,说清楚哪里不清楚
|
||||||
|
|
||||||
|
### 3.2 简洁优先
|
||||||
|
- 不做没要求的功能,不做一次性代码的抽象
|
||||||
|
- 不加没要求的"灵活性"和"可配置性"
|
||||||
|
- 200 行能 50 行搞定就重写
|
||||||
|
- 自问:"高级工程师会不会觉得这过度设计?"
|
||||||
|
|
||||||
|
### 3.3 精准修改
|
||||||
|
- 只改必须改的,不"顺手改进"相邻代码
|
||||||
|
- 匹配现有代码风格,即使你有不同的偏好
|
||||||
|
- 每行改动都能追溯到用户的请求
|
||||||
|
- 只清理你自己改动产生的无用代码
|
||||||
|
|
||||||
|
### 3.4 目标驱动
|
||||||
|
- 把任务转化为可验证目标
|
||||||
|
- 多步任务声明计划:`[步骤] → 验证: [检查]`
|
||||||
|
- 强验收标准让 Agent 能独立循环,弱标准需要持续澄清
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 四、系统化调试(Systematic Debugging)
|
||||||
|
|
||||||
|
> **铁律:没有根因调查,不能提出修复方案。**
|
||||||
|
|
||||||
|
### 四阶段流程
|
||||||
|
|
||||||
|
**阶段1:根因调查**(修复前必须完成)
|
||||||
|
1. 仔细阅读错误信息(堆栈、行号、错误码)
|
||||||
|
2. 稳定复现(能否可靠触发?步骤?每次?)
|
||||||
|
3. 检查最近变更(git diff、新依赖、配置变更)
|
||||||
|
4. 多组件系统:在每个组件边界加诊断日志,定位哪一层断裂
|
||||||
|
5. 追踪数据流:坏值从哪里来?谁调用的?一直追溯到源头
|
||||||
|
|
||||||
|
**阶段2:模式分析**
|
||||||
|
- 找到同代码库中类似的正常工作代码
|
||||||
|
- 逐项对比差异
|
||||||
|
- 理解依赖关系
|
||||||
|
|
||||||
|
**阶段3:假设与测试**
|
||||||
|
- 形成单一假设:"我认为X是根因,因为Y"
|
||||||
|
- 做最小改动测试
|
||||||
|
- 有效 → 阶段4;无效 → 新假设
|
||||||
|
|
||||||
|
**阶段4:实施**
|
||||||
|
- 创建失败测试用例
|
||||||
|
- 修复根因(不是症状)
|
||||||
|
- 验证修复
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 五、后端开发规范
|
||||||
|
|
||||||
|
### 分层架构
|
||||||
|
```
|
||||||
|
Controller → AppService → Service → Mapper → Entity
|
||||||
|
```
|
||||||
|
|
||||||
|
### 命名规范
|
||||||
|
| 类型 | 规则 | 示例 |
|
||||||
|
|------|------|------|
|
||||||
|
| Controller | `XxxController` | `RegistrationController` |
|
||||||
|
| AppService | `IXxxAppService` / `XxxAppServiceImpl` | `IRegistrationAppService` |
|
||||||
|
| Service | `IXxxService` / `XxxServiceImpl` | `IRegistrationService` |
|
||||||
|
| Mapper | `XxxMapper` | `RegistrationMapper` |
|
||||||
|
| Entity | `Xxx` | `Registration` |
|
||||||
|
| DTO | `XxxDto` / `XxxQueryDto` | `RegistrationDto` |
|
||||||
|
|
||||||
|
### 包结构
|
||||||
|
```
|
||||||
|
com.healthlink.his.web.{module}.controller
|
||||||
|
com.healthlink.his.web.{module}.appservice
|
||||||
|
com.healthlink.his.web.{module}.service
|
||||||
|
com.healthlink.his.web.{module}.mapper
|
||||||
|
com.healthlink.his.web.{module}.dto
|
||||||
|
com.healthlink.his.domain.{module}
|
||||||
|
com.healthlink.his.common.enums
|
||||||
|
```
|
||||||
|
|
||||||
|
### 关键约束
|
||||||
|
- 所有查询使用 `LambdaQueryWrapper`,禁止字符串拼接 SQL
|
||||||
|
- `@Transactional(rollbackFor = Exception.class)` 管理事务
|
||||||
|
- 所有接口标注 `@PreAuthorize` 权限控制
|
||||||
|
- 患者敏感信息在日志中脱敏
|
||||||
|
- **扩展功能不修改原有函数签名**
|
||||||
|
- **DTO 字段类型防御**:前端传入的 Boolean 字段 → 改用 String + 业务层转换(Jackson 对 Boolean 严格校验);所有接受前端输入的 DTO 加 `@JsonIgnoreProperties(ignoreUnknown = true)`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 六、前端开发规范
|
||||||
|
|
||||||
|
### 技术栈
|
||||||
|
- Vue 3 + Vite + Element Plus + Pinia + Axios(基于 RuoYi-Vue3)
|
||||||
|
|
||||||
|
### 目录结构
|
||||||
|
```
|
||||||
|
src/api/{module}/ # API接口
|
||||||
|
src/views/{module}/ # 页面组件
|
||||||
|
src/store/modules/ # Pinia状态管理
|
||||||
|
src/components/ # 公共组件
|
||||||
|
```
|
||||||
|
|
||||||
|
### 关键约束
|
||||||
|
- API前缀:`/healthlink-his/api/v1/`
|
||||||
|
- 路由懒加载:`() => import('@/views/xxx/index.vue')`
|
||||||
|
- 页面使用 `<script setup>` 语法
|
||||||
|
- 按钮权限使用 `v-hasPermi` 指令
|
||||||
|
- `onMounted` 中注册的事件在 `onUnmounted` 中移除
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 七、Agent 体系
|
||||||
|
|
||||||
|
### 角色与路由
|
||||||
|
|
||||||
|
| 代号 | 名称 | 角色 | 路由关键词 |
|
||||||
|
|------|------|------|-----------|
|
||||||
|
| liubei | 刘备 | 项目经理 | 协调、分派、异常升级 |
|
||||||
|
| zhugeliang | 诸葛亮 | 架构师 | 分析、路由、设计 |
|
||||||
|
| guanyu | 关羽 | 后端开发 | java, api, spring, service, controller |
|
||||||
|
| zhaoyun | 赵云 | 前端开发 | vue, 界面, 显示, 弹窗, 按钮 |
|
||||||
|
| xunyu | 荀彧 | DBA | 数据库, sql, 迁移, mapper xml |
|
||||||
|
| zhangfei | 张飞 | 测试 | 测试, QA, 回归 |
|
||||||
|
| huatuo | 华佗 | 验收 | 需求验收、质量确认 |
|
||||||
|
| chenlin | 陈琳 | 文档 | 文档、归档、Git提交 |
|
||||||
|
|
||||||
|
### 协作流水线
|
||||||
|
|
||||||
|
```
|
||||||
|
刘备(协调) → 诸葛亮(分析路由) → {关羽|赵云}(修复) → 荀彧(DB审查) → 张飞(测试) → 华佗(验收) → 陈琳(归档)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 八、快速参考命令
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# === 后端 ===
|
||||||
export JAVA_HOME=/opt/jdk-25
|
export JAVA_HOME=/opt/jdk-25
|
||||||
mvn clean compile -DskipTests # 编译
|
mvn clean compile -DskipTests # 编译
|
||||||
mvn install -DskipTests # 构建
|
mvn install -DskipTests # 构建
|
||||||
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
mvn test -pl healthlink-his-application -Dtest="XxxTest" -Dsurefire.failIfNoSpecifiedTests=false
|
||||||
|
|
||||||
|
# === 前端 ===
|
||||||
|
cd healthlink-his-ui
|
||||||
|
npm run dev && npm run build:dev && npm run lint && npm run test:run
|
||||||
|
|
||||||
|
# === Git ===
|
||||||
|
git status && git add -A && git commit -m "feat(module): desc" && git push origin develop
|
||||||
```
|
```
|
||||||
|
|
||||||
## 详细规范
|
---
|
||||||
|
|
||||||
→ 完整铁律: `MD/specs/IRON_RULES.md`
|
## 九、过往教训
|
||||||
→ 后端规范: `MD/specs/BACKEND_DEVELOPMENT_STANDARD.md`
|
|
||||||
→ 后端清单: `MD/specs/BACKEND_CHECKLIST.md`
|
| Bug | 教训 | 根因 |
|
||||||
→ 根目录完整规范: `RULES.md`
|
|---|---|---|
|
||||||
|
| #574 | 状态值 BOOKED(1)→应为 CHECKED_IN(3),前端映射缺失 | 没走完整状态链路 |
|
||||||
|
| #574 | AI 看到编译错误直接删文件 | 没检查 git baseline |
|
||||||
|
| #574 | 多次 fallback 修错文件 | 没用 rg 搜索所有引用 |
|
||||||
|
| #574 | 签到后 booked_num 未累加 | 只改状态没改统计 |
|
||||||
|
| #575 | 改了签到状态没检查退号流程 | 只验正向不验逆向 |
|
||||||
|
| #575 | booked_num 应在预约时累加而非签到时 | 统计变更未验证实际值 |
|
||||||
|
| #617 | 费用性质硬编码为 '0000'(自费),用户选医保无效 | 构建参数时写死默认值 |
|
||||||
|
| #632 | Boolean DTO 接收字符串 "肝功能12项" 导致反序列化失败 | DTO 字段类型未做防御 |
|
||||||
|
| #698 | 模型名拼写错误 mino→mimo 导致 400 | 外部配置值未实测验证 |
|
||||||
|
| — | 修复完成未提交到 develop | 框架未强制验证提交 |
|
||||||
|
| — | 退号流程只检查 BOOKED(1) 不兼容 CHECKED_IN(3) | 状态变更影响面分析缺失 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> ⚠️ 本文件是 AI 开发规范的唯一信源。
|
||||||
|
>
|
||||||
|
> 📅 最后更新: 2026-06-10 | 来源: AgentForge Harness Iron Laws (39条)
|
||||||
@@ -35,7 +35,7 @@ public class TenantOptionUtil {
|
|||||||
|
|
||||||
// TODO:2025/10/17 李永兴提出的sys_option切换TenantOption临时防止报错方案,最晚2025年11月底删除
|
// TODO:2025/10/17 李永兴提出的sys_option切换TenantOption临时防止报错方案,最晚2025年11月底删除
|
||||||
String newValue = loginUser.getOptionMap().get(optionDict.getCode());
|
String newValue = loginUser.getOptionMap().get(optionDict.getCode());
|
||||||
String oldValue = loginUser.getOptionJson().getString(optionDict.getCode());
|
String oldValue = loginUser.getOptionJsonValue(optionDict.getCode());
|
||||||
return StringUtils.isEmpty(newValue) ? oldValue : newValue;
|
return StringUtils.isEmpty(newValue) ? oldValue : newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<artifactId>core-common</artifactId>
|
<artifactId>core-common</artifactId>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
common通用工具
|
common通çâ€Â¨å·¥å…·
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- mybatis-plus 增强CRUD -->
|
<!-- mybatis-plus 增强CRUD -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||||
@@ -67,25 +67,25 @@
|
|||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring框架基本的核心工具 -->
|
<!-- Spring框架基本的核心工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-context-support</artifactId>
|
<artifactId>spring-context-support</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- SpringWeb模块 -->
|
<!-- SpringWeb模åÂÂ -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- spring security 安全认证 -->
|
<!-- spring security 安全认诠-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-security</artifactId>
|
<artifactId>spring-boot-starter-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- pagehelper 分页插件 -->
|
<!-- pagehelper 分页æÂÂ’ä»¶ -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.pagehelper</groupId>
|
<groupId>com.github.pagehelper</groupId>
|
||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
@@ -97,49 +97,49 @@
|
|||||||
<artifactId>jakarta.annotation-api</artifactId>
|
<artifactId>jakarta.annotation-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 自定义验证注解 -->
|
<!-- 自定义验è¯ÂÂ注解 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--常用工具类 -->
|
<!--常çâ€Â¨å·¥å…·ç±» -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- JSON工具类 -->
|
<!-- JSON工具类 -->
|
||||||
|
<!-- JSON工具类 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里JSON解析器 -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.fastjson2</groupId>
|
<groupId>tools.jackson.core</groupId>
|
||||||
<artifactId>fastjson2</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- io常用工具类 -->
|
<!-- 阿里JSONè§£æžÂÂ器 -->
|
||||||
|
<!-- io常çâ€Â¨å·¥å…·ç±» -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- excel工具 -->
|
<!-- excel工具 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- yml解析器 -->
|
<!-- ymlè§£æžÂÂ器 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.yaml</groupId>
|
<groupId>org.yaml</groupId>
|
||||||
<artifactId>snakeyaml</artifactId>
|
<artifactId>snakeyaml</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Token生成与解析-->
|
<!-- Tokençâ€ÂŸæˆÂÂ与解æžÂÂ-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.jsonwebtoken</groupId>
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
<artifactId>jjwt-api</artifactId>
|
<artifactId>jjwt-api</artifactId>
|
||||||
@@ -161,31 +161,31 @@
|
|||||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- redis 缓存操作 -->
|
<!-- redis 缓å˜æ“ÂÂ作 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- pool 对象池 -->
|
<!-- pool 对象池-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-pool2</artifactId>
|
<artifactId>commons-pool2</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 解析客户端操作系统、浏览器等 -->
|
<!-- è§£æžÂÂ客户端æ“ÂÂ作系统ã€ÂÂæµÂÂ览器ç‰ -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>eu.bitwalker</groupId>
|
<groupId>eu.bitwalker</groupId>
|
||||||
<artifactId>UserAgentUtils</artifactId>
|
<artifactId>UserAgentUtils</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- servlet包 -->
|
<!-- servlet包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.servlet</groupId>
|
<groupId>jakarta.servlet</groupId>
|
||||||
<artifactId>jakarta.servlet-api</artifactId>
|
<artifactId>jakarta.servlet-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 中文汉字转换为首字母拼音包 -->
|
<!-- ä¸ÂÂ文汉åÂÂâ€â€ÃƒÂ¨Ã‚½Â¬Ã¦Â¢为首åÂÂâ€â€ÃƒÂ¦Ã‚¯ÂÂ拼音包 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.belerweb</groupId>
|
<groupId>com.belerweb</groupId>
|
||||||
<artifactId>pinyin4j</artifactId>
|
<artifactId>pinyin4j</artifactId>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.core.common.core.domain.model;
|
package com.core.common.core.domain.model;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
|
||||||
import com.core.common.core.domain.entity.SysRole;
|
import com.core.common.core.domain.entity.SysRole;
|
||||||
import com.core.common.core.domain.entity.SysUser;
|
import com.core.common.core.domain.entity.SysUser;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -93,7 +91,7 @@ public class LoginUser implements UserDetails {
|
|||||||
/**
|
/**
|
||||||
* option JSON串
|
* option JSON串
|
||||||
*/
|
*/
|
||||||
private JSONObject optionJson;
|
private Object optionJson;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* option Map
|
* option Map
|
||||||
@@ -146,10 +144,7 @@ public class LoginUser implements UserDetails {
|
|||||||
|
|
||||||
public void setToken(String token) {
|
public void setToken(String token) {
|
||||||
this.token = token;
|
this.token = token;
|
||||||
}
|
} @Override
|
||||||
|
|
||||||
@JSONField(serialize = false)
|
|
||||||
@Override
|
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return user.getPassword();
|
return user.getPassword();
|
||||||
}
|
}
|
||||||
@@ -161,9 +156,7 @@ public class LoginUser implements UserDetails {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 账户是否未过期,过期无法验证
|
* 账户是否未过期,过期无法验证
|
||||||
*/
|
*/ @Override
|
||||||
@JSONField(serialize = false)
|
|
||||||
@Override
|
|
||||||
public boolean isAccountNonExpired() {
|
public boolean isAccountNonExpired() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -172,9 +165,7 @@ public class LoginUser implements UserDetails {
|
|||||||
* 指定用户是否解锁,锁定的用户无法进行身份验证
|
* 指定用户是否解锁,锁定的用户无法进行身份验证
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/ @Override
|
||||||
@JSONField(serialize = false)
|
|
||||||
@Override
|
|
||||||
public boolean isAccountNonLocked() {
|
public boolean isAccountNonLocked() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -183,9 +174,7 @@ public class LoginUser implements UserDetails {
|
|||||||
* 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
|
* 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/ @Override
|
||||||
@JSONField(serialize = false)
|
|
||||||
@Override
|
|
||||||
public boolean isCredentialsNonExpired() {
|
public boolean isCredentialsNonExpired() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -194,9 +183,7 @@ public class LoginUser implements UserDetails {
|
|||||||
* 是否可用 ,禁用的用户不能身份验证
|
* 是否可用 ,禁用的用户不能身份验证
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/ @Override
|
||||||
@JSONField(serialize = false)
|
|
||||||
@Override
|
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -265,6 +252,15 @@ public class LoginUser implements UserDetails {
|
|||||||
this.user = user;
|
this.user = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Safe accessor for option values from optionJson (Map) */
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public String getOptionJsonValue(String key) {
|
||||||
|
if (optionJson instanceof Map<?, ?> map) {
|
||||||
|
Object val = map.get(key);
|
||||||
|
return val != null ? val.toString() : "";
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||||
return java.util.Collections.emptyList();
|
return java.util.Collections.emptyList();
|
||||||
|
|||||||
@@ -1,19 +1,50 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.filter.SimplePropertyPreFilter;
|
import com.fasterxml.jackson.annotation.JsonFilter;
|
||||||
|
import com.fasterxml.jackson.databind.ser.FilterProvider;
|
||||||
|
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
|
||||||
|
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排除JSON敏感属性
|
* 排除JSON敏感属性(Jackson版本)
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
public class PropertyPreExcludeFilter extends SimplePropertyPreFilter {
|
@JsonFilter("propertyFilter")
|
||||||
|
public class PropertyPreExcludeFilter {
|
||||||
|
|
||||||
|
private final Set<String> excludes = new HashSet<>();
|
||||||
|
|
||||||
public PropertyPreExcludeFilter() {}
|
public PropertyPreExcludeFilter() {}
|
||||||
|
|
||||||
public PropertyPreExcludeFilter addExcludes(String... filters) {
|
public PropertyPreExcludeFilter addExcludes(String... filters) {
|
||||||
for (int i = 0; i < filters.length; i++) {
|
for (String filter : filters) {
|
||||||
this.getExcludes().add(filters[i]);
|
this.excludes.add(filter);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Set<String> getExcludes() {
|
||||||
|
return excludes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建Jackson FilterProvider,用于ObjectMapper的序列化过滤
|
||||||
|
*/
|
||||||
|
public FilterProvider toFilterProvider() {
|
||||||
|
SimpleBeanPropertyFilter filter = SimpleBeanPropertyFilter.serializeAllExcept(excludes.toArray(new String[0]));
|
||||||
|
return new SimpleFilterProvider().addFilter("propertyFilter", filter);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建默认的日志过滤器
|
||||||
|
*/
|
||||||
|
public static PropertyPreExcludeFilter createLogFilter(String[] excludeParamNames) {
|
||||||
|
String[] defaultExcludes = {"password", "oldPassword", "newPassword", "confirmPassword"};
|
||||||
|
return new PropertyPreExcludeFilter().addExcludes(ArrayUtils.addAll(defaultExcludes, excludeParamNames));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.core.domain.entity.SysDictData;
|
import com.core.common.core.domain.entity.SysDictData;
|
||||||
import com.core.common.core.redis.RedisCache;
|
import com.core.common.core.redis.RedisCache;
|
||||||
@@ -37,9 +38,9 @@ public class DictUtils {
|
|||||||
* @return dictDatas 字典数据列表
|
* @return dictDatas 字典数据列表
|
||||||
*/
|
*/
|
||||||
public static List<SysDictData> getDictCache(String key) {
|
public static List<SysDictData> getDictCache(String key) {
|
||||||
JSONArray arrayCache = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
JsonNode arrayCache = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
||||||
if (StringUtils.isNotNull(arrayCache)) {
|
if (StringUtils.isNotNull(arrayCache)) {
|
||||||
return arrayCache.toList(SysDictData.class);
|
return new ObjectMapper().convertValue(arrayCache, new com.fasterxml.jackson.core.type.TypeReference<List<SysDictData>>() {});
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Jackson JSON 工具类
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
*/
|
||||||
|
public class JsonUtils {
|
||||||
|
private static final ObjectMapper MAPPER = new ObjectMapper();
|
||||||
|
|
||||||
|
static {
|
||||||
|
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
MAPPER.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ObjectMapper getMapper() {
|
||||||
|
return MAPPER;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String toJson(Object obj) {
|
||||||
|
try {
|
||||||
|
return MAPPER.writeValueAsString(obj);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
return "{}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static JsonNode parse(String json) {
|
||||||
|
try {
|
||||||
|
return MAPPER.readTree(json);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return MAPPER.createObjectNode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> T parseObject(String json, Class<T> clazz) {
|
||||||
|
try {
|
||||||
|
return MAPPER.readValue(json, clazz);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> T parseObject(String json, TypeReference<T> typeRef) {
|
||||||
|
try {
|
||||||
|
return MAPPER.readValue(json, typeRef);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.core.common.utils.ip;
|
package com.core.common.utils.ip;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.core.common.utils.JsonUtils;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
@@ -33,9 +34,9 @@ public class AddressUtils {
|
|||||||
log.error("获取地理位置异常 {}", ip);
|
log.error("获取地理位置异常 {}", ip);
|
||||||
return UNKNOWN;
|
return UNKNOWN;
|
||||||
}
|
}
|
||||||
JSONObject obj = JSON.parseObject(rspStr);
|
JsonNode obj; try { obj = JsonUtils.parse(rspStr); } catch (Exception e) { obj = null; }
|
||||||
String region = obj.getString("pro");
|
String region = obj.path("pro").asText();
|
||||||
String city = obj.getString("city");
|
String city = obj.path("city").asText();
|
||||||
return String.format("%s %s", region, city);
|
return String.format("%s %s", region, city);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取地理位置异常 {}", ip);
|
log.error("获取地理位置异常 {}", ip);
|
||||||
|
|||||||
@@ -39,11 +39,6 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 阿里JSON解析器 -->
|
<!-- 阿里JSON解析器 -->
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.fastjson2</groupId>
|
|
||||||
<artifactId>fastjson2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.core.flowable.service.impl;
|
package com.core.flowable.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.alibaba.fastjson2.TypeReference;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.entity.SysRole;
|
import com.core.common.core.domain.entity.SysRole;
|
||||||
@@ -811,7 +814,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|||||||
if (Objects.isNull(sysForm)) {
|
if (Objects.isNull(sysForm)) {
|
||||||
return AjaxResult.error("请先配置流程表单");
|
return AjaxResult.error("请先配置流程表单");
|
||||||
}
|
}
|
||||||
map.put("formData", JSONObject.parseObject(sysForm.getFormContent()));
|
map.put("formData", JsonUtils.parse(sysForm.getFormContent()));
|
||||||
}
|
}
|
||||||
return AjaxResult.success(map);
|
return AjaxResult.success(map);
|
||||||
}
|
}
|
||||||
@@ -1028,7 +1031,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|||||||
if (Objects.isNull(sysForm)) {
|
if (Objects.isNull(sysForm)) {
|
||||||
return AjaxResult.error("请先配置流程表单!");
|
return AjaxResult.error("请先配置流程表单!");
|
||||||
}
|
}
|
||||||
return AjaxResult.success(JSONObject.parseObject(sysForm.getFormContent()));
|
return AjaxResult.success(JsonUtils.parse(sysForm.getFormContent()));
|
||||||
} else {
|
} else {
|
||||||
return AjaxResult.error("参数错误!");
|
return AjaxResult.error("参数错误!");
|
||||||
}
|
}
|
||||||
@@ -1105,25 +1108,25 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|||||||
} else {
|
} else {
|
||||||
parameters = taskService.getVariables(taskId);
|
parameters = taskService.getVariables(taskId);
|
||||||
}
|
}
|
||||||
JSONObject oldVariables = JSONObject.parseObject(JSON.toJSONString(parameters.get("formJson")));
|
ObjectNode oldVariables = (ObjectNode) JsonUtils.parse(JsonUtils.toJson(parameters.get("formJson")));
|
||||||
List<JSONObject> oldFields = JSON.parseObject(JSON.toJSONString(oldVariables.get("widgetList")),
|
List<JsonNode> oldFields = JsonUtils.parseObject(JsonUtils.toJson(oldVariables.get("widgetList")),
|
||||||
new TypeReference<List<JSONObject>>() {});
|
new TypeReference<List<JsonNode>>() {});
|
||||||
// 设置已填写的表单为禁用状态
|
// 设置已填写的表单为禁用状态
|
||||||
for (JSONObject oldField : oldFields) {
|
for (JsonNode oldField : oldFields) {
|
||||||
JSONObject options = oldField.getJSONObject("options");
|
ObjectNode options = (ObjectNode) oldField.path("options");
|
||||||
options.put("disabled", true);
|
options.put("disabled", true);
|
||||||
}
|
}
|
||||||
// TODO 暂时只处理用户任务上的表单
|
// TODO 暂时只处理用户任务上的表单
|
||||||
if (StringUtils.isNotBlank(task.getFormKey())) {
|
if (StringUtils.isNotBlank(task.getFormKey())) {
|
||||||
SysForm sysForm = sysFormService.selectSysFormById(Long.parseLong(task.getFormKey()));
|
SysForm sysForm = sysFormService.selectSysFormById(Long.parseLong(task.getFormKey()));
|
||||||
JSONObject data = JSONObject.parseObject(sysForm.getFormContent());
|
JsonNode data = JsonUtils.parse(sysForm.getFormContent());
|
||||||
List<JSONObject> newFields =
|
List<JsonNode> newFields =
|
||||||
JSON.parseObject(JSON.toJSONString(data.get("widgetList")), new TypeReference<List<JSONObject>>() {});
|
JsonUtils.parseObject(JsonUtils.toJson(data.get("widgetList")), new TypeReference<List<JsonNode>>() {});
|
||||||
// 表单回显时 加入子表单信息到流程变量中
|
// 表单回显时 加入子表单信息到流程变量中
|
||||||
for (JSONObject newField : newFields) {
|
for (JsonNode newField : newFields) {
|
||||||
String key = newField.getString("id");
|
String key = newField.path("id").asText();
|
||||||
// 处理图片上传组件回显问题
|
// 处理图片上传组件回显问题
|
||||||
if ("picture-upload".equals(newField.getString("type"))) {
|
if ("picture-upload".equals(newField.path("type").asText())) {
|
||||||
parameters.put(key, new ArrayList<>());
|
parameters.put(key, new ArrayList<>());
|
||||||
} else {
|
} else {
|
||||||
parameters.put(key, null);
|
parameters.put(key, null);
|
||||||
@@ -1131,7 +1134,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
|||||||
}
|
}
|
||||||
oldFields.addAll(newFields);
|
oldFields.addAll(newFields);
|
||||||
}
|
}
|
||||||
oldVariables.put("widgetList", oldFields);
|
ArrayNode fieldsArray = new ObjectMapper().createArrayNode(); fieldsArray.addAll(oldFields); oldVariables.set("widgetList", fieldsArray);
|
||||||
parameters.put("formJson", oldVariables);
|
parameters.put("formJson", oldVariables);
|
||||||
return AjaxResult.success(parameters);
|
return AjaxResult.success(parameters);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.core.framework.aspectj;
|
package com.core.framework.aspectj;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.domain.entity.SysUser;
|
import com.core.common.core.domain.entity.SysUser;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
@@ -142,7 +143,7 @@ public class LogAspect {
|
|||||||
}
|
}
|
||||||
// 是否需要保存response,参数和值
|
// 是否需要保存response,参数和值
|
||||||
if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult)) {
|
if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult)) {
|
||||||
operLog.setJsonResult(StringUtils.substring(JSON.toJSONString(jsonResult), 0, 2000));
|
operLog.setJsonResult(StringUtils.substring(JsonUtils.toJson(jsonResult), 0, 2000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,7 +162,7 @@ public class LogAspect {
|
|||||||
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
operLog.setOperParam(StringUtils.substring(params, 0, 2000));
|
||||||
} else {
|
} else {
|
||||||
operLog.setOperParam(StringUtils
|
operLog.setOperParam(StringUtils
|
||||||
.substring(JSON.toJSONString(paramsMap, excludePropertyPreFilter(excludeParamNames)), 0, 2000));
|
.substring(new ObjectMapper().writer(excludePropertyPreFilter(excludeParamNames).toFilterProvider()).writeValueAsString(paramsMap), 0, 2000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,7 +175,7 @@ public class LogAspect {
|
|||||||
for (Object o : paramsArray) {
|
for (Object o : paramsArray) {
|
||||||
if (StringUtils.isNotNull(o) && !isFilterObject(o)) {
|
if (StringUtils.isNotNull(o) && !isFilterObject(o)) {
|
||||||
try {
|
try {
|
||||||
String jsonObj = JSON.toJSONString(o, excludePropertyPreFilter(excludeParamNames));
|
String jsonObj = new ObjectMapper().writer(excludePropertyPreFilter(excludeParamNames).toFilterProvider()).writeValueAsString(o);
|
||||||
params += jsonObj.toString() + " ";
|
params += jsonObj.toString() + " ";
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.debug("Caught expected exception: {}", e.getMessage());
|
log.debug("Caught expected exception: {}", e.getMessage());
|
||||||
|
|||||||
@@ -1,83 +1,58 @@
|
|||||||
package com.core.framework.config;
|
package com.core.framework.config;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonParser;
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.jackson2.autoconfigure.Jackson2ObjectMapperBuilderCustomizer;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
/**
|
|
||||||
* 程序注解配置
|
|
||||||
*
|
|
||||||
* @author system
|
|
||||||
*/
|
|
||||||
@Configuration
|
@Configuration
|
||||||
// 表示通过aop框架暴露该代理对象,AopContext能够访问
|
|
||||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
@EnableAspectJAutoProxy(exposeProxy = true)
|
||||||
// 指定要扫描的Mapper类的包的路径
|
|
||||||
@MapperScan({"com.core.**.mapper", "com.healthlink.his.**.mapper"})
|
@MapperScan({"com.core.**.mapper", "com.healthlink.his.**.mapper"})
|
||||||
public class ApplicationConfig {
|
public class ApplicationConfig {
|
||||||
private static final Logger log = LoggerFactory.getLogger(ApplicationConfig.class);
|
|
||||||
|
|
||||||
/** 支持多种日期格式的反序列化器 */
|
private static final JsonDeserializer<LocalDateTime> LOCAL_DATE_TIME_DESERIALIZER = new JsonDeserializer<>() {
|
||||||
private static final JsonDeserializer<LocalDateTime> LOCAL_DATE_TIME_DESERIALIZER = new JsonDeserializer<LocalDateTime>() {
|
|
||||||
private static final DateTimeFormatter ISO_FORMATTER = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
|
private static final DateTimeFormatter ISO_FORMATTER = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
|
||||||
private static final DateTimeFormatter SIMPLE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
private static final DateTimeFormatter SIMPLE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
private static final DateTimeFormatter SLASH_FORMATTER = DateTimeFormatter.ofPattern("yyyy/M/d HH:mm:ss");
|
private static final DateTimeFormatter SLASH_FORMATTER = DateTimeFormatter.ofPattern("yyyy/M/d HH:mm:ss");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LocalDateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
|
public LocalDateTime deserialize(JsonParser p, DeserializationContext context) throws IOException {
|
||||||
String text = p.getText();
|
String text = p.getText();
|
||||||
if (text == null || text.isEmpty()) {
|
if (text == null || text.isEmpty()) return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// 去除时区后缀 Z/z 和偏移量 +HH:MM/+HHMM(LocalDateTime 不含时区信息)
|
|
||||||
String cleaned = text.replaceAll("[Zz]$", "").replaceAll("[+-]\\d{2}:?\\d{2}$", "");
|
String cleaned = text.replaceAll("[Zz]$", "").replaceAll("[+-]\\d{2}:?\\d{2}$", "");
|
||||||
// 尝试 ISO 8601 格式(yyyy-MM-ddTHH:mm:ss.SSS)
|
try { return LocalDateTime.parse(cleaned, ISO_FORMATTER); } catch (Exception ignored) {}
|
||||||
try {
|
try { return LocalDateTime.parse(cleaned, SIMPLE_FORMATTER); } catch (Exception ignored) {}
|
||||||
return LocalDateTime.parse(cleaned, ISO_FORMATTER);
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
// intentionally ignored
|
|
||||||
}
|
|
||||||
// 尝试简单格式(yyyy-MM-dd HH:mm:ss)
|
|
||||||
try {
|
|
||||||
return LocalDateTime.parse(cleaned, SIMPLE_FORMATTER);
|
|
||||||
} catch (Exception ignored) {
|
|
||||||
// intentionally ignored
|
|
||||||
}
|
|
||||||
// 尝试斜杠格式(yyyy/M/d HH:mm:ss)
|
|
||||||
return LocalDateTime.parse(cleaned, SLASH_FORMATTER);
|
return LocalDateTime.parse(cleaned, SLASH_FORMATTER);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* 时区配置
|
|
||||||
*/
|
|
||||||
@Bean
|
@Bean
|
||||||
public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() {
|
public ObjectMapper objectMapper() {
|
||||||
return builder -> {
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
// 设置默认时区
|
mapper.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||||
builder.timeZone(TimeZone.getDefault());
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
// 设置日期格式为 yyyy/M/d HH:mm:ss,支持多种格式反序列化
|
sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
||||||
builder.simpleDateFormat("yyyy/M/d HH:mm:ss");
|
mapper.setDateFormat(sdf);
|
||||||
// 添加JavaTimeModule支持,用于LocalDateTime
|
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
|
||||||
javaTimeModule.addDeserializer(LocalDateTime.class, LOCAL_DATE_TIME_DESERIALIZER);
|
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
||||||
builder.modules(javaTimeModule);
|
javaTimeModule.addDeserializer(LocalDateTime.class, LOCAL_DATE_TIME_DESERIALIZER);
|
||||||
builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy/M/d HH:mm:ss")));
|
javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||||
};
|
mapper.registerModule(javaTimeModule);
|
||||||
|
|
||||||
|
return mapper;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,30 +1,46 @@
|
|||||||
package com.core.framework.config;
|
package com.core.framework.config;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.alibaba.fastjson2.JSONReader;
|
import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
|
||||||
import com.alibaba.fastjson2.JSONWriter;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
import com.alibaba.fastjson2.filter.Filter;
|
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||||
import com.core.common.constant.Constants;
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.data.redis.serializer.RedisSerializer;
|
import org.springframework.data.redis.serializer.RedisSerializer;
|
||||||
import org.springframework.data.redis.serializer.SerializationException;
|
import org.springframework.data.redis.serializer.SerializationException;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redis使用FastJson序列化
|
* Redis序列化器 - 兼容fastjson2旧格式
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> {
|
public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> {
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(FastJson2JsonRedisSerializer.class);
|
||||||
public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
|
public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
|
||||||
|
|
||||||
static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(Constants.JSON_WHITELIST_STR);
|
/** 新格式: 带类型信息 (activateDefaultTyping) */
|
||||||
|
private final ObjectMapper typedMapper;
|
||||||
private Class<T> clazz;
|
/** 旧格式fallback: 不带类型信息,读为Map再转换 */
|
||||||
|
private final ObjectMapper plainMapper;
|
||||||
|
private final Class<T> clazz;
|
||||||
|
|
||||||
public FastJson2JsonRedisSerializer(Class<T> clazz) {
|
public FastJson2JsonRedisSerializer(Class<T> clazz) {
|
||||||
super();
|
super();
|
||||||
this.clazz = clazz;
|
this.clazz = clazz;
|
||||||
|
|
||||||
|
// 新格式 ObjectMapper (带类型信息)
|
||||||
|
this.typedMapper = new ObjectMapper();
|
||||||
|
this.typedMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
||||||
|
this.typedMapper.activateDefaultTyping(
|
||||||
|
LaissezFaireSubTypeValidator.instance,
|
||||||
|
ObjectMapper.DefaultTyping.NON_FINAL);
|
||||||
|
|
||||||
|
// 旧格式 ObjectMapper (不带类型信息)
|
||||||
|
this.plainMapper = new ObjectMapper();
|
||||||
|
this.plainMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -32,16 +48,31 @@ public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> {
|
|||||||
if (t == null) {
|
if (t == null) {
|
||||||
return new byte[0];
|
return new byte[0];
|
||||||
}
|
}
|
||||||
return JSON.toJSONString(t, JSONWriter.Feature.WriteClassName).getBytes(DEFAULT_CHARSET);
|
try {
|
||||||
|
return typedMapper.writeValueAsBytes(t);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new SerializationException("Could not serialize: " + e.getMessage(), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public T deserialize(byte[] bytes) throws SerializationException {
|
public T deserialize(byte[] bytes) throws SerializationException {
|
||||||
if (bytes == null || bytes.length <= 0) {
|
if (bytes == null || bytes.length <= 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String str = new String(bytes, DEFAULT_CHARSET);
|
// 1. 新格式: 带类型信息的Jackson
|
||||||
|
try {
|
||||||
return JSON.parseObject(str, clazz, AUTO_TYPE_FILTER);
|
return typedMapper.readValue(bytes, clazz);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
|
// 2. 旧格式fallback: 不带类型信息,读为Map再转换
|
||||||
|
try {
|
||||||
|
LinkedHashMap<?, ?> map = plainMapper.readValue(bytes, LinkedHashMap.class);
|
||||||
|
return plainMapper.convertValue(map, clazz);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("Redis数据反序列化失败(已忽略,用户需重新登录): {}", e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,29 +8,51 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.data.redis.core.ValueOperations;
|
import org.springframework.data.redis.core.ValueOperations;
|
||||||
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
import org.springframework.data.redis.core.script.DefaultRedisScript;
|
||||||
|
import org.springframework.data.redis.serializer.GenericJacksonJsonRedisSerializer;
|
||||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||||
|
import tools.jackson.databind.DeserializationFeature;
|
||||||
|
import tools.jackson.databind.DatabindContext;
|
||||||
|
import tools.jackson.databind.JavaType;
|
||||||
|
import tools.jackson.databind.json.JsonMapper;
|
||||||
|
import tools.jackson.databind.jsontype.PolymorphicTypeValidator;
|
||||||
|
|
||||||
/**
|
|
||||||
* redis配置
|
|
||||||
*
|
|
||||||
* @author system
|
|
||||||
*/
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableCaching
|
@EnableCaching
|
||||||
public class RedisConfig extends CachingConfigurerSupport {
|
public class RedisConfig extends CachingConfigurerSupport {
|
||||||
|
|
||||||
|
private static final PolymorphicTypeValidator ALLOW_ALL = new PolymorphicTypeValidator() {
|
||||||
|
@Override
|
||||||
|
public Validity validateBaseType(DatabindContext ctxt, JavaType baseType) {
|
||||||
|
return Validity.ALLOWED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Validity validateSubClassName(DatabindContext ctxt, JavaType baseType, String subClassName) {
|
||||||
|
return Validity.ALLOWED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Validity validateSubType(DatabindContext ctxt, JavaType baseType, JavaType subType) {
|
||||||
|
return Validity.ALLOWED;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@SuppressWarnings(value = {"unchecked", "rawtypes"})
|
@SuppressWarnings(value = {"unchecked", "rawtypes"})
|
||||||
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
|
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
|
||||||
RedisTemplate<Object, Object> template = new RedisTemplate<>();
|
RedisTemplate<Object, Object> template = new RedisTemplate<>();
|
||||||
template.setConnectionFactory(connectionFactory);
|
template.setConnectionFactory(connectionFactory);
|
||||||
|
|
||||||
FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class);
|
tools.jackson.databind.ObjectMapper objectMapper = JsonMapper.builder()
|
||||||
|
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
|
||||||
|
.activateDefaultTyping(ALLOW_ALL, tools.jackson.databind.DefaultTyping.NON_FINAL)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
GenericJacksonJsonRedisSerializer serializer = new GenericJacksonJsonRedisSerializer(objectMapper);
|
||||||
|
|
||||||
// 使用StringRedisSerializer来序列化和反序列化redis的key值
|
|
||||||
template.setKeySerializer(new StringRedisSerializer());
|
template.setKeySerializer(new StringRedisSerializer());
|
||||||
template.setValueSerializer(serializer);
|
template.setValueSerializer(serializer);
|
||||||
|
|
||||||
// Hash的key也采用StringRedisSerializer的序列化方式
|
|
||||||
template.setHashKeySerializer(new StringRedisSerializer());
|
template.setHashKeySerializer(new StringRedisSerializer());
|
||||||
template.setHashValueSerializer(serializer);
|
template.setHashValueSerializer(serializer);
|
||||||
|
|
||||||
@@ -51,9 +73,6 @@ public class RedisConfig extends CachingConfigurerSupport {
|
|||||||
return redisTemplate.opsForValue();
|
return redisTemplate.opsForValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 限流脚本
|
|
||||||
*/
|
|
||||||
private String limitScriptText() {
|
private String limitScriptText() {
|
||||||
return "local key = KEYS[1]\n" + "local count = tonumber(ARGV[1])\n" + "local time = tonumber(ARGV[2])\n"
|
return "local key = KEYS[1]\n" + "local count = tonumber(ARGV[1])\n" + "local time = tonumber(ARGV[2])\n"
|
||||||
+ "local current = redis.call('get', key);\n" + "if current and tonumber(current) > count then\n"
|
+ "local current = redis.call('get', key);\n" + "if current and tonumber(current) > count then\n"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.core.framework.interceptor;
|
package com.core.framework.interceptor;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.core.common.annotation.RepeatSubmit;
|
import com.core.common.annotation.RepeatSubmit;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.utils.ServletUtils;
|
import com.core.common.utils.ServletUtils;
|
||||||
@@ -28,7 +29,7 @@ public abstract class RepeatSubmitInterceptor implements HandlerInterceptor {
|
|||||||
if (annotation != null) {
|
if (annotation != null) {
|
||||||
if (this.isRepeatSubmit(request, annotation)) {
|
if (this.isRepeatSubmit(request, annotation)) {
|
||||||
AjaxResult ajaxResult = AjaxResult.error(annotation.message());
|
AjaxResult ajaxResult = AjaxResult.error(annotation.message());
|
||||||
ServletUtils.renderString(response, JSON.toJSONString(ajaxResult));
|
try { ServletUtils.renderString(response, JsonUtils.toJson(ajaxResult)); } catch (Exception e) { /* ignore */ }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.core.framework.interceptor.impl;
|
package com.core.framework.interceptor.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.core.common.annotation.RepeatSubmit;
|
import com.core.common.annotation.RepeatSubmit;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.core.redis.RedisCache;
|
import com.core.common.core.redis.RedisCache;
|
||||||
@@ -45,7 +46,7 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor {
|
|||||||
|
|
||||||
// body参数为空,获取Parameter的数据
|
// body参数为空,获取Parameter的数据
|
||||||
if (StringUtils.isEmpty(nowParams)) {
|
if (StringUtils.isEmpty(nowParams)) {
|
||||||
nowParams = JSON.toJSONString(request.getParameterMap());
|
try { nowParams = JsonUtils.toJson(request.getParameterMap()); } catch (Exception e) { nowParams = "{}"; }
|
||||||
}
|
}
|
||||||
Map<String, Object> nowDataMap = new HashMap<String, Object>();
|
Map<String, Object> nowDataMap = new HashMap<String, Object>();
|
||||||
nowDataMap.put(REPEAT_PARAMS, nowParams);
|
nowDataMap.put(REPEAT_PARAMS, nowParams);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.core.framework.security.handle;
|
package com.core.framework.security.handle;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.utils.ServletUtils;
|
import com.core.common.utils.ServletUtils;
|
||||||
@@ -28,6 +29,6 @@ public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, S
|
|||||||
throws IOException {
|
throws IOException {
|
||||||
int code = HttpStatus.UNAUTHORIZED;
|
int code = HttpStatus.UNAUTHORIZED;
|
||||||
String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI());
|
String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI());
|
||||||
ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(code, msg)));
|
try { String json = JsonUtils.toJson(AjaxResult.error(code, msg)); ServletUtils.renderString(response, json); } catch (Exception ignored) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.core.framework.security.handle;
|
package com.core.framework.security.handle;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
@@ -48,6 +49,6 @@ public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler {
|
|||||||
AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, MessageUtils.message("user.logout.success")));
|
AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, MessageUtils.message("user.logout.success")));
|
||||||
}
|
}
|
||||||
ServletUtils.renderString(response,
|
ServletUtils.renderString(response,
|
||||||
JSON.toJSONString(AjaxResult.success(MessageUtils.message("user.logout.success"))));
|
JsonUtils.toJson(AjaxResult.success(MessageUtils.message("user.logout.success"))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.core.framework.web.service;
|
package com.core.framework.web.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.constant.UserConstants;
|
import com.core.common.constant.UserConstants;
|
||||||
@@ -163,13 +163,13 @@ public class SysLoginService {
|
|||||||
if (optionList.isEmpty()) {
|
if (optionList.isEmpty()) {
|
||||||
throw new IllegalArgumentException("未匹配到option信息");
|
throw new IllegalArgumentException("未匹配到option信息");
|
||||||
}
|
}
|
||||||
JSONObject optionJson = new JSONObject();
|
Map<String, String> optionJsonMap = new java.util.HashMap<>();
|
||||||
for (Map<String, String> map : optionList) {
|
for (Map<String, String> map : optionList) {
|
||||||
String key = map.get("optionkey");
|
String key = map.get("optionkey");
|
||||||
String value = map.get("optionvalue");
|
String value = map.get("optionvalue");
|
||||||
optionJson.put(key, value);
|
optionJsonMap.put(key, value);
|
||||||
}
|
}
|
||||||
loginUser.setOptionJson(optionJson);
|
loginUser.setOptionJson(optionJsonMap);
|
||||||
|
|
||||||
// TODO:下面的配置项启用后,上面option集合处理注释掉
|
// TODO:下面的配置项启用后,上面option集合处理注释掉
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.core.generator.service;
|
package com.core.generator.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.core.common.utils.JsonUtils;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.constant.GenConstants;
|
import com.core.common.constant.GenConstants;
|
||||||
import com.core.common.core.text.CharsetKit;
|
import com.core.common.core.text.CharsetKit;
|
||||||
@@ -133,7 +134,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateGenTable(GenTable genTable) {
|
public void updateGenTable(GenTable genTable) {
|
||||||
String options = JSON.toJSONString(genTable.getParams());
|
String options; try { options = JsonUtils.toJson(genTable.getParams()); } catch (Exception e) { options = "{}"; }
|
||||||
genTable.setOptions(options);
|
genTable.setOptions(options);
|
||||||
int row = genTableMapper.updateGenTable(genTable);
|
int row = genTableMapper.updateGenTable(genTable);
|
||||||
if (row > 0) {
|
if (row > 0) {
|
||||||
@@ -386,13 +387,13 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||||||
@Override
|
@Override
|
||||||
public void validateEdit(GenTable genTable) {
|
public void validateEdit(GenTable genTable) {
|
||||||
if (GenConstants.TPL_TREE.equals(genTable.getTplCategory())) {
|
if (GenConstants.TPL_TREE.equals(genTable.getTplCategory())) {
|
||||||
String options = JSON.toJSONString(genTable.getParams());
|
String options; try { options = JsonUtils.toJson(genTable.getParams()); } catch (Exception e) { options = "{}"; }
|
||||||
JSONObject paramsObj = JSON.parseObject(options);
|
JsonNode paramsObj; try { paramsObj = JsonUtils.parse(options); } catch (Exception e) { paramsObj = new ObjectMapper().createObjectNode(); }
|
||||||
if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE))) {
|
if (StringUtils.isEmpty(paramsObj.path(GenConstants.TREE_CODE).asText())) {
|
||||||
throw new ServiceException("树编码字段不能为空");
|
throw new ServiceException("树编码字段不能为空");
|
||||||
} else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_PARENT_CODE))) {
|
} else if (StringUtils.isEmpty(paramsObj.path(GenConstants.TREE_PARENT_CODE).asText())) {
|
||||||
throw new ServiceException("树父编码字段不能为空");
|
throw new ServiceException("树父编码字段不能为空");
|
||||||
} else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_NAME))) {
|
} else if (StringUtils.isEmpty(paramsObj.path(GenConstants.TREE_NAME).asText())) {
|
||||||
throw new ServiceException("树名称字段不能为空");
|
throw new ServiceException("树名称字段不能为空");
|
||||||
} else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) {
|
} else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) {
|
||||||
if (StringUtils.isEmpty(genTable.getSubTableName())) {
|
if (StringUtils.isEmpty(genTable.getSubTableName())) {
|
||||||
@@ -450,13 +451,13 @@ public class GenTableServiceImpl implements IGenTableService {
|
|||||||
* @param genTable 设置后的生成对象
|
* @param genTable 设置后的生成对象
|
||||||
*/
|
*/
|
||||||
public void setTableFromOptions(GenTable genTable) {
|
public void setTableFromOptions(GenTable genTable) {
|
||||||
JSONObject paramsObj = JSON.parseObject(genTable.getOptions());
|
JsonNode paramsObj; try { paramsObj = JsonUtils.parse(genTable.getOptions()); } catch (Exception e) { paramsObj = new ObjectMapper().createObjectNode(); }
|
||||||
if (StringUtils.isNotNull(paramsObj)) {
|
if (StringUtils.isNotNull(paramsObj)) {
|
||||||
String treeCode = paramsObj.getString(GenConstants.TREE_CODE);
|
String treeCode = paramsObj.path(GenConstants.TREE_CODE).asText();
|
||||||
String treeParentCode = paramsObj.getString(GenConstants.TREE_PARENT_CODE);
|
String treeParentCode = paramsObj.path(GenConstants.TREE_PARENT_CODE).asText();
|
||||||
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
|
String treeName = paramsObj.path(GenConstants.TREE_NAME).asText();
|
||||||
Long parentMenuId = paramsObj.getLongValue(GenConstants.PARENT_MENU_ID);
|
Long parentMenuId = paramsObj.path(GenConstants.PARENT_MENU_ID).asLong();
|
||||||
String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME);
|
String parentMenuName = paramsObj.path(GenConstants.PARENT_MENU_NAME).asText();
|
||||||
|
|
||||||
genTable.setTreeCode(treeCode);
|
genTable.setTreeCode(treeCode);
|
||||||
genTable.setTreeParentCode(treeParentCode);
|
genTable.setTreeParentCode(treeParentCode);
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.core.generator.util;
|
package com.core.generator.util;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.core.common.utils.JsonUtils;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.core.common.constant.GenConstants;
|
import com.core.common.constant.GenConstants;
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
@@ -72,14 +73,14 @@ public class VelocityUtils {
|
|||||||
|
|
||||||
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) {
|
public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) {
|
||||||
String options = genTable.getOptions();
|
String options = genTable.getOptions();
|
||||||
JSONObject paramsObj = JSON.parseObject(options);
|
JsonNode paramsObj; try { paramsObj = JsonUtils.parse(options); } catch (Exception e) { paramsObj = null; }
|
||||||
String parentMenuId = getParentMenuId(paramsObj);
|
String parentMenuId = getParentMenuId(paramsObj);
|
||||||
context.put("parentMenuId", parentMenuId);
|
context.put("parentMenuId", parentMenuId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) {
|
public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) {
|
||||||
String options = genTable.getOptions();
|
String options = genTable.getOptions();
|
||||||
JSONObject paramsObj = JSON.parseObject(options);
|
JsonNode paramsObj; try { paramsObj = JsonUtils.parse(options); } catch (Exception e) { paramsObj = null; }
|
||||||
String treeCode = getTreecode(paramsObj);
|
String treeCode = getTreecode(paramsObj);
|
||||||
String treeParentCode = getTreeParentCode(paramsObj);
|
String treeParentCode = getTreeParentCode(paramsObj);
|
||||||
String treeName = getTreeName(paramsObj);
|
String treeName = getTreeName(paramsObj);
|
||||||
@@ -88,11 +89,11 @@ public class VelocityUtils {
|
|||||||
context.put("treeParentCode", treeParentCode);
|
context.put("treeParentCode", treeParentCode);
|
||||||
context.put("treeName", treeName);
|
context.put("treeName", treeName);
|
||||||
context.put("expandColumn", getExpandColumn(genTable));
|
context.put("expandColumn", getExpandColumn(genTable));
|
||||||
if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) {
|
if (paramsObj.has(GenConstants.TREE_PARENT_CODE)) {
|
||||||
context.put("tree_parent_code", paramsObj.getString(GenConstants.TREE_PARENT_CODE));
|
context.put("tree_parent_code", paramsObj.path(GenConstants.TREE_PARENT_CODE).asText());
|
||||||
}
|
}
|
||||||
if (paramsObj.containsKey(GenConstants.TREE_NAME)) {
|
if (paramsObj.has(GenConstants.TREE_NAME)) {
|
||||||
context.put("tree_name", paramsObj.getString(GenConstants.TREE_NAME));
|
context.put("tree_name", paramsObj.path(GenConstants.TREE_NAME).asText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,10 +248,10 @@ public class VelocityUtils {
|
|||||||
* @param paramsObj 生成其他选项
|
* @param paramsObj 生成其他选项
|
||||||
* @return 上级菜单ID字段
|
* @return 上级菜单ID字段
|
||||||
*/
|
*/
|
||||||
public static String getParentMenuId(JSONObject paramsObj) {
|
public static String getParentMenuId(JsonNode paramsObj) {
|
||||||
if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID)
|
if (paramsObj != null && !paramsObj.isMissingNode() && paramsObj.has(GenConstants.PARENT_MENU_ID)
|
||||||
&& StringUtils.isNotEmpty(paramsObj.getString(GenConstants.PARENT_MENU_ID))) {
|
&& StringUtils.isNotEmpty(paramsObj.path(GenConstants.PARENT_MENU_ID).asText())) {
|
||||||
return paramsObj.getString(GenConstants.PARENT_MENU_ID);
|
return paramsObj.path(GenConstants.PARENT_MENU_ID).asText();
|
||||||
}
|
}
|
||||||
return DEFAULT_PARENT_MENU_ID;
|
return DEFAULT_PARENT_MENU_ID;
|
||||||
}
|
}
|
||||||
@@ -261,9 +262,9 @@ public class VelocityUtils {
|
|||||||
* @param paramsObj 生成其他选项
|
* @param paramsObj 生成其他选项
|
||||||
* @return 树编码
|
* @return 树编码
|
||||||
*/
|
*/
|
||||||
public static String getTreecode(JSONObject paramsObj) {
|
public static String getTreecode(JsonNode paramsObj) {
|
||||||
if (paramsObj.containsKey(GenConstants.TREE_CODE)) {
|
if (paramsObj.has(GenConstants.TREE_CODE)) {
|
||||||
return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_CODE));
|
return StringUtils.toCamelCase(paramsObj.path(GenConstants.TREE_CODE).asText());
|
||||||
}
|
}
|
||||||
return StringUtils.EMPTY;
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
@@ -274,9 +275,9 @@ public class VelocityUtils {
|
|||||||
* @param paramsObj 生成其他选项
|
* @param paramsObj 生成其他选项
|
||||||
* @return 树父编码
|
* @return 树父编码
|
||||||
*/
|
*/
|
||||||
public static String getTreeParentCode(JSONObject paramsObj) {
|
public static String getTreeParentCode(JsonNode paramsObj) {
|
||||||
if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) {
|
if (paramsObj.has(GenConstants.TREE_PARENT_CODE)) {
|
||||||
return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_PARENT_CODE));
|
return StringUtils.toCamelCase(paramsObj.path(GenConstants.TREE_PARENT_CODE).asText());
|
||||||
}
|
}
|
||||||
return StringUtils.EMPTY;
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
@@ -287,9 +288,9 @@ public class VelocityUtils {
|
|||||||
* @param paramsObj 生成其他选项
|
* @param paramsObj 生成其他选项
|
||||||
* @return 树名称
|
* @return 树名称
|
||||||
*/
|
*/
|
||||||
public static String getTreeName(JSONObject paramsObj) {
|
public static String getTreeName(JsonNode paramsObj) {
|
||||||
if (paramsObj.containsKey(GenConstants.TREE_NAME)) {
|
if (paramsObj.has(GenConstants.TREE_NAME)) {
|
||||||
return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_NAME));
|
return StringUtils.toCamelCase(paramsObj.path(GenConstants.TREE_NAME).asText());
|
||||||
}
|
}
|
||||||
return StringUtils.EMPTY;
|
return StringUtils.EMPTY;
|
||||||
}
|
}
|
||||||
@@ -302,8 +303,8 @@ public class VelocityUtils {
|
|||||||
*/
|
*/
|
||||||
public static int getExpandColumn(GenTable genTable) {
|
public static int getExpandColumn(GenTable genTable) {
|
||||||
String options = genTable.getOptions();
|
String options = genTable.getOptions();
|
||||||
JSONObject paramsObj = JSON.parseObject(options);
|
JsonNode paramsObj; try { paramsObj = JsonUtils.parse(options); } catch (Exception e) { paramsObj = null; }
|
||||||
String treeName = paramsObj.getString(GenConstants.TREE_NAME);
|
String treeName = paramsObj.path(GenConstants.TREE_NAME).asText();
|
||||||
int num = 0;
|
int num = 0;
|
||||||
for (GenTableColumn column : genTable.getColumns()) {
|
for (GenTableColumn column : genTable.getColumns()) {
|
||||||
if (column.isList()) {
|
if (column.isList()) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
</description>
|
</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<fastjson2.version>2.0.43</fastjson2.version>
|
|
||||||
<pinyin4j.version>2.5.1</pinyin4j.version>
|
<pinyin4j.version>2.5.1</pinyin4j.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
@@ -49,21 +48,6 @@
|
|||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- FastJSON2 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.fastjson2</groupId>
|
|
||||||
<artifactId>fastjson2</artifactId>
|
|
||||||
<version>${fastjson2.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 如果还需要FastJSON,建议移除或替换为FastJSON2 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<version>1.2.83</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- pinyin4j -->
|
<!-- pinyin4j -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.belerweb</groupId>
|
<groupId>com.belerweb</groupId>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
@@ -104,12 +104,6 @@
|
|||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba</groupId>
|
|
||||||
<artifactId>fastjson</artifactId>
|
|
||||||
<version>2.0.43</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents.client5</groupId>
|
<groupId>org.apache.httpcomponents.client5</groupId>
|
||||||
<artifactId>httpclient5</artifactId>
|
<artifactId>httpclient5</artifactId>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class HealthcareServiceController {
|
|||||||
boolean res = iChargeItemDefinitionService.addChargeItemDefinitionByHealthcareService(healthcareServiceAfterAdd,
|
boolean res = iChargeItemDefinitionService.addChargeItemDefinitionByHealthcareService(healthcareServiceAfterAdd,
|
||||||
chargeItemDefinition);
|
chargeItemDefinition);
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
// 医保开关打开并且,页面传了医保编码
|
// 医保开关打开并且,页面传了医保编码
|
||||||
String ybNo = healthcareServiceFormData.getYbNo();
|
String ybNo = healthcareServiceFormData.getYbNo();
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(ybNo)) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(ybNo)) {
|
||||||
@@ -186,7 +186,7 @@ public class HealthcareServiceController {
|
|||||||
HealthcareService healthcareService = new HealthcareService();
|
HealthcareService healthcareService = new HealthcareService();
|
||||||
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
BeanUtils.copyProperties(healthcareServiceFormData, healthcareService);
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
// 医保开关打开并且,页面传了医保编码
|
// 医保开关打开并且,页面传了医保编码
|
||||||
String ybNo = healthcareServiceFormData.getYbNo();
|
String ybNo = healthcareServiceFormData.getYbNo();
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(ybNo)) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(ybNo)) {
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ public class OutpatientRefundAppServiceImpl implements IOutpatientRefundAppServi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String fixmedinsCode =
|
String fixmedinsCode =
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
if (!HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
if (!HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
||||||
if (!devReqIdList.isEmpty()) {
|
if (!devReqIdList.isEmpty()) {
|
||||||
List<DeviceRequest> deviceRequestList = deviceRequestService
|
List<DeviceRequest> deviceRequestList = deviceRequestService
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
|||||||
CancelPaymentDto cancelPaymentDto = new CancelPaymentDto();
|
CancelPaymentDto cancelPaymentDto = new CancelPaymentDto();
|
||||||
BeanUtils.copyProperties(cancelRegPaymentDto, cancelPaymentDto);
|
BeanUtils.copyProperties(cancelRegPaymentDto, cancelPaymentDto);
|
||||||
//LoginUser loginUser = SecurityUtils.getLoginUser();
|
//LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
//String string1 = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH);
|
//String string1 = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH);
|
||||||
// 开通医保的处理
|
// 开通医保的处理
|
||||||
if ("1".equals(SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))
|
if ("1".equals(SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH))
|
||||||
&& account != null && !CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(account.getContractNo())) {
|
&& account != null && !CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(account.getContractNo())) {
|
||||||
CancelRegPaymentModel model = new CancelRegPaymentModel();
|
CancelRegPaymentModel model = new CancelRegPaymentModel();
|
||||||
BeanUtils.copyProperties(cancelRegPaymentDto, model);
|
BeanUtils.copyProperties(cancelRegPaymentDto, model);
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import com.core.common.core.domain.entity.SysUser;
|
|||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
import com.core.system.service.ISysUserService;
|
import com.core.system.service.ISysUserService;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.healthlink.his.administration.domain.ChargeItem;
|
import com.healthlink.his.administration.domain.ChargeItem;
|
||||||
import com.healthlink.his.administration.domain.Encounter;
|
import com.healthlink.his.administration.domain.Encounter;
|
||||||
import com.healthlink.his.administration.domain.OperatingRoom;
|
import com.healthlink.his.administration.domain.OperatingRoom;
|
||||||
@@ -219,7 +219,7 @@ public class SurgeryAppServiceImpl implements ISurgeryAppService {
|
|||||||
RequestForm requestForm = requestFormService.getOne(queryWrapper);
|
RequestForm requestForm = requestFormService.getOne(queryWrapper);
|
||||||
if (requestForm != null && requestForm.getDescJson() != null) {
|
if (requestForm != null && requestForm.getDescJson() != null) {
|
||||||
try {
|
try {
|
||||||
Map<String, Object> map = new ObjectMapper().readValue(requestForm.getDescJson(), Map.class);
|
Map<String, Object> map = JsonUtils.parseObject(requestForm.getDescJson(), Map.class);
|
||||||
if (map.containsKey("secondarySurgeries")) {
|
if (map.containsKey("secondarySurgeries")) {
|
||||||
surgeryDto.setSecondarySurgeries((List<Map<String, Object>>) map.get("secondarySurgeries"));
|
surgeryDto.setSecondarySurgeries((List<Map<String, Object>>) map.get("secondarySurgeries"));
|
||||||
}
|
}
|
||||||
@@ -397,10 +397,10 @@ public class SurgeryAppServiceImpl implements ISurgeryAppService {
|
|||||||
serviceContentMap.put("surgeryName", surgeryNameFromDto != null ? surgeryNameFromDto : "");
|
serviceContentMap.put("surgeryName", surgeryNameFromDto != null ? surgeryNameFromDto : "");
|
||||||
serviceContentMap.put("surgeryCode", surgeryCodeFromDto != null ? surgeryCodeFromDto : "");
|
serviceContentMap.put("surgeryCode", surgeryCodeFromDto != null ? surgeryCodeFromDto : "");
|
||||||
try {
|
try {
|
||||||
String contentJson = new ObjectMapper().writeValueAsString(serviceContentMap);
|
String contentJson; try { contentJson = JsonUtils.toJson(serviceContentMap); } catch (Exception e) { contentJson = "{}"; }
|
||||||
log.info("【DEBUG】Setting contentJson: {}", contentJson);
|
log.info("【DEBUG】Setting contentJson: {}", contentJson);
|
||||||
serviceRequest.setContentJson(contentJson);
|
serviceRequest.setContentJson(contentJson);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (Exception e) {
|
||||||
log.error("【DEBUG】设置手术医嘱 contentJson 失败", e);
|
log.error("【DEBUG】设置手术医嘱 contentJson 失败", e);
|
||||||
}
|
}
|
||||||
serviceRequestService.save(serviceRequest);
|
serviceRequestService.save(serviceRequest);
|
||||||
@@ -456,8 +456,8 @@ public class SurgeryAppServiceImpl implements ISurgeryAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return new ObjectMapper().writeValueAsString(map);
|
try { return JsonUtils.toJson(map); } catch (Exception e) { return null; }
|
||||||
} catch (JsonProcessingException e) {
|
} catch (Exception e) {
|
||||||
log.error("构建手术申请单JSON失败", e);
|
log.error("构建手术申请单JSON失败", e);
|
||||||
return "{}";
|
return "{}";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ public class PerformRecordDto {
|
|||||||
private String statusEnum_enumText;
|
private String statusEnum_enumText;
|
||||||
|
|
||||||
/** 预计执行时间 */
|
/** 预计执行时间 */
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||||
private Date occurrenceTime;
|
private Date occurrenceTime;
|
||||||
|
|
||||||
/** 实际执行时间 */
|
/** 实际执行时间 */
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
|
||||||
private Date recordedTime;
|
private Date recordedTime;
|
||||||
|
|
||||||
/** 执行位置 */
|
/** 执行位置 */
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.healthlink.his.web.consultation.appservice.impl;
|
package com.healthlink.his.web.consultation.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
@@ -1059,7 +1059,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
|||||||
contentMap.put("department", consultationRequest.getDepartment());
|
contentMap.put("department", consultationRequest.getDepartment());
|
||||||
contentMap.put("adviceName", consultationRequest.getConsultationActivityName()); // 添加项目名称
|
contentMap.put("adviceName", consultationRequest.getConsultationActivityName()); // 添加项目名称
|
||||||
|
|
||||||
serviceRequest.setContentJson(JSON.toJSONString(contentMap));
|
serviceRequest.setContentJson(JsonUtils.toJson(contentMap));
|
||||||
|
|
||||||
// 时间信息
|
// 时间信息
|
||||||
serviceRequest.setAuthoredTime(new Date());
|
serviceRequest.setAuthoredTime(new Date());
|
||||||
@@ -1166,7 +1166,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 更新医嘱内容
|
// 更新医嘱内容
|
||||||
serviceRequest.setContentJson(JSON.toJSONString(consultationRequest));
|
serviceRequest.setContentJson(JsonUtils.toJson(consultationRequest));
|
||||||
serviceRequest.setUpdateBy(SecurityUtils.getUsername());
|
serviceRequest.setUpdateBy(SecurityUtils.getUsername());
|
||||||
serviceRequest.setUpdateTime(new Date());
|
serviceRequest.setUpdateTime(new Date());
|
||||||
|
|
||||||
@@ -1518,7 +1518,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
|||||||
existingConfirmation.setConfirmingDate(currentInvited.getConfirmTime());
|
existingConfirmation.setConfirmingDate(currentInvited.getConfirmTime());
|
||||||
existingConfirmation.setConsultationStatus(ConsultationStatusEnum.CONFIRMED.getCode()); // 使用枚举
|
existingConfirmation.setConsultationStatus(ConsultationStatusEnum.CONFIRMED.getCode()); // 使用枚举
|
||||||
existingConfirmation.setConsultationOpinion(allOpinions);
|
existingConfirmation.setConsultationOpinion(allOpinions);
|
||||||
existingConfirmation.setConfirmingPhysicians(JSON.toJSONString(physicians));
|
existingConfirmation.setConfirmingPhysicians(JsonUtils.toJson(physicians));
|
||||||
|
|
||||||
consultationConfirmationMapper.updateById(existingConfirmation);
|
consultationConfirmationMapper.updateById(existingConfirmation);
|
||||||
log.info("更新会诊确认记录成功,确认医生:{},参与医生数:{}", currentPhysicianName, physicians.size());
|
log.info("更新会诊确认记录成功,确认医生:{},参与医生数:{}", currentPhysicianName, physicians.size());
|
||||||
@@ -1540,7 +1540,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
|||||||
confirmation.setConsultationStatus(ConsultationStatusEnum.CONFIRMED.getCode());
|
confirmation.setConsultationStatus(ConsultationStatusEnum.CONFIRMED.getCode());
|
||||||
|
|
||||||
confirmation.setConsultationOpinion(allOpinions);
|
confirmation.setConsultationOpinion(allOpinions);
|
||||||
confirmation.setConfirmingPhysicians(JSON.toJSONString(physicians));
|
confirmation.setConfirmingPhysicians(JsonUtils.toJson(physicians));
|
||||||
confirmation.setTenantId(SecurityUtils.getLoginUser().getTenantId().longValue());
|
confirmation.setTenantId(SecurityUtils.getLoginUser().getTenantId().longValue());
|
||||||
|
|
||||||
consultationConfirmationMapper.insert(confirmation);
|
consultationConfirmationMapper.insert(confirmation);
|
||||||
@@ -1786,7 +1786,7 @@ public class ConsultationAppServiceImpl implements IConsultationAppService {
|
|||||||
})
|
})
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
confirmation.setConfirmingPhysicians(JSON.toJSONString(physicians));
|
confirmation.setConfirmingPhysicians(JsonUtils.toJson(physicians));
|
||||||
consultationConfirmationMapper.updateById(confirmation);
|
consultationConfirmationMapper.updateById(confirmation);
|
||||||
|
|
||||||
log.info("更新会诊确认记录成功,所有医生都已签名");
|
log.info("更新会诊确认记录成功,所有医生都已签名");
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
if (deviceDefinitionService.updateById(deviceDefinition)) {
|
if (deviceDefinitionService.updateById(deviceDefinition)) {
|
||||||
|
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(deviceDefinition.getYbNo())) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(deviceDefinition.getYbNo())) {
|
||||||
R<?> r
|
R<?> r
|
||||||
= ybService.directoryCheck(CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition.getId());
|
= ybService.directoryCheck(CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition.getId());
|
||||||
@@ -336,7 +336,7 @@ public class DeviceManageAppServiceImpl implements IDeviceManageAppService {
|
|||||||
deviceDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue());
|
deviceDefinition.setStatusEnum(PublicationStatus.ACTIVE.getValue());
|
||||||
if (deviceDefinitionService.addDevice(deviceDefinition)) {
|
if (deviceDefinitionService.addDevice(deviceDefinition)) {
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(deviceDefinition.getYbNo())) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(deviceDefinition.getYbNo())) {
|
||||||
R<?> r
|
R<?> r
|
||||||
= ybService.directoryCheck(CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition.getId());
|
= ybService.directoryCheck(CommonConstants.TableName.ADM_DEVICE_DEFINITION, deviceDefinition.getId());
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
// 更新诊疗信息
|
// 更新诊疗信息
|
||||||
if (activityDefinitionService.updateById(activityDefinition)) {
|
if (activityDefinitionService.updateById(activityDefinition)) {
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(activityDefinition.getYbNo())) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(activityDefinition.getYbNo())) {
|
||||||
R<?> r = ybService.directoryCheck(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION,
|
R<?> r = ybService.directoryCheck(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION,
|
||||||
activityDefinition.getId());
|
activityDefinition.getId());
|
||||||
@@ -547,7 +547,7 @@ public class DiagTreatMAppServiceImpl implements IDiagTreatMAppService {
|
|||||||
|
|
||||||
if (activityDefinitionService.addDiagnosisTreatment(activityDefinition)) {
|
if (activityDefinitionService.addDiagnosisTreatment(activityDefinition)) {
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(activityDefinition.getYbNo())) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(activityDefinition.getYbNo())) {
|
||||||
R<?> r = ybService.directoryCheck(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION,
|
R<?> r = ybService.directoryCheck(CommonConstants.TableName.WOR_ACTIVITY_DEFINITION,
|
||||||
activityDefinition.getId());
|
activityDefinition.getId());
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
if (updateMedicationDefinition) {
|
if (updateMedicationDefinition) {
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch
|
String ybSwitch
|
||||||
= SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
= SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(medicationDefinition.getYbNo())) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(medicationDefinition.getYbNo())) {
|
||||||
R<?> r = ybService.directoryCheck(CommonConstants.TableName.MED_MEDICATION_DEFINITION,
|
R<?> r = ybService.directoryCheck(CommonConstants.TableName.MED_MEDICATION_DEFINITION,
|
||||||
medicationDefinition.getId());
|
medicationDefinition.getId());
|
||||||
@@ -410,7 +410,7 @@ public class MedicationManageAppServiceImpl implements IMedicationManageAppServi
|
|||||||
// 新增主表外来药品目录
|
// 新增主表外来药品目录
|
||||||
if (medicationDefinitionService.addMedication(medicationDetail)) {
|
if (medicationDefinitionService.addMedication(medicationDetail)) {
|
||||||
// 调用医保目录对照接口
|
// 调用医保目录对照接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(medicationDetail.getYbNo())) {
|
if (Whether.YES.getCode().equals(ybSwitch) && StringUtils.isNotEmpty(medicationDetail.getYbNo())) {
|
||||||
R<?> r = ybService.directoryCheck(CommonConstants.TableName.MED_MEDICATION_DEFINITION,
|
R<?> r = ybService.directoryCheck(CommonConstants.TableName.MED_MEDICATION_DEFINITION,
|
||||||
medicationDetail.getId());
|
medicationDetail.getId());
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.healthlink.his.web.departmentmanage.appservice.impl;
|
package com.healthlink.his.web.departmentmanage.appservice.impl;import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
@@ -187,7 +187,7 @@ public class DepartmentReceiptApprovalServiceImpl implements IDepartmentReceiptA
|
|||||||
SupplyType.PURCHASE_STOCKIN.getValue());
|
SupplyType.PURCHASE_STOCKIN.getValue());
|
||||||
|
|
||||||
// 调用医保商品采购接口 todo 科室材料相关医保接口未对应
|
// 调用医保商品采购接口 todo 科室材料相关医保接口未对应
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
||||||
@@ -274,7 +274,7 @@ public class DepartmentReceiptApprovalServiceImpl implements IDepartmentReceiptA
|
|||||||
SupplyType.PURCHASE_RETURN.getValue());
|
SupplyType.PURCHASE_RETURN.getValue());
|
||||||
|
|
||||||
// 调用医保采购退货接口
|
// 调用医保采购退货接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
||||||
@@ -425,7 +425,7 @@ public class DepartmentReceiptApprovalServiceImpl implements IDepartmentReceiptA
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用医保库存变更接口
|
// 调用医保库存变更接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
||||||
YbInvChgType.DESTRUCTION, false, false, false, now);
|
YbInvChgType.DESTRUCTION, false, false, false, now);
|
||||||
@@ -522,7 +522,7 @@ public class DepartmentReceiptApprovalServiceImpl implements IDepartmentReceiptA
|
|||||||
}
|
}
|
||||||
|
|
||||||
String ybSwitch =
|
String ybSwitch =
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
// 如果首次盘点信息不为空
|
// 如果首次盘点信息不为空
|
||||||
if (!firstSupplyItemDetailList.isEmpty()) {
|
if (!firstSupplyItemDetailList.isEmpty()) {
|
||||||
@@ -864,14 +864,14 @@ public class DepartmentReceiptApprovalServiceImpl implements IDepartmentReceiptA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 转换为JSON
|
// 转换为JSON
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
// 获取追溯码信息
|
// 获取追溯码信息
|
||||||
if (supplyItemDetailDto.getTraceNo() != null) {
|
if (supplyItemDetailDto.getTraceNo() != null) {
|
||||||
List<String> traceNoList =
|
List<String> traceNoList =
|
||||||
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
||||||
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
|||||||
// 先清除可能存在的无效缓存(JSONObject类型)
|
// 先清除可能存在的无效缓存(JSONObject类型)
|
||||||
if (redisCache.hasKey(cacheKey)) {
|
if (redisCache.hasKey(cacheKey)) {
|
||||||
Object cachedObj = redisCache.getCacheObject(cacheKey);
|
Object cachedObj = redisCache.getCacheObject(cacheKey);
|
||||||
if (cachedObj instanceof com.alibaba.fastjson2.JSONObject) {
|
if (cachedObj instanceof com.fasterxml.jackson.databind.JsonNode) {
|
||||||
redisCache.deleteObject(cacheKey);
|
redisCache.deleteObject(cacheKey);
|
||||||
log.info("清除无效缓存, key: {}", cacheKey);
|
log.info("清除无效缓存, key: {}", cacheKey);
|
||||||
} else if (cachedObj instanceof com.baomidou.mybatisplus.extension.plugins.pagination.Page) {
|
} else if (cachedObj instanceof com.baomidou.mybatisplus.extension.plugins.pagination.Page) {
|
||||||
|
|||||||
@@ -459,22 +459,39 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_sign) {
|
if (is_sign) {
|
||||||
// 按groupId分组
|
// 🔧 Bug Fix #668: groupingBy 不接受 null key,先过滤有 groupId 的按组生成处方号
|
||||||
Map<Long, List<AdviceSaveDto>> groupMap
|
insertOrUpdateList.stream()
|
||||||
= insertOrUpdateList.stream().collect(Collectors.groupingBy(AdviceSaveDto::getGroupId));
|
.filter(e -> e.getGroupId() != null)
|
||||||
// 为每个分组生成唯一的处方号
|
.collect(Collectors.groupingBy(AdviceSaveDto::getGroupId))
|
||||||
groupMap.forEach((groupId, groupList) -> {
|
.forEach((groupId, groupList) -> {
|
||||||
// 先查询当前groupId是否已经被签发生成过处方号
|
// 先查询当前groupId是否已经被签发生成过处方号
|
||||||
List<MedicationRequest> list = iMedicationRequestService
|
List<MedicationRequest> list = iMedicationRequestService
|
||||||
.list(new LambdaQueryWrapper<MedicationRequest>().eq(MedicationRequest::getGroupId, groupId));
|
.list(new LambdaQueryWrapper<MedicationRequest>()
|
||||||
if (!list.isEmpty() && StringUtils.isNotEmpty(list.get(0).getPrescriptionNo())) {
|
.eq(MedicationRequest::getGroupId, groupId));
|
||||||
groupList.forEach(dto -> dto.setPrescriptionNo(list.get(0).getPrescriptionNo()));
|
if (!list.isEmpty() && StringUtils.isNotEmpty(list.get(0).getPrescriptionNo())) {
|
||||||
} else {
|
groupList.forEach(dto -> dto.setPrescriptionNo(list.get(0).getPrescriptionNo()));
|
||||||
String prescriptionNo
|
} else {
|
||||||
= assignSeqUtil.getSeq(AssignSeqEnum.PRESCRIPTION_CHINESE_HERBAL_MEDICINE.getPrefix(), 8);
|
String prescriptionNo = assignSeqUtil.getSeq(
|
||||||
groupList.forEach(dto -> dto.setPrescriptionNo(prescriptionNo));
|
AssignSeqEnum.PRESCRIPTION_CHINESE_HERBAL_MEDICINE.getPrefix(), 8);
|
||||||
|
groupList.forEach(dto -> dto.setPrescriptionNo(prescriptionNo));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 🔧 Bug Fix #668: 无 groupId 的各自生成处方号
|
||||||
|
for (AdviceSaveDto dto : insertOrUpdateList) {
|
||||||
|
if (dto.getGroupId() != null) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
});
|
if (dto.getRequestId() != null) {
|
||||||
|
MedicationRequest existing = iMedicationRequestService.getById(dto.getRequestId());
|
||||||
|
if (existing != null && StringUtils.isNotEmpty(existing.getPrescriptionNo())) {
|
||||||
|
dto.setPrescriptionNo(existing.getPrescriptionNo());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setPrescriptionNo(assignSeqUtil.getSeq(
|
||||||
|
AssignSeqEnum.PRESCRIPTION_CHINESE_HERBAL_MEDICINE.getPrefix(), 8));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 医嘱签发编码
|
// 医嘱签发编码
|
||||||
@@ -597,8 +614,12 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
Long encounterDiagnosisId = medicineList.get(0).getEncounterDiagnosisId();
|
Long encounterDiagnosisId = medicineList.get(0).getEncounterDiagnosisId();
|
||||||
// 中药付数
|
// 中药付数
|
||||||
BigDecimal chineseHerbsDoseQuantity = medicineList.get(0).getChineseHerbsDoseQuantity();
|
BigDecimal chineseHerbsDoseQuantity = medicineList.get(0).getChineseHerbsDoseQuantity();
|
||||||
// 处方号
|
// 🔧 Bug Fix #668: 收集所有处方号(不同分组可能有不同处方号)
|
||||||
String prescriptionNo = insertOrUpdateList.get(0).getPrescriptionNo();
|
List<String> prescriptionNos = insertOrUpdateList.stream()
|
||||||
|
.map(AdviceSaveDto::getPrescriptionNo)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
// 签发时,生成中药代煎的账单
|
// 签发时,生成中药代煎的账单
|
||||||
if (Whether.YES.getValue().equals(sufferingFlag) && is_sign) {
|
if (Whether.YES.getValue().equals(sufferingFlag) && is_sign) {
|
||||||
@@ -607,9 +628,12 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
AdviceBaseDto adviceBaseDto = new AdviceBaseDto();
|
AdviceBaseDto adviceBaseDto = new AdviceBaseDto();
|
||||||
adviceBaseDto.setAdviceDefinitionId(sufferingDefinitionId); // 医嘱定义id
|
adviceBaseDto.setAdviceDefinitionId(sufferingDefinitionId); // 医嘱定义id
|
||||||
|
|
||||||
// 先删除中药代煎的账单
|
// 🔧 Bug Fix #668: 先删除所有处方号关联的中药代煎账单
|
||||||
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
if (!prescriptionNos.isEmpty()) {
|
||||||
.eq(ChargeItem::getPrescriptionNo, prescriptionNo).eq(ChargeItem::getProductId, sufferingDefinitionId));
|
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
||||||
|
.in(ChargeItem::getPrescriptionNo, prescriptionNos)
|
||||||
|
.eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||||
|
}
|
||||||
|
|
||||||
// 对应的诊疗医嘱信息
|
// 对应的诊疗医嘱信息
|
||||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null,
|
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null,
|
||||||
@@ -618,40 +642,44 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation
|
|||||||
// 费用定价
|
// 费用定价
|
||||||
AdvicePriceDto advicePriceDto = activityAdviceBaseDto.getPriceList().get(0);
|
AdvicePriceDto advicePriceDto = activityAdviceBaseDto.getPriceList().get(0);
|
||||||
if (advicePriceDto != null) {
|
if (advicePriceDto != null) {
|
||||||
// 生成账单
|
// 🔧 Bug Fix #668: 为每个处方号分别生成代煎账单
|
||||||
chargeItem = new ChargeItem();
|
for (String prescriptionNo : prescriptionNos) {
|
||||||
chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
chargeItem = new ChargeItem();
|
||||||
chargeItem.setPrescriptionNo(prescriptionNo); // 处方号
|
chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||||
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue()); // 收费状态
|
chargeItem.setPrescriptionNo(prescriptionNo); // 处方号
|
||||||
chargeItem.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.CHARGE_ITEM_NO.getPrefix(), 4));
|
chargeItem.setStatusEnum(ChargeItemStatus.PLANNED.getValue()); // 收费状态
|
||||||
chargeItem.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
chargeItem.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.CHARGE_ITEM_NO.getPrefix(), 4));
|
||||||
chargeItem.setPatientId(patientId); // 患者
|
chargeItem.setPatientId(patientId); // 患者
|
||||||
chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型
|
chargeItem.setContextEnum(ChargeItemContext.ACTIVITY.getValue()); // 类型
|
||||||
chargeItem.setEncounterId(encounterId); // 就诊id
|
chargeItem.setEncounterId(encounterId); // 就诊id
|
||||||
chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID
|
chargeItem.setDefinitionId(advicePriceDto.getDefinitionId()); // 费用定价ID
|
||||||
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID
|
chargeItem.setEntererId(SecurityUtils.getLoginUser().getPractitionerId());// 开立人ID
|
||||||
chargeItem.setRequestingOrgId(orgId); // 开立科室
|
chargeItem.setRequestingOrgId(orgId); // 开立科室
|
||||||
chargeItem.setEnteredDate(curDate); // 开立时间
|
chargeItem.setEnteredDate(curDate); // 开立时间
|
||||||
chargeItem.setProductTable(activityAdviceBaseDto.getAdviceTableName());// 产品所在表
|
chargeItem.setProductTable(activityAdviceBaseDto.getAdviceTableName());// 产品所在表
|
||||||
chargeItem.setProductId(activityAdviceBaseDto.getAdviceDefinitionId());// 收费项id
|
chargeItem.setProductId(activityAdviceBaseDto.getAdviceDefinitionId());// 收费项id
|
||||||
chargeItem.setAccountId(accountId);// 关联账户ID
|
chargeItem.setAccountId(accountId);// 关联账户ID
|
||||||
chargeItem.setConditionId(conditionId); // 诊断id
|
chargeItem.setConditionId(conditionId); // 诊断id
|
||||||
chargeItem.setEncounterDiagnosisId(encounterDiagnosisId); // 就诊诊断id
|
chargeItem.setEncounterDiagnosisId(encounterDiagnosisId); // 就诊诊断id
|
||||||
|
|
||||||
chargeItem.setQuantityValue(quantity); // 数量
|
chargeItem.setQuantityValue(quantity); // 数量
|
||||||
chargeItem.setQuantityUnit(activityAdviceBaseDto.getUnitCode()); // 单位
|
chargeItem.setQuantityUnit(activityAdviceBaseDto.getUnitCode()); // 单位
|
||||||
chargeItem.setUnitPrice(advicePriceDto.getPrice()); // 单价
|
chargeItem.setUnitPrice(advicePriceDto.getPrice()); // 单价
|
||||||
// 计算总价,保留6位小数
|
// 计算总价,保留6位小数
|
||||||
BigDecimal qty = quantity;
|
BigDecimal qty = quantity;
|
||||||
chargeItem.setTotalPrice(qty.multiply(advicePriceDto.getPrice()).setScale(6, RoundingMode.HALF_UP)); // 总价
|
chargeItem.setTotalPrice(qty.multiply(advicePriceDto.getPrice()).setScale(6, RoundingMode.HALF_UP)); // 总价
|
||||||
chargeItem.setTcmFlag(Whether.YES.getValue());// 中医标识
|
chargeItem.setTcmFlag(Whether.YES.getValue());// 中医标识
|
||||||
iChargeItemService.save(chargeItem);
|
iChargeItemService.save(chargeItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (Whether.NO.getValue().equals(sufferingFlag)) {
|
} else if (Whether.NO.getValue().equals(sufferingFlag)) {
|
||||||
// 删除中药代煎的账单
|
// 🔧 Bug Fix #668: 删除所有处方号关联的中药代煎账单
|
||||||
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
if (!prescriptionNos.isEmpty()) {
|
||||||
.eq(ChargeItem::getPrescriptionNo, prescriptionNo).eq(ChargeItem::getProductId, sufferingDefinitionId));
|
iChargeItemService.remove(new LambdaQueryWrapper<ChargeItem>()
|
||||||
|
.in(ChargeItem::getPrescriptionNo, prescriptionNos)
|
||||||
|
.eq(ChargeItem::getProductId, sufferingDefinitionId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 签发时,把草稿状态的账单更新为待收费[中医]
|
// 签发时,把草稿状态的账单更新为待收费[中医]
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.healthlink.his.web.doctorstation.appservice.impl;
|
package com.healthlink.his.web.doctorstation.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.alibaba.fastjson2.TypeReference;
|
import com.core.common.utils.JsonUtils;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -92,7 +94,7 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
|
|||||||
List<String> emrDictList = emrDictService.list(new LambdaQueryWrapper<EmrDict>().select(EmrDict::getEmrKey))
|
List<String> emrDictList = emrDictService.list(new LambdaQueryWrapper<EmrDict>().select(EmrDict::getEmrKey))
|
||||||
.stream().map(EmrDict::getEmrKey).collect(Collectors.toList());
|
.stream().map(EmrDict::getEmrKey).collect(Collectors.toList());
|
||||||
Map<String, String> emrContextMap =
|
Map<String, String> emrContextMap =
|
||||||
JSONObject.parseObject(contextStr, new TypeReference<Map<String, String>>() {});
|
JsonUtils.parseObject(contextStr, new TypeReference<Map<String, String>>() {});
|
||||||
List<EmrDetail> emrDetailList = new ArrayList<>();
|
List<EmrDetail> emrDetailList = new ArrayList<>();
|
||||||
// 遍历病历内容map
|
// 遍历病历内容map
|
||||||
for (Map.Entry<String, String> entry : emrContextMap.entrySet()) {
|
for (Map.Entry<String, String> entry : emrContextMap.entrySet()) {
|
||||||
|
|||||||
@@ -461,7 +461,7 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio
|
|||||||
// feePackageId 在保存时已存储,直接使用
|
// feePackageId 在保存时已存储,直接使用
|
||||||
itemDto.setFeePackageId(item.getFeePackageId());
|
itemDto.setFeePackageId(item.getFeePackageId());
|
||||||
// 判断是否是套餐项目(根据 feePackageId 是否存在)
|
// 判断是否是套餐项目(根据 feePackageId 是否存在)
|
||||||
itemDto.setIsPackage(item.getFeePackageId() != null);
|
itemDto.setIsPackage(String.valueOf(item.getFeePackageId() != null));
|
||||||
|
|
||||||
// 从批量查询结果中获取关联信息
|
// 从批量查询结果中获取关联信息
|
||||||
if (item.getItemCode() != null && !item.getItemCode().isEmpty()) {
|
if (item.getItemCode() != null && !item.getItemCode().isEmpty()) {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.healthlink.his.web.doctorstation.dto;
|
package com.healthlink.his.web.doctorstation.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -15,6 +16,7 @@ import java.math.BigDecimal;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class DoctorStationLabApplyItemDto {
|
public class DoctorStationLabApplyItemDto {
|
||||||
/**
|
/**
|
||||||
* 申请单号
|
* 申请单号
|
||||||
@@ -29,7 +31,6 @@ public class DoctorStationLabApplyItemDto {
|
|||||||
/**
|
/**
|
||||||
* 项目代码
|
* 项目代码
|
||||||
*/
|
*/
|
||||||
// @NotBlank(message = "项目代码不能为空")
|
|
||||||
@Size(max = 30, message = "项目代码长度不能超过30个字符")
|
@Size(max = 30, message = "项目代码长度不能超过30个字符")
|
||||||
private String itemCode;
|
private String itemCode;
|
||||||
/**
|
/**
|
||||||
@@ -46,7 +47,6 @@ public class DoctorStationLabApplyItemDto {
|
|||||||
/**
|
/**
|
||||||
* 执行科室代码
|
* 执行科室代码
|
||||||
*/
|
*/
|
||||||
// @NotBlank(message = "执行科室代码不能为空")
|
|
||||||
@Size(max = 20, message = "执行科室代码长度不能超过20个字符")
|
@Size(max = 20, message = "执行科室代码长度不能超过20个字符")
|
||||||
private String performDeptCode;
|
private String performDeptCode;
|
||||||
/**
|
/**
|
||||||
@@ -74,22 +74,30 @@ public class DoctorStationLabApplyItemDto {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动定义ID(检验项目定义ID)
|
* 活动定义ID(检验项目定义ID)
|
||||||
* 用于回充时关联到原始检验项目定义
|
|
||||||
*/
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long activityId;
|
private Long activityId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 套餐ID(如果该项目是套餐,则关联套餐表)
|
* 套餐ID
|
||||||
* 对应 InspectionPackage.basicInformationId
|
|
||||||
*/
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long feePackageId;
|
private Long feePackageId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是套餐项目
|
* 是否是套餐项目
|
||||||
|
* Bug #632: 改为 String 类型,兼容前端传 Boolean/String/项目名
|
||||||
|
* 保存时由 Service 层转为 Boolean 写入数据库
|
||||||
*/
|
*/
|
||||||
private Boolean isPackage;
|
private String isPackage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否是套餐项目
|
||||||
|
*/
|
||||||
|
public Boolean getIsPackageBoolean() {
|
||||||
|
if (isPackage == null) return false;
|
||||||
|
return "true".equalsIgnoreCase(isPackage) || "1".equals(isPackage);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 样本类型
|
* 样本类型
|
||||||
@@ -102,8 +110,7 @@ public class DoctorStationLabApplyItemDto {
|
|||||||
private String unit;
|
private String unit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检验类型ID(关联 inspection_type 大类)
|
* 检验类型ID
|
||||||
* 用于前端自动设置执行科室
|
|
||||||
*/
|
*/
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long inspectionTypeId;
|
private Long inspectionTypeId;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.doctorstation.dto;
|
package com.healthlink.his.web.doctorstation.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -36,6 +36,6 @@ public class EmrTemplateDto implements Serializable {
|
|||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/** 病历内容 */
|
/** 病历内容 */
|
||||||
private JSONObject contextJson;
|
private JsonNode contextJson;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.doctorstation.dto;
|
package com.healthlink.his.web.doctorstation.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ public class PatientEmrDto implements Serializable {
|
|||||||
private Long encounterId;
|
private Long encounterId;
|
||||||
|
|
||||||
/** 病历信息 */
|
/** 病历信息 */
|
||||||
private JSONObject contextJson;
|
private JsonNode contextJson;
|
||||||
|
|
||||||
/** 病历状态 */
|
/** 病历状态 */
|
||||||
private String emrStatus;
|
private String emrStatus;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.document.appservice.impl;
|
package com.healthlink.his.web.document.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -757,7 +759,7 @@ public class DocRecordAppServiceImpl implements IDocRecordAppService {
|
|||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put(TemperatureChartEnum.OUTPUT.getTypeCode(), totalOutput.toString());
|
map.put(TemperatureChartEnum.OUTPUT.getTypeCode(), totalOutput.toString());
|
||||||
map.put(TemperatureChartEnum.INPUT.getTypeCode(), totalInput.toString());
|
map.put(TemperatureChartEnum.INPUT.getTypeCode(), totalInput.toString());
|
||||||
dto.setContentJson(JSONObject.toJSONString(map));
|
dto.setContentJson(JsonUtils.toJson(map));
|
||||||
docRecordList.add(dto);
|
docRecordList.add(dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package com.healthlink.his.web.document.util;
|
package com.healthlink.his.web.document.util;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.healthlink.his.common.enums.TemperatureChartEnum;
|
import com.healthlink.his.common.enums.TemperatureChartEnum;
|
||||||
import com.healthlink.his.web.document.appservice.IDocStatisticsDefinitionAppService;
|
import com.healthlink.his.web.document.appservice.IDocStatisticsDefinitionAppService;
|
||||||
@@ -32,39 +34,44 @@ public class ConvertToDocStatistics {
|
|||||||
* @param jsonObject jsonObject
|
* @param jsonObject jsonObject
|
||||||
* @return JSONObject列表
|
* @return JSONObject列表
|
||||||
*/
|
*/
|
||||||
public List<JSONObject> convertToJSONObjList(JSONObject jsonObject) {
|
public List<JsonNode> convertToJSONObjList(JsonNode jsonObject) {
|
||||||
List<JSONObject> jsonObjectList = new ArrayList<>();
|
List<JsonNode> jsonObjectList = new ArrayList<>();
|
||||||
List<String> keys = new ArrayList<>();
|
List<String> keys = new ArrayList<>();
|
||||||
// 取出所有key
|
// 取出所有key
|
||||||
Set<String> keySet = jsonObject.keySet();
|
java.util.Iterator<String> keySetIter = ((ObjectNode) jsonObject).fieldNames();
|
||||||
for (String key : keySet) {
|
java.util.List<String> keySetList = new ArrayList<>();
|
||||||
|
while (keySetIter.hasNext()) { keySetList.add(keySetIter.next()); }
|
||||||
|
for (String key : keySetList) {
|
||||||
// 取出key对应的数据
|
// 取出key对应的数据
|
||||||
Object obj = jsonObject.get(key);
|
JsonNode obj = jsonObject.get(key);
|
||||||
// 如果obj是数组并且是JSONObject数组,数组遍历添加到List
|
// 如果obj是数组并且是对象数组,数组遍历添加到List
|
||||||
if (obj instanceof JSONArray) {
|
if (obj != null && obj.isArray()) {
|
||||||
if ((!((JSONArray)obj).isEmpty()) && (((JSONArray)obj).get(0) instanceof JSONObject)) {
|
ArrayNode arrayNode = (ArrayNode) obj;
|
||||||
List<JSONObject> javaList = ((JSONArray)obj).toJavaList(JSONObject.class);
|
if (!arrayNode.isEmpty() && arrayNode.get(0).isObject()) {
|
||||||
jsonObjectList.addAll(javaList);
|
for (JsonNode item : arrayNode) {
|
||||||
|
jsonObjectList.add(item);
|
||||||
|
}
|
||||||
keys.add(key);
|
keys.add(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果是对象,添加到jsonObjectList
|
// 如果是对象,添加到jsonObjectList
|
||||||
if (obj instanceof JSONObject) {
|
if (obj != null && obj.isObject()) {
|
||||||
jsonObjectList.add((JSONObject)obj);
|
jsonObjectList.add(obj);
|
||||||
keys.add(key);
|
keys.add(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 移除 对象和数组
|
// 移除 对象和数组
|
||||||
keys.forEach(jsonObject::remove);
|
ObjectNode objectNode = (ObjectNode) jsonObject;
|
||||||
|
keys.forEach(objectNode::remove);
|
||||||
// 将原本JSONObject添加到集合
|
// 将原本JSONObject添加到集合
|
||||||
jsonObjectList.add(jsonObject);
|
jsonObjectList.add(jsonObject);
|
||||||
// 格式化时间点
|
// 格式化时间点
|
||||||
for (JSONObject object : jsonObjectList) {
|
for (JsonNode object : jsonObjectList) {
|
||||||
if (object.containsKey(TemperatureChartEnum.TIME_POINT.getTypeCode())) {
|
if (object.has(TemperatureChartEnum.TIME_POINT.getTypeCode())) {
|
||||||
// 前端传来的时间点格式 0200,转换为02:00:00
|
// 前端传来的时间点格式 0200,转换为02:00:00
|
||||||
String timePointValue = (String)object.get(TemperatureChartEnum.TIME_POINT.getTypeCode());
|
String timePointValue = object.get(TemperatureChartEnum.TIME_POINT.getTypeCode()).asText();
|
||||||
if (timePointValue != null && timePointValue.matches("\\d{4}")) {
|
if (timePointValue != null && timePointValue.matches("\\d{4}")) {
|
||||||
object.put(TemperatureChartEnum.TIME_POINT.getTypeCode(),
|
((ObjectNode) object).put(TemperatureChartEnum.TIME_POINT.getTypeCode(),
|
||||||
timePointValue.substring(0, 2) + ":00:00");
|
timePointValue.substring(0, 2) + ":00:00");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,8 +107,8 @@ public class ConvertToDocStatistics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 解析JSON字符串为JSONObject(方便操作嵌套结构)
|
// 解析JSON字符串为JSONObject(方便操作嵌套结构)
|
||||||
JSONObject contentJsonObj = parseJson(contentJson);
|
JsonNode contentJsonObj = parseJson(contentJson);
|
||||||
for (JSONObject jsonObject : convertToJSONObjList(contentJsonObj)) {
|
for (JsonNode jsonObject : convertToJSONObjList(contentJsonObj)) {
|
||||||
contentJsonObj = jsonObject;
|
contentJsonObj = jsonObject;
|
||||||
// 如果JSON解析失败(返回null),直接返回空列表
|
// 如果JSON解析失败(返回null),直接返回空列表
|
||||||
if (contentJsonObj == null) {
|
if (contentJsonObj == null) {
|
||||||
@@ -113,16 +120,16 @@ public class ConvertToDocStatistics {
|
|||||||
String targetCode = definition.getCode();
|
String targetCode = definition.getCode();
|
||||||
|
|
||||||
// 场景1:先尝试解析顶级键值对结构(如{"BQ": 123})
|
// 场景1:先尝试解析顶级键值对结构(如{"BQ": 123})
|
||||||
if (contentJsonObj.containsKey(targetCode)) {
|
if (contentJsonObj.has(targetCode)) {
|
||||||
// 提取值并转换为字符串
|
// 提取值并转换为字符串
|
||||||
String value = String.valueOf(contentJsonObj.get(targetCode));
|
String value = contentJsonObj.get(targetCode).asText();
|
||||||
Date recordTime = docRecordDto.getRecordTime();
|
Date recordTime = docRecordDto.getRecordTime();
|
||||||
// 判断jsonObject中是否有timePoint、recordTime字段以及值,有则取出与拼接
|
// 判断jsonObject中是否有timePoint、recordTime字段以及值,有则取出与拼接
|
||||||
try {
|
try {
|
||||||
boolean timePoint = contentJsonObj.containsKey("timePoint");
|
boolean timePoint = contentJsonObj.has("timePoint");
|
||||||
boolean date = contentJsonObj.containsKey("recordTime");
|
boolean date = contentJsonObj.has("recordTime");
|
||||||
String dateValue = (String)contentJsonObj.get("recordTime");
|
String dateValue = contentJsonObj.get("recordTime").asText();
|
||||||
String timePointValue = (String)contentJsonObj.get("timePoint");
|
String timePointValue = contentJsonObj.get("timePoint").asText();
|
||||||
if (timePoint && date && !dateValue.isEmpty() && !timePointValue.isEmpty()) {
|
if (timePoint && date && !dateValue.isEmpty() && !timePointValue.isEmpty()) {
|
||||||
// 格式化 例:2025-11-20 13:34:56
|
// 格式化 例:2025-11-20 13:34:56
|
||||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
@@ -141,22 +148,22 @@ public class ConvertToDocStatistics {
|
|||||||
// 列表字段名规则:目标code + "Item"(如code=BQ → 列表字段名=BQItem)
|
// 列表字段名规则:目标code + "Item"(如code=BQ → 列表字段名=BQItem)
|
||||||
String itemListKey = targetCode + "Item";
|
String itemListKey = targetCode + "Item";
|
||||||
// 从JSON中获取对应的列表
|
// 从JSON中获取对应的列表
|
||||||
JSONArray itemArray = contentJsonObj.getJSONArray(itemListKey);
|
JsonNode itemArray = contentJsonObj.path(itemListKey);
|
||||||
|
|
||||||
// 判断列表是否存在且不为空
|
// 判断列表是否存在且不为空
|
||||||
if (itemArray != null && !itemArray.isEmpty()) {
|
if (itemArray != null && !itemArray.isEmpty()) {
|
||||||
// 遍历列表中的每个元素(每个元素是一个JSONObject)
|
// 遍历列表中的每个元素(每个元素是一个JSONObject)
|
||||||
for (int i = 0; i < itemArray.size(); i++) {
|
for (int i = 0; i < itemArray.size(); i++) {
|
||||||
JSONObject itemObj = itemArray.getJSONObject(i);
|
JsonNode itemObj = itemArray.path(i);
|
||||||
// 检查元素是否包含目标code
|
// 检查元素是否包含目标code
|
||||||
if (itemObj != null && itemObj.containsKey(targetCode)) {
|
if (itemObj != null && itemObj.has(targetCode)) {
|
||||||
// 提取当前元素的目标值
|
// 提取当前元素的目标值
|
||||||
String value = String.valueOf(itemObj.get(targetCode));
|
String value = itemObj.get(targetCode).asText();
|
||||||
Date recordTime = new Date();
|
Date recordTime = new Date();
|
||||||
if (itemObj.containsKey("recordTime")) {
|
if (itemObj.has("recordTime")) {
|
||||||
recordTime = itemObj.getDate("recordTime");
|
try { recordTime = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(itemObj.get("recordTime").asText()); } catch (Exception ignored) {}
|
||||||
} else if (contentJsonObj.containsKey("recordTime")) {
|
} else if (contentJsonObj.has("recordTime")) {
|
||||||
recordTime = contentJsonObj.getDate("recordTime");
|
try { recordTime = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(contentJsonObj.get("recordTime").asText()); } catch (Exception ignored) {}
|
||||||
} else {
|
} else {
|
||||||
recordTime = docRecordDto.getRecordTime();
|
recordTime = docRecordDto.getRecordTime();
|
||||||
}
|
}
|
||||||
@@ -183,14 +190,14 @@ public class ConvertToDocStatistics {
|
|||||||
* @param jsonStr 原始JSON字符串
|
* @param jsonStr 原始JSON字符串
|
||||||
* @return 解析后的JSONObject,失败则返回null
|
* @return 解析后的JSONObject,失败则返回null
|
||||||
*/
|
*/
|
||||||
private JSONObject parseJson(String jsonStr) {
|
private JsonNode parseJson(String jsonStr) {
|
||||||
// 如果JSON字符串为空,直接返回null
|
// 如果JSON字符串为空,直接返回null
|
||||||
if (jsonStr == null) {
|
if (jsonStr == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// 解析JSON字符串
|
// 解析JSON字符串
|
||||||
return JSON.parseObject(jsonStr);
|
try { return JsonUtils.parse(jsonStr); } catch (Exception e) { return null; }
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// 记录解析异常日志
|
// 记录解析异常日志
|
||||||
log.error("JSON解析失败,原始字符串: {}", jsonStr, e);
|
log.error("JSON解析失败,原始字符串: {}", jsonStr, e);
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ public class StructuredEmrController {
|
|||||||
@GetMapping("/timeliness/statistics")
|
@GetMapping("/timeliness/statistics")
|
||||||
@Operation(summary = "完成率统计")
|
@Operation(summary = "完成率统计")
|
||||||
public R<Map<String, Object>> getCompletionStatistics(
|
public R<Map<String, Object>> getCompletionStatistics(
|
||||||
@RequestParam String startDate,
|
@RequestParam(required = false) String startDate,
|
||||||
@RequestParam String endDate) {
|
@RequestParam(required = false) String endDate) {
|
||||||
return R.ok(structuredEmrAppService.getCompletionStatistics(startDate, endDate));
|
return R.ok(structuredEmrAppService.getCompletionStatistics(startDate, endDate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.healthlink.his.web.externalintegration.appservice.impl;
|
package com.healthlink.his.web.externalintegration.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.enums.TenantOptionDict;
|
import com.core.common.enums.TenantOptionDict;
|
||||||
import com.core.web.util.TenantOptionUtil;
|
import com.core.web.util.TenantOptionUtil;
|
||||||
@@ -399,7 +400,7 @@ public class BankPosCloudAppServiceImpl implements IBankPosCloudAppService {
|
|||||||
// 设置其他固定参数
|
// 设置其他固定参数
|
||||||
requestDto.setMid(mid).setTid(tid);
|
requestDto.setMid(mid).setTid(tid);
|
||||||
// 将参数转化为json字符串
|
// 将参数转化为json字符串
|
||||||
String jsonStr = JSON.toJSONString(requestDto);
|
String jsonStr; try { jsonStr = JsonUtils.toJson(requestDto); } catch (Exception e) { jsonStr = "{}"; }
|
||||||
log.info("【BPC请求报文】:{}", jsonStr);
|
log.info("【BPC请求报文】:{}", jsonStr);
|
||||||
// 发起post请求
|
// 发起post请求
|
||||||
String postResponse;
|
String postResponse;
|
||||||
@@ -412,7 +413,7 @@ public class BankPosCloudAppServiceImpl implements IBankPosCloudAppService {
|
|||||||
// 解析响应报文
|
// 解析响应报文
|
||||||
BpcTransactionResponseDto responseDto;
|
BpcTransactionResponseDto responseDto;
|
||||||
try {
|
try {
|
||||||
responseDto = JSON.parseObject(postResponse, BpcTransactionResponseDto.class);
|
responseDto = JsonUtils.parseObject(postResponse, BpcTransactionResponseDto.class);
|
||||||
if (StringUtils.isNotEmpty(responseDto.getTraceNo()) && !traceNo.equals(responseDto.getTraceNo())) {
|
if (StringUtils.isNotEmpty(responseDto.getTraceNo()) && !traceNo.equals(responseDto.getTraceNo())) {
|
||||||
return R.fail("终端流水号不一致,交易失败");
|
return R.fail("终端流水号不一致,交易失败");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.healthlink.his.web.externalintegration.appservice.impl;
|
package com.healthlink.his.web.externalintegration.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.core.common.utils.JsonUtils;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.enums.TenantOptionDict;
|
import com.core.common.enums.TenantOptionDict;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
@@ -118,11 +119,11 @@ public class FoodborneAcquisitionAppServiceImpl implements IFoodborneAcquisition
|
|||||||
// 执行请求
|
// 执行请求
|
||||||
response = httpClient.execute(httpGet);
|
response = httpClient.execute(httpGet);
|
||||||
// 获取响应
|
// 获取响应
|
||||||
JSONObject object =
|
JsonNode object =
|
||||||
JSON.parseObject(EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8.toString()));
|
JsonUtils.parse(EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8.toString()));
|
||||||
log.info("【食源性判断接口】入参encounterId:{}返回值:{}", encounterId, object.toString());
|
log.info("【食源性判断接口】入参encounterId:{}返回值:{}", encounterId, object.toString());
|
||||||
// 判断返回的result字段
|
// 判断返回的result字段
|
||||||
String result = String.valueOf(object.getInnerMap().get("result"));
|
String result = String.valueOf(object.get("result"));
|
||||||
if (!"true".equals(result)) {
|
if (!"true".equals(result)) {
|
||||||
// 返回不是true时,返回空OK结果,跳过处理
|
// 返回不是true时,返回空OK结果,跳过处理
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@@ -136,7 +137,7 @@ public class FoodborneAcquisitionAppServiceImpl implements IFoodborneAcquisition
|
|||||||
return R.fail("【食源性判断接口】跳转参数查询失败");
|
return R.fail("【食源性判断接口】跳转参数查询失败");
|
||||||
}
|
}
|
||||||
// 返回的标识字段 fillGuid
|
// 返回的标识字段 fillGuid
|
||||||
String fillGuid = String.valueOf(object.getInnerMap().get("fillGuid"));
|
String fillGuid = String.valueOf(object.get("fillGuid"));
|
||||||
// 拼装参数,作成跳转URL
|
// 拼装参数,作成跳转URL
|
||||||
String jumpUrl = foodborneApiUrl + "/SimplediseaseAddNopw" + "?diseaseDate="
|
String jumpUrl = foodborneApiUrl + "/SimplediseaseAddNopw" + "?diseaseDate="
|
||||||
+ simplediseaseAddNopwParam.getDiseaseDate() + "&diseaseTreattime="
|
+ simplediseaseAddNopwParam.getDiseaseDate() + "&diseaseTreattime="
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.healthlink.his.web.externalintegration.dto;
|
package com.healthlink.his.web.externalintegration.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.hibernate.validator.constraints.Length;
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
@@ -17,161 +17,161 @@ public class BpcDataElementDto {
|
|||||||
* 设备终端编号:设备的唯一编号
|
* 设备终端编号:设备的唯一编号
|
||||||
*/
|
*/
|
||||||
@Length(max = 10)
|
@Length(max = 10)
|
||||||
@JSONField(name = "posNo")
|
@JsonProperty("posNo")
|
||||||
private String posNo;
|
private String posNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端实时经纬度信息:格式为为纬度/经度,+表示北纬、东经,-表示南纬、西 经。例:+37.12/-121.213。例:+37.12/-121.213
|
* 终端实时经纬度信息:格式为为纬度/经度,+表示北纬、东经,-表示南纬、西 经。例:+37.12/-121.213。例:+37.12/-121.213
|
||||||
*/
|
*/
|
||||||
@Length(max = 30)
|
@Length(max = 30)
|
||||||
@JSONField(name = "posGa")
|
@JsonProperty("posGa")
|
||||||
private String posGa;
|
private String posGa;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易类型:(枚举TranType)
|
* 交易类型:(枚举TranType)
|
||||||
*/
|
*/
|
||||||
@Length(max = 1)
|
@Length(max = 1)
|
||||||
@JSONField(name = "tranType")
|
@JsonProperty("tranType")
|
||||||
private String tranType;
|
private String tranType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易金额:以分为单位的交易金额
|
* 交易金额:以分为单位的交易金额
|
||||||
*/
|
*/
|
||||||
@Length(max = 12)
|
@Length(max = 12)
|
||||||
@JSONField(name = "txnAmt")
|
@JsonProperty("txnAmt")
|
||||||
private String txnAmt;
|
private String txnAmt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付方式:(枚举PayType)
|
* 支付方式:(枚举PayType)
|
||||||
*/
|
*/
|
||||||
@Length(max = 4)
|
@Length(max = 4)
|
||||||
@JSONField(name = "payType")
|
@JsonProperty("payType")
|
||||||
private String payType;
|
private String payType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易流水号
|
* 交易流水号
|
||||||
*/
|
*/
|
||||||
@Length(max = 32)
|
@Length(max = 32)
|
||||||
@JSONField(name = "sysTrace")
|
@JsonProperty("sysTrace")
|
||||||
private String sysTrace;
|
private String sysTrace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易流水号:支付结果查询、退货、退货结果查询交易需要传入
|
* 原交易流水号:支付结果查询、退货、退货结果查询交易需要传入
|
||||||
*/
|
*/
|
||||||
@Length(max = 32)
|
@Length(max = 32)
|
||||||
@JSONField(name = "orgSysTrace")
|
@JsonProperty("orgSysTrace")
|
||||||
private String orgSysTrace;
|
private String orgSysTrace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易时间:(yyyyMMddHHmmss)该字段为消费成功后返回的日期时间,在做退货、退货结果查询时,需要传入原消费交易的日期时间
|
* 原交易时间:(yyyyMMddHHmmss)该字段为消费成功后返回的日期时间,在做退货、退货结果查询时,需要传入原消费交易的日期时间
|
||||||
*/
|
*/
|
||||||
@Length(max = 14)
|
@Length(max = 14)
|
||||||
@JSONField(name = "orgTxnTime")
|
@JsonProperty("orgTxnTime")
|
||||||
private String orgTxnTime;
|
private String orgTxnTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 二维码信息:支付二维码,扫码消费订单查询时传入
|
* 二维码信息:支付二维码,扫码消费订单查询时传入
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "scanCode")
|
@JsonProperty("scanCode")
|
||||||
private String scanCode;
|
private String scanCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付订单号:扫码支付交易订单号,扫码支付退货时传入
|
* 支付订单号:扫码支付交易订单号,扫码支付退货时传入
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "tradeNo")
|
@JsonProperty("tradeNo")
|
||||||
private String tradeNo;
|
private String tradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通知URL:交易延时响应时的交易结果通知URL
|
* 通知URL:交易延时响应时的交易结果通知URL
|
||||||
*/
|
*/
|
||||||
@Length(max = 256)
|
@Length(max = 256)
|
||||||
@JSONField(name = "retUrl")
|
@JsonProperty("retUrl")
|
||||||
private String retUrl;
|
private String retUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清算商户号
|
* 清算商户号
|
||||||
*/
|
*/
|
||||||
@Length(max = 15)
|
@Length(max = 15)
|
||||||
@JSONField(name = "mid")
|
@JsonProperty("mid")
|
||||||
private String mid;
|
private String mid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户名称
|
* 商户名称
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "merName")
|
@JsonProperty("merName")
|
||||||
private String merName;
|
private String merName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端号
|
* 终端号
|
||||||
*/
|
*/
|
||||||
@Length(max = 8)
|
@Length(max = 8)
|
||||||
@JSONField(name = "tid")
|
@JsonProperty("tid")
|
||||||
private String tid;
|
private String tid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户系统订单号:由商户系统产生
|
* 商户系统订单号:由商户系统产生
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "merTradeNo")
|
@JsonProperty("merTradeNo")
|
||||||
private String merTradeNo;
|
private String merTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 银行优惠金额
|
* 银行优惠金额
|
||||||
*/
|
*/
|
||||||
@Length(max = 12)
|
@Length(max = 12)
|
||||||
@JSONField(name = "discountAmt")
|
@JsonProperty("discountAmt")
|
||||||
private String discountAmt;
|
private String discountAmt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收款方备注
|
* 收款方备注
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "txtRemarks")
|
@JsonProperty("txtRemarks")
|
||||||
private String txtRemarks;
|
private String txtRemarks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实名认证标志:(枚举RealNameAuthFlag)
|
* 实名认证标志:(枚举RealNameAuthFlag)
|
||||||
*/
|
*/
|
||||||
@Length(max = 1)
|
@Length(max = 1)
|
||||||
@JSONField(name = "realNameAuth")
|
@JsonProperty("realNameAuth")
|
||||||
private String realNameAuth;
|
private String realNameAuth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款人姓名:当realNameAuth为1时必填
|
* 付款人姓名:当realNameAuth为1时必填
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "payerName")
|
@JsonProperty("payerName")
|
||||||
private String payerName;
|
private String payerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款人身份证件类型:(枚举PayerIdType)当realNameAuth为1时必填
|
* 付款人身份证件类型:(枚举PayerIdType)当realNameAuth为1时必填
|
||||||
*/
|
*/
|
||||||
@Length(max = 2)
|
@Length(max = 2)
|
||||||
@JSONField(name = "payerIDType")
|
@JsonProperty("payerIDType")
|
||||||
private String payerIdType;
|
private String payerIdType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款人身份证件号码:当realNameAuth为1时必填
|
* 付款人身份证件号码:当realNameAuth为1时必填
|
||||||
*/
|
*/
|
||||||
@Length(max = 20)
|
@Length(max = 20)
|
||||||
@JSONField(name = "payerID")
|
@JsonProperty("payerID")
|
||||||
private String payerId;
|
private String payerId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起方IP地址:支持IPv6格式
|
* 发起方IP地址:支持IPv6格式
|
||||||
*/
|
*/
|
||||||
@Length(max = 40)
|
@Length(max = 40)
|
||||||
@JSONField(name = "IP")
|
@JsonProperty("IP")
|
||||||
private String ip;
|
private String ip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端设备类型:(枚举DeviceType)
|
* 终端设备类型:(枚举DeviceType)
|
||||||
*/
|
*/
|
||||||
@Length(max = 2)
|
@Length(max = 2)
|
||||||
@JSONField(name = "deviceType")
|
@JsonProperty("deviceType")
|
||||||
private String deviceType;
|
private String deviceType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.healthlink.his.web.externalintegration.dto;
|
package com.healthlink.his.web.externalintegration.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.hibernate.validator.constraints.Length;
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
@@ -17,95 +17,95 @@ public class BpcPaymentScanNotifyDto {
|
|||||||
* 商户系统订单号:申码交易商户系统订单号
|
* 商户系统订单号:申码交易商户系统订单号
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "merTradeNo")
|
@JsonProperty("merTradeNo")
|
||||||
private String merTradeNo;
|
private String merTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易订单号:银行订单号
|
* 原交易订单号:银行订单号
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "orgSysTrace")
|
@JsonProperty("orgSysTrace")
|
||||||
private String orgSysTrace;
|
private String orgSysTrace;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 银行交易日期
|
* 银行交易日期
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "bankDate")
|
@JsonProperty("bankDate")
|
||||||
private String bankDate;
|
private String bankDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 银行交易时间
|
* 银行交易时间
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "bankTime")
|
@JsonProperty("bankTime")
|
||||||
private String bankTime;
|
private String bankTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原申码订单号
|
* 原申码订单号
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "oldQrOrderNo")
|
@JsonProperty("oldQrOrderNo")
|
||||||
private String oldQrOrderNo;
|
private String oldQrOrderNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原商户号
|
* 原商户号
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "oldTermId")
|
@JsonProperty("oldTermId")
|
||||||
private String oldTermId;
|
private String oldTermId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原支付方式
|
* 原支付方式
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "oldPayType")
|
@JsonProperty("oldPayType")
|
||||||
private String oldPayType;
|
private String oldPayType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原银行交易日期
|
* 原银行交易日期
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "oldBankDate")
|
@JsonProperty("oldBankDate")
|
||||||
private String oldBankDate;
|
private String oldBankDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原银行交易时间
|
* 原银行交易时间
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "oldBankTime")
|
@JsonProperty("oldBankTime")
|
||||||
private String oldBankTime;
|
private String oldBankTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易返回码
|
* 原交易返回码
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "oldRespCode")
|
@JsonProperty("oldRespCode")
|
||||||
private String oldRespCode;
|
private String oldRespCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易返回信息
|
* 原交易返回信息
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "oldRespMsg")
|
@JsonProperty("oldRespMsg")
|
||||||
private String oldRespMsg;
|
private String oldRespMsg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信交易单号:仅OldPayType=WEIX 时此域有值
|
* 微信交易单号:仅OldPayType=WEIX 时此域有值
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "oldTradeId")
|
@JsonProperty("oldTradeId")
|
||||||
private String oldTradeId;
|
private String oldTradeId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付宝交易单号:仅OldPayType=ZFBA 时此域有值
|
* 支付宝交易单号:仅OldPayType=ZFBA 时此域有值
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "oldTradeNo")
|
@JsonProperty("oldTradeNo")
|
||||||
private String oldTradeNo;
|
private String oldTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应码:00 表示成功,其它表示失败
|
* 响应码:00 表示成功,其它表示失败
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "respCode")
|
@JsonProperty("respCode")
|
||||||
private String respCode;
|
private String respCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应码解释信息
|
* 响应码解释信息
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "respMsg")
|
@JsonProperty("respMsg")
|
||||||
private String respMsg;
|
private String respMsg;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.healthlink.his.web.externalintegration.dto;
|
package com.healthlink.his.web.externalintegration.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import org.hibernate.validator.constraints.Length;
|
import org.hibernate.validator.constraints.Length;
|
||||||
@@ -19,91 +19,91 @@ public class BpcTransactionRequestDto {
|
|||||||
* 设备终端编号:设备的唯一编号(必填)
|
* 设备终端编号:设备的唯一编号(必填)
|
||||||
*/
|
*/
|
||||||
@Length(max = 10)
|
@Length(max = 10)
|
||||||
@JSONField(name = "posNo")
|
@JsonProperty("posNo")
|
||||||
private String posNo;
|
private String posNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端实时经纬度信息:(最新,甲方确认可以不传)tranType为C时必填,格式为为纬度/经度,+表示北纬、东经,-表示南纬、西 经。例:+37.12/-121.213。例:+37.12/-121.213
|
* 终端实时经纬度信息:(最新,甲方确认可以不传)tranType为C时必填,格式为为纬度/经度,+表示北纬、东经,-表示南纬、西 经。例:+37.12/-121.213。例:+37.12/-121.213
|
||||||
*/
|
*/
|
||||||
@Length(max = 30)
|
@Length(max = 30)
|
||||||
@JSONField(name = "posGa")
|
@JsonProperty("posGa")
|
||||||
private String posGa;
|
private String posGa;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易类型:(枚举TranType)
|
* 交易类型:(枚举TranType)
|
||||||
*/
|
*/
|
||||||
@Length(max = 1)
|
@Length(max = 1)
|
||||||
@JSONField(name = "tranType")
|
@JsonProperty("tranType")
|
||||||
private String tranType;
|
private String tranType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易金额:以分为单位的交易金额
|
* 交易金额:以分为单位的交易金额
|
||||||
*/
|
*/
|
||||||
@Length(max = 12)
|
@Length(max = 12)
|
||||||
@JSONField(name = "txnAmt")
|
@JsonProperty("txnAmt")
|
||||||
private String txnAmt;
|
private String txnAmt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 银行优惠金额:撤销、退货交易时填写原消费交易的优惠金额,可以不填
|
* 银行优惠金额:撤销、退货交易时填写原消费交易的优惠金额,可以不填
|
||||||
*/
|
*/
|
||||||
@Length(max = 12)
|
@Length(max = 12)
|
||||||
@JSONField(name = "discountAmt")
|
@JsonProperty("discountAmt")
|
||||||
private String discountAmt;
|
private String discountAmt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付方式:(枚举PayType)当tranType为F时,payType不填写返回聚合码scanCode填写则返回订单数据payData(部分收单行支持)
|
* 支付方式:(枚举PayType)当tranType为F时,payType不填写返回聚合码scanCode填写则返回订单数据payData(部分收单行支持)
|
||||||
*/
|
*/
|
||||||
@Length(max = 4)
|
@Length(max = 4)
|
||||||
@JSONField(name = "payType")
|
@JsonProperty("payType")
|
||||||
private String payType;
|
private String payType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 二维码信息:被扫交易,采集到的手机支付二维码信息,主扫交易该字段为空
|
* 二维码信息:被扫交易,采集到的手机支付二维码信息,主扫交易该字段为空
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "scanCode")
|
@JsonProperty("scanCode")
|
||||||
private String scanCode;
|
private String scanCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户编号
|
* 商户编号
|
||||||
*/
|
*/
|
||||||
@Length(max = 15)
|
@Length(max = 15)
|
||||||
@JSONField(name = "mid")
|
@JsonProperty("mid")
|
||||||
private String mid;
|
private String mid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端编号(可以不填)
|
* 终端编号(可以不填)
|
||||||
*/
|
*/
|
||||||
@Length(max = 8)
|
@Length(max = 8)
|
||||||
@JSONField(name = "tid")
|
@JsonProperty("tid")
|
||||||
private String tid;
|
private String tid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端流水号:终端号系统跟踪号,从 000001 开始到 999999 循环,应答报文原值返回,客户端收到应答报文需要验证traceNo字段值,如果不一致则丢包交易失败
|
* 终端流水号:终端号系统跟踪号,从 000001 开始到 999999 循环,应答报文原值返回,客户端收到应答报文需要验证traceNo字段值,如果不一致则丢包交易失败
|
||||||
*/
|
*/
|
||||||
@Length(max = 6)
|
@Length(max = 6)
|
||||||
@JSONField(name = "traceNo")
|
@JsonProperty("traceNo")
|
||||||
private String traceNo;
|
private String traceNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品名称:自定义商品名称(可以不填,默认为“商品”)
|
* 商品名称:自定义商品名称(可以不填,默认为“商品”)
|
||||||
*/
|
*/
|
||||||
@Length(max = 200)
|
@Length(max = 200)
|
||||||
@JSONField(name = "goodsName")
|
@JsonProperty("goodsName")
|
||||||
private String goodsName;
|
private String goodsName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易订单号:银行订单号(可以不填)
|
* 原交易订单号:银行订单号(可以不填)
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "tradeNo")
|
@JsonProperty("tradeNo")
|
||||||
private String tradeNo;
|
private String tradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易日期时间:(yyyyMMddHHmmss)撤销、退货时填写原消费交易返回的时间日期
|
* 原交易日期时间:(yyyyMMddHHmmss)撤销、退货时填写原消费交易返回的时间日期
|
||||||
*/
|
*/
|
||||||
@Length(max = 14)
|
@Length(max = 14)
|
||||||
@JSONField(name = "orgTxnTime")
|
@JsonProperty("orgTxnTime")
|
||||||
private String orgTxnTime;
|
private String orgTxnTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,28 +111,28 @@ public class BpcTransactionRequestDto {
|
|||||||
* 消费撤销结果查询、退货交易需要传入原消费或定金交易商户系统订单号;退订、定金确认,填写原定金交易订单号;定金确认撤销、定金确认撤销结果查询,填写定金确认订单号
|
* 消费撤销结果查询、退货交易需要传入原消费或定金交易商户系统订单号;退订、定金确认,填写原定金交易订单号;定金确认撤销、定金确认撤销结果查询,填写定金确认订单号
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "merTradeNo")
|
@JsonProperty("merTradeNo")
|
||||||
private String merTradeNo;
|
private String merTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退款退订定金单号:商户系统退货、退订、定金确认订单号(如果不能生成,可以向扫码平台申请商户系统订单号);退货结果查询、退订结果查询、定金确认查询,需要传入原商户系统退货单号
|
* 退款退订定金单号:商户系统退货、退订、定金确认订单号(如果不能生成,可以向扫码平台申请商户系统订单号);退货结果查询、退订结果查询、定金确认查询,需要传入原商户系统退货单号
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "vfTradeNo")
|
@JsonProperty("vfTradeNo")
|
||||||
private String vfTradeNo;
|
private String vfTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 有效时间:主扫二维码有效时间(可以不填,部分收单行不支持)
|
* 有效时间:主扫二维码有效时间(可以不填,部分收单行不支持)
|
||||||
*/
|
*/
|
||||||
@Length(max = 6)
|
@Length(max = 6)
|
||||||
@JSONField(name = "qrValidTime")
|
@JsonProperty("qrValidTime")
|
||||||
private String qrValidTime;
|
private String qrValidTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通知URL:主扫交易延时响应时的交易结果通知URL(可以不填)
|
* 通知URL:主扫交易延时响应时的交易结果通知URL(可以不填)
|
||||||
*/
|
*/
|
||||||
@Length(max = 256)
|
@Length(max = 256)
|
||||||
@JSONField(name = "retUrl")
|
@JsonProperty("retUrl")
|
||||||
private String retUrl;
|
private String retUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -140,83 +140,83 @@ public class BpcTransactionRequestDto {
|
|||||||
* 回调地址不支持换行符等不可见字符以及特殊字符(可以不填,部分收单行不支持)微信需要对接微信点金计划,详情请参考微信相关文档
|
* 回调地址不支持换行符等不可见字符以及特殊字符(可以不填,部分收单行不支持)微信需要对接微信点金计划,详情请参考微信相关文档
|
||||||
*/
|
*/
|
||||||
@Length(max = 128)
|
@Length(max = 128)
|
||||||
@JSONField(name = "callBackUrl")
|
@JsonProperty("callBackUrl")
|
||||||
private String callBackUrl;
|
private String callBackUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户应用ID:当tranType为F时,payType 值为ZFBA或WEIX时需填写
|
* 商户应用ID:当tranType为F时,payType 值为ZFBA或WEIX时需填写
|
||||||
*/
|
*/
|
||||||
@Length(max = 32)
|
@Length(max = 32)
|
||||||
@JSONField(name = "subAppId")
|
@JsonProperty("subAppId")
|
||||||
private String subAppId;
|
private String subAppId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户用户openId:当tranType为F时,payType 值为ZFBA或WEIX时需填写。当上送wxApiType字段时,可以不用填写。
|
* 商户用户openId:当tranType为F时,payType 值为ZFBA或WEIX时需填写。当上送wxApiType字段时,可以不用填写。
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "subOpenId")
|
@JsonProperty("subOpenId")
|
||||||
private String subOpenId;
|
private String subOpenId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信API类型:当业务场景为微信APP支付时,填写固定值APP,其余交易不送该字段
|
* 微信API类型:当业务场景为微信APP支付时,填写固定值APP,其余交易不送该字段
|
||||||
*/
|
*/
|
||||||
@Length(max = 10)
|
@Length(max = 10)
|
||||||
@JSONField(name = "wxApiType")
|
@JsonProperty("wxApiType")
|
||||||
private String wxApiType;
|
private String wxApiType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收款方备注
|
* 收款方备注
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "txtRemarks")
|
@JsonProperty("txtRemarks")
|
||||||
private String txtRemarks;
|
private String txtRemarks;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实名标志:(枚举RealNameAuthFlag)
|
* 实名标志:(枚举RealNameAuthFlag)
|
||||||
*/
|
*/
|
||||||
@Length(max = 1)
|
@Length(max = 1)
|
||||||
@JSONField(name = "realNameAuth")
|
@JsonProperty("realNameAuth")
|
||||||
private String realNameAuth;
|
private String realNameAuth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款人姓名:当realNameAuth为1时必填
|
* 付款人姓名:当realNameAuth为1时必填
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "payerName")
|
@JsonProperty("payerName")
|
||||||
private String payerName;
|
private String payerName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款人身份证件类型:当realNameAuth为1时必填
|
* 付款人身份证件类型:当realNameAuth为1时必填
|
||||||
*/
|
*/
|
||||||
@Length(max = 2)
|
@Length(max = 2)
|
||||||
@JSONField(name = "payerIDType")
|
@JsonProperty("payerIDType")
|
||||||
private String payerIdType;
|
private String payerIdType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款人身份证件号码:当realNameAuth为1时必填
|
* 付款人身份证件号码:当realNameAuth为1时必填
|
||||||
*/
|
*/
|
||||||
@Length(max = 20)
|
@Length(max = 20)
|
||||||
@JSONField(name = "payerID")
|
@JsonProperty("payerID")
|
||||||
private String payerId;
|
private String payerId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起方IP地址:支持IPv6格式
|
* 发起方IP地址:支持IPv6格式
|
||||||
*/
|
*/
|
||||||
@Length(max = 40)
|
@Length(max = 40)
|
||||||
@JSONField(name = "IP")
|
@JsonProperty("IP")
|
||||||
private String ip;
|
private String ip;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端类型:(枚举DeviceType)
|
* 终端类型:(枚举DeviceType)
|
||||||
*/
|
*/
|
||||||
@Length(max = 2)
|
@Length(max = 2)
|
||||||
@JSONField(name = "deviceType")
|
@JsonProperty("deviceType")
|
||||||
private String deviceType;
|
private String deviceType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 银行卡号
|
* 银行卡号
|
||||||
*/
|
*/
|
||||||
@JSONField(name = "pan")
|
@JsonProperty("pan")
|
||||||
private String pan;
|
private String pan;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.healthlink.his.web.externalintegration.dto;
|
package com.healthlink.his.web.externalintegration.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.hibernate.validator.constraints.Length;
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
@@ -17,140 +17,140 @@ public class BpcTransactionResponseDto {
|
|||||||
* 响应码:(枚举RespCode)00 表示成功,其它表示失败
|
* 响应码:(枚举RespCode)00 表示成功,其它表示失败
|
||||||
*/
|
*/
|
||||||
@Length(max = 2)
|
@Length(max = 2)
|
||||||
@JSONField(name = "respCode")
|
@JsonProperty("respCode")
|
||||||
private String respCode;
|
private String respCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应码解释信息(需要Base64解密)
|
* 响应码解释信息(需要Base64解密)
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "respMsg")
|
@JsonProperty("respMsg")
|
||||||
private String respMsg;
|
private String respMsg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易类型:(枚举TranType)
|
* 交易类型:(枚举TranType)
|
||||||
*/
|
*/
|
||||||
@Length(max = 1)
|
@Length(max = 1)
|
||||||
@JSONField(name = "tranType")
|
@JsonProperty("tranType")
|
||||||
private String tranType;
|
private String tranType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易金额:以分为单位的交易金额(订单总金额,同请求金额一致)
|
* 交易金额:以分为单位的交易金额(订单总金额,同请求金额一致)
|
||||||
*/
|
*/
|
||||||
@Length(max = 12)
|
@Length(max = 12)
|
||||||
@JSONField(name = "txnAmt")
|
@JsonProperty("txnAmt")
|
||||||
private String txnAmt;
|
private String txnAmt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付方式:(枚举PayType)
|
* 支付方式:(枚举PayType)
|
||||||
*/
|
*/
|
||||||
@Length(max = 4)
|
@Length(max = 4)
|
||||||
@JSONField(name = "payType")
|
@JsonProperty("payType")
|
||||||
private String payType;
|
private String payType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端流水号:终端号系统跟踪号,同请求报文原值返回,客户端收到应答报文需要验证traceNo字段值,需与请求报文值一致,如果不一致则丢包交易失败
|
* 终端流水号:终端号系统跟踪号,同请求报文原值返回,客户端收到应答报文需要验证traceNo字段值,需与请求报文值一致,如果不一致则丢包交易失败
|
||||||
*/
|
*/
|
||||||
@Length(max = 6)
|
@Length(max = 6)
|
||||||
@JSONField(name = "traceNo")
|
@JsonProperty("traceNo")
|
||||||
private String traceNo;
|
private String traceNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交易时间:(yyyyMMddHHmmss)
|
* 交易时间:(yyyyMMddHHmmss)
|
||||||
*/
|
*/
|
||||||
@Length(max = 14)
|
@Length(max = 14)
|
||||||
@JSONField(name = "txnTime")
|
@JsonProperty("txnTime")
|
||||||
private String txnTime;
|
private String txnTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付订单号:银行返回系统订单号,需要保存该支付交易订单号
|
* 支付订单号:银行返回系统订单号,需要保存该支付交易订单号
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "tradeNo")
|
@JsonProperty("tradeNo")
|
||||||
private String tradeNo;
|
private String tradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第三方支付订单号
|
* 第三方支付订单号
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "transNo")
|
@JsonProperty("transNo")
|
||||||
private String transNo;
|
private String transNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户号
|
* 商户号
|
||||||
*/
|
*/
|
||||||
@Length(max = 15)
|
@Length(max = 15)
|
||||||
@JSONField(name = "mid")
|
@JsonProperty("mid")
|
||||||
private String mid;
|
private String mid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户名称
|
* 商户名称
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "merName")
|
@JsonProperty("merName")
|
||||||
private String merName;
|
private String merName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端号
|
* 终端号
|
||||||
*/
|
*/
|
||||||
@Length(max = 8)
|
@Length(max = 8)
|
||||||
@JSONField(name = "tid")
|
@JsonProperty("tid")
|
||||||
private String tid;
|
private String tid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户系统订单号:同请求一致
|
* 商户系统订单号:同请求一致
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "merTradeNo")
|
@JsonProperty("merTradeNo")
|
||||||
private String merTradeNo;
|
private String merTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户系统退款授权单号:同请求一致
|
* 商户系统退款授权单号:同请求一致
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "vfTradeNo")
|
@JsonProperty("vfTradeNo")
|
||||||
private String vfTradeNo;
|
private String vfTradeNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 优惠金额
|
* 优惠金额
|
||||||
*/
|
*/
|
||||||
@Length(max = 12)
|
@Length(max = 12)
|
||||||
@JSONField(name = "discountAmt")
|
@JsonProperty("discountAmt")
|
||||||
private String discountAmt;
|
private String discountAmt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 有效时间:二维码本身的有效时间,是相对时间,单位为秒,以接收方收到报文时间为起始点计时。不同类型的订单以及不同的订单状况会对应不同的默认有效时间和最大有效时间(可以为空)
|
* 有效时间:二维码本身的有效时间,是相对时间,单位为秒,以接收方收到报文时间为起始点计时。不同类型的订单以及不同的订单状况会对应不同的默认有效时间和最大有效时间(可以为空)
|
||||||
*/
|
*/
|
||||||
@Length(max = 8)
|
@Length(max = 8)
|
||||||
@JSONField(name = "qrValidTime")
|
@JsonProperty("qrValidTime")
|
||||||
private String qrValidTime;
|
private String qrValidTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 二维码信息:主扫支付二维码,以二维码形式显示,手机APP扫二维码码消费
|
* 二维码信息:主扫支付二维码,以二维码形式显示,手机APP扫二维码码消费
|
||||||
*/
|
*/
|
||||||
@Length(max = 128)
|
@Length(max = 128)
|
||||||
@JSONField(name = "scanCode")
|
@JsonProperty("scanCode")
|
||||||
private String scanCode;
|
private String scanCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易类型:1、订单查询类交易填写原交易类型(被扫交易必填)2、非订单查询填写交易类型与tranType一致(可以为空)
|
* 原交易类型:1、订单查询类交易填写原交易类型(被扫交易必填)2、非订单查询填写交易类型与tranType一致(可以为空)
|
||||||
*/
|
*/
|
||||||
@Length(max = 1)
|
@Length(max = 1)
|
||||||
@JSONField(name = "orgTranType")
|
@JsonProperty("orgTranType")
|
||||||
private String orgTranType;
|
private String orgTranType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 原交易名称:订单查询类交易填写原交易名称,非订单查询填写交易名称(被扫交易必填)
|
* 原交易名称:订单查询类交易填写原交易名称,非订单查询填写交易名称(被扫交易必填)
|
||||||
*/
|
*/
|
||||||
@Length(max = 30)
|
@Length(max = 30)
|
||||||
@JSONField(name = "orgTxnName")
|
@JsonProperty("orgTxnName")
|
||||||
private String orgTxnName;
|
private String orgTxnName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单数据:当tranType为F时,payType 值为ZFBA或WEIX时支付宝返回的tradeNo 或者微信返回的prepayId
|
* 订单数据:当tranType为F时,payType 值为ZFBA或WEIX时支付宝返回的tradeNo 或者微信返回的prepayId
|
||||||
*/
|
*/
|
||||||
@Length(max = 64)
|
@Length(max = 64)
|
||||||
@JSONField(name = "payData")
|
@JsonProperty("payData")
|
||||||
private String payData;
|
private String payData;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,4 +99,20 @@ public interface IInHospitalRegisterAppService {
|
|||||||
* @return 病区列表
|
* @return 病区列表
|
||||||
*/
|
*/
|
||||||
List<LocationDto> getWardList(Long orgId);
|
List<LocationDto> getWardList(Long orgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改住院登记信息
|
||||||
|
*
|
||||||
|
* @param inHospitalInfoDto 登记dto
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<?> updateRegistration(InHospitalInfoDto inHospitalInfoDto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作废住院登记
|
||||||
|
*
|
||||||
|
* @param encounterId 住院就诊id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
R<?> voidRegistration(Long encounterId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
|||||||
@Resource
|
@Resource
|
||||||
private YbManager ybManager;
|
private YbManager ybManager;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IChargeItemService iChargeItemService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 门诊医生开住院申请
|
* 门诊医生开住院申请
|
||||||
*
|
*
|
||||||
@@ -175,7 +178,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
|||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
QueryWrapper<InHospitalRegisterQueryDto> queryWrapper
|
QueryWrapper<InHospitalRegisterQueryDto> queryWrapper
|
||||||
= HisQueryUtils.buildQueryWrapper(inHospitalRegisterQueryDto, searchKey,
|
= HisQueryUtils.buildQueryWrapper(inHospitalRegisterQueryDto, searchKey,
|
||||||
new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name")), request);
|
new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name", "id_card")), request);
|
||||||
|
|
||||||
IPage<InHospitalRegisterQueryDto> inHospitalRegisterInfo = inHospitalRegisterAppMapper
|
IPage<InHospitalRegisterQueryDto> inHospitalRegisterInfo = inHospitalRegisterAppMapper
|
||||||
.getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus,
|
.getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus,
|
||||||
@@ -362,6 +365,183 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
|||||||
return locationDtoList;
|
return locationDtoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改住院登记信息
|
||||||
|
*
|
||||||
|
* @param inHospitalInfoDto 登记dto
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> updateRegistration(InHospitalInfoDto inHospitalInfoDto) {
|
||||||
|
Long encounterId = inHospitalInfoDto.getEncounterId();
|
||||||
|
if (encounterId == null) {
|
||||||
|
throw new ServiceException("就诊ID不能为空");
|
||||||
|
}
|
||||||
|
Encounter encounter = iEncounterService.getById(encounterId);
|
||||||
|
if (encounter == null) {
|
||||||
|
throw new ServiceException("未找到该住院登记记录");
|
||||||
|
}
|
||||||
|
// 仅"待入科"状态可修改
|
||||||
|
if (!EncounterZyStatus.REGISTERED.getValue().equals(encounter.getStatusEnum())) {
|
||||||
|
throw new ServiceException("患者已入科接收,无法修改登记信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新就诊信息
|
||||||
|
encounter.setOrganizationId(inHospitalInfoDto.getInHospitalOrgId()); // 住院科室
|
||||||
|
encounter.setPriorityEnum(inHospitalInfoDto.getPriorityEnum()); // 优先级(患者病情)
|
||||||
|
encounter.setAdmitSourceCode(inHospitalInfoDto.getAdmitSourceCode()); // 入院类型
|
||||||
|
encounter.setInWayCode(inHospitalInfoDto.getInWayCode()); // 入院方式
|
||||||
|
encounter.setStartTime(inHospitalInfoDto.getStartTime()); // 入院日期
|
||||||
|
encounter.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 登记员
|
||||||
|
iEncounterService.saveOrUpdate(encounter);
|
||||||
|
|
||||||
|
// 更新病区信息
|
||||||
|
EncounterLocation encounterLocation = iEncounterLocationService.getOne(
|
||||||
|
new LambdaQueryWrapper<EncounterLocation>()
|
||||||
|
.eq(EncounterLocation::getEncounterId, encounterId)
|
||||||
|
.eq(EncounterLocation::getFormEnum, LocationForm.WARD.getValue()));
|
||||||
|
if (inHospitalInfoDto.getWardLocationId() != null) {
|
||||||
|
EncounterLocation encounterLocationReg = new EncounterLocation();
|
||||||
|
if (encounterLocation != null) {
|
||||||
|
encounterLocationReg.setId(encounterLocation.getId());
|
||||||
|
}
|
||||||
|
encounterLocationReg.setEncounterId(encounterId);
|
||||||
|
encounterLocationReg.setLocationId(inHospitalInfoDto.getWardLocationId());
|
||||||
|
encounterLocationReg.setFormEnum(LocationForm.WARD.getValue());
|
||||||
|
iEncounterLocationService.saveOrUpdate(encounterLocationReg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新费用性质(contractNo)对应的账户信息
|
||||||
|
if (inHospitalInfoDto.getContractNo() != null) {
|
||||||
|
boolean selfFunded = CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(inHospitalInfoDto.getContractNo());
|
||||||
|
|
||||||
|
// 查找自费账户(type_code='04')
|
||||||
|
Account cashAccount = iAccountService.getOne(
|
||||||
|
new LambdaQueryWrapper<Account>()
|
||||||
|
.eq(Account::getEncounterId, encounterId)
|
||||||
|
.eq(Account::getTypeCode, AccountType.PERSONAL_CASH_ACCOUNT.getCode()));
|
||||||
|
|
||||||
|
// 查找非自费账户
|
||||||
|
Account contractAccount = iAccountService.getOne(
|
||||||
|
new LambdaQueryWrapper<Account>()
|
||||||
|
.eq(Account::getEncounterId, encounterId)
|
||||||
|
.ne(Account::getTypeCode, AccountType.PERSONAL_CASH_ACCOUNT.getCode()));
|
||||||
|
|
||||||
|
if (selfFunded) {
|
||||||
|
// 改为自费
|
||||||
|
if (cashAccount != null) {
|
||||||
|
cashAccount.setContractNo(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO);
|
||||||
|
cashAccount.setEncounterFlag(Whether.YES.getValue());
|
||||||
|
iAccountService.saveOrUpdate(cashAccount);
|
||||||
|
} else {
|
||||||
|
// 不存在自费账户时,创建一个
|
||||||
|
Account newCashAccount = new Account();
|
||||||
|
newCashAccount.setTypeCode(AccountType.PERSONAL_CASH_ACCOUNT.getCode());
|
||||||
|
newCashAccount.setPatientId(encounter.getPatientId());
|
||||||
|
newCashAccount.setEncounterId(encounterId);
|
||||||
|
newCashAccount.setContractNo(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO);
|
||||||
|
newCashAccount.setEncounterFlag(Whether.YES.getValue());
|
||||||
|
newCashAccount.setBalanceAmount(BigDecimal.ZERO);
|
||||||
|
iAccountService.save(newCashAccount);
|
||||||
|
}
|
||||||
|
// 删除非自费账户
|
||||||
|
if (contractAccount != null) {
|
||||||
|
iAccountService.removeById(contractAccount.getId());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 改为非自费
|
||||||
|
if (cashAccount != null) {
|
||||||
|
cashAccount.setEncounterFlag(Whether.NO.getValue());
|
||||||
|
iAccountService.saveOrUpdate(cashAccount);
|
||||||
|
} else {
|
||||||
|
// 不存在自费账户时,创建一个
|
||||||
|
Account newCashAccount = new Account();
|
||||||
|
newCashAccount.setTypeCode(AccountType.PERSONAL_CASH_ACCOUNT.getCode());
|
||||||
|
newCashAccount.setPatientId(encounter.getPatientId());
|
||||||
|
newCashAccount.setEncounterId(encounterId);
|
||||||
|
newCashAccount.setContractNo(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO);
|
||||||
|
newCashAccount.setEncounterFlag(Whether.NO.getValue());
|
||||||
|
newCashAccount.setBalanceAmount(BigDecimal.ZERO);
|
||||||
|
iAccountService.save(newCashAccount);
|
||||||
|
}
|
||||||
|
// 更新或创建非自费账户
|
||||||
|
String typeCode = StringUtils.isNotEmpty(inHospitalInfoDto.getTypeCoce())
|
||||||
|
? inHospitalInfoDto.getTypeCoce()
|
||||||
|
: AccountType.PERSONAL_CASH_ACCOUNT.getCode();
|
||||||
|
if (contractAccount != null) {
|
||||||
|
contractAccount.setContractNo(inHospitalInfoDto.getContractNo());
|
||||||
|
iAccountService.saveOrUpdate(contractAccount);
|
||||||
|
} else {
|
||||||
|
Account newAccount = new Account();
|
||||||
|
newAccount.setTypeCode(typeCode);
|
||||||
|
newAccount.setPatientId(encounter.getPatientId());
|
||||||
|
newAccount.setEncounterId(encounterId);
|
||||||
|
newAccount.setContractNo(inHospitalInfoDto.getContractNo());
|
||||||
|
newAccount.setEncounterFlag(Whether.YES.getValue());
|
||||||
|
iAccountService.save(newAccount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"住院登记"}));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作废住院登记
|
||||||
|
*
|
||||||
|
* @param encounterId 住院就诊id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public R<?> voidRegistration(Long encounterId) {
|
||||||
|
if (encounterId == null) {
|
||||||
|
throw new ServiceException("就诊ID不能为空");
|
||||||
|
}
|
||||||
|
Encounter encounter = iEncounterService.getById(encounterId);
|
||||||
|
if (encounter == null) {
|
||||||
|
throw new ServiceException("未找到该住院登记记录");
|
||||||
|
}
|
||||||
|
// 仅"待入科"状态可作废
|
||||||
|
if (!EncounterZyStatus.REGISTERED.getValue().equals(encounter.getStatusEnum())) {
|
||||||
|
throw new ServiceException("该患者已入科,请先通知护士站办理退科处理!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查预交金余额
|
||||||
|
Account cashAccount = iAccountService.getOne(
|
||||||
|
new LambdaQueryWrapper<Account>()
|
||||||
|
.eq(Account::getEncounterId, encounterId)
|
||||||
|
.eq(Account::getTypeCode, AccountType.PERSONAL_CASH_ACCOUNT.getCode()));
|
||||||
|
if (cashAccount != null && cashAccount.getBalanceAmount() != null
|
||||||
|
&& cashAccount.getBalanceAmount().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
throw new ServiceException("该患者存在未退清的预交金,请先前往预交金页面办理退款!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否已产生计费
|
||||||
|
long chargeCount = iChargeItemService.count(
|
||||||
|
new LambdaQueryWrapper<ChargeItem>()
|
||||||
|
.eq(ChargeItem::getEncounterId, encounterId));
|
||||||
|
if (chargeCount > 0) {
|
||||||
|
throw new ServiceException("该患者已产生计费记录,无法作废登记!");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置状态为已作废
|
||||||
|
encounter.setStatusEnum(EncounterZyStatus.VOIDED.getValue());
|
||||||
|
encounter.setRegistrarId(SecurityUtils.getLoginUser().getPractitionerId()); // 作废操作人
|
||||||
|
iEncounterService.saveOrUpdate(encounter);
|
||||||
|
|
||||||
|
// 清理账户记录
|
||||||
|
if (cashAccount != null) {
|
||||||
|
iAccountService.removeById(cashAccount.getId());
|
||||||
|
}
|
||||||
|
// 清理非自费账户
|
||||||
|
iAccountService.remove(
|
||||||
|
new LambdaQueryWrapper<Account>()
|
||||||
|
.eq(Account::getEncounterId, encounterId)
|
||||||
|
.ne(Account::getTypeCode, AccountType.PERSONAL_CASH_ACCOUNT.getCode()));
|
||||||
|
|
||||||
|
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"作废操作"}));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理入院登记信息
|
* 处理入院登记信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -142,4 +142,26 @@ public class InHospitalRegisterController {
|
|||||||
return R.ok(iInHospitalRegisterAppService.getWardList(orgId));
|
return R.ok(iInHospitalRegisterAppService.getWardList(orgId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改住院登记信息
|
||||||
|
*
|
||||||
|
* @param inHospitalInfoDto 登记dto
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@PutMapping(value = "/update-registration")
|
||||||
|
public R<?> updateRegistration(@RequestBody InHospitalInfoDto inHospitalInfoDto) {
|
||||||
|
return iInHospitalRegisterAppService.updateRegistration(inHospitalInfoDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作废住院登记
|
||||||
|
*
|
||||||
|
* @param encounterId 住院就诊id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@PutMapping(value = "/void-registration")
|
||||||
|
public R<?> voidRegistration(@RequestParam(value = "encounterId") Long encounterId) {
|
||||||
|
return iInHospitalRegisterAppService.voidRegistration(encounterId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,4 +95,10 @@ public class InHospitalRegisterQueryDto {
|
|||||||
private String admitSourceCode;
|
private String admitSourceCode;
|
||||||
private String admitSourceCode_dictText;
|
private String admitSourceCode_dictText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住院状态
|
||||||
|
*/
|
||||||
|
private Integer statusEnum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// PLACEHOLDER_FOR_NEW_FIELDS
|
||||||
|
|||||||
@@ -74,6 +74,13 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"),
|
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"),
|
||||||
DateTimeFormatter.ofPattern("yyyy-MM-dd H:mm:ss"));
|
DateTimeFormatter.ofPattern("yyyy-MM-dd H:mm:ss"));
|
||||||
|
|
||||||
|
/** Date → "yyyy-MM-dd HH:mm:ss",与前端 formatDateStr 输出格式一致 */
|
||||||
|
private static String formatOccurrenceTime(Date date) {
|
||||||
|
if (date == null) return "";
|
||||||
|
LocalDateTime ldt = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
||||||
|
return ldt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
}
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
AssignSeqUtil assignSeqUtil;
|
AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
@@ -177,6 +184,9 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
// 初始化查询参数
|
// 初始化查询参数
|
||||||
String encounterIds = inpatientAdviceParam.getEncounterIds();
|
String encounterIds = inpatientAdviceParam.getEncounterIds();
|
||||||
inpatientAdviceParam.setEncounterIds(null);
|
inpatientAdviceParam.setEncounterIds(null);
|
||||||
|
// Bug #715: 提取therapyEnum手动处理,避免自动条件排除therapy_enum为NULL的耗材医嘱
|
||||||
|
Integer therapyEnum = inpatientAdviceParam.getTherapyEnum();
|
||||||
|
inpatientAdviceParam.setTherapyEnum(null);
|
||||||
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
||||||
inpatientAdviceParam.setExeStatus(null);
|
inpatientAdviceParam.setExeStatus(null);
|
||||||
// 提取requestStatus手动处理,支持COMPLETED(3)和CHECK_VERIFIED(10)同时查询
|
// 提取requestStatus手动处理,支持COMPLETED(3)和CHECK_VERIFIED(10)同时查询
|
||||||
@@ -186,13 +196,18 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
QueryWrapper<InpatientAdviceParam> queryWrapper
|
QueryWrapper<InpatientAdviceParam> queryWrapper
|
||||||
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
|
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
|
||||||
|
|
||||||
// 手动拼接requestStatus条件:COMPLETED(3)时同时包含CHECK_VERIFIED(10)和PENDING_RECEIVE(11)
|
// 手动拼接requestStatus条件
|
||||||
|
// COMPLETED(3)时同时包含CHECK_VERIFIED(10)和PENDING_RECEIVE(11)
|
||||||
|
// ACTIVE(2)时同时包含PENDING_STOP(13),以便护士核对停嘱医嘱
|
||||||
// UNION查询外层列名为request_status(T1.status_enum AS request_status),不是status_enum
|
// UNION查询外层列名为request_status(T1.status_enum AS request_status),不是status_enum
|
||||||
if (requestStatus != null) {
|
if (requestStatus != null) {
|
||||||
if (RequestStatus.COMPLETED.getValue().equals(requestStatus)) {
|
if (RequestStatus.COMPLETED.getValue().equals(requestStatus)) {
|
||||||
queryWrapper.in("request_status",
|
queryWrapper.in("request_status",
|
||||||
RequestStatus.COMPLETED.getValue(), RequestStatus.CHECK_VERIFIED.getValue(),
|
RequestStatus.COMPLETED.getValue(), RequestStatus.CHECK_VERIFIED.getValue(),
|
||||||
RequestStatus.PENDING_RECEIVE.getValue());
|
RequestStatus.PENDING_RECEIVE.getValue());
|
||||||
|
} else if (RequestStatus.ACTIVE.getValue().equals(requestStatus)) {
|
||||||
|
queryWrapper.in("request_status",
|
||||||
|
RequestStatus.ACTIVE.getValue(), RequestStatus.PENDING_STOP.getValue());
|
||||||
} else {
|
} else {
|
||||||
queryWrapper.eq("request_status", requestStatus);
|
queryWrapper.eq("request_status", requestStatus);
|
||||||
}
|
}
|
||||||
@@ -204,6 +219,10 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
= Arrays.stream(encounterIds.split(CommonConstants.Common.COMMA)).map(Long::parseLong).toList();
|
= Arrays.stream(encounterIds.split(CommonConstants.Common.COMMA)).map(Long::parseLong).toList();
|
||||||
queryWrapper.in(CommonConstants.FieldName.EncounterId, encounterIdList);
|
queryWrapper.in(CommonConstants.FieldName.EncounterId, encounterIdList);
|
||||||
}
|
}
|
||||||
|
// Bug #715: 手动拼接therapyEnum条件,耗材医嘱(DeviceRequest)无therapy_enum(NULL),需兼容
|
||||||
|
if (therapyEnum != null) {
|
||||||
|
queryWrapper.and(w -> w.eq("therapy_enum", therapyEnum).or().isNull("therapy_enum"));
|
||||||
|
}
|
||||||
// 患者医嘱分页列表
|
// 患者医嘱分页列表
|
||||||
Page<InpatientAdviceDto> inpatientAdvicePage
|
Page<InpatientAdviceDto> inpatientAdvicePage
|
||||||
= adviceProcessAppMapper.selectInpatientAdvicePage(new Page<>(pageNo, pageSize), queryWrapper,
|
= adviceProcessAppMapper.selectInpatientAdvicePage(new Page<>(pageNo, pageSize), queryWrapper,
|
||||||
@@ -230,6 +249,70 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
if (e.getBirthDate() != null) {
|
if (e.getBirthDate() != null) {
|
||||||
e.setAge(AgeCalculatorUtil.getAge(e.getBirthDate()));
|
e.setAge(AgeCalculatorUtil.getAge(e.getBirthDate()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---------- Bug #595: 医嘱校对列表计算字段 ----------
|
||||||
|
|
||||||
|
// 单次剂量:剂量 + 单位
|
||||||
|
if (e.getDose() != null) {
|
||||||
|
String doseStr = e.getDose().stripTrailingZeros().toPlainString();
|
||||||
|
String unitStr = e.getDoseUnitCode_dictText() != null ? e.getDoseUnitCode_dictText() : "";
|
||||||
|
e.setSingleDose(doseStr + unitStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 总量:剂量 × 数量 + 单位(仅药品医嘱)
|
||||||
|
if (e.getDose() != null && e.getQuantity() != null) {
|
||||||
|
BigDecimal total = e.getDose().multiply(BigDecimal.valueOf(e.getQuantity()));
|
||||||
|
String totalStr = total.stripTrailingZeros().toPlainString();
|
||||||
|
String unitStr = e.getUnitCode_dictText() != null ? e.getUnitCode_dictText() : "";
|
||||||
|
e.setTotalAmount(totalStr + unitStr);
|
||||||
|
} else if (e.getQuantity() != null) {
|
||||||
|
String unitStr = e.getUnitCode_dictText() != null ? e.getUnitCode_dictText() : "";
|
||||||
|
e.setTotalAmount(e.getQuantity() + unitStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 频次/用法组合(直接使用DictUtils翻译,避免DictAspect延迟导致_dictText为空)
|
||||||
|
String rateLabel = e.getRateCode() != null ? DictUtils.getDictLabel("rate_code", e.getRateCode()) : null;
|
||||||
|
String methodLabel = e.getMethodCode() != null ? DictUtils.getDictLabel("method_code", e.getMethodCode()) : null;
|
||||||
|
StringBuilder freqBuilder = new StringBuilder();
|
||||||
|
if (rateLabel != null && !rateLabel.isEmpty()) {
|
||||||
|
freqBuilder.append(rateLabel);
|
||||||
|
}
|
||||||
|
if (methodLabel != null && !methodLabel.isEmpty()) {
|
||||||
|
if (freqBuilder.length() > 0) freqBuilder.append(" ");
|
||||||
|
freqBuilder.append(methodLabel);
|
||||||
|
}
|
||||||
|
e.setFrequencyUsage(freqBuilder.length() > 0 ? freqBuilder.toString() : null);
|
||||||
|
|
||||||
|
// 开嘱医生
|
||||||
|
e.setOrderingDoctor(e.getRequesterId_dictText() != null
|
||||||
|
? e.getRequesterId_dictText() : e.getAdmittingDoctorName());
|
||||||
|
|
||||||
|
// 皮试状态 + 高亮
|
||||||
|
if (e.getSkinTestFlag() != null && e.getSkinTestFlag() == 1) {
|
||||||
|
e.setSkinTestStatus("需皮试");
|
||||||
|
e.setSkinTestHighlight(true);
|
||||||
|
} else if (e.getSkinTestFlag() != null && e.getSkinTestFlag() == 2) {
|
||||||
|
e.setSkinTestStatus("皮试通过");
|
||||||
|
e.setSkinTestHighlight(false);
|
||||||
|
} else {
|
||||||
|
e.setSkinTestStatus("无需");
|
||||||
|
e.setSkinTestHighlight(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 注射药品标记
|
||||||
|
e.setIsInjection(e.getInjectFlag() != null && e.getInjectFlag() == 1);
|
||||||
|
|
||||||
|
// 停嘱医生
|
||||||
|
e.setStopperName(e.getStopperName());
|
||||||
|
|
||||||
|
// 停嘱时间
|
||||||
|
e.setStopTime(e.getEndTime());
|
||||||
|
|
||||||
|
// 医嘱号
|
||||||
|
e.setOrderNo(e.getRequestId() != null ? e.getRequestId().toString() : null);
|
||||||
|
|
||||||
|
// 诊断(行级)
|
||||||
|
e.setDiagnosis(e.getConditionNames());
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取医嘱列表
|
// 获取医嘱列表
|
||||||
@@ -258,7 +341,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
if (performRecordList != null && !performRecordList.isEmpty()) {
|
if (performRecordList != null && !performRecordList.isEmpty()) {
|
||||||
// 按时间分组,处理每个时间点的多条记录
|
// 按时间分组,处理每个时间点的多条记录
|
||||||
Map<String, List<PerformRecordDto>> recordsByTime = performRecordList.stream()
|
Map<String, List<PerformRecordDto>> recordsByTime = performRecordList.stream()
|
||||||
.collect(Collectors.groupingBy(record -> record.getOccurrenceTime().toString()));
|
.collect(Collectors.groupingBy(record -> formatOccurrenceTime(record.getOccurrenceTime())));
|
||||||
for (Map.Entry<String, List<PerformRecordDto>> entry : recordsByTime.entrySet()) {
|
for (Map.Entry<String, List<PerformRecordDto>> entry : recordsByTime.entrySet()) {
|
||||||
List<PerformRecordDto> records = entry.getValue();
|
List<PerformRecordDto> records = entry.getValue();
|
||||||
// 按操作顺序排序
|
// 按操作顺序排序
|
||||||
@@ -333,10 +416,29 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
List<Long> serviceReqIds = serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList();
|
List<Long> serviceReqIds = serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList();
|
||||||
// 先查询服务请求,按 categoryEnum 分流:检查类(23)走 CHECK_VERIFIED,其余走 COMPLETED
|
// 先查询服务请求,按 categoryEnum 分流:检查类(23)走 CHECK_VERIFIED,其余走 COMPLETED
|
||||||
List<ServiceRequest> allServiceRequests = serviceRequestService.listByIds(serviceReqIds);
|
List<ServiceRequest> allServiceRequests = serviceRequestService.listByIds(serviceReqIds);
|
||||||
List<Long> checkReqIds = allServiceRequests.stream()
|
|
||||||
|
// 分离已停嘱(PENDING_STOP)的订单,护士核对后变为已停止(STOPPED)
|
||||||
|
List<ServiceRequest> pendingStopRequests = allServiceRequests.stream()
|
||||||
|
.filter(sr -> RequestStatus.PENDING_STOP.getValue().equals(sr.getStatusEnum()))
|
||||||
|
.toList();
|
||||||
|
List<ServiceRequest> normalRequests = allServiceRequests.stream()
|
||||||
|
.filter(sr -> !RequestStatus.PENDING_STOP.getValue().equals(sr.getStatusEnum()))
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
// 已停嘱订单 → 已停止(STOPPED)
|
||||||
|
if (!pendingStopRequests.isEmpty()) {
|
||||||
|
List<Long> pendingStopIds = pendingStopRequests.stream().map(ServiceRequest::getId).toList();
|
||||||
|
serviceRequestService.update(new LambdaUpdateWrapper<ServiceRequest>()
|
||||||
|
.in(ServiceRequest::getId, pendingStopIds)
|
||||||
|
.set(ServiceRequest::getStatusEnum, RequestStatus.STOPPED.getValue())
|
||||||
|
.set(ServiceRequest::getUpdateBy, SecurityUtils.getNickName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 正常订单:检查类 → 已校对(CHECK_VERIFIED=10),其余 → 已完成(COMPLETED=3)
|
||||||
|
List<Long> checkReqIds = normalRequests.stream()
|
||||||
.filter(sr -> ActivityDefCategory.TEST.getValue().equals(sr.getCategoryEnum()))
|
.filter(sr -> ActivityDefCategory.TEST.getValue().equals(sr.getCategoryEnum()))
|
||||||
.map(ServiceRequest::getId).toList();
|
.map(ServiceRequest::getId).toList();
|
||||||
List<Long> otherReqIds = allServiceRequests.stream()
|
List<Long> otherReqIds = normalRequests.stream()
|
||||||
.filter(sr -> !ActivityDefCategory.TEST.getValue().equals(sr.getCategoryEnum()))
|
.filter(sr -> !ActivityDefCategory.TEST.getValue().equals(sr.getCategoryEnum()))
|
||||||
.map(ServiceRequest::getId).toList();
|
.map(ServiceRequest::getId).toList();
|
||||||
// 检查类 → 已校对(CHECK_VERIFIED=10)
|
// 检查类 → 已校对(CHECK_VERIFIED=10)
|
||||||
@@ -348,7 +450,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
serviceRequestService.updateCompleteRequestStatus(otherReqIds, practitionerId, checkDate);
|
serviceRequestService.updateCompleteRequestStatus(otherReqIds, practitionerId, checkDate);
|
||||||
}
|
}
|
||||||
// 处理转科/出院等特殊医嘱
|
// 处理转科/出院等特殊医嘱
|
||||||
for (ServiceRequest serviceRequest : allServiceRequests) {
|
for (ServiceRequest serviceRequest : normalRequests) {
|
||||||
if (ActivityDefCategory.TRANSFER.getValue().equals(serviceRequest.getCategoryEnum())) {
|
if (ActivityDefCategory.TRANSFER.getValue().equals(serviceRequest.getCategoryEnum())) {
|
||||||
encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
||||||
EncounterZyStatus.PENDING_TRANSFER.getValue());
|
EncounterZyStatus.PENDING_TRANSFER.getValue());
|
||||||
@@ -359,9 +461,30 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!medRequestList.isEmpty()) {
|
if (!medRequestList.isEmpty()) {
|
||||||
// 更新药品请求状态已完成
|
List<Long> medReqIds = medRequestList.stream().map(PerformInfoDto::getRequestId).toList();
|
||||||
medicationRequestService.updateCompletedStatusBatch(
|
// 查询药品请求,分离已停嘱(PENDING_STOP)的订单
|
||||||
medRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate);
|
List<MedicationRequest> allMedRequests = medicationRequestService.list(
|
||||||
|
new LambdaQueryWrapper<MedicationRequest>()
|
||||||
|
.select(MedicationRequest::getId, MedicationRequest::getStatusEnum)
|
||||||
|
.in(MedicationRequest::getId, medReqIds));
|
||||||
|
List<Long> pendingStopMedIds = allMedRequests.stream()
|
||||||
|
.filter(mr -> RequestStatus.PENDING_STOP.getValue().equals(mr.getStatusEnum()))
|
||||||
|
.map(MedicationRequest::getId).toList();
|
||||||
|
List<Long> normalMedIds = allMedRequests.stream()
|
||||||
|
.filter(mr -> !RequestStatus.PENDING_STOP.getValue().equals(mr.getStatusEnum()))
|
||||||
|
.map(MedicationRequest::getId).toList();
|
||||||
|
|
||||||
|
// 已停嘱订单 → 已停止(STOPPED)
|
||||||
|
if (!pendingStopMedIds.isEmpty()) {
|
||||||
|
medicationRequestService.update(new LambdaUpdateWrapper<MedicationRequest>()
|
||||||
|
.in(MedicationRequest::getId, pendingStopMedIds)
|
||||||
|
.set(MedicationRequest::getStatusEnum, RequestStatus.STOPPED.getValue())
|
||||||
|
.set(MedicationRequest::getUpdateBy, SecurityUtils.getNickName()));
|
||||||
|
}
|
||||||
|
// 正常订单 → 已完成(COMPLETED)
|
||||||
|
if (!normalMedIds.isEmpty()) {
|
||||||
|
medicationRequestService.updateCompletedStatusBatch(normalMedIds, practitionerId, checkDate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return R.ok(null, "校对成功");
|
return R.ok(null, "校对成功");
|
||||||
}
|
}
|
||||||
@@ -447,12 +570,25 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
Date exeDate = adviceExecuteParam.getExeDate();
|
Date exeDate = adviceExecuteParam.getExeDate();
|
||||||
// 医嘱集合
|
// 医嘱集合
|
||||||
List<AdviceExecuteDetailParam> adviceExecuteDetailList = adviceExecuteParam.getAdviceExecuteDetailList();
|
List<AdviceExecuteDetailParam> adviceExecuteDetailList = adviceExecuteParam.getAdviceExecuteDetailList();
|
||||||
|
|
||||||
|
// 前置校验:确保有待执行的医嘱且 executeTimes 不为空
|
||||||
|
if (adviceExecuteDetailList == null || adviceExecuteDetailList.isEmpty()) {
|
||||||
|
return R.fail("未选择需要执行的医嘱");
|
||||||
|
}
|
||||||
|
adviceExecuteDetailList.removeIf(item -> item.getExecuteTimes() == null || item.getExecuteTimes().isEmpty());
|
||||||
|
if (adviceExecuteDetailList.isEmpty()) {
|
||||||
|
return R.fail("所选医嘱没有可执行的时间点,请勾选预计执行时间后再操作");
|
||||||
|
}
|
||||||
|
|
||||||
// 药品
|
// 药品
|
||||||
List<AdviceExecuteDetailParam> medicineList = adviceExecuteDetailList.stream()
|
List<AdviceExecuteDetailParam> medicineList = adviceExecuteDetailList.stream()
|
||||||
.filter(e -> CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(e.getAdviceTable())).toList();
|
.filter(e -> CommonConstants.TableName.MED_MEDICATION_REQUEST.equals(e.getAdviceTable())).toList();
|
||||||
// 诊疗
|
// 诊疗
|
||||||
List<AdviceExecuteDetailParam> activityList = adviceExecuteDetailList.stream()
|
List<AdviceExecuteDetailParam> activityList = adviceExecuteDetailList.stream()
|
||||||
.filter(e -> CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(e.getAdviceTable())).toList();
|
.filter(e -> CommonConstants.TableName.WOR_SERVICE_REQUEST.equals(e.getAdviceTable())).toList();
|
||||||
|
|
||||||
|
int totalCreatedCount = 0;
|
||||||
|
|
||||||
// -------------------------------------------药品
|
// -------------------------------------------药品
|
||||||
if (!medicineList.isEmpty()) {
|
if (!medicineList.isEmpty()) {
|
||||||
// 组装药品请求用于执行的数据结构
|
// 组装药品请求用于执行的数据结构
|
||||||
@@ -465,14 +601,14 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 处理药品执行
|
// 处理药品执行
|
||||||
this.exeMedication(medUseExeList, exeDate);
|
totalCreatedCount += this.exeMedication(medUseExeList, exeDate);
|
||||||
}
|
}
|
||||||
// -------------------------------------------诊疗
|
// -------------------------------------------诊疗
|
||||||
if (!activityList.isEmpty()) {
|
if (!activityList.isEmpty()) {
|
||||||
// 组装诊疗请求用于执行的数据结构
|
// 组装诊疗请求用于执行的数据结构
|
||||||
List<ServiceRequestUseExe> actUseExeList = this.assemblyActivity(activityList);
|
List<ServiceRequestUseExe> actUseExeList = this.assemblyActivity(activityList);
|
||||||
// 处理诊疗执行
|
// 处理诊疗执行
|
||||||
this.exeActivity(actUseExeList, exeDate);
|
totalCreatedCount += this.exeActivity(actUseExeList, exeDate);
|
||||||
// 检查类医嘱执行后,状态改为"待接收"(PENDING_RECEIVE=11)
|
// 检查类医嘱执行后,状态改为"待接收"(PENDING_RECEIVE=11)
|
||||||
List<Long> actReqIds = activityList.stream().map(AdviceExecuteDetailParam::getRequestId).toList();
|
List<Long> actReqIds = activityList.stream().map(AdviceExecuteDetailParam::getRequestId).toList();
|
||||||
List<ServiceRequest> executedReqs = serviceRequestService.listByIds(actReqIds);
|
List<ServiceRequest> executedReqs = serviceRequestService.listByIds(actReqIds);
|
||||||
@@ -491,6 +627,11 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 后置校验:确认有执行记录被实际创建
|
||||||
|
if (totalCreatedCount == 0) {
|
||||||
|
return R.fail("执行失败,未生成任何执行记录,请检查医嘱状态后重试");
|
||||||
|
}
|
||||||
|
|
||||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱执行"}));
|
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱执行"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -792,8 +933,10 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
*
|
*
|
||||||
* @param medUseExeList 药品医嘱
|
* @param medUseExeList 药品医嘱
|
||||||
* @param exeDate 实际执行时间
|
* @param exeDate 实际执行时间
|
||||||
|
* @return 实际创建的执行记录数
|
||||||
*/
|
*/
|
||||||
private void exeMedication(List<MedicationRequestUseExe> medUseExeList, Date exeDate) {
|
private int exeMedication(List<MedicationRequestUseExe> medUseExeList, Date exeDate) {
|
||||||
|
int createdCount = 0;
|
||||||
// 长期医嘱
|
// 长期医嘱
|
||||||
List<MedicationRequestUseExe> longMedication = medUseExeList.stream()
|
List<MedicationRequestUseExe> longMedication = medUseExeList.stream()
|
||||||
.filter(e -> TherapyTimeType.LONG_TERM.getValue().equals(e.getTherapyEnum())).toList();
|
.filter(e -> TherapyTimeType.LONG_TERM.getValue().equals(e.getTherapyEnum())).toList();
|
||||||
@@ -816,6 +959,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
MedicationRequest longMedicationRequest;
|
MedicationRequest longMedicationRequest;
|
||||||
ChargeItem chargeItem;
|
ChargeItem chargeItem;
|
||||||
for (MedicationRequestUseExe medicationRequestUseExe : longMedication) {
|
for (MedicationRequestUseExe medicationRequestUseExe : longMedication) {
|
||||||
|
if (medicationRequestUseExe.getExecuteTimes() == null) continue;
|
||||||
for (String executeTime : medicationRequestUseExe.getExecuteTimes()) {
|
for (String executeTime : medicationRequestUseExe.getExecuteTimes()) {
|
||||||
longMedicationRequest = new MedicationRequest();
|
longMedicationRequest = new MedicationRequest();
|
||||||
BeanUtils.copyProperties(medicationRequestUseExe, longMedicationRequest);
|
BeanUtils.copyProperties(medicationRequestUseExe, longMedicationRequest);
|
||||||
@@ -845,6 +989,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, EventStatus.COMPLETED,
|
CommonConstants.TableName.MED_MEDICATION_REQUEST, EventStatus.COMPLETED,
|
||||||
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, longMedicationRequest.getGroupId(),
|
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, longMedicationRequest.getGroupId(),
|
||||||
null);
|
null);
|
||||||
|
createdCount++;
|
||||||
|
|
||||||
// 医嘱定价来源
|
// 医嘱定价来源
|
||||||
String orderPricingSource = TenantOptionUtil.getOptionContent(TenantOptionDict.ORDER_PRICING_SOURCE);
|
String orderPricingSource = TenantOptionUtil.getOptionContent(TenantOptionDict.ORDER_PRICING_SOURCE);
|
||||||
@@ -1045,6 +1190,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
// 临时
|
// 临时
|
||||||
MedicationRequest tempMedicationRequest;
|
MedicationRequest tempMedicationRequest;
|
||||||
for (MedicationRequestUseExe medicationRequestUseExe : tempMedication) {
|
for (MedicationRequestUseExe medicationRequestUseExe : tempMedication) {
|
||||||
|
if (medicationRequestUseExe.getExecuteTimes() == null) continue;
|
||||||
for (String executeTime : medicationRequestUseExe.getExecuteTimes()) {
|
for (String executeTime : medicationRequestUseExe.getExecuteTimes()) {
|
||||||
tempMedicationRequest = new MedicationRequest();
|
tempMedicationRequest = new MedicationRequest();
|
||||||
BeanUtils.copyProperties(medicationRequestUseExe, tempMedicationRequest);
|
BeanUtils.copyProperties(medicationRequestUseExe, tempMedicationRequest);
|
||||||
@@ -1057,6 +1203,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
CommonConstants.TableName.MED_MEDICATION_REQUEST, EventStatus.COMPLETED,
|
CommonConstants.TableName.MED_MEDICATION_REQUEST, EventStatus.COMPLETED,
|
||||||
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, tempMedicationRequest.getGroupId(),
|
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, tempMedicationRequest.getGroupId(),
|
||||||
null);
|
null);
|
||||||
|
createdCount++;
|
||||||
|
|
||||||
// 更新药品放发状态
|
// 更新药品放发状态
|
||||||
medicationDispenseService.update(new LambdaUpdateWrapper<MedicationDispense>()
|
medicationDispenseService.update(new LambdaUpdateWrapper<MedicationDispense>()
|
||||||
@@ -1073,6 +1220,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return createdCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1080,8 +1228,10 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
*
|
*
|
||||||
* @param actUseExeList 诊疗医嘱
|
* @param actUseExeList 诊疗医嘱
|
||||||
* @param exeDate 实际执行时间
|
* @param exeDate 实际执行时间
|
||||||
|
* @return 实际创建的执行记录数
|
||||||
*/
|
*/
|
||||||
private void exeActivity(List<ServiceRequestUseExe> actUseExeList, Date exeDate) {
|
private int exeActivity(List<ServiceRequestUseExe> actUseExeList, Date exeDate) {
|
||||||
|
int createdCount = 0;
|
||||||
// 长期医嘱
|
// 长期医嘱
|
||||||
List<ServiceRequestUseExe> longActivity = actUseExeList.stream()
|
List<ServiceRequestUseExe> longActivity = actUseExeList.stream()
|
||||||
.filter(e -> TherapyTimeType.LONG_TERM.getValue().equals(e.getTherapyEnum())).toList();
|
.filter(e -> TherapyTimeType.LONG_TERM.getValue().equals(e.getTherapyEnum())).toList();
|
||||||
@@ -1106,6 +1256,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
ServiceRequest longServiceRequest;
|
ServiceRequest longServiceRequest;
|
||||||
ChargeItem chargeItem;
|
ChargeItem chargeItem;
|
||||||
for (ServiceRequestUseExe serviceRequestUseExe : longActivity) {
|
for (ServiceRequestUseExe serviceRequestUseExe : longActivity) {
|
||||||
|
if (serviceRequestUseExe.getExecuteTimes() == null) continue;
|
||||||
// 查询耗材的取药科室
|
// 查询耗材的取药科室
|
||||||
Long takeDeviceLocationId = doctorStationAdviceAppMapper
|
Long takeDeviceLocationId = doctorStationAdviceAppMapper
|
||||||
.getTakeDeviceLocationId(serviceRequestUseExe.getEncounterId(), ItemCategoryCode.DEVICE.getCode());
|
.getTakeDeviceLocationId(serviceRequestUseExe.getEncounterId(), ItemCategoryCode.DEVICE.getCode());
|
||||||
@@ -1120,6 +1271,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
longServiceRequest.getPatientId(), longServiceRequest.getId(),
|
longServiceRequest.getPatientId(), longServiceRequest.getId(),
|
||||||
CommonConstants.TableName.WOR_SERVICE_REQUEST, EventStatus.COMPLETED,
|
CommonConstants.TableName.WOR_SERVICE_REQUEST, EventStatus.COMPLETED,
|
||||||
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, null, null);
|
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, null, null);
|
||||||
|
createdCount++;
|
||||||
|
|
||||||
// 生成账单
|
// 生成账单
|
||||||
chargeItem = new ChargeItem();
|
chargeItem = new ChargeItem();
|
||||||
@@ -1177,6 +1329,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
// 临时
|
// 临时
|
||||||
ServiceRequest tempServiceRequest;
|
ServiceRequest tempServiceRequest;
|
||||||
for (ServiceRequestUseExe serviceRequestUseExe : tempActivity) {
|
for (ServiceRequestUseExe serviceRequestUseExe : tempActivity) {
|
||||||
|
if (serviceRequestUseExe.getExecuteTimes() == null) continue;
|
||||||
// 查询耗材的取药科室
|
// 查询耗材的取药科室
|
||||||
Long takeDeviceLocationId = doctorStationAdviceAppMapper
|
Long takeDeviceLocationId = doctorStationAdviceAppMapper
|
||||||
.getTakeDeviceLocationId(serviceRequestUseExe.getEncounterId(), ItemCategoryCode.DEVICE.getCode());
|
.getTakeDeviceLocationId(serviceRequestUseExe.getEncounterId(), ItemCategoryCode.DEVICE.getCode());
|
||||||
@@ -1191,6 +1344,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
tempServiceRequest.getPatientId(), tempServiceRequest.getId(),
|
tempServiceRequest.getPatientId(), tempServiceRequest.getId(),
|
||||||
CommonConstants.TableName.WOR_SERVICE_REQUEST, EventStatus.COMPLETED,
|
CommonConstants.TableName.WOR_SERVICE_REQUEST, EventStatus.COMPLETED,
|
||||||
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, null, null);
|
ProcedureCategory.INPATIENT_ADVICE, null, expectedDate, exeDate, null, null);
|
||||||
|
createdCount++;
|
||||||
|
|
||||||
// 更新账单状态
|
// 更新账单状态
|
||||||
chargeItemService.update(
|
chargeItemService.update(
|
||||||
@@ -1208,6 +1362,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return createdCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -190,8 +190,9 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService
|
|||||||
}
|
}
|
||||||
// 领药人
|
// 领药人
|
||||||
Long receiverId = medicineSummaryParamList.get(0).getReceiverId();
|
Long receiverId = medicineSummaryParamList.get(0).getReceiverId();
|
||||||
// 申请时间
|
// 申请时间(优先使用前端传递的操作时间,确保与实际操作时间一致)
|
||||||
Date now = DateUtils.getNowDate();
|
Date now = medicineSummaryParamList.get(0).getDispenseTime() != null
|
||||||
|
? medicineSummaryParamList.get(0).getDispenseTime() : DateUtils.getNowDate();
|
||||||
// 申请人
|
// 申请人
|
||||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||||
// 药品发放id
|
// 药品发放id
|
||||||
|
|||||||
@@ -259,4 +259,40 @@ public class InpatientAdviceDto {
|
|||||||
/** 发药状态 */
|
/** 发药状态 */
|
||||||
private Integer dispenseStatus;
|
private Integer dispenseStatus;
|
||||||
private String dispenseStatus_enumText;
|
private String dispenseStatus_enumText;
|
||||||
|
|
||||||
|
// ========== Bug #595 计算展示字段 ==========
|
||||||
|
|
||||||
|
/** 单次剂量(格式化:剂量+单位) */
|
||||||
|
private String singleDose;
|
||||||
|
|
||||||
|
/** 总量(格式化:剂量×数量+单位) */
|
||||||
|
private String totalAmount;
|
||||||
|
|
||||||
|
/** 频次/用法组合(如:tid 静滴) */
|
||||||
|
private String frequencyUsage;
|
||||||
|
|
||||||
|
/** 开嘱医生 */
|
||||||
|
private String orderingDoctor;
|
||||||
|
|
||||||
|
/** 皮试状态文本(需皮试/皮试通过/无需) */
|
||||||
|
private String skinTestStatus;
|
||||||
|
|
||||||
|
/** 皮试高亮标记(需皮试时为true) */
|
||||||
|
private Boolean skinTestHighlight;
|
||||||
|
|
||||||
|
/** 是否注射药品 */
|
||||||
|
private Boolean isInjection;
|
||||||
|
|
||||||
|
/** 停嘱医生 */
|
||||||
|
private String stopperName;
|
||||||
|
|
||||||
|
/** 停嘱时间 */
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date stopTime;
|
||||||
|
|
||||||
|
/** 医嘱号 */
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/** 诊断(行级展示) */
|
||||||
|
private String diagnosis;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.inpatientmanage.appservice.impl;
|
package com.healthlink.his.web.inpatientmanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -240,7 +242,7 @@ public class NursingRecordAppServiceImpl implements INursingRecordAppService {
|
|||||||
Practitioner practitioner = practitionerService.getById(recorderId);
|
Practitioner practitioner = practitionerService.getById(recorderId);
|
||||||
// 体征转换
|
// 体征转换
|
||||||
NursingVitalSignsDto nursingVitalSigns =
|
NursingVitalSignsDto nursingVitalSigns =
|
||||||
JSONObject.parseObject(nursingRecordDto.getContextJson(), NursingVitalSignsDto.class);
|
JsonUtils.parseObject(nursingRecordDto.getContextJson(), NursingVitalSignsDto.class);
|
||||||
// 体温
|
// 体温
|
||||||
String tw = nursingVitalSigns.getTw();
|
String tw = nursingVitalSigns.getTw();
|
||||||
// 脉搏
|
// 脉搏
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.inventorymanage.appservice.impl;
|
package com.healthlink.his.web.inventorymanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -364,7 +366,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用医保商品采购接口
|
// 调用医保商品采购接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList
|
List<String> uploadFailedNoList
|
||||||
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, now, false);
|
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, now, false);
|
||||||
@@ -452,7 +454,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
// 处理盘点追溯码
|
// 处理盘点追溯码
|
||||||
traceNoAppService.updateTraceNoList(supplyItemDetailList, SupplyType.PRODUCT_STOCKTAKING.getValue());
|
traceNoAppService.updateTraceNoList(supplyItemDetailList, SupplyType.PRODUCT_STOCKTAKING.getValue());
|
||||||
// 医保开关
|
// 医保开关
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH);
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH);
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedGainList = null;
|
List<String> uploadFailedGainList = null;
|
||||||
List<String> uploadFailedLossList = null;
|
List<String> uploadFailedLossList = null;
|
||||||
@@ -675,7 +677,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
traceNoAppService.addTraceNoManage(supplyItemDetailList, TraceNoStatus.OUT.getValue(),
|
traceNoAppService.addTraceNoManage(supplyItemDetailList, TraceNoStatus.OUT.getValue(),
|
||||||
SupplyType.PRODUCT_RETURN.getValue());
|
SupplyType.PRODUCT_RETURN.getValue());
|
||||||
// 调用医保采购退货接口
|
// 调用医保采购退货接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList
|
List<String> uploadFailedNoList
|
||||||
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, now, false);
|
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, now, false);
|
||||||
@@ -767,7 +769,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
SupplyType.LOSS_REPORT_FORM.getValue());
|
SupplyType.LOSS_REPORT_FORM.getValue());
|
||||||
|
|
||||||
// 调用医保库存变更接口
|
// 调用医保库存变更接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList
|
List<String> uploadFailedNoList
|
||||||
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.DESTRUCTION, now, false);
|
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.DESTRUCTION, now, false);
|
||||||
@@ -864,7 +866,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
// 返回信息
|
// 返回信息
|
||||||
String returnMsg = null;
|
String returnMsg = null;
|
||||||
// 调用医保库存变更接口
|
// 调用医保库存变更接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList
|
List<String> uploadFailedNoList
|
||||||
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.OTHER_OUT, now, false);
|
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.OTHER_OUT, now, false);
|
||||||
@@ -960,7 +962,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
// 返回信息
|
// 返回信息
|
||||||
String returnMsg = null;
|
String returnMsg = null;
|
||||||
// 调用医保库存变更接口
|
// 调用医保库存变更接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList
|
List<String> uploadFailedNoList
|
||||||
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.OTHER_IN, now, false);
|
= this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.OTHER_IN, now, false);
|
||||||
@@ -1171,7 +1173,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
List<String> inventoryTraceNoList = null;
|
List<String> inventoryTraceNoList = null;
|
||||||
if (!YbInvChgType.DESTRUCTION.getValue().equals(ybInvChgType)
|
if (!YbInvChgType.DESTRUCTION.getValue().equals(ybInvChgType)
|
||||||
|| !YbInvChgType.INVENTORY_LOSS.getValue().equals(ybInvChgType)) {
|
|| !YbInvChgType.INVENTORY_LOSS.getValue().equals(ybInvChgType)) {
|
||||||
@@ -1182,7 +1184,7 @@ public class ReceiptApprovalAppServiceImpl implements IReceiptApprovalAppService
|
|||||||
// 转换成上传医保的格式
|
// 转换成上传医保的格式
|
||||||
if (inventoryTraceNoList != null) {
|
if (inventoryTraceNoList != null) {
|
||||||
for (String traceNo : inventoryTraceNoList) {
|
for (String traceNo : inventoryTraceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.inventorymanage.dto;
|
package com.healthlink.his.web.inventorymanage.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
@@ -61,12 +61,12 @@ public class PurchaseReturnPageDto {
|
|||||||
/** 期望日期(制单日期) */
|
/** 期望日期(制单日期) */
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JSONField(name="occurrence_time")
|
@JsonProperty("occurrence_time")
|
||||||
private Date occurrenceTime;
|
private Date occurrenceTime;
|
||||||
/** 审批时间 */
|
/** 审批时间 */
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JSONField(name="approval_time")
|
@JsonProperty("approval_time")
|
||||||
private Date approvalTime;
|
private Date approvalTime;
|
||||||
|
|
||||||
/** 供应商 */
|
/** 供应商 */
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.materialmanage.appservice.impl;
|
package com.healthlink.his.web.materialmanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.exception.ServiceException;
|
import com.core.common.exception.ServiceException;
|
||||||
@@ -199,7 +201,7 @@ public class MaterialReceiptApprovalServiceImpl implements IMaterialReceiptAppro
|
|||||||
SupplyType.MATERIAL_STOCKIN.getValue());
|
SupplyType.MATERIAL_STOCKIN.getValue());
|
||||||
|
|
||||||
// 调用医保商品采购接口 todo 相关医保接口未对应
|
// 调用医保商品采购接口 todo 相关医保接口未对应
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
||||||
@@ -302,7 +304,7 @@ public class MaterialReceiptApprovalServiceImpl implements IMaterialReceiptAppro
|
|||||||
SupplyType.MATERIAL_RETURN.getValue());
|
SupplyType.MATERIAL_RETURN.getValue());
|
||||||
|
|
||||||
// 调用医保采购退货接口
|
// 调用医保采购退货接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
||||||
@@ -530,7 +532,7 @@ public class MaterialReceiptApprovalServiceImpl implements IMaterialReceiptAppro
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用医保库存变更接口
|
// 调用医保库存变更接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
||||||
YbInvChgType.DESTRUCTION, false, false, false, now);
|
YbInvChgType.DESTRUCTION, false, false, false, now);
|
||||||
@@ -625,7 +627,7 @@ public class MaterialReceiptApprovalServiceImpl implements IMaterialReceiptAppro
|
|||||||
}
|
}
|
||||||
|
|
||||||
String ybSwitch =
|
String ybSwitch =
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
// 如果首次盘点信息不为空
|
// 如果首次盘点信息不为空
|
||||||
if (!firstSupplyItemDetailList.isEmpty()) {
|
if (!firstSupplyItemDetailList.isEmpty()) {
|
||||||
@@ -1060,14 +1062,14 @@ public class MaterialReceiptApprovalServiceImpl implements IMaterialReceiptAppro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 转换为JSON
|
// 转换为JSON
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
// 获取追溯码信息
|
// 获取追溯码信息
|
||||||
if (supplyItemDetailDto.getTraceNo() != null) {
|
if (supplyItemDetailDto.getTraceNo() != null) {
|
||||||
List<String> traceNoList =
|
List<String> traceNoList =
|
||||||
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
||||||
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ package com.healthlink.his.web.nenu.appservice.impl;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
@@ -582,7 +583,7 @@ public class GfStudentListAppServiceImpl implements IGfStudentListAppService {
|
|||||||
// 发送请求
|
// 发送请求
|
||||||
try {
|
try {
|
||||||
HttpPost httpPost = new HttpPost(TenantOptionUtil.getOptionContent(TenantOptionDict.PEIS_SERVER_URL) + "/wx/auth/syncHisInfo");
|
HttpPost httpPost = new HttpPost(TenantOptionUtil.getOptionContent(TenantOptionDict.PEIS_SERVER_URL) + "/wx/auth/syncHisInfo");
|
||||||
StringEntity stringEntity = new StringEntity(JSON.toJSONString(peisStudentPatientDto), ContentType.APPLICATION_JSON);
|
StringEntity stringEntity = new StringEntity(JsonUtils.toJson(peisStudentPatientDto), ContentType.APPLICATION_JSON);
|
||||||
httpPost.setEntity(stringEntity);
|
httpPost.setEntity(stringEntity);
|
||||||
// 执行http请求
|
// 执行http请求
|
||||||
response = httpClient.execute(httpPost);
|
response = httpClient.execute(httpPost);
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
@@ -310,13 +312,73 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
|||||||
patient.setBloodAbo(patientInfoDto.getBloodAbo()); // 血型ABO
|
patient.setBloodAbo(patientInfoDto.getBloodAbo()); // 血型ABO
|
||||||
patient.setBloodRh(patientInfoDto.getBloodRh()); // 血型RH
|
patient.setBloodRh(patientInfoDto.getBloodRh()); // 血型RH
|
||||||
patient.setMaritalStatusEnum(patientInfoDto.getMaritalStatusEnum()); // 婚姻状态
|
patient.setMaritalStatusEnum(patientInfoDto.getMaritalStatusEnum()); // 婚姻状态
|
||||||
patient.setDeceasedDate(patientInfoDto.getDeceasedDate()); // 死亡时间
|
// 死亡时间:支持 yyyy-MM-dd HH:mm:ss 和 yyyy/MM/dd HH:mm:ss 格式
|
||||||
|
if (patientInfoDto.getDeceasedDate() != null && !patientInfoDto.getDeceasedDate().isEmpty()) {
|
||||||
|
String dateStr = patientInfoDto.getDeceasedDate();
|
||||||
|
String[] patterns = {"yyyy-MM-dd HH:mm:ss", "yyyy/MM/dd HH:mm:ss", "yyyy/M/d HH:mm:ss"};
|
||||||
|
Date parsedDate = null;
|
||||||
|
for (String pat : patterns) {
|
||||||
|
try { parsedDate = new SimpleDateFormat(pat).parse(dateStr); break; } catch (Exception ignored) {}
|
||||||
|
}
|
||||||
|
patient.setDeceasedDate(parsedDate);
|
||||||
|
} else {
|
||||||
|
patient.setDeceasedDate(null);
|
||||||
|
}
|
||||||
patient.setNationalityCode(patientInfoDto.getNationalityCode());// 民族
|
patient.setNationalityCode(patientInfoDto.getNationalityCode());// 民族
|
||||||
patient.setActiveFlag(patientInfoDto.getActiveFlag());// 活动标识
|
patient.setActiveFlag(patientInfoDto.getActiveFlag());// 活动标识
|
||||||
|
patient.setCountryCode(patientInfoDto.getCountryCode());// 国家编码
|
||||||
|
patient.setPostalCode(patientInfoDto.getPostalCode());// 邮政编码
|
||||||
|
patient.setHukouAddress(patientInfoDto.getHukouAddress());// 户籍地址
|
||||||
|
patient.setGuardianName(patientInfoDto.getGuardianName());// 监护人姓名
|
||||||
|
patient.setGuardianRelation(patientInfoDto.getGuardianRelation());// 监护人关系
|
||||||
|
patient.setGuardianPhone(patientInfoDto.getGuardianPhone());// 监护人电话
|
||||||
|
patient.setGuardianIdType(patientInfoDto.getGuardianIdType());// 监护人证件类型
|
||||||
|
patient.setGuardianIdNo(patientInfoDto.getGuardianIdNo());// 监护人证件号码
|
||||||
|
patient.setGuardianAddress(patientInfoDto.getGuardianAddress());// 监护人地址
|
||||||
|
patient.setPatientDerived(patientInfoDto.getPatientDerived());// 患者来源
|
||||||
|
patient.setEducationLevel(patientInfoDto.getEducationLevel());// 文化程度
|
||||||
|
patient.setCompanyAddress(patientInfoDto.getCompanyAddress());// 单位地址
|
||||||
|
|
||||||
if (patientInfoDto.getId() != null) {
|
if (patientInfoDto.getId() != null) {
|
||||||
// 更新操作
|
// 更新操作 - 使用 LambdaUpdateWrapper 显式设置所有字段,确保 null 值也能正确更新
|
||||||
patientService.updateById(patient);
|
LambdaUpdateWrapper<Patient> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
updateWrapper.eq(Patient::getId, patient.getId())
|
||||||
|
.set(Patient::getName, patient.getName())
|
||||||
|
.set(Patient::getPyStr, patient.getPyStr())
|
||||||
|
.set(Patient::getWbStr, patient.getWbStr())
|
||||||
|
.set(Patient::getIdCard, patient.getIdCard())
|
||||||
|
.set(Patient::getBirthDate, patient.getBirthDate())
|
||||||
|
.set(Patient::getGenderEnum, patient.getGenderEnum())
|
||||||
|
.set(Patient::getPhone, patient.getPhone())
|
||||||
|
.set(Patient::getPrfsEnum, patient.getPrfsEnum())
|
||||||
|
.set(Patient::getWorkCompany, patient.getWorkCompany())
|
||||||
|
.set(Patient::getLinkName, patient.getLinkName())
|
||||||
|
.set(Patient::getLinkRelationCode, patient.getLinkRelationCode())
|
||||||
|
.set(Patient::getLinkTelcom, patient.getLinkTelcom())
|
||||||
|
.set(Patient::getAddress, patient.getAddress())
|
||||||
|
.set(Patient::getAddressProvince, patient.getAddressProvince())
|
||||||
|
.set(Patient::getAddressCity, patient.getAddressCity())
|
||||||
|
.set(Patient::getAddressDistrict, patient.getAddressDistrict())
|
||||||
|
.set(Patient::getAddressStreet, patient.getAddressStreet())
|
||||||
|
.set(Patient::getBloodAbo, patient.getBloodAbo())
|
||||||
|
.set(Patient::getBloodRh, patient.getBloodRh())
|
||||||
|
.set(Patient::getMaritalStatusEnum, patient.getMaritalStatusEnum())
|
||||||
|
.set(Patient::getDeceasedDate, patient.getDeceasedDate())
|
||||||
|
.set(Patient::getNationalityCode, patient.getNationalityCode())
|
||||||
|
.set(Patient::getActiveFlag, patient.getActiveFlag())
|
||||||
|
.set(Patient::getCountryCode, patient.getCountryCode())
|
||||||
|
.set(Patient::getPostalCode, patient.getPostalCode())
|
||||||
|
.set(Patient::getHukouAddress, patient.getHukouAddress())
|
||||||
|
.set(Patient::getGuardianName, patient.getGuardianName())
|
||||||
|
.set(Patient::getGuardianRelation, patient.getGuardianRelation())
|
||||||
|
.set(Patient::getGuardianPhone, patient.getGuardianPhone())
|
||||||
|
.set(Patient::getGuardianIdType, patient.getGuardianIdType())
|
||||||
|
.set(Patient::getGuardianIdNo, patient.getGuardianIdNo())
|
||||||
|
.set(Patient::getGuardianAddress, patient.getGuardianAddress())
|
||||||
|
.set(Patient::getPatientDerived, patient.getPatientDerived())
|
||||||
|
.set(Patient::getEducationLevel, patient.getEducationLevel())
|
||||||
|
.set(Patient::getCompanyAddress, patient.getCompanyAddress());
|
||||||
|
patientService.update(updateWrapper);
|
||||||
} else {
|
} else {
|
||||||
// 新增操作
|
// 新增操作
|
||||||
patientService.save(patient);
|
patientService.save(patient);
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.healthlink.his.web.patientmanage.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonParser;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||||
|
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支持多种日期格式的反序列化器
|
||||||
|
* 兼容 yyyy-MM-dd HH:mm:ss 和 yyyy/MM/dd HH:mm:ss 等格式
|
||||||
|
*/
|
||||||
|
public class FlexibleDateDeserializer extends JsonDeserializer<Date> {
|
||||||
|
|
||||||
|
private static final String[] DATE_FORMATS = {
|
||||||
|
"yyyy-MM-dd HH:mm:ss",
|
||||||
|
"yyyy/MM/dd HH:mm:ss",
|
||||||
|
"yyyy/M/d HH:mm:ss",
|
||||||
|
"yyyy-MM-dd'T'HH:mm:ss",
|
||||||
|
"yyyy-MM-dd'T'HH:mm:ss.SSS",
|
||||||
|
"yyyy-MM-dd",
|
||||||
|
"yyyy/MM/dd"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date deserialize(JsonParser p, DeserializationContext context) throws IOException {
|
||||||
|
String dateStr = p.getValueAsString();
|
||||||
|
if (dateStr == null || dateStr.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (String pattern : DATE_FORMATS) {
|
||||||
|
try {
|
||||||
|
return new SimpleDateFormat(pattern).parse(dateStr);
|
||||||
|
} catch (ParseException ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new IOException("无法解析日期: " + dateStr + ",支持格式: yyyy-MM-dd HH:mm:ss 或 yyyy/MM/dd HH:mm:ss");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.healthlink.his.web.patientmanage.dto;
|
package com.healthlink.his.web.patientmanage.dto;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import com.healthlink.his.common.annotation.Dict;
|
import com.healthlink.his.common.annotation.Dict;
|
||||||
@@ -144,8 +145,7 @@ public class PatientBaseInfoDto {
|
|||||||
/**
|
/**
|
||||||
* 死亡时间
|
* 死亡时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
private String deceasedDate;
|
||||||
private Date deceasedDate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 病人证件信息集合
|
* 病人证件信息集合
|
||||||
@@ -168,4 +168,65 @@ public class PatientBaseInfoDto {
|
|||||||
*/
|
*/
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮政编码
|
||||||
|
*/
|
||||||
|
private String postalCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 户籍地址
|
||||||
|
*/
|
||||||
|
private String hukouAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人姓名
|
||||||
|
*/
|
||||||
|
private String guardianName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人关系
|
||||||
|
*/
|
||||||
|
private Integer guardianRelation;
|
||||||
|
private String guardianRelation_enumText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人电话
|
||||||
|
*/
|
||||||
|
private String guardianPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人证件类型
|
||||||
|
*/
|
||||||
|
private String guardianIdType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人证件号码
|
||||||
|
*/
|
||||||
|
private String guardianIdNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人地址
|
||||||
|
*/
|
||||||
|
private String guardianAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者来源
|
||||||
|
*/
|
||||||
|
private String patientDerived;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文化程度
|
||||||
|
*/
|
||||||
|
private String educationLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位地址
|
||||||
|
*/
|
||||||
|
private String companyAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国家编码
|
||||||
|
*/
|
||||||
|
private String countryCode;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.paymentmanage.appservice.impl;
|
package com.healthlink.his.web.paymentmanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
@@ -208,7 +208,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> prePayment(PrePaymentDto prePaymentDto) {
|
public R<?> prePayment(PrePaymentDto prePaymentDto) {
|
||||||
logger.info("预结算:参数:" + JSON.toJSONString(prePaymentDto));
|
logger.info("预结算:参数:" + JsonUtils.toJson(prePaymentDto));
|
||||||
// 查收费项
|
// 查收费项
|
||||||
List<ChargeItem> chargeItemList = getChargeItems(prePaymentDto.getChargeItemIds());
|
List<ChargeItem> chargeItemList = getChargeItems(prePaymentDto.getChargeItemIds());
|
||||||
if (chargeItemList.isEmpty()) {
|
if (chargeItemList.isEmpty()) {
|
||||||
@@ -357,13 +357,13 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
if (StringUtils.isEmpty(chargeItem.getChildrenJson())
|
if (StringUtils.isEmpty(chargeItem.getChildrenJson())
|
||||||
|| CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(account.getContractNo())
|
|| CommonConstants.BusinessName.DEFAULT_CONTRACT_NO.equals(account.getContractNo())
|
||||||
|| "0".equals(
|
|| "0".equals(
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))) {
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH))) {
|
||||||
PaymentedItemModel piModel = ConverterToPaymenItemModel(diagList, chargeItem);
|
PaymentedItemModel piModel = ConverterToPaymenItemModel(diagList, chargeItem);
|
||||||
prePaymentedItems.add(piModel);
|
prePaymentedItems.add(piModel);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
List<ChargeItem> childrenList
|
List<ChargeItem> childrenList
|
||||||
= JSON.parseArray(chargeItem.getChildrenJson(), ChargeItem.class);
|
= JsonUtils.parseObject(chargeItem.getChildrenJson(), new com.fasterxml.jackson.core.type.TypeReference<List<ChargeItem>>() {});
|
||||||
for (ChargeItem child : childrenList) {
|
for (ChargeItem child : childrenList) {
|
||||||
PaymentedItemModel piModel = ConverterToPaymenItemModel(diagList, child);
|
PaymentedItemModel piModel = ConverterToPaymenItemModel(diagList, child);
|
||||||
prePaymentedItems.add(piModel);
|
prePaymentedItems.add(piModel);
|
||||||
@@ -651,7 +651,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
// 更改付款状态
|
// 更改付款状态
|
||||||
logger.info("更新付款状态:payment:" + JSON.toJSONString(paymentReconciliation));
|
logger.info("更新付款状态:payment:" + JsonUtils.toJson(paymentReconciliation));
|
||||||
iPaymentReconciliationService.updatePaymentStatusAndSettleIdsById(paymentReconciliation.getId(),
|
iPaymentReconciliationService.updatePaymentStatusAndSettleIdsById(paymentReconciliation.getId(),
|
||||||
PaymentStatus.SUCCESS, PaymentOutcome.COMPLETED.getCode(), ybSettleIds);
|
PaymentStatus.SUCCESS, PaymentOutcome.COMPLETED.getCode(), ybSettleIds);
|
||||||
// iPaymentRecDetailService.updateResultByPaymentId(paymentReconciliation.getId(), PaymentResult.PAID);
|
// iPaymentRecDetailService.updateResultByPaymentId(paymentReconciliation.getId(), PaymentResult.PAID);
|
||||||
@@ -763,7 +763,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
// 更新服务请求状态为已完成
|
// 更新服务请求状态为已完成
|
||||||
serviceRequestService.updateCompleteRequestStatus(serviceRequestIdList, null, null);
|
serviceRequestService.updateCompleteRequestStatus(serviceRequestIdList, null, null);
|
||||||
}
|
}
|
||||||
logger.info("收费成功:payment:" + JSON.toJSONString(paymentReconciliation));
|
logger.info("收费成功:payment:" + JsonUtils.toJson(paymentReconciliation));
|
||||||
// throw new ServiceException("");
|
// throw new ServiceException("");
|
||||||
return R.ok(paymentReconciliation,
|
return R.ok(paymentReconciliation,
|
||||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"收费"}));
|
MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"收费"}));
|
||||||
@@ -880,7 +880,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PrePaymentResultModel prePaymentResultModel
|
PrePaymentResultModel prePaymentResultModel
|
||||||
= JSON.parseObject(JSON.toJSONString(preResult.getData()), PrePaymentResultModel.class);
|
= JsonUtils.parseObject(JsonUtils.toJson(preResult.getData()), PrePaymentResultModel.class);
|
||||||
// 新的应收
|
// 新的应收
|
||||||
BigDecimal cashPay = BigDecimal.ZERO;
|
BigDecimal cashPay = BigDecimal.ZERO;
|
||||||
for (PaymentRecDetailDto paymentRecDetail : prePaymentResultModel.getDetails()) {
|
for (PaymentRecDetailDto paymentRecDetail : prePaymentResultModel.getDetails()) {
|
||||||
@@ -914,7 +914,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
|
|
||||||
// 获取新的付款参数表
|
// 获取新的付款参数表
|
||||||
PaymentReconciliation payment
|
PaymentReconciliation payment
|
||||||
= JSON.parseObject(JSON.toJSONString(settleResult.getData()), PaymentReconciliation.class);
|
= JsonUtils.parseObject(JsonUtils.toJson(settleResult.getData()), PaymentReconciliation.class);
|
||||||
// 获取实付金额
|
// 获取实付金额
|
||||||
List<PaymentRecDetail> paymentRecDetail = paymentRecDetailService.list(
|
List<PaymentRecDetail> paymentRecDetail = paymentRecDetailService.list(
|
||||||
new LambdaQueryWrapper<PaymentRecDetail>().eq(PaymentRecDetail::getReconciliationId, payment.getId())
|
new LambdaQueryWrapper<PaymentRecDetail>().eq(PaymentRecDetail::getReconciliationId, payment.getId())
|
||||||
@@ -927,7 +927,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info(
|
logger.info(
|
||||||
"部分退款:原payment:" + JSON.toJSONString(paymentReconciliation) + "新payment:" + JSON.toJSONString(payment));
|
"部分退款:原payment:" + JsonUtils.toJson(paymentReconciliation) + "新payment:" + JsonUtils.toJson(payment));
|
||||||
if (chargedPay.compareTo(payAmount) >= 0) {
|
if (chargedPay.compareTo(payAmount) >= 0) {
|
||||||
return R.ok("请患者补交" + chargedPay.subtract(payAmount).setScale(6, RoundingMode.HALF_UP) + "元");
|
return R.ok("请患者补交" + chargedPay.subtract(payAmount).setScale(6, RoundingMode.HALF_UP) + "元");
|
||||||
} else {
|
} else {
|
||||||
@@ -1077,7 +1077,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
list.add(item);
|
list.add(item);
|
||||||
}
|
}
|
||||||
paymentRecDetailService.updateBatchById(list);
|
paymentRecDetailService.updateBatchById(list);
|
||||||
logger.info("退款payment:" + JSON.toJSONString(paymentReconciliation));
|
logger.info("退款payment:" + JsonUtils.toJson(paymentReconciliation));
|
||||||
|
|
||||||
// 保存付款快照信息 2025/08/08
|
// 保存付款快照信息 2025/08/08
|
||||||
List<Long> chargeItemIds = new ArrayList<>();
|
List<Long> chargeItemIds = new ArrayList<>();
|
||||||
@@ -1863,8 +1863,8 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Clinic2206OrderOutput clinic2206OrderResult;
|
Clinic2206OrderOutput clinic2206OrderResult;
|
||||||
String string = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH);
|
String string = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH);
|
||||||
if ("1".equals(SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))
|
if ("1".equals(SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH))
|
||||||
&& !(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO
|
&& !(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO
|
||||||
.equals(outpatientRegistrationAddParam.getAccountFormData().getContractNo())
|
.equals(outpatientRegistrationAddParam.getAccountFormData().getContractNo())
|
||||||
|| CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO
|
|| CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO
|
||||||
@@ -1959,7 +1959,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
throw new ServiceException("请选择合适的费用性质");
|
throw new ServiceException("请选择合适的费用性质");
|
||||||
}
|
}
|
||||||
com.healthlink.his.financial.model.PaymentResult paymentResult;
|
com.healthlink.his.financial.model.PaymentResult paymentResult;
|
||||||
if ("1".equals(SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH))
|
if ("1".equals(SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH))
|
||||||
&& !CommonConstants.BusinessName.DEFAULT_CONTRACT_NO
|
&& !CommonConstants.BusinessName.DEFAULT_CONTRACT_NO
|
||||||
.equals(outpatientRegistrationAddParam.getAccountFormData().getContractNo())
|
.equals(outpatientRegistrationAddParam.getAccountFormData().getContractNo())
|
||||||
&& contract.getYbFlag() == 1) {
|
&& contract.getYbFlag() == 1) {
|
||||||
@@ -2666,7 +2666,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
.filter(StringUtils::isNotEmpty).collect(Collectors.toList());
|
.filter(StringUtils::isNotEmpty).collect(Collectors.toList());
|
||||||
|
|
||||||
// <4>更改付款状态
|
// <4>更改付款状态
|
||||||
logger.info("更新付款状态:payment:" + JSON.toJSONString(paymentReconciliation));
|
logger.info("更新付款状态:payment:" + JsonUtils.toJson(paymentReconciliation));
|
||||||
iPaymentReconciliationService.updatePaymentStatusAndSettleIdsById(paymentReconciliation.getId(),
|
iPaymentReconciliationService.updatePaymentStatusAndSettleIdsById(paymentReconciliation.getId(),
|
||||||
PaymentStatus.SUCCESS, PaymentOutcome.COMPLETED.getCode(), ybSettleIds);
|
PaymentStatus.SUCCESS, PaymentOutcome.COMPLETED.getCode(), ybSettleIds);
|
||||||
|
|
||||||
@@ -2743,7 +2743,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
|||||||
.setChargeItemIds(paymentReconciliation.getChargeItemIds());
|
.setChargeItemIds(paymentReconciliation.getChargeItemIds());
|
||||||
iInvoiceService.save(invoice);
|
iInvoiceService.save(invoice);
|
||||||
|
|
||||||
logger.info("收费成功:payment:" + JSON.toJSONString(paymentReconciliation));
|
logger.info("收费成功:payment:" + JsonUtils.toJson(paymentReconciliation));
|
||||||
// throw new ServiceException("");
|
// throw new ServiceException("");
|
||||||
return R.ok(paymentReconciliation,
|
return R.ok(paymentReconciliation,
|
||||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"收费"}));
|
MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"收费"}));
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package com.healthlink.his.web.paymentmanage.appservice.impl;
|
package com.healthlink.his.web.paymentmanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -75,7 +76,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_MAPPING_METHOD);
|
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_MAPPING_METHOD);
|
||||||
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_ACTIVE_PARAM);
|
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_ACTIVE_PARAM);
|
||||||
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_STATIC_PARAM);
|
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_STATIC_PARAM);
|
||||||
JSONObject jsonObject = JSON.parseObject(activeParam);
|
JsonNode jsonObject = JsonUtils.parse(activeParam);
|
||||||
|
|
||||||
//B.基础信息查询
|
//B.基础信息查询
|
||||||
//款员信息查询
|
//款员信息查询
|
||||||
@@ -104,7 +105,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_OUT_MAPPING_METHOD);
|
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_OUT_MAPPING_METHOD);
|
||||||
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_OUT_ACTIVE_PARAM);
|
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_OUT_ACTIVE_PARAM);
|
||||||
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_OUT_STATIC_PARAM);
|
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_SIGN_OUT_STATIC_PARAM);
|
||||||
JSONObject jsonObject = JSON.parseObject(activeParam);
|
JsonNode jsonObject = JsonUtils.parse(activeParam);
|
||||||
|
|
||||||
//B.基础信息查询
|
//B.基础信息查询
|
||||||
//款员信息查询
|
//款员信息查询
|
||||||
@@ -134,7 +135,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_MAPPING_METHOD);
|
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_MAPPING_METHOD);
|
||||||
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_ACTIVE_PARAM);
|
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_ACTIVE_PARAM);
|
||||||
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_STATIC_PARAM);
|
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_STATIC_PARAM);
|
||||||
JSONObject jsonObject = JSON.parseObject(activeParam);
|
JsonNode jsonObject = JsonUtils.parse(activeParam);
|
||||||
|
|
||||||
//B.基础信息查询
|
//B.基础信息查询
|
||||||
//订单号及订单信息
|
//订单号及订单信息
|
||||||
@@ -170,7 +171,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
//映射实体
|
//映射实体
|
||||||
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
||||||
//保存实体
|
//保存实体
|
||||||
ThreePartPayCallBack threePartPayCallBack = JSON.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
ThreePartPayCallBack threePartPayCallBack = JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
||||||
|
|
||||||
//红旗临时处理,这个if后续可删除
|
//红旗临时处理,这个if后续可删除
|
||||||
if (threePartPayDto.getId() == null) {
|
if (threePartPayDto.getId() == null) {
|
||||||
@@ -197,7 +198,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_QUERY_MAPPING_METHOD);
|
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_QUERY_MAPPING_METHOD);
|
||||||
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_QUERY_ACTIVE_PARAM);
|
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_QUERY_ACTIVE_PARAM);
|
||||||
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_QUERY_STATIC_PARAM);
|
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_PAY_QUERY_STATIC_PARAM);
|
||||||
JSONObject jsonObject = JSON.parseObject(activeParam);
|
JsonNode jsonObject = JsonUtils.parse(activeParam);
|
||||||
|
|
||||||
//B.基础信息查询
|
//B.基础信息查询
|
||||||
//订单号及订单信息
|
//订单号及订单信息
|
||||||
@@ -222,8 +223,8 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
//映射实体
|
//映射实体
|
||||||
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
||||||
//保存实体
|
//保存实体
|
||||||
ThreePartPayCallBack threePartPayCallBack1 = JSON.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
ThreePartPayCallBack threePartPayCallBack1 = JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
||||||
//ThreePartPayCallBack threePartPayCallBack1 = JSON.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
//ThreePartPayCallBack threePartPayCallBack1 = JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
||||||
//threePartPayCallBackService.save(threePartPayCallBack1);
|
//threePartPayCallBackService.save(threePartPayCallBack1);
|
||||||
|
|
||||||
if (threePartPayCallBack1 != null && threePartPayCallBack1.getPayResult() != null && "00".equals(threePartPayCallBack1.getPayResult())) {
|
if (threePartPayCallBack1 != null && threePartPayCallBack1.getPayResult() != null && "00".equals(threePartPayCallBack1.getPayResult())) {
|
||||||
@@ -243,7 +244,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_MAPPING_METHOD);
|
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_MAPPING_METHOD);
|
||||||
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_ACTIVE_PARAM);
|
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_ACTIVE_PARAM);
|
||||||
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_STATIC_PARAM);
|
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_STATIC_PARAM);
|
||||||
JSONObject jsonObject = JSON.parseObject(activeParam);
|
JsonNode jsonObject = JsonUtils.parse(activeParam);
|
||||||
|
|
||||||
//B.基础信息查询
|
//B.基础信息查询
|
||||||
PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(paymentId);
|
PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(paymentId);
|
||||||
@@ -266,7 +267,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
//映射实体
|
//映射实体
|
||||||
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
||||||
//保存实体
|
//保存实体
|
||||||
ThreePartPayCallBack threePartPayCallBack1 = JSON.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
ThreePartPayCallBack threePartPayCallBack1 = JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
||||||
threePartPayCallBackService.save(threePartPayCallBack1);
|
threePartPayCallBackService.save(threePartPayCallBack1);
|
||||||
|
|
||||||
if (threePartPayCallBack1 != null && threePartPayCallBack1.getPayResult() != null && "00".equals(threePartPayCallBack1.getPayResult())) {
|
if (threePartPayCallBack1 != null && threePartPayCallBack1.getPayResult() != null && "00".equals(threePartPayCallBack1.getPayResult())) {
|
||||||
@@ -286,7 +287,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_NEXT_DAY_RETURN_MAPPING_METHOD);
|
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_NEXT_DAY_RETURN_MAPPING_METHOD);
|
||||||
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_NEXT_DAY_RETURN_ACTIVE_PARAM);
|
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_NEXT_DAY_RETURN_ACTIVE_PARAM);
|
||||||
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_NEXT_DAY_RETURN_STATIC_PARAM);
|
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_NEXT_DAY_RETURN_STATIC_PARAM);
|
||||||
JSONObject jsonObject = JSON.parseObject(activeParam);
|
JsonNode jsonObject = JsonUtils.parse(activeParam);
|
||||||
|
|
||||||
//B.基础信息查询
|
//B.基础信息查询
|
||||||
PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(paymentId);
|
PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(paymentId);
|
||||||
@@ -309,9 +310,9 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
//映射实体
|
//映射实体
|
||||||
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
||||||
//保存实体
|
//保存实体
|
||||||
//threePartPayCallBackService.save(JSON.parseObject(threePartMapping,ThreePartPayCallBack.class));
|
//threePartPayCallBackService.save(JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class));
|
||||||
|
|
||||||
ThreePartPayCallBack threePartPayCallBack1 = JSON.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
ThreePartPayCallBack threePartPayCallBack1 = JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
||||||
threePartPayCallBackService.save(threePartPayCallBack1);
|
threePartPayCallBackService.save(threePartPayCallBack1);
|
||||||
|
|
||||||
if ("00".equals(threePartPayCallBack1.getPayResult())) {
|
if ("00".equals(threePartPayCallBack1.getPayResult())) {
|
||||||
@@ -331,7 +332,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_QUERY_MAPPING_METHOD);
|
String requestMethod = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_QUERY_MAPPING_METHOD);
|
||||||
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_QUERY_ACTIVE_PARAM);
|
String activeParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_QUERY_ACTIVE_PARAM);
|
||||||
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_QUERY_STATIC_PARAM);
|
String staticParam = TenantOptionUtil.getOptionContent(TenantOptionDict.THREE_PART_RETURN_QUERY_STATIC_PARAM);
|
||||||
JSONObject jsonObject = JSON.parseObject(activeParam);
|
JsonNode jsonObject = JsonUtils.parse(activeParam);
|
||||||
|
|
||||||
//B.基础信息查询
|
//B.基础信息查询
|
||||||
//PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(paymentId);
|
//PaymentReconciliation paymentReconciliation = paymentReconciliationService.getById(paymentId);
|
||||||
@@ -353,8 +354,8 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
//映射实体
|
//映射实体
|
||||||
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
String threePartMapping = threePartSimpleFieldMappingService.reverseMap("three-part-mapping", requestResult);
|
||||||
//保存实体
|
//保存实体
|
||||||
//threePartPayCallBackService.save(JSON.parseObject(threePartMapping,ThreePartPayCallBack.class));
|
//threePartPayCallBackService.save(JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class));
|
||||||
ThreePartPayCallBack threePartPayCallBack1 = JSON.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
ThreePartPayCallBack threePartPayCallBack1 = JsonUtils.parseObject(threePartMapping, ThreePartPayCallBack.class);
|
||||||
|
|
||||||
if (threePartPayCallBack1 != null && threePartPayCallBack1.getPayResult() != null && "00".equals(threePartPayCallBack1.getPayResult())) {
|
if (threePartPayCallBack1 != null && threePartPayCallBack1.getPayResult() != null && "00".equals(threePartPayCallBack1.getPayResult())) {
|
||||||
return R.ok("成功退费:" + new BigDecimal(threePartPayCallBack1.getTxnAmt()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP) + "元");
|
return R.ok("成功退费:" + new BigDecimal(threePartPayCallBack1.getTxnAmt()).divide(new BigDecimal(100), 2, BigDecimal.ROUND_HALF_UP) + "元");
|
||||||
@@ -392,20 +393,20 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
* @param txtCode 支付码
|
* @param txtCode 支付码
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Map<String, String> getParamMap(JSONObject jsonObject, Practitioner practitioner, ThreePartPayCallBack threePartPayCallBack, PaymentReconciliation paymentReconciliation, String amountResult, String txtCode) {
|
private Map<String, String> getParamMap(JsonNode jsonObject, Practitioner practitioner, ThreePartPayCallBack threePartPayCallBack, PaymentReconciliation paymentReconciliation, String amountResult, String txtCode) {
|
||||||
Map<String, String> paramMap = new HashMap<>();
|
Map<String, String> paramMap = new HashMap<>();
|
||||||
|
|
||||||
//款员信息
|
//款员信息
|
||||||
if (practitioner != null) {
|
if (practitioner != null) {
|
||||||
String posNoKey = jsonObject.getString("posNo");//pos机编码
|
String posNoKey = jsonObject.path("posNo").asText();//pos机编码
|
||||||
if (posNoKey != null) {
|
if (posNoKey != null) {
|
||||||
paramMap.put(posNoKey, practitioner.getPosNo());
|
paramMap.put(posNoKey, practitioner.getPosNo());
|
||||||
}
|
}
|
||||||
String userIdKey = jsonObject.getString("userId");
|
String userIdKey = jsonObject.path("userId").asText();
|
||||||
if (userIdKey != null) {
|
if (userIdKey != null) {
|
||||||
paramMap.put(userIdKey, practitioner.getId().toString());
|
paramMap.put(userIdKey, practitioner.getId().toString());
|
||||||
}
|
}
|
||||||
String userNameKey = jsonObject.getString("userName");
|
String userNameKey = jsonObject.path("userName").asText();
|
||||||
if (userNameKey != null) {
|
if (userNameKey != null) {
|
||||||
paramMap.put(userNameKey, practitioner.getName());
|
paramMap.put(userNameKey, practitioner.getName());
|
||||||
}
|
}
|
||||||
@@ -413,53 +414,53 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
|
|
||||||
//原账单信息
|
//原账单信息
|
||||||
if (threePartPayCallBack != null) {
|
if (threePartPayCallBack != null) {
|
||||||
String bankOrderIdKey = jsonObject.getString("bankOrderId");
|
String bankOrderIdKey = jsonObject.path("bankOrderId").asText();
|
||||||
if (bankOrderIdKey != null) {
|
if (bankOrderIdKey != null) {
|
||||||
paramMap.put(bankOrderIdKey, threePartPayCallBack.getTradeNo());//银行订单号
|
paramMap.put(bankOrderIdKey, threePartPayCallBack.getTradeNo());//银行订单号
|
||||||
}
|
}
|
||||||
String payWayOrderIdKey = jsonObject.getString("payWayOrderId");
|
String payWayOrderIdKey = jsonObject.path("payWayOrderId").asText();
|
||||||
if (payWayOrderIdKey != null) {
|
if (payWayOrderIdKey != null) {
|
||||||
paramMap.put(payWayOrderIdKey, threePartPayCallBack.getTransNo());//支付渠道订单号
|
paramMap.put(payWayOrderIdKey, threePartPayCallBack.getTransNo());//支付渠道订单号
|
||||||
}
|
}
|
||||||
String tranTypeKey = jsonObject.getString("tranType");
|
String tranTypeKey = jsonObject.path("tranType").asText();
|
||||||
if (tranTypeKey != null) {
|
if (tranTypeKey != null) {
|
||||||
paramMap.put(tranTypeKey, threePartPayCallBack.getTranType());//交易类型
|
paramMap.put(tranTypeKey, threePartPayCallBack.getTranType());//交易类型
|
||||||
}
|
}
|
||||||
String payTypeKey = jsonObject.getString("payType");
|
String payTypeKey = jsonObject.path("payType").asText();
|
||||||
if (payTypeKey != null) {
|
if (payTypeKey != null) {
|
||||||
paramMap.put(payTypeKey, threePartPayCallBack.getPayType());//支付方式
|
paramMap.put(payTypeKey, threePartPayCallBack.getPayType());//支付方式
|
||||||
}
|
}
|
||||||
String traceNoKey = jsonObject.getString("traceNo");
|
String traceNoKey = jsonObject.path("traceNo").asText();
|
||||||
if (payWayOrderIdKey != null) {
|
if (payWayOrderIdKey != null) {
|
||||||
paramMap.put(traceNoKey, threePartPayCallBack.getTraceNo());//终端流水号
|
paramMap.put(traceNoKey, threePartPayCallBack.getTraceNo());//终端流水号
|
||||||
}
|
}
|
||||||
String txnTimeKey = jsonObject.getString("txnTime");
|
String txnTimeKey = jsonObject.path("txnTime").asText();
|
||||||
if (payWayOrderIdKey != null) {
|
if (payWayOrderIdKey != null) {
|
||||||
paramMap.put(txnTimeKey, threePartPayCallBack.getTxnTime());//交易时间
|
paramMap.put(txnTimeKey, threePartPayCallBack.getTxnTime());//交易时间
|
||||||
}
|
}
|
||||||
String merTradeNoKey = jsonObject.getString("merTradeNo");
|
String merTradeNoKey = jsonObject.path("merTradeNo").asText();
|
||||||
if (payWayOrderIdKey != null) {
|
if (payWayOrderIdKey != null) {
|
||||||
paramMap.put(merTradeNoKey, threePartPayCallBack.getMerTradeNo());//商户系统订单号
|
paramMap.put(merTradeNoKey, threePartPayCallBack.getMerTradeNo());//商户系统订单号
|
||||||
}
|
}
|
||||||
String tradeNoKey = jsonObject.getString("tradeNo");
|
String tradeNoKey = jsonObject.path("tradeNo").asText();
|
||||||
if (tradeNoKey != null) {
|
if (tradeNoKey != null) {
|
||||||
paramMap.put(tradeNoKey, threePartPayCallBack.getTradeNo());//商户系统订单号
|
paramMap.put(tradeNoKey, threePartPayCallBack.getTradeNo());//商户系统订单号
|
||||||
}
|
}
|
||||||
String txnAmtKey = jsonObject.getString("txnAmt");
|
String txnAmtKey = jsonObject.path("txnAmt").asText();
|
||||||
if (txnAmtKey != null) {
|
if (txnAmtKey != null) {
|
||||||
paramMap.put(txnAmtKey, threePartPayCallBack.getTxnAmt());//金额
|
paramMap.put(txnAmtKey, threePartPayCallBack.getTxnAmt());//金额
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paymentReconciliation != null) {
|
if (paymentReconciliation != null) {
|
||||||
String paymentIdKey = jsonObject.getString("paymentId");
|
String paymentIdKey = jsonObject.path("paymentId").asText();
|
||||||
if (paymentIdKey != null) {
|
if (paymentIdKey != null) {
|
||||||
paramMap.put(paymentIdKey, paymentReconciliation.getId().toString());//his系统订单号
|
paramMap.put(paymentIdKey, paymentReconciliation.getId().toString());//his系统订单号
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String amountResultKey = jsonObject.getString("amountResult");
|
String amountResultKey = jsonObject.path("amountResult").asText();
|
||||||
String txtCodeKey = jsonObject.getString("txtCode");
|
String txtCodeKey = jsonObject.path("txtCode").asText();
|
||||||
|
|
||||||
if (amountResult != null) {
|
if (amountResult != null) {
|
||||||
paramMap.put(amountResultKey, amountResult);//金额
|
paramMap.put(amountResultKey, amountResult);//金额
|
||||||
@@ -516,20 +517,20 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
|
|
||||||
} else if (CommonConstants.Common.REQUEST_MAPPING_METHOD_POST.equals(method)) {
|
} else if (CommonConstants.Common.REQUEST_MAPPING_METHOD_POST.equals(method)) {
|
||||||
|
|
||||||
JSONObject data = new JSONObject();
|
ObjectNode data = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
for (Map.Entry<String, String> stringStringEntry : map.entrySet()) {
|
for (Map.Entry<String, String> stringStringEntry : map.entrySet()) {
|
||||||
data.put(stringStringEntry.getKey(), stringStringEntry.getValue());
|
data.put(stringStringEntry.getKey(), stringStringEntry.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (staticParam != null && !StringUtils.isEmpty(staticParam)) {
|
if (staticParam != null && !StringUtils.isEmpty(staticParam)) {
|
||||||
JSONObject staticDta = JSON.parseObject(staticParam);
|
JsonNode staticDta = JsonUtils.parse(staticParam);
|
||||||
data.putAll(staticDta);
|
if (staticDta.isObject()) { data.setAll((ObjectNode) staticDta); }
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info("三方支付请求入参:" + data.toJSONString());
|
logger.info("三方支付请求入参:" + data.toString());
|
||||||
logger.info("三方支付请求入参:" + data.toJSONString());
|
logger.info("三方支付请求入参:" + data.toString());
|
||||||
|
|
||||||
requestResult = httpPost(threePartUrl, data.toJSONString());
|
requestResult = httpPost(threePartUrl, data.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -556,7 +557,7 @@ public class ThreePartPayServiceImpl implements ThreePartPayService {
|
|||||||
HttpGet httpGet = new HttpGet(url);
|
HttpGet httpGet = new HttpGet(url);
|
||||||
// 执行http请求
|
// 执行http请求
|
||||||
response = httpClient.execute(httpGet);
|
response = httpClient.execute(httpGet);
|
||||||
logger.info("回复信息:" + JSON.toJSONString(response));
|
logger.info("回复信息:" + JsonUtils.toJson(response));
|
||||||
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
|
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Http请求异常, url: {}", url, e);
|
logger.error("Http请求异常, url: {}", url, e);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.paymentmanage.dto;
|
package com.healthlink.his.web.paymentmanage.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -19,67 +19,67 @@ import java.math.BigDecimal;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class Clinic2206OrderResultDto {
|
public class Clinic2206OrderResultDto {
|
||||||
|
|
||||||
@JSONField(name = "medfee_sumamt")
|
@JsonProperty("medfee_sumamt")
|
||||||
private BigDecimal medfeeSumamt; // 医疗费总额
|
private BigDecimal medfeeSumamt; // 医疗费总额
|
||||||
|
|
||||||
@JSONField(name = "fulamt_ownpay_amt")
|
@JsonProperty("fulamt_ownpay_amt")
|
||||||
private BigDecimal fulamtOwnpayAmt; // 全自费金额
|
private BigDecimal fulamtOwnpayAmt; // 全自费金额
|
||||||
|
|
||||||
@JSONField(name = "overlmt_selfpay")
|
@JsonProperty("overlmt_selfpay")
|
||||||
private BigDecimal overlmtSelfpay; // 超限价自费费用
|
private BigDecimal overlmtSelfpay; // 超限价自费费用
|
||||||
|
|
||||||
@JSONField(name = "preselfpay_amt")
|
@JsonProperty("preselfpay_amt")
|
||||||
private BigDecimal preselfpayAmt; // 先行自付金额
|
private BigDecimal preselfpayAmt; // 先行自付金额
|
||||||
|
|
||||||
@JSONField(name = "inscp_scp_amt")
|
@JsonProperty("inscp_scp_amt")
|
||||||
private BigDecimal inscpScpAmt; // 符合政策范围金额
|
private BigDecimal inscpScpAmt; // 符合政策范围金额
|
||||||
|
|
||||||
@JSONField(name = "act_pay_dedc")
|
@JsonProperty("act_pay_dedc")
|
||||||
private BigDecimal actPayDedc; // 实际支付起付线
|
private BigDecimal actPayDedc; // 实际支付起付线
|
||||||
|
|
||||||
@JSONField(name = "hifp_pay")
|
@JsonProperty("hifp_pay")
|
||||||
private BigDecimal hifpPay; // 基本医疗保险统筹基金支出
|
private BigDecimal hifpPay; // 基本医疗保险统筹基金支出
|
||||||
|
|
||||||
@JSONField(name = "pool_prop_selfpay")
|
@JsonProperty("pool_prop_selfpay")
|
||||||
private BigDecimal poolPropSelfpay; // 基本医疗保险统筹基金支付比例
|
private BigDecimal poolPropSelfpay; // 基本医疗保险统筹基金支付比例
|
||||||
|
|
||||||
@JSONField(name = "cvlserv_pay")
|
@JsonProperty("cvlserv_pay")
|
||||||
private BigDecimal cvlservPay; // 公务员医疗补助资金支出
|
private BigDecimal cvlservPay; // 公务员医疗补助资金支出
|
||||||
|
|
||||||
@JSONField(name = "hifes_pay")
|
@JsonProperty("hifes_pay")
|
||||||
private BigDecimal hifesPay; // 企业补充医疗保险基金支出
|
private BigDecimal hifesPay; // 企业补充医疗保险基金支出
|
||||||
|
|
||||||
@JSONField(name = "hifmi_pay")
|
@JsonProperty("hifmi_pay")
|
||||||
private BigDecimal hifmiPay; // 居民大病保险资金支出
|
private BigDecimal hifmiPay; // 居民大病保险资金支出
|
||||||
|
|
||||||
@JSONField(name = "hifob_pay")
|
@JsonProperty("hifob_pay")
|
||||||
private BigDecimal hifobPay; // 职工大额医疗费用补助基金支出
|
private BigDecimal hifobPay; // 职工大额医疗费用补助基金支出
|
||||||
|
|
||||||
@JSONField(name = "maf_pay")
|
@JsonProperty("maf_pay")
|
||||||
private BigDecimal mafPay; // 医疗救助基金支出
|
private BigDecimal mafPay; // 医疗救助基金支出
|
||||||
|
|
||||||
@JSONField(name = "oth_pay")
|
@JsonProperty("oth_pay")
|
||||||
private BigDecimal othPay; // 其他支出
|
private BigDecimal othPay; // 其他支出
|
||||||
|
|
||||||
@JSONField(name = "fund_pay_sumamt")
|
@JsonProperty("fund_pay_sumamt")
|
||||||
private BigDecimal fundPaySumamt; // 基金支付总额
|
private BigDecimal fundPaySumamt; // 基金支付总额
|
||||||
|
|
||||||
@JSONField(name = "psn_part_amt")
|
@JsonProperty("psn_part_amt")
|
||||||
private BigDecimal psnPartAmt; // 个人负担总金额
|
private BigDecimal psnPartAmt; // 个人负担总金额
|
||||||
|
|
||||||
@JSONField(name = "acct_pay")
|
@JsonProperty("acct_pay")
|
||||||
private BigDecimal acctPay; // 个人账户支出
|
private BigDecimal acctPay; // 个人账户支出
|
||||||
|
|
||||||
@JSONField(name = "psn_cash_pay")
|
@JsonProperty("psn_cash_pay")
|
||||||
private BigDecimal psnCashPay; // 个人现金支出
|
private BigDecimal psnCashPay; // 个人现金支出
|
||||||
|
|
||||||
@JSONField(name = "hosp_part_amt")
|
@JsonProperty("hosp_part_amt")
|
||||||
private BigDecimal hospPartAmt; // 医院负担金额
|
private BigDecimal hospPartAmt; // 医院负担金额
|
||||||
|
|
||||||
@JSONField(name = "hifdm_pay")
|
@JsonProperty("hifdm_pay")
|
||||||
private BigDecimal hifdmPay;
|
private BigDecimal hifdmPay;
|
||||||
|
|
||||||
@JSONField(name = "acct_mulaid_pay")
|
@JsonProperty("acct_mulaid_pay")
|
||||||
private BigDecimal acctMulaidPay; // 个人账户共济支付金额
|
private BigDecimal acctMulaidPay; // 个人账户共济支付金额
|
||||||
|
|
||||||
private String chrgBchno;//收费批次号
|
private String chrgBchno;//收费批次号
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.paymentmanage.dto;
|
package com.healthlink.his.web.paymentmanage.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.healthlink.his.yb.dto.Clinic2206FundPaymentResult;
|
import com.healthlink.his.yb.dto.Clinic2206FundPaymentResult;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -22,54 +22,54 @@ import java.util.List;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class Clinic2207OrderResultInfoDto {
|
public class Clinic2207OrderResultInfoDto {
|
||||||
// 主键字段
|
// 主键字段
|
||||||
@JSONField(name = "mdtrt_id")
|
@JsonProperty("mdtrt_id")
|
||||||
private String mdtrtId; // 就诊ID
|
private String mdtrtId; // 就诊ID
|
||||||
|
|
||||||
@JSONField(name = "psn_no")
|
@JsonProperty("psn_no")
|
||||||
private String psnNo; // 人员编号
|
private String psnNo; // 人员编号
|
||||||
|
|
||||||
@JSONField(name = "psn_name")
|
@JsonProperty("psn_name")
|
||||||
private String psnName; // 人员姓名
|
private String psnName; // 人员姓名
|
||||||
|
|
||||||
@JSONField(name = "psn_cert_type")
|
@JsonProperty("psn_cert_type")
|
||||||
private String psnCertType; // 人员证件类型
|
private String psnCertType; // 人员证件类型
|
||||||
|
|
||||||
@JSONField(name = "certno")
|
@JsonProperty("certno")
|
||||||
private String certno; // 证件号码
|
private String certno; // 证件号码
|
||||||
|
|
||||||
@JSONField(name = "gend")
|
@JsonProperty("gend")
|
||||||
private String gend; // 性别
|
private String gend; // 性别
|
||||||
|
|
||||||
@JSONField(name = "naty")
|
@JsonProperty("naty")
|
||||||
private String naty; // 民族
|
private String naty; // 民族
|
||||||
|
|
||||||
@JSONField(name = "brdy")
|
@JsonProperty("brdy")
|
||||||
private Date brdy; // 出生日期
|
private Date brdy; // 出生日期
|
||||||
|
|
||||||
@JSONField(name = "age")
|
@JsonProperty("age")
|
||||||
private BigDecimal age; // 年龄
|
private BigDecimal age; // 年龄
|
||||||
|
|
||||||
@JSONField(name = "insutype")
|
@JsonProperty("insutype")
|
||||||
private String insutype; // 险种类型
|
private String insutype; // 险种类型
|
||||||
|
|
||||||
@JSONField(name = "psn_type")
|
@JsonProperty("psn_type")
|
||||||
private String psnType; // 人员类别
|
private String psnType; // 人员类别
|
||||||
|
|
||||||
@JSONField(name = "cvlserv_flag")
|
@JsonProperty("cvlserv_flag")
|
||||||
private String cvlservFlag; // 公务员标志
|
private String cvlservFlag; // 公务员标志
|
||||||
|
|
||||||
@JSONField(name = "setl_time")
|
@JsonProperty("setl_time")
|
||||||
private Date setlTime; // 结算时间
|
private Date setlTime; // 结算时间
|
||||||
|
|
||||||
@JSONField(name = "mdtrt_cert_type")
|
@JsonProperty("mdtrt_cert_type")
|
||||||
private String mdtrtCertType; // 就诊凭证类型
|
private String mdtrtCertType; // 就诊凭证类型
|
||||||
|
|
||||||
@JSONField(name = "med_type")
|
@JsonProperty("med_type")
|
||||||
private String medType; // 医疗类别
|
private String medType; // 医疗类别
|
||||||
|
|
||||||
@JSONField(name = "medins_setl_id")
|
@JsonProperty("medins_setl_id")
|
||||||
private String medinsSetlId; // 医药机构结算ID 存放发送方报文ID
|
private String medinsSetlId; // 医药机构结算ID 存放发送方报文ID
|
||||||
|
|
||||||
@JSONField(name = "setldetail")
|
@JsonProperty("setldetail")
|
||||||
private List<Clinic2206FundPaymentResult> setldetail;// 结算详细信息
|
private List<Clinic2206FundPaymentResult> setldetail;// 结算详细信息
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package com.healthlink.his.web.paymentmanage.dto;
|
package com.healthlink.his.web.paymentmanage.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class EleInvioceBillDto {
|
public class EleInvioceBillDto {
|
||||||
|
|
||||||
JSONObject jsonObject;
|
JsonNode jsonObject;
|
||||||
|
|
||||||
String endpoint;
|
String endpoint;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.paymentmanage.dto;
|
package com.healthlink.his.web.paymentmanage.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.healthlink.his.yb.dto.Clinic2206FundPaymentResult;
|
import com.healthlink.his.yb.dto.Clinic2206FundPaymentResult;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -269,7 +269,7 @@ public class InpatientPreSettleDto {
|
|||||||
@JsonProperty("hifdm_pay")
|
@JsonProperty("hifdm_pay")
|
||||||
private BigDecimal hifdmPay;
|
private BigDecimal hifdmPay;
|
||||||
|
|
||||||
@JSONField(name = "setldetail")
|
@JsonProperty("setldetail")
|
||||||
private List<Clinic2206FundPaymentResult> setldetail;
|
private List<Clinic2206FundPaymentResult> setldetail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.paymentmanage.dto;
|
package com.healthlink.his.web.paymentmanage.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -23,7 +23,7 @@ import java.util.Date;
|
|||||||
public class InvoiceBaseInfoDto {
|
public class InvoiceBaseInfoDto {
|
||||||
// 主键
|
// 主键
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@JSONField(serialize = false)
|
@JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private String setlId;// 结算id
|
private String setlId;// 结算id
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl;
|
package com.healthlink.his.web.pharmacyDispensarymanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
@@ -187,7 +189,7 @@ public class PharmacyDispensaryReceiptApprovalServiceImpl implements IPharmacyDi
|
|||||||
SupplyType.PURCHASE_STOCKIN.getValue());
|
SupplyType.PURCHASE_STOCKIN.getValue());
|
||||||
|
|
||||||
// 调用医保商品采购接口 todo 药房相关医保接口未对应
|
// 调用医保商品采购接口 todo 药房相关医保接口未对应
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
||||||
@@ -274,7 +276,7 @@ public class PharmacyDispensaryReceiptApprovalServiceImpl implements IPharmacyDi
|
|||||||
SupplyType.PURCHASE_RETURN.getValue());
|
SupplyType.PURCHASE_RETURN.getValue());
|
||||||
|
|
||||||
// 调用医保采购退货接口
|
// 调用医保采购退货接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
||||||
@@ -425,7 +427,7 @@ public class PharmacyDispensaryReceiptApprovalServiceImpl implements IPharmacyDi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用医保库存变更接口
|
// 调用医保库存变更接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
||||||
YbInvChgType.DESTRUCTION, false, false, false, now);
|
YbInvChgType.DESTRUCTION, false, false, false, now);
|
||||||
@@ -522,7 +524,7 @@ public class PharmacyDispensaryReceiptApprovalServiceImpl implements IPharmacyDi
|
|||||||
}
|
}
|
||||||
|
|
||||||
String ybSwitch =
|
String ybSwitch =
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
// 如果首次盘点信息不为空
|
// 如果首次盘点信息不为空
|
||||||
if (!firstSupplyItemDetailList.isEmpty()) {
|
if (!firstSupplyItemDetailList.isEmpty()) {
|
||||||
@@ -864,14 +866,14 @@ public class PharmacyDispensaryReceiptApprovalServiceImpl implements IPharmacyDi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 转换为JSON
|
// 转换为JSON
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
// 获取追溯码信息
|
// 获取追溯码信息
|
||||||
if (supplyItemDetailDto.getTraceNo() != null) {
|
if (supplyItemDetailDto.getTraceNo() != null) {
|
||||||
List<String> traceNoList =
|
List<String> traceNoList =
|
||||||
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
||||||
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.pharmacyWarehousemanage.appservice.impl;
|
package com.healthlink.his.web.pharmacyWarehousemanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.exception.ServiceException;
|
import com.core.common.exception.ServiceException;
|
||||||
@@ -211,7 +213,7 @@ public class PharmacyWarehouseReceiptApprovalServiceImpl implements IPharmacyWar
|
|||||||
SupplyType.CABINET_STOCKIN.getValue());
|
SupplyType.CABINET_STOCKIN.getValue());
|
||||||
|
|
||||||
// 调用医保商品采购接口 todo 药库相关医保接口未对应
|
// 调用医保商品采购接口 todo 药库相关医保接口未对应
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.PURCHASE_IN, false, true, false, now);
|
||||||
@@ -314,7 +316,7 @@ public class PharmacyWarehouseReceiptApprovalServiceImpl implements IPharmacyWar
|
|||||||
SupplyType.CABINET_RETURN.getValue());
|
SupplyType.CABINET_RETURN.getValue());
|
||||||
|
|
||||||
// 调用医保采购退货接口
|
// 调用医保采购退货接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList =
|
List<String> uploadFailedNoList =
|
||||||
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
this.ybInventoryIntegrated(supplyItemDetailList, YbInvChgType.RETURN_OUT, false, false, true, now);
|
||||||
@@ -543,7 +545,7 @@ public class PharmacyWarehouseReceiptApprovalServiceImpl implements IPharmacyWar
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 调用医保库存变更接口
|
// 调用医保库存变更接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
List<String> uploadFailedNoList = this.ybInventoryIntegrated(supplyItemDetailList,
|
||||||
YbInvChgType.DESTRUCTION, false, false, false, now);
|
YbInvChgType.DESTRUCTION, false, false, false, now);
|
||||||
@@ -638,7 +640,7 @@ public class PharmacyWarehouseReceiptApprovalServiceImpl implements IPharmacyWar
|
|||||||
}
|
}
|
||||||
|
|
||||||
String ybSwitch =
|
String ybSwitch =
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
// 如果首次盘点信息不为空
|
// 如果首次盘点信息不为空
|
||||||
if (!firstSupplyItemDetailList.isEmpty()) {
|
if (!firstSupplyItemDetailList.isEmpty()) {
|
||||||
@@ -914,14 +916,14 @@ public class PharmacyWarehouseReceiptApprovalServiceImpl implements IPharmacyWar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 转换为JSON
|
// 转换为JSON
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
// 获取追溯码信息
|
// 获取追溯码信息
|
||||||
if (supplyItemDetailDto.getTraceNo() != null) {
|
if (supplyItemDetailDto.getTraceNo() != null) {
|
||||||
List<String> traceNoList =
|
List<String> traceNoList =
|
||||||
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
Arrays.stream(supplyItemDetailDto.getTraceNo().split(CommonConstants.Common.COMMA))
|
||||||
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
.map(String::trim).filter(s -> !s.isEmpty()).collect(Collectors.toList());
|
||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -448,7 +450,7 @@ public class InHospitalReturnMedicineAppServiceImpl implements IInHospitalReturn
|
|||||||
String returnMsg = null;
|
String returnMsg = null;
|
||||||
List<String> uploadFailedNoList;
|
List<String> uploadFailedNoList;
|
||||||
// 调用医保商品销售退货接口
|
// 调用医保商品销售退货接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<DeviceDefinition> deviceDefinitions = new ArrayList<>();
|
List<DeviceDefinition> deviceDefinitions = new ArrayList<>();
|
||||||
List<MedicationDefinition> medicationDefinitions = new ArrayList<>();
|
List<MedicationDefinition> medicationDefinitions = new ArrayList<>();
|
||||||
@@ -622,14 +624,14 @@ public class InHospitalReturnMedicineAppServiceImpl implements IInHospitalReturn
|
|||||||
// throw new ServiceException("未查询到发票信息");
|
// throw new ServiceException("未查询到发票信息");
|
||||||
// }
|
// }
|
||||||
// 转换为JSON
|
// 转换为JSON
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
// 获取追溯码信息
|
// 获取追溯码信息
|
||||||
if (dispenseInventoryDto.getTraceNo() != null) {
|
if (dispenseInventoryDto.getTraceNo() != null) {
|
||||||
List<String> traceNoList =
|
List<String> traceNoList =
|
||||||
Arrays.stream(dispenseInventoryDto.getTraceNo().split(CommonConstants.Common.COMMA)).map(String::trim)
|
Arrays.stream(dispenseInventoryDto.getTraceNo().split(CommonConstants.Common.COMMA)).map(String::trim)
|
||||||
.filter(s -> !s.isEmpty()).toList();
|
.filter(s -> !s.isEmpty()).toList();
|
||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
@@ -645,7 +647,7 @@ public class InHospitalReturnMedicineAppServiceImpl implements IInHospitalReturn
|
|||||||
.setDrugtracinfo(medicalTraceNo).setCertno(dispenseInventoryDto.getIdCard());
|
.setDrugtracinfo(medicalTraceNo).setCertno(dispenseInventoryDto.getIdCard());
|
||||||
// 查看所属医院
|
// 查看所属医院
|
||||||
String fixmedinsCode =
|
String fixmedinsCode =
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
if (dispenseInventoryDto.getPreparerName() == null && HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
if (dispenseInventoryDto.getPreparerName() == null && HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
||||||
medical3506Param.setSelRetnOpterName(CommonConstants.CCU.DisDeviceDoctorName);
|
medical3506Param.setSelRetnOpterName(CommonConstants.CCU.DisDeviceDoctorName);
|
||||||
} else {
|
} else {
|
||||||
@@ -675,7 +677,7 @@ public class InHospitalReturnMedicineAppServiceImpl implements IInHospitalReturn
|
|||||||
MedicalInventory3511Param medicalInventory3511Param = new MedicalInventory3511Param();
|
MedicalInventory3511Param medicalInventory3511Param = new MedicalInventory3511Param();
|
||||||
|
|
||||||
String fixmedinsCode =
|
String fixmedinsCode =
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
// TODO
|
// TODO
|
||||||
medicalInventory3511Param.setFixmedinsCode(fixmedinsCode).setMedinsListCodg(dispenseInventoryDto.getYbNo())
|
medicalInventory3511Param.setFixmedinsCode(fixmedinsCode).setMedinsListCodg(dispenseInventoryDto.getYbNo())
|
||||||
.setFixmedinsBchno(dispenseInventoryDto.getLotNumber()).setBegndate(dispenseInventoryDto.getDispenseTime())
|
.setFixmedinsBchno(dispenseInventoryDto.getLotNumber()).setBegndate(dispenseInventoryDto.getDispenseTime())
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen
|
|||||||
// String returnMsg = null;
|
// String returnMsg = null;
|
||||||
// List<String> uploadFailedNoList;
|
// List<String> uploadFailedNoList;
|
||||||
// // 调用医保商品销售接口
|
// // 调用医保商品销售接口
|
||||||
// String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH);
|
// String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH);
|
||||||
// // 医保开关
|
// // 医保开关
|
||||||
// if (Whether.YES.getCode().equals(ybSwitch)) {
|
// if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
// // 设置进销存参数
|
// // 设置进销存参数
|
||||||
@@ -388,7 +388,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen
|
|||||||
public R<?> dispenseMedicalConsumables(List<Long> chargeItemIds) {
|
public R<?> dispenseMedicalConsumables(List<Long> chargeItemIds) {
|
||||||
// 查看所属医院
|
// 查看所属医院
|
||||||
String fixmedinsCode
|
String fixmedinsCode
|
||||||
= SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
= SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
if (!HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
if (!HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@@ -498,7 +498,7 @@ public class MedicalDeviceDispenseAppServiceImpl implements IMedicalDeviceDispen
|
|||||||
// // 返回信息
|
// // 返回信息
|
||||||
// String returnMsg = null;
|
// String returnMsg = null;
|
||||||
// // 调用医保商品销售接口
|
// // 调用医保商品销售接口
|
||||||
// String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH);
|
// String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH);
|
||||||
// List<String> uploadFailedNoList = new ArrayList<>();
|
// List<String> uploadFailedNoList = new ArrayList<>();
|
||||||
// // 医保开关
|
// // 医保开关
|
||||||
// if (Whether.YES.getCode().equals(ybSwitch)) {
|
// if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.pharmacymanage.appservice.impl;
|
package com.healthlink.his.web.pharmacymanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -441,7 +443,7 @@ public class ReturnMedicineAppServiceImpl implements IReturnMedicineAppService {
|
|||||||
String returnMsg = null;
|
String returnMsg = null;
|
||||||
List<String> uploadFailedNoList;
|
List<String> uploadFailedNoList;
|
||||||
// 调用医保商品销售退货接口
|
// 调用医保商品销售退货接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
List<DeviceDefinition> deviceDefinitions = new ArrayList<>();
|
List<DeviceDefinition> deviceDefinitions = new ArrayList<>();
|
||||||
List<MedicationDefinition> medicationDefinitions = new ArrayList<>();
|
List<MedicationDefinition> medicationDefinitions = new ArrayList<>();
|
||||||
@@ -616,14 +618,14 @@ public class ReturnMedicineAppServiceImpl implements IReturnMedicineAppService {
|
|||||||
// throw new ServiceException("未查询到发票信息");
|
// throw new ServiceException("未查询到发票信息");
|
||||||
// }
|
// }
|
||||||
// 转换为JSON
|
// 转换为JSON
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
// 获取追溯码信息
|
// 获取追溯码信息
|
||||||
if (dispenseInventoryDto.getTraceNo() != null) {
|
if (dispenseInventoryDto.getTraceNo() != null) {
|
||||||
List<String> traceNoList
|
List<String> traceNoList
|
||||||
= Arrays.stream(dispenseInventoryDto.getTraceNo().split(CommonConstants.Common.COMMA)).map(String::trim)
|
= Arrays.stream(dispenseInventoryDto.getTraceNo().split(CommonConstants.Common.COMMA)).map(String::trim)
|
||||||
.filter(s -> !s.isEmpty()).toList();
|
.filter(s -> !s.isEmpty()).toList();
|
||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
@@ -639,7 +641,7 @@ public class ReturnMedicineAppServiceImpl implements IReturnMedicineAppService {
|
|||||||
.setDrugtracinfo(medicalTraceNo).setCertno(dispenseInventoryDto.getIdCard());
|
.setDrugtracinfo(medicalTraceNo).setCertno(dispenseInventoryDto.getIdCard());
|
||||||
// 查看所属医院
|
// 查看所属医院
|
||||||
String fixmedinsCode
|
String fixmedinsCode
|
||||||
= SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
= SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
if (dispenseInventoryDto.getPreparerName() == null && HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
if (dispenseInventoryDto.getPreparerName() == null && HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
||||||
medical3506Param.setSelRetnOpterName(CommonConstants.CCU.DisDeviceDoctorName);
|
medical3506Param.setSelRetnOpterName(CommonConstants.CCU.DisDeviceDoctorName);
|
||||||
} else {
|
} else {
|
||||||
@@ -669,7 +671,7 @@ public class ReturnMedicineAppServiceImpl implements IReturnMedicineAppService {
|
|||||||
MedicalInventory3511Param medicalInventory3511Param = new MedicalInventory3511Param();
|
MedicalInventory3511Param medicalInventory3511Param = new MedicalInventory3511Param();
|
||||||
|
|
||||||
String fixmedinsCode
|
String fixmedinsCode
|
||||||
= SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
= SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
// TODO
|
// TODO
|
||||||
medicalInventory3511Param.setFixmedinsCode(fixmedinsCode).setMedinsListCodg(dispenseInventoryDto.getYbNo())
|
medicalInventory3511Param.setFixmedinsCode(fixmedinsCode).setMedinsListCodg(dispenseInventoryDto.getYbNo())
|
||||||
.setFixmedinsBchno(dispenseInventoryDto.getLotNumber()).setBegndate(dispenseInventoryDto.getDispenseTime())
|
.setFixmedinsBchno(dispenseInventoryDto.getLotNumber()).setBegndate(dispenseInventoryDto.getDispenseTime())
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ public class SummaryDispenseMedicineAppServiceImpl implements ISummaryDispenseMe
|
|||||||
String returnMsg = null;
|
String returnMsg = null;
|
||||||
List<String> uploadFailedNoList;
|
List<String> uploadFailedNoList;
|
||||||
// 调用医保商品销售接口
|
// 调用医保商品销售接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH);
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH);
|
||||||
// 医保开关
|
// 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
// 设置进销存参数
|
// 设置进销存参数
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.pharmacymanage.appservice.impl;
|
package com.healthlink.his.web.pharmacymanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
@@ -155,6 +157,8 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi
|
|||||||
|
|
||||||
// 发药状态
|
// 发药状态
|
||||||
List<DispenseStatusOption> dispenseStatusOptions = new ArrayList<>();
|
List<DispenseStatusOption> dispenseStatusOptions = new ArrayList<>();
|
||||||
|
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.SUBMITTED.getValue(),
|
||||||
|
DispenseStatus.SUBMITTED.getInfo()));
|
||||||
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.IN_PROGRESS.getValue(),
|
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.IN_PROGRESS.getValue(),
|
||||||
DispenseStatus.IN_PROGRESS.getInfo()));
|
DispenseStatus.IN_PROGRESS.getInfo()));
|
||||||
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.COMPLETED.getValue(),
|
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.COMPLETED.getValue(),
|
||||||
@@ -491,7 +495,7 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi
|
|||||||
String returnMsg = null;
|
String returnMsg = null;
|
||||||
List<String> uploadFailedNoList;
|
List<String> uploadFailedNoList;
|
||||||
// 调用医保商品销售接口
|
// 调用医保商品销售接口
|
||||||
String ybSwitch = SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.YB_SWITCH); // 医保开关
|
String ybSwitch = SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.YB_SWITCH); // 医保开关
|
||||||
if (Whether.YES.getCode().equals(ybSwitch)) {
|
if (Whether.YES.getCode().equals(ybSwitch)) {
|
||||||
// 设置进销存参数
|
// 设置进销存参数
|
||||||
List<MedicationDefinition> medicationDefinitions = medicationDefinitionService.listByIds(
|
List<MedicationDefinition> medicationDefinitions = medicationDefinitionService.listByIds(
|
||||||
@@ -672,14 +676,14 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi
|
|||||||
// throw new ServiceException("未查找到就诊发票信息");
|
// throw new ServiceException("未查找到就诊发票信息");
|
||||||
// }
|
// }
|
||||||
// 转换为JSON
|
// 转换为JSON
|
||||||
JSONArray medicalTraceNo = new JSONArray();
|
ArrayNode medicalTraceNo = new com.fasterxml.jackson.databind.ObjectMapper().createArrayNode();
|
||||||
// 获取追溯码信息
|
// 获取追溯码信息
|
||||||
if (dispenseInventoryDto.getTraceNo() != null) {
|
if (dispenseInventoryDto.getTraceNo() != null) {
|
||||||
List<String> traceNoList
|
List<String> traceNoList
|
||||||
= Arrays.stream(dispenseInventoryDto.getTraceNo().split(CommonConstants.Common.COMMA)).map(String::trim)
|
= Arrays.stream(dispenseInventoryDto.getTraceNo().split(CommonConstants.Common.COMMA)).map(String::trim)
|
||||||
.filter(s -> !s.isEmpty()).toList();
|
.filter(s -> !s.isEmpty()).toList();
|
||||||
for (String traceNo : traceNoList) {
|
for (String traceNo : traceNoList) {
|
||||||
Map<String, String> traceNoMap = new HashMap<>();
|
ObjectNode traceNoMap = new com.fasterxml.jackson.databind.ObjectMapper().createObjectNode();
|
||||||
traceNoMap.put("drug_trac_codg", traceNo);
|
traceNoMap.put("drug_trac_codg", traceNo);
|
||||||
medicalTraceNo.add(traceNoMap);
|
medicalTraceNo.add(traceNoMap);
|
||||||
}
|
}
|
||||||
@@ -703,7 +707,7 @@ public class WesternMedicineDispenseAppServiceImpl implements IWesternMedicineDi
|
|||||||
}
|
}
|
||||||
// 查看所属医院
|
// 查看所属医院
|
||||||
String fixmedinsCode
|
String fixmedinsCode
|
||||||
= SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.FIXMEDINS_CODE);
|
= SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
if (dispenseInventoryDto.getPreparerName() == null && HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
if (dispenseInventoryDto.getPreparerName() == null && HospitalCodeEnum.CCU.getCode().equals(fixmedinsCode)) {
|
||||||
medical3505Param.setSelRetnOpterName(CommonConstants.CCU.DisDeviceDoctorName);
|
medical3505Param.setSelRetnOpterName(CommonConstants.CCU.DisDeviceDoctorName);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.healthlink.his.reconstruction.domain.*;
|
import com.healthlink.his.reconstruction.domain.*;
|
||||||
import com.healthlink.his.reconstruction.service.*;
|
import com.healthlink.his.reconstruction.service.*;
|
||||||
|
import com.core.system.service.ISysUserService;
|
||||||
|
import com.core.system.service.ISysRoleService;
|
||||||
|
import com.core.common.core.domain.entity.SysRole;
|
||||||
|
import com.core.common.core.domain.entity.SysUser;
|
||||||
import lombok.AllArgsConstructor;import lombok.extern.slf4j.Slf4j;
|
import lombok.AllArgsConstructor;import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.StringUtils;import org.springframework.web.bind.annotation.*;
|
import org.springframework.util.StringUtils;import org.springframework.web.bind.annotation.*;
|
||||||
@@ -13,6 +17,8 @@ public class Reconstruction3DController {
|
|||||||
private final IReconstructionTaskService taskService;
|
private final IReconstructionTaskService taskService;
|
||||||
private final IReconstructionResultService resultService;
|
private final IReconstructionResultService resultService;
|
||||||
private final IReconstructionReportService reportService;
|
private final IReconstructionReportService reportService;
|
||||||
|
private final ISysUserService userService;
|
||||||
|
private final ISysRoleService roleService;
|
||||||
|
|
||||||
// ==================== 重建任务 ====================
|
// ==================== 重建任务 ====================
|
||||||
@GetMapping("/task/page")
|
@GetMapping("/task/page")
|
||||||
@@ -100,4 +106,32 @@ public class Reconstruction3DController {
|
|||||||
stats.put("totalReports", reportService.count());
|
stats.put("totalReports", reportService.count());
|
||||||
return R.ok(stats);
|
return R.ok(stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== 医生列表 ====================
|
||||||
|
@GetMapping("/doctors")
|
||||||
|
public R<?> getDoctors() {
|
||||||
|
SysUser query = new SysUser();
|
||||||
|
query.setStatus("0");
|
||||||
|
query.setDelFlag("0");
|
||||||
|
List<SysUser> allUsers = userService.selectUserList(query);
|
||||||
|
// For each user, check if they have role 200 (doctor)
|
||||||
|
List<Map<String, Object>> doctors = new ArrayList<>();
|
||||||
|
for (SysUser user : allUsers) {
|
||||||
|
List<SysRole> roles = roleService.selectRolesByUserId(user.getUserId());
|
||||||
|
if (roles != null) {
|
||||||
|
for (SysRole role : roles) {
|
||||||
|
if (role.getRoleId() != null && role.getRoleId() == 200L) {
|
||||||
|
Map<String, Object> doc = new HashMap<>();
|
||||||
|
doc.put("userId", user.getUserId());
|
||||||
|
doc.put("userName", user.getUserName());
|
||||||
|
doc.put("nickName", user.getNickName());
|
||||||
|
doctors.add(doc);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return R.ok(doctors);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1122,14 +1122,14 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
iMedicationRequestService.update(new LambdaUpdateWrapper<MedicationRequest>()
|
iMedicationRequestService.update(new LambdaUpdateWrapper<MedicationRequest>()
|
||||||
.in(MedicationRequest::getId, medicineRequestIds)
|
.in(MedicationRequest::getId, medicineRequestIds)
|
||||||
.set(MedicationRequest::getEffectiveDoseEnd, stopTime)
|
.set(MedicationRequest::getEffectiveDoseEnd, stopTime)
|
||||||
.set(MedicationRequest::getStatusEnum, RequestStatus.STOPPED.getValue())
|
.set(MedicationRequest::getStatusEnum, RequestStatus.PENDING_STOP.getValue())
|
||||||
.set(MedicationRequest::getUpdateBy, stopUserName));
|
.set(MedicationRequest::getUpdateBy, stopUserName));
|
||||||
}
|
}
|
||||||
if (!activityRequestIds.isEmpty()) {
|
if (!activityRequestIds.isEmpty()) {
|
||||||
iServiceRequestService.update(new LambdaUpdateWrapper<ServiceRequest>()
|
iServiceRequestService.update(new LambdaUpdateWrapper<ServiceRequest>()
|
||||||
.in(ServiceRequest::getId, activityRequestIds)
|
.in(ServiceRequest::getId, activityRequestIds)
|
||||||
.set(ServiceRequest::getOccurrenceEndTime, stopTime)
|
.set(ServiceRequest::getOccurrenceEndTime, stopTime)
|
||||||
.set(ServiceRequest::getStatusEnum, RequestStatus.STOPPED.getValue())
|
.set(ServiceRequest::getStatusEnum, RequestStatus.PENDING_STOP.getValue())
|
||||||
.set(ServiceRequest::getUpdateBy, stopUserName));
|
.set(ServiceRequest::getUpdateBy, stopUserName));
|
||||||
}
|
}
|
||||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱停止"}));
|
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱停止"}));
|
||||||
@@ -1173,7 +1173,8 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
.select(MedicationRequest::getId, MedicationRequest::getStatusEnum)
|
.select(MedicationRequest::getId, MedicationRequest::getStatusEnum)
|
||||||
.in(MedicationRequest::getId, medicineRequestIds));
|
.in(MedicationRequest::getId, medicineRequestIds));
|
||||||
for (MedicationRequest mr : medicineRequestList) {
|
for (MedicationRequest mr : medicineRequestList) {
|
||||||
if (!RequestStatus.STOPPED.getValue().equals(mr.getStatusEnum())) {
|
if (!RequestStatus.STOPPED.getValue().equals(mr.getStatusEnum())
|
||||||
|
&& !RequestStatus.PENDING_STOP.getValue().equals(mr.getStatusEnum())) {
|
||||||
throw new ServiceException("护士站已确认停止该医嘱,无法取消停嘱!");
|
throw new ServiceException("护士站已确认停止该医嘱,无法取消停嘱!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1184,7 +1185,8 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
|||||||
.select(ServiceRequest::getId, ServiceRequest::getStatusEnum)
|
.select(ServiceRequest::getId, ServiceRequest::getStatusEnum)
|
||||||
.in(ServiceRequest::getId, activityRequestIds));
|
.in(ServiceRequest::getId, activityRequestIds));
|
||||||
for (ServiceRequest sr : activityRequestList) {
|
for (ServiceRequest sr : activityRequestList) {
|
||||||
if (!RequestStatus.STOPPED.getValue().equals(sr.getStatusEnum())) {
|
if (!RequestStatus.STOPPED.getValue().equals(sr.getStatusEnum())
|
||||||
|
&& !RequestStatus.PENDING_STOP.getValue().equals(sr.getStatusEnum())) {
|
||||||
throw new ServiceException("护士站已确认停止该医嘱,无法取消停嘱!");
|
throw new ServiceException("护士站已确认停止该医嘱,无法取消停嘱!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ public class RegRequestBaseDto extends RequestBaseDto {
|
|||||||
private String doseUnitCode_dictText;
|
private String doseUnitCode_dictText;
|
||||||
|
|
||||||
|
|
||||||
|
/** 药品分类编码(1-中成药 2-西药 4-中草药) */
|
||||||
|
private String categoryCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注(最长50字)
|
* 备注(最长50字)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.healthlink.his.web.reportManagement.appservice.impl;
|
package com.healthlink.his.web.reportManagement.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
@@ -88,8 +90,8 @@ public class InfectiousCardAppServiceImpl implements IInfectiousCardAppService {
|
|||||||
Page<InfectiousCardDto> page = new Page<>(pageNo, pageSize);
|
Page<InfectiousCardDto> page = new Page<>(pageNo, pageSize);
|
||||||
IPage<InfectiousCardDto> resultPage = reportManageCardMapper.selectCardPage(page, param);
|
IPage<InfectiousCardDto> resultPage = reportManageCardMapper.selectCardPage(page, param);
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
ObjectNode result = new ObjectMapper().createObjectNode();
|
||||||
result.put("rows", resultPage.getRecords());
|
result.set("rows", new ObjectMapper().valueToTree(resultPage.getRecords()));
|
||||||
result.put("total", resultPage.getTotal());
|
result.put("total", resultPage.getTotal());
|
||||||
|
|
||||||
return R.ok(result);
|
return R.ok(result);
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.reportmanage.appservice.impl;
|
package com.healthlink.his.web.reportmanage.appservice.impl;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.utils.AgeCalculatorUtil;
|
import com.core.common.utils.AgeCalculatorUtil;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
import com.healthlink.his.administration.service.IEncounterService;
|
import com.healthlink.his.administration.service.IEncounterService;
|
||||||
@@ -30,7 +31,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 住院病案首页采集 impl
|
* ä½é™¢ç—…案首页采集 impl
|
||||||
*
|
*
|
||||||
* @author yuxj
|
* @author yuxj
|
||||||
* @date 2025-08-25
|
* @date 2025-08-25
|
||||||
@@ -47,308 +48,308 @@ public class InpatientMedicalRecordHomePageCollectionAppServiceImpl implements I
|
|||||||
IEncounterService encounterService;
|
IEncounterService encounterService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 住院病案csv做成
|
* ä½é™¢ç—…案csvåšæˆ
|
||||||
*
|
*
|
||||||
* @param encounterIdList 就诊idList
|
* @param encounterIdList 就诊idList
|
||||||
* @return 执行结果
|
* @return 执行结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> makeCsvFile(List<Long> encounterIdList, HttpServletResponse response) {
|
public R<?> makeCsvFile(List<Long> encounterIdList, HttpServletResponse response) {
|
||||||
|
|
||||||
// // 格式 (7,2):最大整数位 7,固定小数位 2
|
// // æ ¼å¼ (7,2)ï¼šæœ€å¤§æ•´æ•°ä½ 7ï¼Œå›ºå®šå°æ•°ä½ 2
|
||||||
// DecimalFormat df7_2 = new DecimalFormat();
|
// DecimalFormat df7_2 = new DecimalFormat();
|
||||||
// df7_2.setMaximumIntegerDigits(7); // 最大整数位 7
|
// df7_2.setMaximumIntegerDigits(7); // æœ€å¤§æ•´æ•°ä½ 7
|
||||||
// df7_2.setMinimumFractionDigits(2); // 最小小数位 2(不足补 0)
|
// df7_2.setMinimumFractionDigits(2); // 最å°å°æ•°ä½ 2(ä¸è¶³è¡¥ 0)
|
||||||
// df7_2.setMaximumFractionDigits(2); // 最大小数位 2(超出四舍五入)
|
// df7_2.setMaximumFractionDigits(2); // æœ€å¤§å°æ•°ä½ 2(超出四èˆäº”入)
|
||||||
// 格式 (4,1):最大整数位 4,固定小数位 1
|
// æ ¼å¼ (4,1)ï¼šæœ€å¤§æ•´æ•°ä½ 4ï¼Œå›ºå®šå°æ•°ä½ 1
|
||||||
DecimalFormat df4_1 = new DecimalFormat();
|
DecimalFormat df4_1 = new DecimalFormat();
|
||||||
df4_1.setMaximumIntegerDigits(4);
|
df4_1.setMaximumIntegerDigits(4);
|
||||||
df4_1.setMinimumFractionDigits(1);
|
df4_1.setMinimumFractionDigits(1);
|
||||||
df4_1.setMaximumFractionDigits(1);
|
df4_1.setMaximumFractionDigits(1);
|
||||||
// 格式 (8,2):最大整数位 8,固定小数位 2
|
// æ ¼å¼ (8,2)ï¼šæœ€å¤§æ•´æ•°ä½ 8ï¼Œå›ºå®šå°æ•°ä½ 2
|
||||||
DecimalFormat df8_2 = new DecimalFormat();
|
DecimalFormat df8_2 = new DecimalFormat();
|
||||||
df8_2.setMaximumIntegerDigits(8);
|
df8_2.setMaximumIntegerDigits(8);
|
||||||
df8_2.setMinimumFractionDigits(2);
|
df8_2.setMinimumFractionDigits(2);
|
||||||
df8_2.setMaximumFractionDigits(2);
|
df8_2.setMaximumFractionDigits(2);
|
||||||
// 格式 (11,2):最大整数位 11,固定小数位 2
|
// æ ¼å¼ (11,2)ï¼šæœ€å¤§æ•´æ•°ä½ 11ï¼Œå›ºå®šå°æ•°ä½ 2
|
||||||
DecimalFormat df11_2 = new DecimalFormat();
|
DecimalFormat df11_2 = new DecimalFormat();
|
||||||
df11_2.setMaximumIntegerDigits(11);
|
df11_2.setMaximumIntegerDigits(11);
|
||||||
df11_2.setMinimumFractionDigits(2);
|
df11_2.setMinimumFractionDigits(2);
|
||||||
df11_2.setMaximumFractionDigits(2);
|
df11_2.setMaximumFractionDigits(2);
|
||||||
// 格式 (10,2):最大整数位 10,固定小数位 2
|
// æ ¼å¼ (10,2)ï¼šæœ€å¤§æ•´æ•°ä½ 10ï¼Œå›ºå®šå°æ•°ä½ 2
|
||||||
DecimalFormat df10_2 = new DecimalFormat();
|
DecimalFormat df10_2 = new DecimalFormat();
|
||||||
df10_2.setMaximumIntegerDigits(10);
|
df10_2.setMaximumIntegerDigits(10);
|
||||||
df10_2.setMinimumFractionDigits(2);
|
df10_2.setMinimumFractionDigits(2);
|
||||||
df10_2.setMaximumFractionDigits(2);
|
df10_2.setMaximumFractionDigits(2);
|
||||||
|
|
||||||
// // 获取当前登陆用户信息
|
// // 获å–当å‰ç™»é™†ç”¨æˆ·ä¿¡æ¯
|
||||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
// Practitioner user = practitionerService.getPractitionerByUserId(loginUser.getUserId());
|
// Practitioner user = practitionerService.getPractitionerByUserId(loginUser.getUserId());
|
||||||
|
|
||||||
// 获取系统信息
|
// 获å–系统信æ¯
|
||||||
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
|
|
||||||
|
|
||||||
// 住院病案csv参数
|
|
||||||
|
// ä½é™¢ç—…案csv傿•°
|
||||||
InpatientMedicalRecordHomePageCollectionDto medicalRecordHomePage =
|
InpatientMedicalRecordHomePageCollectionDto medicalRecordHomePage =
|
||||||
new InpatientMedicalRecordHomePageCollectionDto();
|
new InpatientMedicalRecordHomePageCollectionDto();
|
||||||
List<InpatientMedicalRecordHomePageCollectionDto> medicalRecordHomePageList = new ArrayList<>();
|
List<InpatientMedicalRecordHomePageCollectionDto> medicalRecordHomePageList = new ArrayList<>();
|
||||||
// 搜索csv所需数据 todo sql没写完 csv出力需要确认好不好使
|
// æœç´¢csvæ‰€éœ€æ•°æ® todo sql没写完 csv出力需è¦ç¡®è®¤å¥½ä¸å¥½ä½¿
|
||||||
List<InpatientMedicalRecordHomePageMakeDto> medicalRecordHomePageMakeList =
|
List<InpatientMedicalRecordHomePageMakeDto> medicalRecordHomePageMakeList =
|
||||||
inpatientMedicalRecordHomePageCollectionMapper.getInfo(encounterIdList);
|
inpatientMedicalRecordHomePageCollectionMapper.getInfo(encounterIdList);
|
||||||
|
|
||||||
for (InpatientMedicalRecordHomePageMakeDto item : medicalRecordHomePageMakeList) {
|
for (InpatientMedicalRecordHomePageMakeDto item : medicalRecordHomePageMakeList) {
|
||||||
// 组织机构代码 字符 30 必填
|
// 组织机构代ç å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setA01(optionJson.getString(CommonConstants.Option.FIXMEDINS_CODE));
|
medicalRecordHomePage.setA01(loginUser.getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE));
|
||||||
// 医疗机构名称 A02 字符 80 必填
|
// 医疗机构åç§° A02 å—符 80 å¿…å¡«
|
||||||
medicalRecordHomePage.setA02(optionJson.getString(CommonConstants.Option.FIXMEDINS_NAME));
|
medicalRecordHomePage.setA02(loginUser.getOptionJsonValue(CommonConstants.Option.FIXMEDINS_NAME));
|
||||||
// 病案号 A48 字符 50 必填
|
// ç—…æ¡ˆå· A48 å—符 50 å¿…å¡«
|
||||||
medicalRecordHomePage.setA48(item.getA48());
|
medicalRecordHomePage.setA48(item.getA48());
|
||||||
// 住院次数 A49 数字 4 必填
|
// ä½é™¢æ¬¡æ•° A49 æ•°å— 4 å¿…å¡«
|
||||||
medicalRecordHomePage.setA49(item.getA49() == null ? 0 : item.getA49());
|
medicalRecordHomePage.setA49(item.getA49() == null ? 0 : item.getA49());
|
||||||
// 入院时间 B12 日期时间 必填
|
// 入院时间 B12 日期时间 必填
|
||||||
medicalRecordHomePage.setB12(item.getB12());
|
medicalRecordHomePage.setB12(item.getB12());
|
||||||
// 出院时间 B15 日期时间 必填
|
// 出院时间 B15 日期时间 必填
|
||||||
medicalRecordHomePage.setB15(item.getB15());
|
medicalRecordHomePage.setB15(item.getB15());
|
||||||
// 医疗付费方式 A46C 字符 3 必填
|
// åŒ»ç–—ä»˜è´¹æ–¹å¼ A46C å—符 3 å¿…å¡«
|
||||||
medicalRecordHomePage.setA46C(item.getA46C());
|
medicalRecordHomePage.setA46C(item.getA46C());
|
||||||
// 姓名 A11 字符 40 必填
|
// å§“å A11 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setA11(item.getA11());
|
medicalRecordHomePage.setA11(item.getA11());
|
||||||
// 性别 A12C 数字 1 必填 未查询到时:9 - 未说明的性别
|
// 性别 A12C æ•°å— 1 å¿…å¡« 未查询到时:9 - 未说明的性别
|
||||||
medicalRecordHomePage.setA12C(item.getA12C() == null ? 9 : item.getA12C());
|
medicalRecordHomePage.setA12C(item.getA12C() == null ? 9 : item.getA12C());
|
||||||
// 出生日期 A13 日期 10 必填
|
// 出生日期 A13 日期 10 必填
|
||||||
medicalRecordHomePage.setA13(item.getA13());
|
medicalRecordHomePage.setA13(item.getA13());
|
||||||
// 年龄(岁) A14 数字 3 必填
|
// 年龄(å²ï¼‰ A14 æ•°å— 3 å¿…å¡«
|
||||||
medicalRecordHomePage.setA14(AgeCalculatorUtil.calculateAge(medicalRecordHomePage.getA13()));
|
medicalRecordHomePage.setA14(AgeCalculatorUtil.calculateAge(medicalRecordHomePage.getA13()));
|
||||||
// 国籍 A15C 字符 40 必填
|
// å›½ç± A15C å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setA15C(item.getA15C());
|
medicalRecordHomePage.setA15C(item.getA15C());
|
||||||
// 婚姻 A21C 字符 1 必填
|
// 婚姻 A21C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setA21C(item.getA21C());
|
medicalRecordHomePage.setA21C(item.getA21C());
|
||||||
// 职业 A38C 字符 2 必填
|
// èŒä¸š A38C å—符 2 å¿…å¡«
|
||||||
medicalRecordHomePage.setA38C(item.getA38C());
|
medicalRecordHomePage.setA38C(item.getA38C());
|
||||||
// 民族 A19C 字符 2 必填
|
// æ°‘æ— A19C å—符 2 å¿…å¡«
|
||||||
medicalRecordHomePage.setA19C(item.getA19C());
|
medicalRecordHomePage.setA19C(item.getA19C());
|
||||||
// 证件类别 A20N 字符 1 必填 1:居民身份证 todo 是否
|
// è¯ä»¶ç±»åˆ« A20N å—符 1 å¿…å¡« 1ï¼šå±…æ°‘èº«ä»½è¯ todo 是å¦
|
||||||
medicalRecordHomePage.setA20N("1");
|
medicalRecordHomePage.setA20N("1");
|
||||||
// 证件号码 A20 字符 18 必填
|
// è¯ä»¶å·ç A20 å—符 18 å¿…å¡«
|
||||||
medicalRecordHomePage.setA20(item.getA20());
|
medicalRecordHomePage.setA20(item.getA20());
|
||||||
// 出生地址 A22 字符 200 必填
|
// å‡ºç”Ÿåœ°å€ A22 å—符 200 å¿…å¡«
|
||||||
medicalRecordHomePage.setA22(item.getA22()== null ? CommonConstants.Common.DASH:item.getA22());
|
medicalRecordHomePage.setA22(item.getA22()== null ? CommonConstants.Common.DASH:item.getA22());
|
||||||
// 籍贯省(自治区、直辖市) A23C 字符 50 必填
|
// ç±è´¯çœï¼ˆè‡ªæ²»åŒºã€ç›´è¾–市) A23C å—符 50 å¿…å¡«
|
||||||
medicalRecordHomePage.setA23C(item.getA23C());
|
medicalRecordHomePage.setA23C(item.getA23C());
|
||||||
// 户口地址 A24 字符 200 必填
|
// 户å£åœ°å€ A24 å—符 200 å¿…å¡«
|
||||||
medicalRecordHomePage.setA24(item.getA24()== null ? CommonConstants.Common.DASH:item.getA24());
|
medicalRecordHomePage.setA24(item.getA24()== null ? CommonConstants.Common.DASH:item.getA24());
|
||||||
// 户口地址邮政编码 A25C 字符 6 必填
|
// 户å£åœ°å€é‚®æ”¿ç¼–ç A25C å—符 6 å¿…å¡«
|
||||||
medicalRecordHomePage.setA25C(item.getA25C());
|
medicalRecordHomePage.setA25C(item.getA25C());
|
||||||
// 现住址 A26 字符 200 必填
|
// 现ä½å€ A26 å—符 200 å¿…å¡«
|
||||||
medicalRecordHomePage.setA26(item.getA26()== null ? CommonConstants.Common.DASH:item.getA26());
|
medicalRecordHomePage.setA26(item.getA26()== null ? CommonConstants.Common.DASH:item.getA26());
|
||||||
// 现住址电话 A27 字符 40 必填
|
// 现ä½å€ç”µè¯ A27 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setA27(item.getA27()== null ? CommonConstants.Common.DASH:item.getA27());
|
medicalRecordHomePage.setA27(item.getA27()== null ? CommonConstants.Common.DASH:item.getA27());
|
||||||
// 现住址邮政编码 A28C 字符 6 必填
|
// 现ä½å€é‚®æ”¿ç¼–ç A28C å—符 6 å¿…å¡«
|
||||||
medicalRecordHomePage.setA28C(item.getA28C());
|
medicalRecordHomePage.setA28C(item.getA28C());
|
||||||
// 工作单位及地址 A29 字符 200 必填
|
// 工作å•ä½åŠåœ°å€ A29 å—符 200 å¿…å¡«
|
||||||
medicalRecordHomePage.setA29(item.getA29()== null ? CommonConstants.Common.DASH:item.getA29());
|
medicalRecordHomePage.setA29(item.getA29()== null ? CommonConstants.Common.DASH:item.getA29());
|
||||||
// 工作单位电话 A30 字符 20 必填
|
// 工作å•ä½ç”µè¯ A30 å—符 20 å¿…å¡«
|
||||||
medicalRecordHomePage.setA30(item.getA30()== null ? CommonConstants.Common.DASH:item.getA30());
|
medicalRecordHomePage.setA30(item.getA30()== null ? CommonConstants.Common.DASH:item.getA30());
|
||||||
// 工作单位邮政编码 A31C 字符 6 必填
|
// 工作å•ä½é‚®æ”¿ç¼–ç A31C å—符 6 å¿…å¡«
|
||||||
medicalRecordHomePage.setA31C(item.getA31C());
|
medicalRecordHomePage.setA31C(item.getA31C());
|
||||||
// 联系人姓名 A32 字符 40 必填
|
// è”系人姓å A32 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setA32(item.getA32());
|
medicalRecordHomePage.setA32(item.getA32());
|
||||||
// 联系人关系 A33C 字符 1 必填
|
// è”系人关系 A33C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setA33C(item.getA33C());
|
medicalRecordHomePage.setA33C(item.getA33C());
|
||||||
// 联系人地址 A34 字符 200 必填
|
// è”ç³»äººåœ°å€ A34 å—符 200 å¿…å¡«
|
||||||
medicalRecordHomePage.setA34(item.getA34()== null ? CommonConstants.Common.DASH:item.getA34());
|
medicalRecordHomePage.setA34(item.getA34()== null ? CommonConstants.Common.DASH:item.getA34());
|
||||||
// 联系人电话 A35 字符 40 必填
|
// è”ç³»äººç”µè¯ A35 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setA35(item.getA35());
|
medicalRecordHomePage.setA35(item.getA35());
|
||||||
// 是否为日间手术 B38 字符 1 必填
|
// 是å¦ä¸ºæ—¥é—´æ‰‹æœ¯ B38 å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setB38(item.getB38());
|
medicalRecordHomePage.setB38(item.getB38());
|
||||||
// 入院途径 B11C 字符 1 必填
|
// 入院途径 B11C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setB11C(item.getB11C());
|
medicalRecordHomePage.setB11C(item.getB11C());
|
||||||
// 入院科别 B13C 字符 6 必填
|
// 入院科别 B13C å—符 6 å¿…å¡«
|
||||||
medicalRecordHomePage.setB13C(item.getB13C());
|
medicalRecordHomePage.setB13C(item.getB13C());
|
||||||
// 入院病房 B14 字符 30 必填
|
// 入院病房 B14 å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setB14(item.getB14());
|
medicalRecordHomePage.setB14(item.getB14());
|
||||||
// 转科科别 B21C 集合 可以多选 必填
|
// 转科科别 B21C é›†åˆ å¯ä»¥å¤šé€‰ å¿…å¡«
|
||||||
medicalRecordHomePage.setB21C(String.join(CommonConstants.Common.COMMA, item.getB21C()));
|
medicalRecordHomePage.setB21C(String.join(CommonConstants.Common.COMMA, item.getB21C()));
|
||||||
// 出院科别 B16C 字符 6 必填
|
// 出院科别 B16C å—符 6 å¿…å¡«
|
||||||
medicalRecordHomePage.setB16C(item.getB16C());
|
medicalRecordHomePage.setB16C(item.getB16C());
|
||||||
// 出院病房 B17 字符 30 必填
|
// 出院病房 B17 å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setB17(item.getB17());
|
medicalRecordHomePage.setB17(item.getB17());
|
||||||
// 实际住院(天) B20 数字 6 必填
|
// 实际ä½é™¢ï¼ˆå¤©ï¼‰ B20 æ•°å— 6 å¿…å¡«
|
||||||
medicalRecordHomePage.setB20(item.getB20() == null ? 0 : item.getB20());
|
medicalRecordHomePage.setB20(item.getB20() == null ? 0 : item.getB20());
|
||||||
// 门(急)诊诊断编码 C01C 字符 20 必填
|
// 门(急)诊诊æ–ç¼–ç C01C å—符 20 å¿…å¡«
|
||||||
medicalRecordHomePage.setC01C(item.getC01C());
|
medicalRecordHomePage.setC01C(item.getC01C());
|
||||||
// 门(急)诊诊断名称 C02N 字符 100 必填
|
// 门(急)诊诊æ–åç§° C02N å—符 100 å¿…å¡«
|
||||||
medicalRecordHomePage.setC02N(item.getC02N());
|
medicalRecordHomePage.setC02N(item.getC02N());
|
||||||
// 出院主要诊断编码 C03C 字符 20 必填
|
// 出院主è¦è¯Šæ–ç¼–ç C03C å—符 20 å¿…å¡«
|
||||||
medicalRecordHomePage.setC03C(item.getC03C());
|
medicalRecordHomePage.setC03C(item.getC03C());
|
||||||
// 出院主要诊断名称 C04N 字符 100 必填
|
// 出院主è¦è¯Šæ–åç§° C04N å—符 100 å¿…å¡«
|
||||||
medicalRecordHomePage.setC04N(item.getC04N());
|
medicalRecordHomePage.setC04N(item.getC04N());
|
||||||
// 出院主要诊断入院病情 C05C 字符 1 必填
|
// 出院主è¦è¯Šæ–入院病情 C05C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setC05C(item.getC05C());
|
medicalRecordHomePage.setC05C(item.getC05C());
|
||||||
String c03c = medicalRecordHomePage.getC03C();
|
String c03c = medicalRecordHomePage.getC03C();
|
||||||
if (c03c != null && !c03c.isEmpty()) {
|
if (c03c != null && !c03c.isEmpty()) {
|
||||||
char firstChar = c03c.charAt(0);
|
char firstChar = c03c.charAt(0);
|
||||||
// 主要诊断ICD编码首字母为C或D00-D48时必填。
|
// 主è¦è¯Šæ–ICDç¼–ç 首嗿¯ä¸ºC或D00-D48时必填。
|
||||||
if (firstChar == 'C' || (c03c.length() >= 3 && c03c.matches("D(0[0-9]|[1-3][0-9]|4[0-8]).*"))) {
|
if (firstChar == 'C' || (c03c.length() >= 3 && c03c.matches("D(0[0-9]|[1-3][0-9]|4[0-8]).*"))) {
|
||||||
// 病理诊断编码 C09C 字符 20 条件必填
|
// ç—…ç†è¯Šæ–ç¼–ç C09C å—符 20 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC09C(item.getC09C());
|
medicalRecordHomePage.setC09C(item.getC09C());
|
||||||
// 病理诊断名称 C10N 字符 100 条件必填
|
// ç—…ç†è¯Šæ–åç§° C10N å—符 100 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC10N(item.getC10N());
|
medicalRecordHomePage.setC10N(item.getC10N());
|
||||||
// 病理号 C11 字符 50 条件必填
|
// ç—…ç†å· C11 å—符 50 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC11(item.getC11());
|
medicalRecordHomePage.setC11(item.getC11());
|
||||||
}
|
}
|
||||||
// 主要诊断ICD编码首字母为S或T时必填
|
// 主è¦è¯Šæ–ICDç¼–ç 首嗿¯ä¸ºS或Tæ—¶å¿…å¡«
|
||||||
if (firstChar == 'S' || firstChar == 'T') {
|
if (firstChar == 'S' || firstChar == 'T') {
|
||||||
// 损伤、中毒外部原因编码 C12C 字符 20 条件必填
|
// æŸä¼¤ã€ä¸æ¯’å¤–éƒ¨åŽŸå› ç¼–ç C12C å—符 20 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC12C(item.getC12C());
|
medicalRecordHomePage.setC12C(item.getC12C());
|
||||||
// 损伤、中毒外部原因名称 C13N 字符 100 条件必填
|
// æŸä¼¤ã€ä¸æ¯’å¤–éƒ¨åŽŸå› åç§° C13N å—符 100 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC13N(item.getC13N());
|
medicalRecordHomePage.setC13N(item.getC13N());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 有无药物过敏 C24C 字符 1 必填
|
// æœ‰æ— è¯ç‰©è¿‡æ• C24C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setC24C(item.getC24C());
|
medicalRecordHomePage.setC24C(item.getC24C());
|
||||||
// “有无药物过敏”为“有”时必填;多种药物用英文逗号进行分隔
|
// â€œæœ‰æ— è¯ç‰©è¿‡æ•â€ä¸ºâ€œæœ‰â€æ—¶å¿…填;多ç§è¯ç‰©ç”¨è‹±æ–‡é€—å·è¿›è¡Œåˆ†éš”
|
||||||
if (medicalRecordHomePage.getC24C().equals("2")) {
|
if (medicalRecordHomePage.getC24C().equals("2")) {
|
||||||
// 过敏药物名称 C25 字符 200 条件必填
|
// 过æ•è¯ç‰©åç§° C25 å—符 200 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC25(item.getC25());
|
medicalRecordHomePage.setC25(item.getC25());
|
||||||
}
|
}
|
||||||
// 科主任编码 B22C 字符 30 必填
|
// 科主任编ç B22C å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setB22C(item.getB22C());
|
medicalRecordHomePage.setB22C(item.getB22C());
|
||||||
// 科主任 B22 字符 40 必填
|
// 科主任 B22 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setB22(item.getB22());
|
medicalRecordHomePage.setB22(item.getB22());
|
||||||
// 主(副主)任医师编码 B23C 字符 30 必填
|
// 主(副主)任医师编ç B23C å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setB23C(item.getB23C());
|
medicalRecordHomePage.setB23C(item.getB23C());
|
||||||
// 主(副主)任医师 B23 字符 40 必填
|
// 主(副主)任医师 B23 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setB23(item.getB23());
|
medicalRecordHomePage.setB23(item.getB23());
|
||||||
// 主治医师编码 B24C 字符 30 必填
|
// 主治医师编ç B24C å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setB24C(item.getB24C());
|
medicalRecordHomePage.setB24C(item.getB24C());
|
||||||
// 主治医师 B24 字符 40 必填
|
// 主治医师 B24 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setB24(item.getB24());
|
medicalRecordHomePage.setB24(item.getB24());
|
||||||
// 住院医师编码 B25C 字符 30 必填
|
// ä½é™¢åŒ»å¸ˆç¼–ç B25C å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setB25C(item.getB25C());
|
medicalRecordHomePage.setB25C(item.getB25C());
|
||||||
// 住院医师 B25 字符 40 必填
|
// ä½é™¢åŒ»å¸ˆ B25 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setB25(item.getB25());
|
medicalRecordHomePage.setB25(item.getB25());
|
||||||
// 责任护士编码 B26C 字符 30 必填
|
// 责任护士编ç B26C å—符 30 å¿…å¡«
|
||||||
medicalRecordHomePage.setB26C(item.getB26C());
|
medicalRecordHomePage.setB26C(item.getB26C());
|
||||||
// 责任护士 B26 字符 40 必填
|
// 责任护士 B26 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setB26(item.getB26());
|
medicalRecordHomePage.setB26(item.getB26());
|
||||||
// 编码员 B29 字符 40 必填
|
// ç¼–ç 员 B29 å—符 40 å¿…å¡«
|
||||||
medicalRecordHomePage.setB29(item.getB29());
|
medicalRecordHomePage.setB29(item.getB29());
|
||||||
// ABO血型 C26C 字符 1 必填
|
// ABO血型 C26C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setC26C(item.getC26C());
|
medicalRecordHomePage.setC26C(item.getC26C());
|
||||||
// Rh血型 C27C 字符 1 必填
|
// Rh血型 C27C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setC27C(item.getC27C());
|
medicalRecordHomePage.setC27C(item.getC27C());
|
||||||
// 主要手术操作编码 C14x01C 字符 20 必填
|
// ä¸»è¦æ‰‹æœ¯æ“作编ç C14x01C å—符 20 å¿…å¡«
|
||||||
medicalRecordHomePage.setC14x01C(item.getC14x01C());
|
medicalRecordHomePage.setC14x01C(item.getC14x01C());
|
||||||
// 主要手术操作名称 C15x01N 字符 100 必填
|
// ä¸»è¦æ‰‹æœ¯æ“作åç§° C15x01N å—符 100 å¿…å¡«
|
||||||
medicalRecordHomePage.setC15x01N(item.getC15x01N());
|
medicalRecordHomePage.setC15x01N(item.getC15x01N());
|
||||||
// 主要手术操作日期 C16x01 日期时间 必填
|
// ä¸»è¦æ‰‹æœ¯æ“作日期 C16x01 日期时间 å¿…å¡«
|
||||||
medicalRecordHomePage.setC16x01(item.getC16x01());
|
medicalRecordHomePage.setC16x01(item.getC16x01());
|
||||||
// 手术操作编码属性为手术或介入治疗代码时必填 todo 手术或介入治疗代码
|
// 手术æ“作编ç å±žæ€§ä¸ºæ‰‹æœ¯æˆ–ä»‹å…¥æ²»ç–—ä»£ç æ—¶å¿…å¡« todo 手术或介入治疗代ç
|
||||||
if (medicalRecordHomePage.getC14x01C().equals("") || medicalRecordHomePage.getC14x01C().equals("")) {
|
if (medicalRecordHomePage.getC14x01C().equals("") || medicalRecordHomePage.getC14x01C().equals("")) {
|
||||||
// 主要手术操作级别 C17x01 字符 1 条件必填
|
// ä¸»è¦æ‰‹æœ¯æ“作级别 C17x01 å—符 1 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC17x01(item.getC17x01());
|
medicalRecordHomePage.setC17x01(item.getC17x01());
|
||||||
// 主要手术操作术者 C18x01 字符 40 条件必填
|
// ä¸»è¦æ‰‹æœ¯æ“作术者 C18x01 å—符 40 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC18x01(item.getC18x01());
|
medicalRecordHomePage.setC18x01(item.getC18x01());
|
||||||
// 主要手术操作Ⅰ助 C19x01 字符 40 条件必填
|
// ä¸»è¦æ‰‹æœ¯æ“ä½œâ… åŠ© C19x01 å—符 40 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC19x01(item.getC19x01());
|
medicalRecordHomePage.setC19x01(item.getC19x01());
|
||||||
// 主要手术操作Ⅱ助 C20x01 字符 40 条件必填
|
// ä¸»è¦æ‰‹æœ¯æ“作Ⅱ助 C20x01 å—符 40 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC20x01(item.getC20x01());
|
medicalRecordHomePage.setC20x01(item.getC20x01());
|
||||||
// 手术编码属性为手术时必填 todo 手术代码
|
// 手术编ç 属性为手术时必填 todo 手术代ç
|
||||||
if (medicalRecordHomePage.getC14x01C().equals("")) {
|
if (medicalRecordHomePage.getC14x01C().equals("")) {
|
||||||
// 主要手术操作切口愈合等级 C21x01C 字符 2 条件必填
|
// ä¸»è¦æ‰‹æœ¯æ“ä½œåˆ‡å£æ„ˆåˆç‰çº§ C21x01C å—符 2 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC21x01C(item.getC21x01C());
|
medicalRecordHomePage.setC21x01C(item.getC21x01C());
|
||||||
// 主要手术操作麻醉方式 C22x01C 字符 6 条件必填
|
// ä¸»è¦æ‰‹æœ¯æ“ä½œéº»é†‰æ–¹å¼ C22x01C å—符 6 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC22x01C(item.getC22x01C());
|
medicalRecordHomePage.setC22x01C(item.getC22x01C());
|
||||||
// 主要手术操作麻醉医师 C23x01 字符 40 条件必填
|
// ä¸»è¦æ‰‹æœ¯æ“作麻醉医师 C23x01 å—符 40 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setC23x01(item.getC23x01());
|
medicalRecordHomePage.setC23x01(item.getC23x01());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 16.血费 D26 数字 (10,2)
|
// 16.血费 D26 æ•°å— (10,2)
|
||||||
medicalRecordHomePage.setD26(item.getD26() == null ? BigDecimal.ZERO : item.getD26());
|
medicalRecordHomePage.setD26(item.getD26() == null ? BigDecimal.ZERO : item.getD26());
|
||||||
// 血费>0,则必填,没有可以填0或英文横杠”-”
|
// 血费>0,则必填,没有å¯ä»¥å¡«0或英文横æ â€-â€
|
||||||
if (medicalRecordHomePage.getD26().compareTo(BigDecimal.ZERO) > 0) {
|
if (medicalRecordHomePage.getD26().compareTo(BigDecimal.ZERO) > 0) {
|
||||||
// 输血反应 F21 数字 1 条件必填
|
// 输血å应 F21 æ•°å— 1 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF21(item.getF21() == null ? 0 : item.getF21());
|
medicalRecordHomePage.setF21(item.getF21() == null ? 0 : item.getF21());
|
||||||
// 红细胞 F22 数字 (4,1) 条件必填
|
// 红细胞 F22 æ•°å— (4,1) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF22(item.getF22() == null ? BigDecimal.ZERO : item.getF22());
|
medicalRecordHomePage.setF22(item.getF22() == null ? BigDecimal.ZERO : item.getF22());
|
||||||
// 血小板 F23 数字 (4,1) 条件必填
|
// è¡€å°æ¿ F23 æ•°å— (4,1) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF23(item.getF23() == null ? BigDecimal.ZERO : item.getF23());
|
medicalRecordHomePage.setF23(item.getF23() == null ? BigDecimal.ZERO : item.getF23());
|
||||||
// 血浆 F24 数字 (8,2) 条件必填
|
// 血浆 F24 æ•°å— (8,2) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF24(item.getF24() == null ? BigDecimal.ZERO : item.getF24());
|
medicalRecordHomePage.setF24(item.getF24() == null ? BigDecimal.ZERO : item.getF24());
|
||||||
// 全血 F25 数字 (8,2) 条件必填
|
// 全血 F25 æ•°å— (8,2) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF25(item.getF25() == null ? BigDecimal.ZERO : item.getF25());
|
medicalRecordHomePage.setF25(item.getF25() == null ? BigDecimal.ZERO : item.getF25());
|
||||||
// 自体血回输 F26 数字 (4,1) 条件必填
|
// 自体血回输 F26 æ•°å— (4,1) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF26(item.getF26() == null ? BigDecimal.ZERO : item.getF26());
|
medicalRecordHomePage.setF26(item.getF26() == null ? BigDecimal.ZERO : item.getF26());
|
||||||
} else {
|
} else {
|
||||||
// 输血反应 F21 数字 1 条件必填
|
// 输血å应 F21 æ•°å— 1 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF21(0);
|
medicalRecordHomePage.setF21(0);
|
||||||
// 红细胞 F22 数字 (4,1) 条件必填
|
// 红细胞 F22 æ•°å— (4,1) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF22(BigDecimal.ZERO);
|
medicalRecordHomePage.setF22(BigDecimal.ZERO);
|
||||||
// 血小板 F23 数字 (4,1) 条件必填
|
// è¡€å°æ¿ F23 æ•°å— (4,1) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF23(BigDecimal.ZERO);
|
medicalRecordHomePage.setF23(BigDecimal.ZERO);
|
||||||
// 血浆 F24 数字 (8,2) 条件必填
|
// 血浆 F24 æ•°å— (8,2) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF24(BigDecimal.ZERO);
|
medicalRecordHomePage.setF24(BigDecimal.ZERO);
|
||||||
// 全血 F25 数字 (8,2) 条件必填
|
// 全血 F25 æ•°å— (8,2) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF25(BigDecimal.ZERO);
|
medicalRecordHomePage.setF25(BigDecimal.ZERO);
|
||||||
// 自体血回输 F26 数字 (4,1) 条件必填
|
// 自体血回输 F26 æ•°å— (4,1) æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setF26(BigDecimal.ZERO);
|
medicalRecordHomePage.setF26(BigDecimal.ZERO);
|
||||||
}
|
}
|
||||||
if (medicalRecordHomePage.getA14().equals(0)) {
|
if (medicalRecordHomePage.getA14().equals(0)) {
|
||||||
// 年龄不足1周岁的年龄(天) A16 数字 3 条件必填②
|
// 年龄ä¸è¶³1周å²çš„年龄(天) A16 æ•°å— 3 æ¡ä»¶å¿…å¡«â‘¡
|
||||||
medicalRecordHomePage.setA16(item.getA16() == null ? 0 : item.getA16());
|
medicalRecordHomePage.setA16(item.getA16() == null ? 0 : item.getA16());
|
||||||
}
|
}
|
||||||
// 产妇和新生儿病案填写 todo 产妇怎么判断
|
// 产妇和新生儿病案填写 todo 产妇怎么判æ–
|
||||||
// if(){
|
// if(){
|
||||||
// 新生儿出生体重(克) A18x01 数字 6 条件必填②
|
// 新生儿出生体é‡ï¼ˆå…‹ï¼‰ A18x01 æ•°å— 6 æ¡ä»¶å¿…å¡«â‘¡
|
||||||
medicalRecordHomePage.setA18x01(item.getA18x01() == null ? 0 : item.getA18x01());
|
medicalRecordHomePage.setA18x01(item.getA18x01() == null ? 0 : item.getA18x01());
|
||||||
// }
|
// }
|
||||||
// “新生儿入院体重”与“年龄不足1周岁的年龄(天)”互为逻辑校验项,小于等于28天的新生儿必填。
|
// “新生儿入院体é‡â€ä¸Žâ€œå¹´é¾„ä¸è¶³1周å²çš„年龄(天)â€äº’ä¸ºé€»è¾‘æ ¡éªŒé¡¹ï¼Œå°äºŽç‰äºŽ28天的新生儿必填。
|
||||||
if (medicalRecordHomePage.getA16() != null && medicalRecordHomePage.getA16() <= 28) {
|
if (medicalRecordHomePage.getA16() != null && medicalRecordHomePage.getA16() <= 28) {
|
||||||
// 新生儿入院体重(克) A17 数字 6 条件必填②
|
// 新生儿入院体é‡ï¼ˆå…‹ï¼‰ A17 æ•°å— 6 æ¡ä»¶å¿…å¡«â‘¡
|
||||||
medicalRecordHomePage.setA17(item.getA17() == null ? 0 : item.getA17());
|
medicalRecordHomePage.setA17(item.getA17() == null ? 0 : item.getA17());
|
||||||
}
|
}
|
||||||
// 颅脑损伤患者入院前昏迷时间(天) C28 数字 5 必填
|
// 颅脑æŸä¼¤æ‚£è€…入院剿˜è¿·æ—¶é—´ï¼ˆå¤©ï¼‰ C28 æ•°å— 5 å¿…å¡«
|
||||||
medicalRecordHomePage.setC28(item.getC28() == null ? 0 : item.getC28());
|
medicalRecordHomePage.setC28(item.getC28() == null ? 0 : item.getC28());
|
||||||
// 颅脑损伤患者入院前昏迷时间(小时) C29 数字 2 必填
|
// 颅脑æŸä¼¤æ‚£è€…入院剿˜è¿·æ—¶é—´ï¼ˆå°æ—¶ï¼‰ C29 æ•°å— 2 å¿…å¡«
|
||||||
medicalRecordHomePage.setC29(item.getC29() == null ? 0 : item.getC29());
|
medicalRecordHomePage.setC29(item.getC29() == null ? 0 : item.getC29());
|
||||||
// 颅脑损伤患者入院前昏迷时间(分钟) C30 数字 2 必填
|
// 颅脑æŸä¼¤æ‚£è€…入院剿˜è¿·æ—¶é—´ï¼ˆåˆ†é’Ÿï¼‰ C30 æ•°å— 2 å¿…å¡«
|
||||||
medicalRecordHomePage.setC30(item.getC30() == null ? 0 : item.getC30());
|
medicalRecordHomePage.setC30(item.getC30() == null ? 0 : item.getC30());
|
||||||
// 颅脑损伤患者入院后昏迷时间(天) C31 数字 5 必填
|
// 颅脑æŸä¼¤æ‚£è€…å…¥é™¢åŽæ˜è¿·æ—¶é—´ï¼ˆå¤©ï¼‰ C31 æ•°å— 5 å¿…å¡«
|
||||||
medicalRecordHomePage.setC31(item.getC31() == null ? 0 : item.getC31());
|
medicalRecordHomePage.setC31(item.getC31() == null ? 0 : item.getC31());
|
||||||
// 颅脑损伤患者入院后昏迷时间(小时) C32 数字 2 必填
|
// 颅脑æŸä¼¤æ‚£è€…å…¥é™¢åŽæ˜è¿·æ—¶é—´ï¼ˆå°æ—¶ï¼‰ C32 æ•°å— 2 å¿…å¡«
|
||||||
medicalRecordHomePage.setC32(item.getC32() == null ? 0 : item.getC32());
|
medicalRecordHomePage.setC32(item.getC32() == null ? 0 : item.getC32());
|
||||||
// 颅脑损伤患者入院后昏迷时间(分钟) C33 数字 2 必填
|
// 颅脑æŸä¼¤æ‚£è€…å…¥é™¢åŽæ˜è¿·æ—¶é—´ï¼ˆåˆ†é’Ÿï¼‰ C33 æ•°å— 2 å¿…å¡«
|
||||||
medicalRecordHomePage.setC33(item.getC33() == null ? 0 : item.getC33());
|
medicalRecordHomePage.setC33(item.getC33() == null ? 0 : item.getC33());
|
||||||
// 是否有出院31日内再住院计划 B36C 数字 1 必填
|
// æ˜¯å¦æœ‰å‡ºé™¢31日内å†ä½é™¢è®¡åˆ’ B36C æ•°å— 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setB36C(item.getB36C() == null ? 0 : item.getB36C());
|
medicalRecordHomePage.setB36C(item.getB36C() == null ? 0 : item.getB36C());
|
||||||
// 是否有出院31日内再住院计划填“有”时必填。
|
// æ˜¯å¦æœ‰å‡ºé™¢31日内å†ä½é™¢è®¡åˆ’å¡«â€œæœ‰â€æ—¶å¿…填。
|
||||||
if (medicalRecordHomePage.getB36C().equals(2)) {
|
if (medicalRecordHomePage.getB36C().equals(2)) {
|
||||||
// 出院31天再住院计划目的 B37 字符 100 条件必填
|
// 出院31天å†ä½é™¢è®¡åˆ’目的 B37 å—符 100 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setB37(item.getB37());
|
medicalRecordHomePage.setB37(item.getB37());
|
||||||
}
|
}
|
||||||
// 离院方式 B34C 字符 1 必填
|
// ç¦»é™¢æ–¹å¼ B34C å—符 1 å¿…å¡«
|
||||||
medicalRecordHomePage.setB34C(item.getB34C());
|
medicalRecordHomePage.setB34C(item.getB34C());
|
||||||
// 离院方式为医嘱转院或医嘱转社区患者必填
|
// 离院方å¼ä¸ºåŒ»å˜±è½¬é™¢æˆ–医嘱转社区患者必填
|
||||||
if (medicalRecordHomePage.getB34C().equals("2") || medicalRecordHomePage.getB34C().equals("3")) {
|
if (medicalRecordHomePage.getB34C().equals("2") || medicalRecordHomePage.getB34C().equals("3")) {
|
||||||
// 医嘱转院、转社区卫生服务机构/乡镇卫生院名称 B35 字符 100 条件必填
|
// 医嘱转院ã€è½¬ç¤¾åŒºå«ç”ŸæœåŠ¡æœºæž„/乡镇å«ç”Ÿé™¢åç§° B35 å—符 100 æ¡ä»¶å¿…å¡«
|
||||||
medicalRecordHomePage.setB35(item.getB35());
|
medicalRecordHomePage.setB35(item.getB35());
|
||||||
}
|
}
|
||||||
// 住院总费用 D01 数字 (11,2) 必填
|
// ä½é™¢æ€»è´¹ç”¨ D01 æ•°å— (11,2) å¿…å¡«
|
||||||
medicalRecordHomePage.setD01(item.getD01() == null ? BigDecimal.ZERO : item.getD01());
|
medicalRecordHomePage.setD01(item.getD01() == null ? BigDecimal.ZERO : item.getD01());
|
||||||
// 住院总费用其中自付金额 D09 数字 (10,2) 必填
|
// ä½é™¢æ€»è´¹ç”¨å…¶ä¸è‡ªä»˜é‡‘é¢ D09 æ•°å— (10,2) å¿…å¡«
|
||||||
medicalRecordHomePage.setD09(item.getD09() == null ? BigDecimal.ZERO : item.getD09());
|
medicalRecordHomePage.setD09(item.getD09() == null ? BigDecimal.ZERO : item.getD09());
|
||||||
|
|
||||||
medicalRecordHomePageList.add(medicalRecordHomePage);
|
medicalRecordHomePageList.add(medicalRecordHomePage);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// 做成csv文件
|
// åšæˆcsv文件
|
||||||
CsvFillerUtil.makeCsvFile(response, medicalRecordHomePageList);
|
CsvFillerUtil.makeCsvFile(response, medicalRecordHomePageList);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("Exception occurred", e);
|
log.error("Exception occurred", e);
|
||||||
log.error("写入csv时发生错误:" + e.getMessage());
|
log.error("写入csvæ—¶å‘生错误:" + e.getMessage());
|
||||||
return R.fail("写入csv时发生错误:" + e.getMessage());
|
return R.fail("写入csvæ—¶å‘生错误:" + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
*/
|
*/
|
||||||
package com.healthlink.his.web.reportmanage.appservice.impl;
|
package com.healthlink.his.web.reportmanage.appservice.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -38,7 +38,7 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表 impl
|
* 报表 impl
|
||||||
*
|
*
|
||||||
* @author liuhr
|
* @author liuhr
|
||||||
* @date 2025-11-06
|
* @date 2025-11-06
|
||||||
@@ -52,13 +52,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
private IPaymentRecStaticService paymentRecStaticService;
|
private IPaymentRecStaticService paymentRecStaticService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 例子 药剂科报表_常规报表:出库明细表
|
* 例å è¯å‰‚科报表_常规报表:出库明细表
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 出库明细表
|
* @return 出库明细表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getStockOutDetailPage(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
public R<?> getStockOutDetailPage(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||||
@@ -66,24 +66,24 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:患者明细主表
|
* è¯å‰‚科报表:患者明细主表
|
||||||
*
|
*
|
||||||
* @param patientMasterDetailsSearchParam 患者明细主表查询条件
|
* @param patientMasterDetailsSearchParam 患者明细主表查询æ¡ä»¶
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 患者明细主表
|
* @return 患者明细主表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<ReportPatientMasterDetailDto> getPatientMasterDetailPage(
|
public Page<ReportPatientMasterDetailDto> getPatientMasterDetailPage(
|
||||||
ReportPatientMasterDetailsSearchParam patientMasterDetailsSearchParam, Integer pageNo, Integer pageSize,
|
ReportPatientMasterDetailsSearchParam patientMasterDetailsSearchParam, Integer pageNo, Integer pageSize,
|
||||||
String searchKey, HttpServletRequest request) {
|
String searchKey, HttpServletRequest request) {
|
||||||
// 构建查询条件
|
// 构建查询æ¡ä»¶
|
||||||
QueryWrapper<ReportPatientMasterDetailsSearchParam> queryWrapper
|
QueryWrapper<ReportPatientMasterDetailsSearchParam> queryWrapper
|
||||||
= HisQueryUtils.buildQueryWrapper(patientMasterDetailsSearchParam, searchKey,
|
= HisQueryUtils.buildQueryWrapper(patientMasterDetailsSearchParam, searchKey,
|
||||||
new HashSet<>(Arrays.asList("encounter_bus_no", "patient_name")), request);
|
new HashSet<>(Arrays.asList("encounter_bus_no", "patient_name")), request);
|
||||||
// 查询挂号明细分页列表
|
// æŸ¥è¯¢æŒ‚å·æ˜Žç»†åˆ†é¡µåˆ—表
|
||||||
Page<ReportPatientMasterDetailDto> patientMasterDetailsPage = reportMapper
|
Page<ReportPatientMasterDetailDto> patientMasterDetailsPage = reportMapper
|
||||||
.selectPatientMasterDetailPage(new Page<>(pageNo, pageSize), queryWrapper, EncounterClass.IMP.getValue());
|
.selectPatientMasterDetailPage(new Page<>(pageNo, pageSize), queryWrapper, EncounterClass.IMP.getValue());
|
||||||
|
|
||||||
@@ -91,13 +91,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:线下采购占比
|
* è¯å‰‚科报表:线下采è´å 比
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 线下采购占比报表
|
* @return 线下采è´å 比报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getOfflinePurchaseRatioPage(Integer pageNo, Integer pageSize, String searchKey,
|
public R<?> getOfflinePurchaseRatioPage(Integer pageNo, Integer pageSize, String searchKey,
|
||||||
@@ -106,13 +106,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:药品使用情况
|
* è¯å‰‚科报表:è¯å“使用情况
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 药品使用情况报表
|
* @return è¯å“使用情况报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getMedicationUsagePage(Integer pageNo, Integer pageSize, String searchKey, LocalDateTime startTime,
|
public R<?> getMedicationUsagePage(Integer pageNo, Integer pageSize, String searchKey, LocalDateTime startTime,
|
||||||
@@ -130,25 +130,25 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:患者明细
|
* è¯å‰‚科报表:患者明细
|
||||||
*
|
*
|
||||||
* @param patientDetailsSearchParam 患者明细查询条件
|
* @param patientDetailsSearchParam 患者明细查询æ¡ä»¶
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 患者明细报表
|
* @return 患者明细报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<ReportPatientDetailsDto> getPatientDetailsPage(
|
public Page<ReportPatientDetailsDto> getPatientDetailsPage(
|
||||||
ReportPatientDetailsSearchParam patientDetailsSearchParam, Integer pageNo, Integer pageSize, String searchKey,
|
ReportPatientDetailsSearchParam patientDetailsSearchParam, Integer pageNo, Integer pageSize, String searchKey,
|
||||||
HttpServletRequest request) {
|
HttpServletRequest request) {
|
||||||
|
|
||||||
// 构建查询条件
|
// 构建查询æ¡ä»¶
|
||||||
QueryWrapper<ReportPatientDetailsSearchParam> queryWrapper
|
QueryWrapper<ReportPatientDetailsSearchParam> queryWrapper
|
||||||
= HisQueryUtils.buildQueryWrapper(patientDetailsSearchParam, searchKey,
|
= HisQueryUtils.buildQueryWrapper(patientDetailsSearchParam, searchKey,
|
||||||
new HashSet<>(Arrays.asList("encounter_bus_no", "med_name", "manufacturer_text")), request);
|
new HashSet<>(Arrays.asList("encounter_bus_no", "med_name", "manufacturer_text")), request);
|
||||||
// 查询挂号明细分页列表
|
// æŸ¥è¯¢æŒ‚å·æ˜Žç»†åˆ†é¡µåˆ—表
|
||||||
Page<ReportPatientDetailsDto> patientDetailsPage = reportMapper.selectPatientDetailsPage(
|
Page<ReportPatientDetailsDto> patientDetailsPage = reportMapper.selectPatientDetailsPage(
|
||||||
new Page<>(pageNo, pageSize), queryWrapper, CommonConstants.TableName.MED_MEDICATION_REQUEST);
|
new Page<>(pageNo, pageSize), queryWrapper, CommonConstants.TableName.MED_MEDICATION_REQUEST);
|
||||||
|
|
||||||
@@ -156,13 +156,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表_常规报表:药品费用增长率
|
* è¯å‰‚科报表_常规报表:è¯å“费用增长率
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 药品费用增长率
|
* @return è¯å“费用增长率
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getDrugExpensesGrowthRate(Integer pageNo, Integer pageSize, String searchKey,
|
public R<?> getDrugExpensesGrowthRate(Integer pageNo, Integer pageSize, String searchKey,
|
||||||
@@ -171,13 +171,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表_结余留用:30天回款率
|
* è¯å‰‚科报表_结余留用:30天回款率
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 30天回款率
|
* @return 30天回款率
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getThirtyDayCollectionRate(Integer pageNo, Integer pageSize, String searchKey,
|
public R<?> getThirtyDayCollectionRate(Integer pageNo, Integer pageSize, String searchKey,
|
||||||
@@ -186,48 +186,48 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取医疗机构代码、组织机构名称
|
* 获å–医疗机构代ç ã€ç»„织机构åç§°
|
||||||
*
|
*
|
||||||
* @return 医疗机构代码[0]、组织机构名称[1]
|
* @return 医疗机构代ç [0]ã€ç»„织机构åç§°[1]
|
||||||
*/
|
*/
|
||||||
private String[] getOrgInfo() {
|
private String[] getOrgInfo() {
|
||||||
// 获取系统信息
|
// 获å–系统信æ¯
|
||||||
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
|
var loginUser = SecurityUtils.getLoginUser();
|
||||||
// 医疗机构代码
|
// 医疗机构代ç
|
||||||
String fixmedinsCode = optionJson.getString(CommonConstants.Option.FIXMEDINS_CODE);
|
String fixmedinsCode = loginUser.getOptionJsonValue(CommonConstants.Option.FIXMEDINS_CODE);
|
||||||
// 组织机构名称
|
// 组织机构åç§°
|
||||||
String fixmedinsName = optionJson.getString(CommonConstants.Option.FIXMEDINS_NAME);
|
String fixmedinsName = loginUser.getOptionJsonValue(CommonConstants.Option.FIXMEDINS_NAME);
|
||||||
return new String[]{fixmedinsCode, fixmedinsName};
|
return new String[]{fixmedinsCode, fixmedinsName};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:基本情况
|
* è¯å‰‚科报表:基本情况
|
||||||
*
|
*
|
||||||
* @param param 查询参数
|
* @param param æŸ¥è¯¢å‚æ•°
|
||||||
* @return 基本情况报表
|
* @return 基本情况报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getBasicInformationDetails(ReportDetailsSearchParam param) {
|
public R<?> getBasicInformationDetails(ReportDetailsSearchParam param) {
|
||||||
if (param.getItemTypeCode() != null && param.getOccurrenceTime() != null) {
|
if (param.getItemTypeCode() != null && param.getOccurrenceTime() != null) {
|
||||||
// 获取时间
|
// èŽ·å–æ—¶é—´
|
||||||
LocalDate date = LocalDate.of(Integer.parseInt(param.getOccurrenceTime()), 1, 1);
|
LocalDate date = LocalDate.of(Integer.parseInt(param.getOccurrenceTime()), 1, 1);
|
||||||
LambdaQueryWrapper<PaymentRecStatic> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PaymentRecStatic> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.in(PaymentRecStatic::getTypeCode, param.getItemTypeCode());
|
wrapper.in(PaymentRecStatic::getTypeCode, param.getItemTypeCode());
|
||||||
wrapper.ge(PaymentRecStatic::getCreateTime, date).lt(PaymentRecStatic::getCreateTime, date.plusYears(1));
|
wrapper.ge(PaymentRecStatic::getCreateTime, date).lt(PaymentRecStatic::getCreateTime, date.plusYears(1));
|
||||||
// 查询
|
// 查询
|
||||||
List<PaymentRecStatic> paymentRecStatics = paymentRecStaticService.list(wrapper);
|
List<PaymentRecStatic> paymentRecStatics = paymentRecStaticService.list(wrapper);
|
||||||
if (paymentRecStatics.isEmpty()) {
|
if (paymentRecStatics.isEmpty()) {
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
// 年度总收入
|
// 年度总收入
|
||||||
BigDecimal totalAmount = paymentRecStatics.stream().map(PaymentRecStatic::getAmount)
|
BigDecimal totalAmount = paymentRecStatics.stream().map(PaymentRecStatic::getAmount)
|
||||||
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP);
|
.filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP);
|
||||||
ReportBasicInformationDetailsDto dto = new ReportBasicInformationDetailsDto();
|
ReportBasicInformationDetailsDto dto = new ReportBasicInformationDetailsDto();
|
||||||
// 设置医疗机构代码、组织机构名称
|
// 设置医疗机构代ç ã€ç»„织机构åç§°
|
||||||
String[] orgInfo = getOrgInfo();
|
String[] orgInfo = getOrgInfo();
|
||||||
dto.setMedicalCode(orgInfo[0]);
|
dto.setMedicalCode(orgInfo[0]);
|
||||||
dto.setOrganizationName(orgInfo[1]);
|
dto.setOrganizationName(orgInfo[1]);
|
||||||
// 设置年度总收入
|
// 设置年度总收入
|
||||||
dto.setYearMedicineTotalRevenue(totalAmount);
|
dto.setYearMedicineTotalRevenue(totalAmount);
|
||||||
return R.ok(List.of(dto));
|
return R.ok(List.of(dto));
|
||||||
}
|
}
|
||||||
@@ -235,26 +235,26 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:药品出库情况
|
* è¯å‰‚科报表:è¯å“出库情况
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @return 药品出库情况报表
|
* @return è¯å“出库情况报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<Page<ReportMedicationInboundDetailsDto>> getMedicationStockOutDetails(ReportDetailsSearchParam param,
|
public R<Page<ReportMedicationInboundDetailsDto>> getMedicationStockOutDetails(ReportDetailsSearchParam param,
|
||||||
Integer pageNo, Integer pageSize) {
|
Integer pageNo, Integer pageSize) {
|
||||||
// 源仓库ID
|
// æºä»“库ID
|
||||||
Long sourceLocationId = param.getSourceLocationId();
|
Long sourceLocationId = param.getSourceLocationId();
|
||||||
// 目的仓库ID
|
// 目的仓库ID
|
||||||
Long purposeLocationId = param.getPurposeLocationId();
|
Long purposeLocationId = param.getPurposeLocationId();
|
||||||
// 开始时间
|
// 开始时间
|
||||||
String occurrenceTimeSTime = param.getOccurrenceTimeSTime();
|
String occurrenceTimeSTime = param.getOccurrenceTimeSTime();
|
||||||
// 结束时间
|
// ç»“æŸæ—¶é—´
|
||||||
String occurrenceTimeETime = param.getOccurrenceTimeETime();
|
String occurrenceTimeETime = param.getOccurrenceTimeETime();
|
||||||
if (sourceLocationId == null || purposeLocationId == null || occurrenceTimeSTime == null
|
if (sourceLocationId == null || purposeLocationId == null || occurrenceTimeSTime == null
|
||||||
|| occurrenceTimeETime == null) {
|
|| occurrenceTimeETime == null) {
|
||||||
return R.fail("请构建完整的查询条件");
|
return R.fail("请构建完整的查询æ¡ä»¶");
|
||||||
}
|
}
|
||||||
Page<ReportMedicationInboundDetailsDto> detailsPage = reportMapper.selectMedicationInboundDetailsPage(
|
Page<ReportMedicationInboundDetailsDto> detailsPage = reportMapper.selectMedicationInboundDetailsPage(
|
||||||
new Page<>(pageNo, pageSize), SupplyType.PRODUCT_TRANSFER.getValue(),
|
new Page<>(pageNo, pageSize), SupplyType.PRODUCT_TRANSFER.getValue(),
|
||||||
@@ -262,7 +262,7 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
LocalDate.parse(occurrenceTimeSTime), LocalDate.parse(occurrenceTimeETime).plusDays(1));
|
LocalDate.parse(occurrenceTimeSTime), LocalDate.parse(occurrenceTimeETime).plusDays(1));
|
||||||
String[] orgInfo = getOrgInfo();
|
String[] orgInfo = getOrgInfo();
|
||||||
List<ReportMedicationInboundDetailsDto> records = detailsPage.getRecords();
|
List<ReportMedicationInboundDetailsDto> records = detailsPage.getRecords();
|
||||||
// 设置医疗机构代码、组织机构名称
|
// 设置医疗机构代ç ã€ç»„织机构åç§°
|
||||||
if (!records.isEmpty()) {
|
if (!records.isEmpty()) {
|
||||||
detailsPage.getRecords().forEach(record -> {
|
detailsPage.getRecords().forEach(record -> {
|
||||||
record.setMedinsCode(orgInfo[0]);
|
record.setMedinsCode(orgInfo[0]);
|
||||||
@@ -273,13 +273,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:产品使用情况
|
* è¯å‰‚科报表:产å“使用情况
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 产品使用情况报表
|
* @return 产å“使用情况报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getProductUsageDetails(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
public R<?> getProductUsageDetails(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||||
@@ -287,13 +287,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:非中选产品采购量占比
|
* è¯å‰‚科报表:éžä¸é€‰äº§å“采è´é‡å 比
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 非中选产品采购量占比报表
|
* @return éžä¸é€‰äº§å“采è´é‡å 比报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getNonWinQtyRatio(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
public R<?> getNonWinQtyRatio(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||||
@@ -301,13 +301,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药剂科报表:药品入库情况
|
* è¯å‰‚科报表:è¯å“入库情况
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 药品入库情况报表
|
* @return è¯å“入库情况报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getMedicationInboundDetails(Integer pageNo, Integer pageSize, String searchKey,
|
public R<?> getMedicationInboundDetails(Integer pageNo, Integer pageSize, String searchKey,
|
||||||
@@ -316,13 +316,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 红旗:红旗药品销售情况表
|
* 红旗:红旗è¯å“销售情况表
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 在售药品明细报表
|
* @return 在售è¯å“明细报表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getMedicationSaleDetails(Integer pageNo, Integer pageSize, String searchKey,
|
public R<?> getMedicationSaleDetails(Integer pageNo, Integer pageSize, String searchKey,
|
||||||
@@ -331,13 +331,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 农大:疾病统计(健康保健)
|
* 农大:疾病统计(å¥åº·ä¿å¥ï¼‰
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 疾病统计(健康保健)报表
|
* @return 疾病统计(å¥åº·ä¿å¥ï¼‰æŠ¥è¡¨
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getDiseaseDetails(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
public R<?> getDiseaseDetails(Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||||
@@ -345,13 +345,13 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同一报表:门诊医生工作量统计
|
* åŒä¸€æŠ¥è¡¨:门诊医生工作é‡ç»Ÿè®¡
|
||||||
*
|
*
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 门诊医生工作量统计
|
* @return 门诊医生工作é‡ç»Ÿè®¡
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getOutpatientDepartmentMetrics(Integer pageNo, Integer pageSize, String searchKey,
|
public R<?> getOutpatientDepartmentMetrics(Integer pageNo, Integer pageSize, String searchKey,
|
||||||
@@ -360,9 +360,9 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同一报表:医生工作量报表:下拉框
|
* åŒä¸€æŠ¥è¡¨:åŒ»ç”Ÿå·¥ä½œé‡æŠ¥è¡¨ï¼šä¸‹æ‹‰æ¡†
|
||||||
*
|
*
|
||||||
* @return 下拉框信息
|
* @return 下拉框信æ¯
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> physicianWorkloadReportInit() {
|
public R<?> physicianWorkloadReportInit() {
|
||||||
@@ -371,29 +371,29 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同一报表:医生工作量报表
|
* åŒä¸€æŠ¥è¡¨:åŒ»ç”Ÿå·¥ä½œé‡æŠ¥è¡¨
|
||||||
*
|
*
|
||||||
* @param physicianWorkloadReportSearchParam 医生工作量报表查询条件
|
* @param physicianWorkloadReportSearchParam åŒ»ç”Ÿå·¥ä½œé‡æŠ¥è¡¨æŸ¥è¯¢æ¡ä»¶
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当å‰é¡µç
|
||||||
* @param pageSize 查询条数
|
* @param pageSize æŸ¥è¯¢æ¡æ•°
|
||||||
* @param searchKey 模糊查询关键字
|
* @param searchKey 模糊查询关键å—
|
||||||
* @param request 请求数据
|
* @param request 请求数æ®
|
||||||
* @return 医生工作量
|
* @return 医生工作é‡
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> getPhysicianWorkloadPage(ReportPhysicianWorkloadSearchParam physicianWorkloadReportSearchParam,
|
public R<?> getPhysicianWorkloadPage(ReportPhysicianWorkloadSearchParam physicianWorkloadReportSearchParam,
|
||||||
Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
Integer pageNo, Integer pageSize, String searchKey, HttpServletRequest request) {
|
||||||
// 最终返回结果
|
// 最终返回结果
|
||||||
Page<ReportPhysicianWorkloadPageDto> physicianWorkloadReportList;
|
Page<ReportPhysicianWorkloadPageDto> physicianWorkloadReportList;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报表导出
|
* 报表导出
|
||||||
*
|
*
|
||||||
* @param param 查询条件
|
* @param param 查询æ¡ä»¶
|
||||||
* @param response 响应数据
|
* @param response å“应数æ®
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void makeExcelFile(ReportDetailsSearchParam param, HttpServletResponse response, String code) {
|
public void makeExcelFile(ReportDetailsSearchParam param, HttpServletResponse response, String code) {
|
||||||
@@ -406,10 +406,10 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 药品调拨-导出
|
* è¯å“调拨-导出
|
||||||
*
|
*
|
||||||
* @param param 查询条件
|
* @param param 查询æ¡ä»¶
|
||||||
* @param response 响应数据
|
* @param response å“应数æ®
|
||||||
*/
|
*/
|
||||||
private void productTransferExcelOut(ReportDetailsSearchParam param, HttpServletResponse response) {
|
private void productTransferExcelOut(ReportDetailsSearchParam param, HttpServletResponse response) {
|
||||||
R<Page<ReportMedicationInboundDetailsDto>> details = this.getMedicationStockOutDetails(param, 1, 10000);
|
R<Page<ReportMedicationInboundDetailsDto>> details = this.getMedicationStockOutDetails(param, 1, 10000);
|
||||||
@@ -426,10 +426,10 @@ public class ReportAppServiceImpl implements IReportAppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年度药品总收入-导出
|
* 年度è¯å“总收入-导出
|
||||||
*
|
*
|
||||||
* @param param 查询参数
|
* @param param æŸ¥è¯¢å‚æ•°
|
||||||
* @param response 响应数据
|
* @param response å“应数æ®
|
||||||
*/
|
*/
|
||||||
private void reportBasicInformationDetailsExcelOut(ReportDetailsSearchParam param, HttpServletResponse response) {
|
private void reportBasicInformationDetailsExcelOut(ReportDetailsSearchParam param, HttpServletResponse response) {
|
||||||
R<?> details = this.getBasicInformationDetails(param);
|
R<?> details = this.getBasicInformationDetails(param);
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ package com.healthlink.his.web.tencentJH.utils.httpUtil;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.core.common.utils.JsonUtils;
|
||||||
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
import org.apache.hc.client5.http.classic.methods.HttpPost;
|
||||||
import org.apache.hc.client5.http.config.RequestConfig;
|
import org.apache.hc.client5.http.config.RequestConfig;
|
||||||
import org.apache.hc.core5.http.ContentType;
|
import org.apache.hc.core5.http.ContentType;
|
||||||
@@ -68,7 +69,7 @@ public class HttpRequesPost extends HttpReques {
|
|||||||
// 创建参数队列
|
// 创建参数队列
|
||||||
if ("json".equals(requestType.toLowerCase())) {
|
if ("json".equals(requestType.toLowerCase())) {
|
||||||
// 解决中文乱码问题
|
// 解决中文乱码问题
|
||||||
StringEntity entity = new StringEntity(JSON.toJSONString(param), ContentType.APPLICATION_JSON);
|
StringEntity entity = new StringEntity(JsonUtils.toJson(param), ContentType.APPLICATION_JSON);
|
||||||
httpPost.setEntity(entity);
|
httpPost.setEntity(entity);
|
||||||
} else if("xml".equals(requestType.toLowerCase())){
|
} else if("xml".equals(requestType.toLowerCase())){
|
||||||
StringBuffer xml=new StringBuffer();
|
StringBuffer xml=new StringBuffer();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ package com.healthlink.his.web.ybmanage.controller;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.core.common.utils.JsonUtils;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.core.common.annotation.Anonymous;
|
import com.core.common.annotation.Anonymous;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
@@ -172,7 +172,7 @@ public class YbController {
|
|||||||
if (perinfo == null) {
|
if (perinfo == null) {
|
||||||
throw new ServiceException("未连接医保获取患者信息");
|
throw new ServiceException("未连接医保获取患者信息");
|
||||||
}
|
}
|
||||||
Info1101Output info1101Output = JSON.parseObject(perinfo.getResult1101(), Info1101Output.class);
|
Info1101Output info1101Output = JsonUtils.parseObject(perinfo.getResult1101(), Info1101Output.class);
|
||||||
List<Info5301SpecialConditionResult> feedetail = info1101Output.getFeedetail();
|
List<Info5301SpecialConditionResult> feedetail = info1101Output.getFeedetail();
|
||||||
|
|
||||||
Date currentDate = new Date();
|
Date currentDate = new Date();
|
||||||
@@ -251,9 +251,9 @@ public class YbController {
|
|||||||
Financial3201Param financial3201Param = ybDao.getFinancial3201Param(settlement3201WebParam);
|
Financial3201Param financial3201Param = ybDao.getFinancial3201Param(settlement3201WebParam);
|
||||||
Result result = ybHttpUtils.reconcileGeneralLedger(financial3201Param);
|
Result result = ybHttpUtils.reconcileGeneralLedger(financial3201Param);
|
||||||
if (result.getCode().equals(CommonConstant.SC_OK_200)) {
|
if (result.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||||
// log.info(JSON.parseObject(JSON.toJSONString(result.getResult())));
|
// log.info(JsonUtils.parseObject(JsonUtils.toJson(result.getResult())));
|
||||||
Financial3201Output financial3201Output
|
Financial3201Output financial3201Output
|
||||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Financial3201Output.class);
|
= JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Financial3201Output.class);
|
||||||
ybDao.saveReconcileGeneralLedger(financial3201Output, financial3201Param);
|
ybDao.saveReconcileGeneralLedger(financial3201Output, financial3201Param);
|
||||||
if ("0".equals(financial3201Output.getStmtRslt())) {
|
if ("0".equals(financial3201Output.getStmtRslt())) {
|
||||||
return R.ok("OK");
|
return R.ok("OK");
|
||||||
@@ -293,13 +293,13 @@ public class YbController {
|
|||||||
.setFundPaySumamt(financialHand3203WebParam.getFundAppySum().doubleValue())
|
.setFundPaySumamt(financialHand3203WebParam.getFundAppySum().doubleValue())
|
||||||
.setAcctPay(financialHand3203WebParam.getAcctPay().doubleValue())
|
.setAcctPay(financialHand3203WebParam.getAcctPay().doubleValue())
|
||||||
.setFixmedinsSetlCnt(Integer.parseInt(financialHand3203WebParam.getSetlCnt()))
|
.setFixmedinsSetlCnt(Integer.parseInt(financialHand3203WebParam.getSetlCnt()))
|
||||||
.setInsuplcAdmdvs(SecurityUtils.getLoginUser().getOptionJson().getString("admvs"));
|
.setInsuplcAdmdvs(SecurityUtils.getLoginUser().getOptionJsonValue("admvs"));
|
||||||
|
|
||||||
Result result = ybHttpUtils.reconcileGeneralLedger(financial3201Param);
|
Result result = ybHttpUtils.reconcileGeneralLedger(financial3201Param);
|
||||||
if (result.getCode().equals(CommonConstant.SC_OK_200)) {
|
if (result.getCode().equals(CommonConstant.SC_OK_200)) {
|
||||||
// log.info(JSON.parseObject(JSON.toJSONString(result.getResult())));
|
// log.info(JsonUtils.parseObject(JsonUtils.toJson(result.getResult())));
|
||||||
Financial3201Output financial3201Output
|
Financial3201Output financial3201Output
|
||||||
= JSON.parseObject(JSON.toJSONString(result.getResult()), Financial3201Output.class);
|
= JsonUtils.parseObject(JsonUtils.toJson(result.getResult()), Financial3201Output.class);
|
||||||
ybDao.saveReconcileGeneralLedger(financial3201Output, financial3201Param);
|
ybDao.saveReconcileGeneralLedger(financial3201Output, financial3201Param);
|
||||||
if ("0".equals(financial3201Output.getStmtRslt())) {
|
if ("0".equals(financial3201Output.getStmtRslt())) {
|
||||||
return R.ok("OK");
|
return R.ok("OK");
|
||||||
@@ -336,7 +336,7 @@ public class YbController {
|
|||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
List<Financial3202FileParam> financial3202FileParams
|
List<Financial3202FileParam> financial3202FileParams
|
||||||
= ybDao.paymentCompareYbSettle(financial3202WebParam.getSettlementIdList());
|
= ybDao.paymentCompareYbSettle(financial3202WebParam.getSettlementIdList());
|
||||||
// String filePath = SecurityUtils.getLoginUser().getOptionJson().getString("filePath")+new
|
// String filePath = SecurityUtils.getLoginUser().getOptionJsonValue("filePath")+new
|
||||||
// Date().getTime()+".txt";
|
// Date().getTime()+".txt";
|
||||||
// String filePath = "C:\\Users\\bjbUser\\Desktop\\"+new Date().getTime()+".txt";
|
// String filePath = "C:\\Users\\bjbUser\\Desktop\\"+new Date().getTime()+".txt";
|
||||||
// try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) {
|
// try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) {
|
||||||
@@ -407,7 +407,7 @@ public class YbController {
|
|||||||
public R<?> reconcileGeneral(List<String> settlementIdList, String filePath, String fileQuryNo, String setlOptins,
|
public R<?> reconcileGeneral(List<String> settlementIdList, String filePath, String fileQuryNo, String setlOptins,
|
||||||
String clrType) {
|
String clrType) {
|
||||||
// todo:这里需要考虑3302接口的参数是后台合计还是由前台传入,因为这个参数还要和txt文件对应(既需要txt中的数据还需要db表中的一些数据),
|
// todo:这里需要考虑3302接口的参数是后台合计还是由前台传入,因为这个参数还要和txt文件对应(既需要txt中的数据还需要db表中的一些数据),
|
||||||
// String filePath = SecurityUtils.getLoginUser().getOptionJson().getString("filePath")+new
|
// String filePath = SecurityUtils.getLoginUser().getOptionJsonValue("filePath")+new
|
||||||
// Date().getTime()+".txt";
|
// Date().getTime()+".txt";
|
||||||
List<Financial3202FileParam> financial3202FileParamList = new ArrayList<>();
|
List<Financial3202FileParam> financial3202FileParamList = new ArrayList<>();
|
||||||
Resource resource = resourceLoader.getResource(filePath); // 或使用 "file:" 读取绝对路径
|
Resource resource = resourceLoader.getResource(filePath); // 或使用 "file:" 读取绝对路径
|
||||||
@@ -488,7 +488,7 @@ public class YbController {
|
|||||||
Financial3203AParam financial3203AParam = ybDao.getFinancial3203AParam(financial3203AWebParam);
|
Financial3203AParam financial3203AParam = ybDao.getFinancial3203AParam(financial3203AWebParam);
|
||||||
String s = ybHttpUtils.applyFinancialClearing(financial3203AParam);
|
String s = ybHttpUtils.applyFinancialClearing(financial3203AParam);
|
||||||
if (!StringUtils.isEmpty(s)) {
|
if (!StringUtils.isEmpty(s)) {
|
||||||
Result<?> result = JSON.parseObject(s, Result.class);
|
Result<?> result = JsonUtils.parseObject(s, Result.class);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (result.getCode() == 200) {
|
if (result.getCode() == 200) {
|
||||||
ybDao.save3203AFinancialClearingApplycation(financial3203AParam,
|
ybDao.save3203AFinancialClearingApplycation(financial3203AParam,
|
||||||
@@ -522,7 +522,7 @@ public class YbController {
|
|||||||
financialClearing3203AWebParam.getClrType(), financialClearing3203AWebParam.getSetlOptins());
|
financialClearing3203AWebParam.getClrType(), financialClearing3203AWebParam.getSetlOptins());
|
||||||
String s = ybHttpUtils.applyFinancialClearing(financial3203AParam);
|
String s = ybHttpUtils.applyFinancialClearing(financial3203AParam);
|
||||||
if (!StringUtils.isEmpty(s)) {
|
if (!StringUtils.isEmpty(s)) {
|
||||||
Result<?> result = JSON.parseObject(s, Result.class);
|
Result<?> result = JsonUtils.parseObject(s, Result.class);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (result.getCode() == 200) {
|
if (result.getCode() == 200) {
|
||||||
ybDao.save3203AFinancialClearingApplycation(financial3203AParam,
|
ybDao.save3203AFinancialClearingApplycation(financial3203AParam,
|
||||||
@@ -558,7 +558,7 @@ public class YbController {
|
|||||||
String.valueOf(financialHand3203AWebParam.getEnddate()));
|
String.valueOf(financialHand3203AWebParam.getEnddate()));
|
||||||
String s = ybHttpUtils.applyFinancialClearing(financial3203AParam);
|
String s = ybHttpUtils.applyFinancialClearing(financial3203AParam);
|
||||||
if (!StringUtils.isEmpty(s)) {
|
if (!StringUtils.isEmpty(s)) {
|
||||||
Result<?> result = JSON.parseObject(s, Result.class);
|
Result<?> result = JsonUtils.parseObject(s, Result.class);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (result.getCode() == 200) {
|
if (result.getCode() == 200) {
|
||||||
ybDao.save3203AFinancialClearingApplycation(financial3203AParam,
|
ybDao.save3203AFinancialClearingApplycation(financial3203AParam,
|
||||||
@@ -706,7 +706,7 @@ public class YbController {
|
|||||||
// ybDao.getMedical3505Param(id, ListType, SecurityUtils.getLoginUser().getTenantId());
|
// ybDao.getMedical3505Param(id, ListType, SecurityUtils.getLoginUser().getTenantId());
|
||||||
// Result result = ybHttpUtils.merchandise(medical3505Param);
|
// Result result = ybHttpUtils.merchandise(medical3505Param);
|
||||||
// Medical3505Result medical3505Result =
|
// Medical3505Result medical3505Result =
|
||||||
// JSON.parseObject(JSON.toJSONString(result.getMessage()), Medical3505Result.class);
|
// JsonUtils.parseObject(JsonUtils.toJson(result.getMessage()), Medical3505Result.class);
|
||||||
// if ("1".equals(medical3505Result.getRetRslt())) {
|
// if ("1".equals(medical3505Result.getRetRslt())) {
|
||||||
// ybDao.saveInventorySaleRecord(medical3505Param, medical3505Result.getMsgRslt());
|
// ybDao.saveInventorySaleRecord(medical3505Param, medical3505Result.getMsgRslt());
|
||||||
// return R.ok();
|
// return R.ok();
|
||||||
@@ -726,7 +726,7 @@ public class YbController {
|
|||||||
// ybDao.getMedical3506Param(id, ListType, SecurityUtils.getLoginUser().getTenantId());
|
// ybDao.getMedical3506Param(id, ListType, SecurityUtils.getLoginUser().getTenantId());
|
||||||
// Result result = ybHttpUtils.cancelMerchandise(medical3506Param);
|
// Result result = ybHttpUtils.cancelMerchandise(medical3506Param);
|
||||||
// Medical3505Result medical3505Result =
|
// Medical3505Result medical3505Result =
|
||||||
// JSON.parseObject(JSON.toJSONString(result.getMessage()), Medical3505Result.class);
|
// JsonUtils.parseObject(JsonUtils.toJson(result.getMessage()), Medical3505Result.class);
|
||||||
// if ("1".equals(medical3505Result.getRetRslt())) {
|
// if ("1".equals(medical3505Result.getRetRslt())) {
|
||||||
// ybDao.saveInventorySaleReturnRecord(medical3506Param, medical3505Result.getMsgRslt());
|
// ybDao.saveInventorySaleReturnRecord(medical3506Param, medical3505Result.getMsgRslt());
|
||||||
// return R.ok();
|
// return R.ok();
|
||||||
@@ -783,7 +783,7 @@ public class YbController {
|
|||||||
Catalogue1312QueryParam catalogue1312QueryParam = new Catalogue1312QueryParam();
|
Catalogue1312QueryParam catalogue1312QueryParam = new Catalogue1312QueryParam();
|
||||||
catalogue1312QueryParam.setHilistCode(hilistCode);
|
catalogue1312QueryParam.setHilistCode(hilistCode);
|
||||||
catalogue1312QueryParam.setInsuplcAdmdvs(
|
catalogue1312QueryParam.setInsuplcAdmdvs(
|
||||||
SecurityUtils.getLoginUser().getOptionJson().getString(CommonConstants.Option.INSUPLC_ADMDVS));
|
SecurityUtils.getLoginUser().getOptionJsonValue(CommonConstants.Option.INSUPLC_ADMDVS));
|
||||||
// 直接解析(默认 ISO 格式)
|
// 直接解析(默认 ISO 格式)
|
||||||
LocalDate localDate = LocalDate.parse(dateStr);
|
LocalDate localDate = LocalDate.parse(dateStr);
|
||||||
// 转换为 Date
|
// 转换为 Date
|
||||||
@@ -966,8 +966,8 @@ public class YbController {
|
|||||||
String s2
|
String s2
|
||||||
= "{\"feedetl_sn\":\"530390\",\"mdtrt_id\":\"220000202511101029490122280385\",\"psn_no\":\"22000011000014958451\",\"chrg_bchno\":\"SF2511100007050575\",\"dise_codg\":\"M51.202\",\"rx_circ_flag\":\"0\",\"fee_ocur_time\":\"2025-11-10 10:28:20\",\"med_list_codg\":\"014400000050100\",\"medins_list_codg\":\"yp3201\",\"det_item_fee_sumamt\":\"210\",\"cnt\":\"6.0\",\"pric\":\"35.0\",\"sin_dos_dscr\":\"\",\"used_frqu_dscr\":\"\",\"prd_days\":\"1\",\"medc_way_dscr\":\"\",\"bilg_dept_codg\":\"A21\",\"bilg_dept_name\":\"康复医学科\",\"bilg_dr_codg\":\"D220104007959\",\"bilg_dr_name\":\"齐艳英\",\"acord_dept_codg\":\"A21\",\"acord_dept_name\":\"康复医学科\",\"orders_dr_code\":\"D220104007959\",\"orders_dr_name\":\"齐艳英\",\"hosp_appr_flag\":\"1\",\"tcmdrug_used_way\":\"1\",\"etip_flag\":\"0\",\"etip_hosp_code\":\"\",\"dscg_tkdrug_flag\":\"0\",\"matn_fee_flag\":\"0\"}";
|
= "{\"feedetl_sn\":\"530390\",\"mdtrt_id\":\"220000202511101029490122280385\",\"psn_no\":\"22000011000014958451\",\"chrg_bchno\":\"SF2511100007050575\",\"dise_codg\":\"M51.202\",\"rx_circ_flag\":\"0\",\"fee_ocur_time\":\"2025-11-10 10:28:20\",\"med_list_codg\":\"014400000050100\",\"medins_list_codg\":\"yp3201\",\"det_item_fee_sumamt\":\"210\",\"cnt\":\"6.0\",\"pric\":\"35.0\",\"sin_dos_dscr\":\"\",\"used_frqu_dscr\":\"\",\"prd_days\":\"1\",\"medc_way_dscr\":\"\",\"bilg_dept_codg\":\"A21\",\"bilg_dept_name\":\"康复医学科\",\"bilg_dr_codg\":\"D220104007959\",\"bilg_dr_name\":\"齐艳英\",\"acord_dept_codg\":\"A21\",\"acord_dept_name\":\"康复医学科\",\"orders_dr_code\":\"D220104007959\",\"orders_dr_name\":\"齐艳英\",\"hosp_appr_flag\":\"1\",\"tcmdrug_used_way\":\"1\",\"etip_flag\":\"0\",\"etip_hosp_code\":\"\",\"dscg_tkdrug_flag\":\"0\",\"matn_fee_flag\":\"0\"}";
|
||||||
|
|
||||||
Clinic2204FeeDetailParam feeDetailResult1 = JSON.parseObject(s1, Clinic2204FeeDetailParam.class);
|
Clinic2204FeeDetailParam feeDetailResult1 = JsonUtils.parseObject(s1, Clinic2204FeeDetailParam.class);
|
||||||
Clinic2204FeeDetailParam feeDetailResult2 = JSON.parseObject(s2, Clinic2204FeeDetailParam.class);
|
Clinic2204FeeDetailParam feeDetailResult2 = JsonUtils.parseObject(s2, Clinic2204FeeDetailParam.class);
|
||||||
|
|
||||||
clinic2204OrderResult.setFeedetail(Arrays.asList(feeDetailResult1, feeDetailResult2));
|
clinic2204OrderResult.setFeedetail(Arrays.asList(feeDetailResult1, feeDetailResult2));
|
||||||
|
|
||||||
@@ -1008,7 +1008,7 @@ public class YbController {
|
|||||||
|
|
||||||
if (inpatientReg != null) {
|
if (inpatientReg != null) {
|
||||||
|
|
||||||
inpatientReg.setInputParam(JSON.toJSONString(yb2401InputInpatientMdtrtInfo));
|
inpatientReg.setInputParam(JsonUtils.toJson(yb2401InputInpatientMdtrtInfo));
|
||||||
ybDao.save2401InpatientReg(inpatientReg);
|
ybDao.save2401InpatientReg(inpatientReg);
|
||||||
return R.ok("医保入院办理成功!");
|
return R.ok("医保入院办理成功!");
|
||||||
|
|
||||||
@@ -1034,11 +1034,11 @@ public class YbController {
|
|||||||
InpatientDischarge inpatientDischarge = new InpatientDischarge();
|
InpatientDischarge inpatientDischarge = new InpatientDischarge();
|
||||||
BeanUtils.copyProperties(yb2402InputParam, inpatientDischarge);
|
BeanUtils.copyProperties(yb2402InputParam, inpatientDischarge);
|
||||||
|
|
||||||
inpatientDischarge.setInputParam(JSON.toJSONString(yb2402InputInpatientDscgInfo));
|
inpatientDischarge.setInputParam(JsonUtils.toJson(yb2402InputInpatientDscgInfo));
|
||||||
inpatientDischarge.setOutputResult(JSON.toJSONString(yb2402InputParam));
|
inpatientDischarge.setOutputResult(JsonUtils.toJson(yb2402InputParam));
|
||||||
|
|
||||||
ybDao.save2402InpatientDscg(inpatientDischarge);
|
ybDao.save2402InpatientDscg(inpatientDischarge);
|
||||||
// inpatientReg.setInputParam(JSON.toJSONString(yb2402InputInpatientDscgInfo));
|
// inpatientReg.setInputParam(JsonUtils.toJson(yb2402InputInpatientDscgInfo));
|
||||||
// ybDao.save2402InpatientDscg(inpatientReg);
|
// ybDao.save2402InpatientDscg(inpatientReg);
|
||||||
return R.ok("医保出院办理成功!");
|
return R.ok("医保出院办理成功!");
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.healthlink.his.web.ybmanage.dto;
|
package com.healthlink.his.web.ybmanage.dto;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
@@ -17,19 +17,19 @@ public class ClinicReg2201Output {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
//主键
|
//主键
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@JSONField(serialize=false)
|
@JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY)
|
||||||
private String id;
|
private String id;
|
||||||
//就诊ID
|
//就诊ID
|
||||||
private String mdtrtId;
|
private String mdtrtId;
|
||||||
//参保地医保区划
|
//参保地医保区划
|
||||||
@JSONField(serialize=false)
|
@JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY)
|
||||||
private String insuplcAdmdvs;
|
private String insuplcAdmdvs;
|
||||||
//人员编号
|
//人员编号
|
||||||
private String psnNo;
|
private String psnNo;
|
||||||
//险种类型
|
//险种类型
|
||||||
private String insutype;
|
private String insutype;
|
||||||
//医疗类别
|
//医疗类别
|
||||||
@JSONField(serialize=false)
|
@JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY)
|
||||||
private String medType;
|
private String medType;
|
||||||
//挂号时间
|
//挂号时间
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@@ -40,7 +40,7 @@ public class ClinicReg2201Output {
|
|||||||
//就诊凭证编号
|
//就诊凭证编号
|
||||||
private String mdtrtCertNo;
|
private String mdtrtCertNo;
|
||||||
//证件加密串
|
//证件加密串
|
||||||
@JSONField(serialize=false)
|
@JsonProperty(access = com.fasterxml.jackson.annotation.JsonProperty.Access.WRITE_ONLY)
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String mdtrtCertNoEncrypt;
|
private String mdtrtCertNoEncrypt;
|
||||||
//住院/门诊号
|
//住院/门诊号
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user