Compare commits
8 Commits
fix/BUG#61
...
f84940fa5f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f84940fa5f | ||
| e3db810972 | |||
| 85e95420b7 | |||
| 206a0f4083 | |||
| 5e9aaebc7a | |||
| f925731f6f | |||
|
|
156a3f0f24 | ||
| 85d254990f |
@@ -1,27 +0,0 @@
|
||||
# Bug #556 Analysis
|
||||
|
||||
## Title
|
||||
【门诊医生站-检验】新增检验申请单时就诊卡号/执行时间未自动回显,且项目列表冗余显示"套餐"文字
|
||||
|
||||
## Root Cause Analysis
|
||||
|
||||
### Issue 1: 就诊卡号未自动回显
|
||||
- **Code**: `inspectionApplication.vue:886` - `formData.medicalrecordNumber = props.patientInfo.identifierNo || ''`
|
||||
- **Root Cause**: Logic is correct but depends on `props.patientInfo.identifierNo` being populated. The watch on `props.patientInfo` (line 2074) triggers `initData()`. The card number field itself is correctly bound. This is likely a timing issue where the patient data loads before `identifierNo` is available, but the core code path is correct — no code change needed here beyond ensuring executeTime default doesn't block form rendering.
|
||||
|
||||
### Issue 2: 执行时间未默认填充当前系统时间
|
||||
- **Code**: `inspectionApplication.vue:978` - `executeTime: null`
|
||||
- **Root Cause**: In `initData()` (line 879-921), only `applyTime` is set via `startApplyTimeTimer()`. `formData.executeTime` is never assigned a default value. Similarly in `resetForm()` (line 1550), `executeTime` remains `null`.
|
||||
- **Fix**: Add `formData.executeTime = formatDateTime(new Date())` in `initData()` and change `resetForm()` to use `executeTime: formatDateTime(new Date())`.
|
||||
|
||||
### Issue 3: 项目列表冗余显示"套餐"文字
|
||||
- **Code**: `inspectionApplication.vue:1190` - Already fixed with `packageName` check. But `inspectionApplication.vue:2000` in `loadApplicationToForm()` still uses loose check: `item.feePackageId != null || item.itemName?.includes('套餐')`.
|
||||
- **Fix**: Update `loadApplicationToForm()` line 2000 to match the stricter check: `item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName`.
|
||||
|
||||
## Files to Modify
|
||||
- `openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue`
|
||||
|
||||
## Changes
|
||||
1. `initData()`: Add `formData.executeTime = formatDateTime(new Date())` after line 899
|
||||
2. `resetForm()`: Change `executeTime: null` to `executeTime: formatDateTime(new Date())` at line 1550
|
||||
3. `loadApplicationToForm()`: Fix `isPackage` logic at line 2000
|
||||
@@ -1,53 +0,0 @@
|
||||
# Bug #556 分析报告
|
||||
|
||||
## 问题描述
|
||||
【门诊医生站-检验】新增检验申请单时:
|
||||
1. 就诊卡号字段为空,未自动带出患者就诊卡号
|
||||
2. 执行时间字段未自动填充,仅显示占位提示
|
||||
3. 检验项目列表每条记录前均带"套餐"文字标签(冗余显示)
|
||||
|
||||
## 根因分析
|
||||
|
||||
### 问题1:就诊卡号未自动回显
|
||||
- 代码路径:`initData()` 中 `formData.medicalrecordNumber = props.patientInfo.identifierNo || ''`
|
||||
- 数据绑定:`v-model="formData.medicalrecordNumber"`
|
||||
- `props.patientInfo` 由父组件传入,字段 `identifierNo` 来自后端患者信息
|
||||
- 当前逻辑本身正确,但需要增加兜底回读机制(已有 #406 的同步逻辑在 handleSave 中,initData 也应覆盖)
|
||||
- **结论**:代码路径正确,如果 identifierNo 为空则是父组件传参问题;已在 handleSave 中有同步逻辑,initData 中已有逻辑。无需额外修复。
|
||||
|
||||
### 问题2:执行时间未自动填充
|
||||
- 根因:`formData.executeTime` 在 `formData` 初始化时(line 978)设为 `null`
|
||||
- `initData()` 函数没有为 executeTime 设置默认值
|
||||
- `resetForm()` 函数(line 1550)也将 executeTime 重置为 `null`
|
||||
- 前端 datetime picker 在 `v-model` 为 `null` 时显示占位符 "选择执行时间"
|
||||
- **修复方案**:在 `initData()` 中设置 `formData.executeTime = formatDateTime(new Date())`;在 `resetForm()` 中也同样设置默认值为当前时间
|
||||
|
||||
### 问题3:项目列表冗余显示"套餐"文字
|
||||
- 根因:`isPackage` 判定条件不一致
|
||||
- `loadCategoryItems()` (line 1190): 使用 `item.feePackageId != null && ... && item.packageName` — ✅ 正确(同时检查 feePackageId 有效 + packageName 非空)
|
||||
- `loadApplicationToForm()` (line 2000): 使用 `item.feePackageId != null || item.itemName?.includes('套餐')` — ❌ 错误
|
||||
- `feePackageId != null` 单独判断会导致普通项目因 feePackageId 有值被误标为套餐
|
||||
- `item.itemName?.includes('套餐')` 更是直接按名称文字判断,极不准确
|
||||
- 影响位置:
|
||||
- 检验项目选择区(line 566):`<el-tag v-if="item.isPackage">套餐</el-tag>`
|
||||
- 已选项目列表(line 617):`<el-tag v-if="item.isPackage">套餐</el-tag>`
|
||||
- 检验信息详情表格(line 448):`<el-tag v-if="scope.row.isPackage">套餐</el-tag>`
|
||||
- **修复方案**:将 `loadApplicationToForm()` 中的 `isPackage` 判定统一为与 `loadCategoryItems()` 一致的逻辑
|
||||
|
||||
## 修复方案
|
||||
|
||||
### 修复1:执行时间默认填充
|
||||
- 文件:`inspectionApplication.vue`
|
||||
- 位置:`initData()` 函数,在已有患者信息赋值后添加 `formData.executeTime = formatDateTime(new Date())`
|
||||
- 位置:`resetForm()` 函数,将 `executeTime: null` 改为使用当前时间
|
||||
|
||||
### 修复2:isPackage 判定统一
|
||||
- 文件:`inspectionApplication.vue`
|
||||
- 位置:`loadApplicationToForm()` 函数 line 2000
|
||||
- 旧代码:`const isPackage = item.feePackageId != null || item.itemName?.includes('套餐')`
|
||||
- 新代码:`const isPackage = item.feePackageId != null && item.feePackageId !== '' && item.feePackageId !== 'null' && item.packageName`
|
||||
|
||||
## 验收标准
|
||||
1. 新增检验申请单时,执行时间字段自动填充当前系统时间(YYYY-MM-DD HH:mm:ss 格式)
|
||||
2. 检验项目列表中,只有真正的套餐项目前显示"套餐"标签,普通项目不显示
|
||||
3. 就诊卡号在有患者信息时正常显示
|
||||
68
.gitignore
vendored
Executable file
68
.gitignore
vendored
Executable file
@@ -0,0 +1,68 @@
|
||||
# 忽略所有编译器、IDE相关的文件
|
||||
**/.idea/
|
||||
**/.vscode/
|
||||
**/*.swp
|
||||
**/*.swo
|
||||
**/*.bak
|
||||
**/*.tmp
|
||||
**/.vs/
|
||||
|
||||
# 忽略 Java 项目编译文件
|
||||
**/*.class
|
||||
**/*.jar
|
||||
**/*.war
|
||||
**/*.ear
|
||||
**/target/
|
||||
**/bin/
|
||||
|
||||
# 忽略 Maven、Gradle、Ant 相关文件
|
||||
**/.mvn/
|
||||
**/.gradle/
|
||||
**/build/
|
||||
**/out/
|
||||
|
||||
# 忽略 Eclipse、IntelliJ IDEA 和 NetBeans 临时文件
|
||||
**/*.log
|
||||
**/*.project
|
||||
**/*.classpath
|
||||
|
||||
# 忽略 Java 配置文件
|
||||
**/*.iml
|
||||
|
||||
# 忽略 Node.js 和 Vue 项目相关文件
|
||||
**/node_modules/
|
||||
**/npm-debug.log
|
||||
**/yarn-error.log
|
||||
**/yarn-debug.log
|
||||
**/dist/
|
||||
**/*.lock
|
||||
**/*.tgz
|
||||
|
||||
# 忽略 Vue 项目相关构建文件
|
||||
**/.vuepress/dist/
|
||||
|
||||
# 忽略 IDE 配置文件
|
||||
**/*.launch
|
||||
**/*.settings/
|
||||
|
||||
# 忽略操作系统生成的文件
|
||||
**/.DS_Store
|
||||
**/Thumbs.db
|
||||
**/Desktop.ini
|
||||
|
||||
|
||||
|
||||
/openhis-miniapp/unpackage
|
||||
|
||||
# 忽略设计书
|
||||
PostgreSQL/openHis_DB设计书.xlsx
|
||||
|
||||
public.sql
|
||||
发版记录/2025-11-12/~$发版日志.docx
|
||||
发版记录/2025-11-12/~$S-管理系统-调价管理.docx
|
||||
发版记录/2025-11-12/发版日志.docx
|
||||
.gitignore
|
||||
openhis-server-new/openhis-application/src/main/resources/application-dev.yml
|
||||
.env.test.local
|
||||
playwright-report/
|
||||
test-results/
|
||||
@@ -1,39 +0,0 @@
|
||||
# 进度日志
|
||||
|
||||
## 当前已验证状态
|
||||
|
||||
- 仓库根目录:`/root/.openclaw/workspace/his-repo`
|
||||
- 分支:`develop`
|
||||
- 标准启动路径:`cd openhis-server-new && mvn compile -pl openhis-application -am`
|
||||
- 标准验证路径:`bash .harness/check.sh`(一键全部门禁)
|
||||
- 标准初始化:`bash .harness/init.sh`
|
||||
- 标准作业流程:`.harness/STANDARD_OPERATING_PROCEDURE.md`
|
||||
- 当前最高优先级未完成功能:`harness-003` — 持续完善 check.sh
|
||||
- 当前 blocker:无
|
||||
|
||||
## 会话记录
|
||||
|
||||
### Session 001 (2026-05-28) — 基础设施 v1
|
||||
- 已完成:AGENTS.md 重构、5 技能创建、通用模板、插件安装
|
||||
|
||||
### Session 002 (2026-05-28) — WalkingLabs 整合
|
||||
- 已完成:walkinglabs-harness 技能、.harness/ 模板、AGENTS.md v2、check.sh
|
||||
|
||||
### Session 003 (2026-05-28) ← 当前
|
||||
- 目标:用 Harness 方法论验证 Bug #597 + 定义标准化开发流程
|
||||
- 已完成:
|
||||
- Bug #597 全链路 6 环验证通过(所有环节 ✅)
|
||||
- 创建 .harness/STANDARD_OPERATING_PROCEDURE.md(196 行)
|
||||
- 格式化的 Harness 工作循环:Init→Plan→Implement→Verify→Cleanup→Review
|
||||
- 运行过的验证:mvn compile ✅ | check.sh 7/7 ✅ | 全链路 6/6 ✅
|
||||
- 提交记录:
|
||||
- 已知风险或未解决问题:
|
||||
- 下一步最佳动作:无 — 所有基础设施已完成
|
||||
|
||||
## 当前功能状态
|
||||
|
||||
| ID | 功能 | 状态 |
|
||||
|---|---|---|
|
||||
| harness-001 | 基础设施 v1(24 篇博客) | done ✅ |
|
||||
| harness-002 | WalkingLabs 实战模式整合 | done ✅ |
|
||||
| harness-003 | 质量门禁自动化检查脚本 | in_progress 🔄 |
|
||||
@@ -1,196 +0,0 @@
|
||||
# Harness 标准作业程序 (SOP)
|
||||
|
||||
> 所有开发任务、Bug 修复、重构,必须遵循此流程。
|
||||
|
||||
## 流程全景
|
||||
|
||||
```
|
||||
Init → Plan → Implement → Verify → Cleanup → Review
|
||||
│ │ │ │ │ │
|
||||
└─ 环境 └─ 全链路 └─ 约束内 └─ 门禁 └─ 状态 └─ 评分
|
||||
就绪 分析 修改 检查 更新 评审
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 步骤详解
|
||||
|
||||
### Step 1: Init — 环境就绪
|
||||
|
||||
```bash
|
||||
# 1. 确认在正确的目录
|
||||
pwd
|
||||
|
||||
# 2. 运行初始化
|
||||
bash .harness/init.sh
|
||||
|
||||
# 3. 读取当前进度
|
||||
cat .harness/PROGRESS.md
|
||||
cat .harness/feature_list.json
|
||||
|
||||
# 4. 查看最近变更
|
||||
git log --oneline -5
|
||||
git status --short
|
||||
```
|
||||
|
||||
**检查项:**
|
||||
- [ ] 编译通过 (`mvn compile`)
|
||||
- [ ] 了解当前进行中的功能
|
||||
- [ ] 了解最近提交
|
||||
|
||||
---
|
||||
|
||||
### Step 2: Plan — 全链路分析
|
||||
|
||||
**对于每个字段/功能的新增或修改,先画出完整数据流:**
|
||||
|
||||
```
|
||||
录入 → 保存 → 查询 → 修改 → 删除 → 关联
|
||||
│ │ │ │ │ │
|
||||
└前端 └API └Mapper └回显 └软删除 └上下游
|
||||
└Ctrl └DTO └再保存 └计费
|
||||
└Svc └前端 └打印
|
||||
└Entity └报表
|
||||
└DB
|
||||
```
|
||||
|
||||
**检查清单(6 环):**
|
||||
1. **录入** — 前端有输入入口?(弹窗、行编辑、表单)
|
||||
2. **保存** — 前端→API→Controller→Service→Entity→DB,每个入口都传了吗?(注意多个 Service 实现类)
|
||||
3. **查询** — DB→Mapper XML(UNION ALL 子查询统一加)→DTO→前端展示
|
||||
4. **修改** — 编辑回显→修改保存→正确更新?
|
||||
5. **删除/停止** — 状态变更会丢失该字段吗?
|
||||
6. **关联** — 上下游(护士站、药房、计费、打印、报表)需要同步改吗?
|
||||
|
||||
**输出:** `update_plan` 分解步骤 + 风险评估
|
||||
|
||||
---
|
||||
|
||||
### Step 3: Implement — 约束内修改
|
||||
|
||||
**约束铁律:**
|
||||
- 一次只做一个功能(`single_active_feature = true`)
|
||||
- 只动必要文件,禁止"顺便改进"无关代码
|
||||
- 遵循 AGENTS.md 中的代码风格规范
|
||||
- 涉及 Mapper XML 时,UNION ALL 所有子查询统一修改
|
||||
|
||||
**修改原则:**
|
||||
- 安全 > 架构 > 质量 > 性能
|
||||
- 增量修改,每步可回滚
|
||||
- 每个检查点保存进度(`update_plan`)
|
||||
|
||||
---
|
||||
|
||||
### Step 4: Verify — 门禁检查
|
||||
|
||||
```bash
|
||||
# L1: 编译检查
|
||||
cd openhis-server-new && mvn compile -pl openhis-application -am
|
||||
|
||||
# L2: 全链路门禁
|
||||
bash .harness/check.sh
|
||||
|
||||
# L3: 人工审查(输出变更摘要)
|
||||
```
|
||||
|
||||
**输出变更摘要:**
|
||||
```
|
||||
修改文件: N 个
|
||||
新增行数: N
|
||||
删除行数: N
|
||||
影响模块: [模块列表]
|
||||
风险等级: 低/中/高
|
||||
变更摘要: [一句话描述做了什么]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Step 5: Cleanup — 状态更新
|
||||
|
||||
```bash
|
||||
# 1. 更新进度
|
||||
vim .harness/PROGRESS.md
|
||||
# 添加新会话记录,更新完成状态
|
||||
|
||||
# 2. 更新功能清单
|
||||
vim .harness/feature_list.json
|
||||
# 标记完成/更新状态
|
||||
|
||||
# 3. 运行干净状态检查
|
||||
cat .harness/clean-state-checklist.md
|
||||
# 逐项确认
|
||||
|
||||
# 4. 提交
|
||||
git add -A
|
||||
git commit -m "type(scope): description"
|
||||
git push origin develop
|
||||
```
|
||||
|
||||
**提交信息格式:**
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
type: feat | fix | refactor | docs | test | chore
|
||||
scope: 模块名(如 mapper, service, harness)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Step 6: Review — 评审评分
|
||||
|
||||
对照 `.harness/evaluator-rubric.md` 逐项评分:
|
||||
|
||||
| 维度 | 满分 | 自评 |
|
||||
|---|---|---|
|
||||
| 正确性 | 2 | 行为是否符合目标 |
|
||||
| 验证 | 2 | 门禁是否全部通过 |
|
||||
| 范围纪律 | 2 | 是否超出任务边界 |
|
||||
| 可靠性 | 2 | 能否重复执行 |
|
||||
| 可维护性 | 2 | 代码是否规范 |
|
||||
| 交接准备度 | 2 | 下一轮能否继续 |
|
||||
|
||||
**结论:** Accept / Revise / Block
|
||||
|
||||
---
|
||||
|
||||
## 异常处理
|
||||
|
||||
### 编译失败
|
||||
```
|
||||
失败 → 分析错误 → git restore 撤销 → 从检查点重试
|
||||
持续失败(3次) → 上报人类
|
||||
```
|
||||
|
||||
### 全链路不完整
|
||||
```
|
||||
发现缺环 → 记录到 PROGRESS.md blocker → 补充修复
|
||||
```
|
||||
|
||||
### 范围蔓延
|
||||
```
|
||||
发现超出任务 → 创建新 feature → 当前任务先完成
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 速查命令
|
||||
|
||||
```bash
|
||||
# 诊断
|
||||
pwd # 确认目录
|
||||
git status --short # 查看变更
|
||||
git log --oneline -5 # 查看历史
|
||||
git diff --stat HEAD # 变更统计
|
||||
|
||||
# 回滚
|
||||
git checkout -- <file> # 撤销单个文件
|
||||
git reset HEAD~1 # 撤销上次提交(保留修改)
|
||||
|
||||
# 验证
|
||||
bash .harness/init.sh # 初始化
|
||||
bash .harness/check.sh # 全部门禁
|
||||
|
||||
# 状态
|
||||
cat .harness/PROGRESS.md # 进度
|
||||
cat .harness/feature_list.json # 功能清单
|
||||
```
|
||||
@@ -1,82 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================
|
||||
# Harness Quality Gates — 一键运行所有门禁
|
||||
# 源自 $closed-loop-testing skill
|
||||
# =============================================
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
PASS=0
|
||||
FAIL=0
|
||||
RESULTS=()
|
||||
|
||||
check() {
|
||||
local level="$1" name="$2" cmd="$3"
|
||||
cd "$ROOT_DIR"
|
||||
echo ""
|
||||
echo "━━━ [${level}] ${name} ━━━"
|
||||
if eval "$cmd" 2>&1; then
|
||||
echo " ✅ ${name} 通过"
|
||||
PASS=$((PASS + 1))
|
||||
RESULTS+=("✅|${level}|${name}")
|
||||
else
|
||||
echo " ❌ ${name} 失败"
|
||||
FAIL=$((FAIL + 1))
|
||||
RESULTS+=("❌|${level}|${name}")
|
||||
fi
|
||||
}
|
||||
|
||||
echo ""
|
||||
echo "╔══════════════════════════════════════╗"
|
||||
echo "║ Harness Quality Gates ║"
|
||||
echo "║ $(date '+%Y-%m-%d %H:%M') ║"
|
||||
echo "╚══════════════════════════════════════╝"
|
||||
|
||||
# ── L1: 编译检查 ──
|
||||
echo ""
|
||||
echo "╔══ L1 编译检查 ══════════════════════╗"
|
||||
check "L1" "后端编译" "cd '$ROOT_DIR/openhis-server-new' && mvn compile -pl openhis-application -am -q"
|
||||
|
||||
# ── L2: 全链路检查 ──
|
||||
echo ""
|
||||
echo "╔══ L2 全链路数据流验证 ══════════════╗"
|
||||
|
||||
# L2-1: 文件存在性检查
|
||||
check "L2" "AGENTS.md 存在" "test -f '$ROOT_DIR/AGENTS.md'"
|
||||
check "L2" "init.sh 可执行" "test -x '$ROOT_DIR/.harness/init.sh'"
|
||||
check "L2" "PROGRESS.md 存在" "test -f '$ROOT_DIR/.harness/PROGRESS.md'"
|
||||
check "L2" "feature_list.json 有效" "python3 -c 'import json; json.load(open(\"$ROOT_DIR/.harness/feature_list.json\"))'"
|
||||
|
||||
# L2-2: Mapper XML 结构检查
|
||||
check "L2" "Mapper XML 行数一致性" "find '$ROOT_DIR/openhis-server-new' -path '*/mapper/*.xml' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print \$1}' | xargs test 0 -lt"
|
||||
|
||||
# ── L3: 约束合规检查 ──
|
||||
echo ""
|
||||
echo "╔══ L3 约束合规检查 ══════════════════╗"
|
||||
|
||||
# L3-1: 无硬编码密钥
|
||||
check "L3" "无硬编码密钥" "! grep -r 'password=.*[a-zA-Z0-9]\{8,\}' --include='*.java' --include='*.yml' --include='*.xml' --include='*.py' '$ROOT_DIR' 2>/dev/null | grep -v 'test\|example\|sample\|template\|localhost\|jchl' | head -5 | grep . && false || true"
|
||||
|
||||
# ── 汇总 ──
|
||||
echo ""
|
||||
echo "╔══════════════════════════════════════╗"
|
||||
echo "║ 质量门禁结果汇总 ║"
|
||||
echo "╚══════════════════════════════════════╝"
|
||||
echo ""
|
||||
for r in "${RESULTS[@]}"; do
|
||||
IFS='|' read -r status level name <<< "$r"
|
||||
echo " $status [$level] $name"
|
||||
done
|
||||
echo ""
|
||||
echo " 总计: $((PASS + FAIL)) | ✅ $PASS 通过 | ❌ $FAIL 失败"
|
||||
echo ""
|
||||
|
||||
if [ "$FAIL" -gt 0 ]; then
|
||||
echo " ⚠️ 有 $FAIL 项未通过"
|
||||
echo " 提示:新增/修改文件后记得 git add 后再检查"
|
||||
exit 1
|
||||
else
|
||||
echo " 🎉 所有门禁通过!"
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
# 干净状态检查清单
|
||||
|
||||
会话结束前逐项检查:
|
||||
|
||||
- [ ] 标准启动路径仍然可用(mvn compile 通过)
|
||||
- [ ] 标准验证路径仍然可运行
|
||||
- [ ] 当前进度已记录到 PROGRESS.md
|
||||
- [ ] 功能状态真实反映 passing 和未验证的边界
|
||||
- [ ] feature_list.json 已更新
|
||||
- [ ] 没有任何半成品步骤处于未记录状态
|
||||
- [ ] 临时文件和调试代码已清理
|
||||
- [ ] 提交信息清晰描述了变更内容
|
||||
- [ ] 下一轮会话无需人工修复即可继续
|
||||
@@ -1,22 +0,0 @@
|
||||
# 评审评分表
|
||||
|
||||
| 维度 | 问题 | 0-2分 | 备注 |
|
||||
|---|---|---|---|
|
||||
| 正确性 | 实现的行为是否符合目标功能? | | |
|
||||
| 验证 | 编译检查是否通过?数据流是否完整? | | |
|
||||
| 范围纪律 | 是否保持在选定功能范围内? | | |
|
||||
| 可靠性 | 结果能否在重启后继续工作? | | |
|
||||
| 可维护性 | 代码是否遵循项目规范? | | |
|
||||
| 交接准备度 | 下一轮能否只靠仓库内文件继续推进? | | |
|
||||
|
||||
## 结论
|
||||
|
||||
- [ ] Accept
|
||||
- [ ] Revise
|
||||
- [ ] Block
|
||||
|
||||
## 后续动作
|
||||
|
||||
- 缺失的证据:
|
||||
- 必须补的修复:
|
||||
- 下次复审触发条件:
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"project": "OpenHIS",
|
||||
"last_updated": "2026-05-28",
|
||||
"rules": {
|
||||
"single_active_feature": true,
|
||||
"passing_requires_evidence": true,
|
||||
"do_not_skip_verification": true
|
||||
},
|
||||
"status_legend": {
|
||||
"not_started": "功能还没开始做",
|
||||
"in_progress": "当前唯一正在进行的任务",
|
||||
"blocked": "有已记录的阻塞问题",
|
||||
"passing": "验证已通过,证据已记录",
|
||||
"done": "已完成并合入主干"
|
||||
},
|
||||
"features": [
|
||||
{
|
||||
"id": "harness-001",
|
||||
"priority": 1,
|
||||
"area": "infrastructure",
|
||||
"title": "Harness Engineering 基础设施搭建",
|
||||
"user_visible_behavior": "Codex 具备完整的约束/反馈/控制/持久执行能力",
|
||||
"status": "done",
|
||||
"verification": [
|
||||
"AGENTS.md 包含四大核心组件",
|
||||
"5 个技能安装到 Codex 环境",
|
||||
"harness-engineering 插件注册到 marketplace",
|
||||
"通用 AGENTS.md 模板可用"
|
||||
],
|
||||
"evidence": ["AGENTS.md restructured", "skills created", "plugin validated"],
|
||||
"notes": "v1: 24 篇博客方法整合完成"
|
||||
},
|
||||
{
|
||||
"id": "harness-002",
|
||||
"priority": 2,
|
||||
"area": "infrastructure",
|
||||
"title": "WalkingLabs 实战模式整合",
|
||||
"user_visible_behavior": "项目具备完整的 5 子系统 Harness(指令/工具/环境/状态/反馈)",
|
||||
"status": "done",
|
||||
"verification": [
|
||||
".harness/ 目录包含所有模板文件",
|
||||
"init.sh 可正常运行",
|
||||
"PROGRESS.md 记录当前状态",
|
||||
"feature_list.json 跟踪所有功能",
|
||||
"walkinglabs-harness 技能已安装"
|
||||
],
|
||||
"evidence": [
|
||||
"init.sh verified (compile OK)",
|
||||
"6 templates installed in .harness/",
|
||||
"AGENTS.md updated with 5-subsystem model",
|
||||
"walkinglabs-harness skill created (142 lines)"
|
||||
],
|
||||
"notes": "v2: walkinglabs 5 子系统整合完成"
|
||||
},
|
||||
{
|
||||
"id": "harness-003",
|
||||
"priority": 3,
|
||||
"area": "infrastructure",
|
||||
"title": "建立质量门禁自动化检查脚本",
|
||||
"user_visible_behavior": "运行一条命令即可完成 L1-L3 质量门禁检查",
|
||||
"status": "not_started",
|
||||
"verification": [
|
||||
"创建 .harness/check.sh — 一键运行所有门禁",
|
||||
"L1: mvn compile 编译检查",
|
||||
"L2: Mapper XML 全链路字段一致性检查",
|
||||
"L3: 生成变更摘要供人工审查"
|
||||
],
|
||||
"evidence": [],
|
||||
"notes": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Harness Init — 统一启动与验证入口
|
||||
# 每次新会话开始前运行
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
echo "==> 当前目录: $PWD"
|
||||
echo "==> Git 状态"
|
||||
git status --short 2>/dev/null || true
|
||||
git log --oneline -3 2>/dev/null || true
|
||||
|
||||
echo ""
|
||||
echo "==> 编译检查"
|
||||
cd openhis-server-new
|
||||
mvn compile -pl openhis-application -am -q 2>/dev/null && echo " ✅ 编译通过" || echo " ❌ 编译失败"
|
||||
|
||||
echo ""
|
||||
echo "==> 读取进度"
|
||||
if [ -f .harness/PROGRESS.md ]; then
|
||||
head -20 .harness/PROGRESS.md
|
||||
else
|
||||
echo " (无进度文件)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==> 读取功能清单"
|
||||
if [ -f .harness/feature_list.json ]; then
|
||||
python3 -c "
|
||||
import json
|
||||
with open('.harness/feature_list.json') as f:
|
||||
data = json.load(f)
|
||||
features = [f for f in data.get('features', []) if f.get('status') == 'in_progress']
|
||||
if features:
|
||||
print(f\" 当前进行中: {features[0].get('title', 'unknown')}\")
|
||||
else:
|
||||
print(' 当前无进行中的功能')
|
||||
" 2>/dev/null || echo " (无法解析)"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "==> 环境就绪 ✅"
|
||||
@@ -1,29 +0,0 @@
|
||||
# 会话交接
|
||||
|
||||
## 当前已验证
|
||||
|
||||
- 现在明确可用的部分:
|
||||
- 本轮实际跑过的验证:
|
||||
|
||||
## 本轮改动
|
||||
|
||||
- 新增了哪些代码或行为:
|
||||
- Harness 发生了哪些变化:
|
||||
|
||||
## 仍损坏或未验证
|
||||
|
||||
- 已知缺陷:
|
||||
- 未验证路径:
|
||||
- 下一轮需要注意的风险:
|
||||
|
||||
## 下一步最佳动作
|
||||
|
||||
- 最高优先级未完成功能:
|
||||
- 为什么它是下一步:
|
||||
- 什么结果才算 passing:
|
||||
|
||||
## 命令速查
|
||||
|
||||
- 编译:`cd openhis-server-new && mvn compile -pl openhis-application -am`
|
||||
- 打包:`mvn clean package -DskipTests`
|
||||
- 启动:`mvn spring-boot:run`
|
||||
361
AGENTS.md
361
AGENTS.md
@@ -1,237 +1,188 @@
|
||||
# OpenHIS — Harness Engineering 开发指南
|
||||
# OpenHIS - AI Agent Development Guide
|
||||
|
||||
> **模型决定上限,Harness 决定底线。**
|
||||
> 本文件是 OpenHIS 项目的 Harness Engineering 落地。整合了 OpenAI/Anthropic Harness Engineering 方法论与 walkinglabs 实战模式。
|
||||
## 项目概览
|
||||
OpenHIS 是一个医院管理系统,采用 Java 17 + Spring Boot 后端和 Vue 3 + Vite 前端架构。
|
||||
|
||||
---
|
||||
|
||||
## 📋 项目信息
|
||||
|
||||
OpenHIS 医院管理系统 | Java 17 + Spring Boot + MyBatis Plus | Vue 3 + Element Plus | PostgreSQL
|
||||
|
||||
### 构建和运行
|
||||
## 构建和运行命令
|
||||
|
||||
### 后端(Java/Spring Boot)
|
||||
```bash
|
||||
cd /root/.openclaw/workspace/his-repo
|
||||
|
||||
# 初始化(每次新会话先运行)
|
||||
bash .harness/init.sh
|
||||
|
||||
# 后端编译
|
||||
cd openhis-server-new && mvn compile -pl openhis-application -am
|
||||
|
||||
# 后端打包
|
||||
# 构建整个项目
|
||||
cd openhis-server-new
|
||||
mvn clean package -DskipTests
|
||||
|
||||
# 后端运行
|
||||
cd openhis-application && mvn spring-boot:run
|
||||
# 运行后端(开发模式)
|
||||
cd openhis-server-new/openhis-application
|
||||
mvn spring-boot:run
|
||||
|
||||
# 前端
|
||||
cd openhis-ui-vue3 && npm install && npm run dev
|
||||
# 运行特定模块
|
||||
cd openhis-server-new/[module-name]
|
||||
mvn spring-boot:run
|
||||
```
|
||||
|
||||
### 关键路径
|
||||
### 前端(Vue 3 + Vite)
|
||||
```bash
|
||||
# 安装依赖
|
||||
cd openhis-ui-vue3
|
||||
npm install
|
||||
|
||||
```
|
||||
后端代码: openhis-server-new/openhis-application/src/main/java/com/
|
||||
后端配置: openhis-server-new/openhis-application/src/main/resources/
|
||||
Mapper XML: .../mapper/ (regdoctorstation/, doctorstation/, ...)
|
||||
前端代码: openhis-ui-vue3/src/
|
||||
Harness: .harness/ (init.sh, PROGRESS.md, feature_list.json, ...)
|
||||
# 开发服务器
|
||||
npm run dev
|
||||
|
||||
# 生产构建
|
||||
npm run build:prod
|
||||
|
||||
# 测试环境构建
|
||||
npm run build:test
|
||||
|
||||
# 预览构建结果
|
||||
npm run preview
|
||||
```
|
||||
|
||||
---
|
||||
### 测试
|
||||
项目当前没有配置正式的测试框架。如需添加测试:
|
||||
- 后端:考虑使用 JUnit 5 + Mockito
|
||||
- 前端:考虑使用 Vitest + Vue Test Utils
|
||||
|
||||
## 🔧 5 子系统模型(WalkingLabs)
|
||||
## 代码风格规范
|
||||
|
||||
> 源自:[Learn Harness Engineering](https://walkinglabs.github.io/learn-harness-engineering/zh/)
|
||||
### Java 后端规范
|
||||
- **Java 版本**: 17
|
||||
- **框架**: Spring Boot 2.5.15
|
||||
- **ORM**: MyBatis Plus 3.5.5
|
||||
- **数据库**: PostgreSQL
|
||||
- **包结构**:
|
||||
- `com.openhis` - 业务逻辑
|
||||
- `com.core` - 核心框架
|
||||
- **命名约定**:
|
||||
- 类名:PascalCase(如 `UserController`)
|
||||
- 方法名:camelCase(如 `getUserList`)
|
||||
- 常量:SCREAMING_SNAKE_CASE
|
||||
- 配置文件:kebab-case
|
||||
- **注解使用**:
|
||||
- 使用 `@Slf4j` 替代手动声明 logger
|
||||
- 使用 `@Data` 在实体类中
|
||||
- 使用 `@Service/@Controller/@Repository` 等 Spring 注解
|
||||
- **异常处理**:
|
||||
- 使用统一的异常处理机制
|
||||
- 自定义业务异常继承 `RuntimeException`
|
||||
|
||||
### 1. 指令子系统(Instruction)
|
||||
|
||||
| 文件 | 用途 |
|
||||
|---|---|
|
||||
| **AGENTS.md**(本文件) | 项目规则、约束、工作流程 |
|
||||
| `.harness/feature_list.json` | 机器可读的功能状态追踪 |
|
||||
| `.harness/PROGRESS.md` | 会话进度和已验证状态 |
|
||||
| `.harness/session-handoff.md` | 跨会话交接摘要 |
|
||||
|
||||
### 2. 工具子系统(Tools)
|
||||
|
||||
| 工具 | 用途 |
|
||||
|---|---|
|
||||
| `mvn compile` | 编译验证 |
|
||||
| `git` | 版本控制 + 回滚 |
|
||||
| `pwd` | 确认当前目录 |
|
||||
| shell | 文件操作、命令执行 |
|
||||
|
||||
### 3. 环境子系统(Environment)
|
||||
|
||||
| 组件 | 状态 |
|
||||
|---|---|
|
||||
| Java 17 | ✅ `pom.xml` 锁定 |
|
||||
| Maven | ✅ `mvn-wrapper` |
|
||||
| PostgreSQL | ✅ 192.168.110.252:15432 |
|
||||
| Node.js | ✅ `package.json` 锁定 |
|
||||
|
||||
### 4. 状态子系统(State)
|
||||
|
||||
| 机制 | 用途 |
|
||||
|---|---|
|
||||
| `update_plan` | 当前步骤检查点 |
|
||||
| `.harness/PROGRESS.md` | 跨会话进度记录 |
|
||||
| `.harness/feature_list.json` | 功能状态跟踪 |
|
||||
| `git log` | 变更历史追溯 |
|
||||
|
||||
### 5. 反馈子系统(Feedback)
|
||||
|
||||
| 层级 | 命令 | 时间 |
|
||||
|---|---|---|
|
||||
| L1 编译 | `mvn compile -pl openhis-application -am` | <30 秒 |
|
||||
| L2 全链路 | 六环检查清单(见下文) | <5 分钟 |
|
||||
| L3 审查 | 你人工审查 diff | 10-30 分钟 |
|
||||
|
||||
---
|
||||
|
||||
## 📋 标准工作循环
|
||||
|
||||
```
|
||||
开始会话
|
||||
│
|
||||
├→ 1. Init
|
||||
│ ├── bash .harness/init.sh
|
||||
│ ├── 读取 PROGRESS.md / feature_list.json
|
||||
│ ├── git log --oneline -5
|
||||
│ └── 确认编译通过
|
||||
│
|
||||
├→ 2. Plan
|
||||
│ ├── update_plan / checklist_write 分解步骤
|
||||
│ ├── 评估复杂度/风险
|
||||
│ └── 设定检查点
|
||||
│
|
||||
├→ 3. Implement
|
||||
│ ├── 一次只做一个功能
|
||||
│ ├── 全链路检查清单核对
|
||||
│ └── 增量修改,只动必要文件
|
||||
│
|
||||
├→ 4. Verify
|
||||
│ ├── L1: mvn compile
|
||||
│ ├── L2: 全链路数据流验证
|
||||
│ └── 生成变更摘要
|
||||
│
|
||||
└→ 5. Cleanup
|
||||
├── 运行 clean-state-checklist.md
|
||||
├── 更新 PROGRESS.md + feature_list.json
|
||||
├── git add + commit + push
|
||||
└── init.sh 确认干净状态
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔗 全链路修复原则
|
||||
|
||||
修 Bug 时,不得"就事论事",必须走通完整的**数据流全链路**:
|
||||
|
||||
### 六环检查清单
|
||||
|
||||
```
|
||||
1. 录入 → 前端有无输入入口?(弹窗、行编辑、表单...)
|
||||
2. 保存 → 前端 → API → Controller → Service → Entity → DB,
|
||||
每个保存入口都传了该字段吗?
|
||||
3. 查询 → DB → Mapper XML(UNION ALL 子查询统一加)→ DTO → 前端展示
|
||||
4. 修改 → 编辑回显 → 修改保存 → 正确更新?
|
||||
5. 删除 → 状态变更会丢失该字段吗?
|
||||
6. 关联 → 上下游(护士站、计费、打印、报表)需要同步改吗?
|
||||
```
|
||||
|
||||
### 常见陷阱
|
||||
|
||||
| 陷阱 | 解决 |
|
||||
|---|---|
|
||||
| 只修主入口,批量保存/签发保存漏了 | 检查所有 Service 实现类 |
|
||||
| 前端加了后端没传 | 逐个入口确认 |
|
||||
| UNION ALL 只改一半 | 所有子查询统一加 |
|
||||
| DTO 继承链没检查 | 检查父类/子类字段一致性 |
|
||||
| 只测新增没测编辑 | 新增和编辑都要测 |
|
||||
|
||||
---
|
||||
|
||||
## 📐 代码风格规范
|
||||
|
||||
### Java 后端
|
||||
|
||||
| 项目 | 规范 |
|
||||
|---|---|
|
||||
| 包结构 | `com.openhis`(业务)、`com.core`(核心) |
|
||||
| 命名 | 类 PascalCase、方法 camelCase、常量 SCREAMING_SNAKE_CASE |
|
||||
| 注解 | `@Slf4j`、`@Data`、`@Service/@Controller/@Repository` |
|
||||
| 异常 | 统一异常处理,业务异常继承 `RuntimeException` |
|
||||
| 缩进 | 4 空格,行 120 字符 |
|
||||
|
||||
### Vue 前端
|
||||
|
||||
| 项目 | 规范 |
|
||||
|---|---|
|
||||
| 框架 | Vue 3 + Composition API + Element Plus + Pinia |
|
||||
| 命名 | 组件 PascalCase、文件 kebab-case、变量 camelCase |
|
||||
| 缩进 | 2 空格,单引号,行 100 字符 |
|
||||
### Vue 前端规范
|
||||
- **框架**: Vue 3 + Composition API
|
||||
- **UI 库**: Element Plus
|
||||
- **状态管理**: Pinia
|
||||
- **路由**: Vue Router 4
|
||||
- **构建工具**: Vite 5
|
||||
- **组件命名**: PascalCase
|
||||
- **文件命名**: kebab-case
|
||||
- **变量命名**: camelCase
|
||||
- **常量命名**: SCREAMING_SNAKE_CASE
|
||||
- **函数命名**:
|
||||
- 事件处理:`handle` 前缀
|
||||
- 数据获取:`get`/`load` 前缀
|
||||
- 提交操作:`submit` 前缀
|
||||
|
||||
### 导入顺序
|
||||
#### Java
|
||||
1. `java.*`
|
||||
2. `javax.*`
|
||||
3. 第三方库
|
||||
4. `com.core.*`
|
||||
5. `com.openhis.*`
|
||||
6. `*.*`(其他包)
|
||||
|
||||
**Java:** `java.*` → `javax.*` → 第三方 → `com.core.*` → `com.openhis.*`
|
||||
**Vue:** `vue` 相关 → 第三方 → `@/` 别名 → 相对路径
|
||||
#### JavaScript/Vue
|
||||
1. `vue` 相关
|
||||
2. 第三方库
|
||||
3. `@/` 别名导入
|
||||
4. 相对路径导入
|
||||
|
||||
---
|
||||
### 代码格式
|
||||
#### Java
|
||||
- 缩进:4个空格
|
||||
- 行长度:120字符
|
||||
- 左大括号不换行
|
||||
|
||||
## 🏗️ 开发约定
|
||||
#### Vue/JavaScript
|
||||
- 缩进:2个空格
|
||||
- 字符串:优先使用单引号
|
||||
- 行长度:100字符
|
||||
|
||||
| 领域 | 约定 |
|
||||
|---|---|
|
||||
| API | RESTful,统一响应格式,Swagger 文档 |
|
||||
| 数据库 | snake_case 命名,主键 `id`,软删除 `valid_flag` |
|
||||
| 安全 | 所有 API 需权限验证,SQL 注入/XSS 防护 |
|
||||
| 性能 | Druid 连接池,路由懒加载,虚拟滚动 |
|
||||
## 关键配置文件
|
||||
|
||||
---
|
||||
### 后端配置
|
||||
- 主配置:`openhis-server-new/openhis-application/src/main/resources/application.yml`
|
||||
- 环境配置:`application-{profile}.yml`
|
||||
- Maven 父 POM:`openhis-server-new/pom.xml`
|
||||
|
||||
## ⚙️ 关键配置
|
||||
### 前端配置
|
||||
- Vite 配置:`openhis-ui-vue3/vite.config.js`
|
||||
- 环境变量:`.env.*` 文件
|
||||
- 路由配置:`openhis-ui-vue3/src/router/index.js`
|
||||
|
||||
| 项目 | 值 |
|
||||
|---|---|
|
||||
| 后端端口 | 18080 |
|
||||
| 前端端口 | 81 |
|
||||
| API 前缀 | `/openhis` |
|
||||
| Swagger | `/openhis/swagger-ui/index.html` |
|
||||
| 后端配置 | `application.yml` / `application-{profile}.yml` |
|
||||
| 前端配置 | `vite.config.js` / `.env.*` |
|
||||
## 开发约定
|
||||
|
||||
---
|
||||
### API 设计
|
||||
- RESTful API 风格
|
||||
- 统一响应格式
|
||||
- 使用 Swagger 文档
|
||||
- 错误码统一管理
|
||||
|
||||
## 📈 成熟度追踪
|
||||
### 数据库
|
||||
- 表名:snake_case
|
||||
- 字段名:snake_case
|
||||
- 主键:使用 `id`
|
||||
- 软删除:使用 `valid_flag` 字段
|
||||
|
||||
| 等级 | 特征 | 本项目 |
|
||||
|---|---|---|
|
||||
| **L1 初始** | 零星使用 AI 工具 | ✅ 已超越 |
|
||||
| **L2 管理** | 基础约束 + 反馈 + 控制 | ✅ **当前** |
|
||||
| **L3 定义** | 标准化、可复用 | 🔄 walkinglabs 5 子系统整合 |
|
||||
| **L4 量化** | 数据驱动优化 | ⏳ |
|
||||
| **L5 优化** | AI 自主优化 Harness | ⏳ |
|
||||
### 前端组件
|
||||
- 单一职责原则
|
||||
- Props 使用 camelCase
|
||||
- Events 使用 kebab-case
|
||||
- 使用 Composition API
|
||||
- 组件文档使用 JSDoc
|
||||
|
||||
---
|
||||
### 状态管理
|
||||
- 模块化设计
|
||||
- 异步操作使用 actions
|
||||
- 避免在组件中直接修改状态
|
||||
|
||||
## 📚 技能索引(Codex 内置)
|
||||
## 环境变量
|
||||
|
||||
| 技能 | 用途 |
|
||||
|---|---|
|
||||
| `$harness-engineering` | 主方法论 — 约束 + 反馈 + 控制 + 持久 |
|
||||
| `$walkinglabs-harness` | 实战模式 — 5 子系统 + 模板 + 会话持续 |
|
||||
| `$durable-execution` | 检查点、幂等性、事件溯源 |
|
||||
| `$closed-loop-testing` | 质量门禁、测试策略、反馈循环 |
|
||||
| `$constraint-design` | DSL 设计、策略模式、约束编排 |
|
||||
| `$review-audit` | 审查工作流、审计追踪、合规检查 |
|
||||
| `$full-chain-fix` | 全链路数据流修复 |
|
||||
| `$karpathy-guidelines` | 减少 LLM 编码常见错误 |
|
||||
### 前端
|
||||
- `VITE_APP_BASE_API`: API 基础路径
|
||||
- `VITE_APP_ENV`: 环境标识
|
||||
|
||||
---
|
||||
### 后端
|
||||
- `spring.profiles.active`: 激活的配置文件
|
||||
- `core.name`: 应用名称
|
||||
- `core.version`: 应用版本
|
||||
|
||||
> **总纲:** 你负责"做什么"和"为什么",Agent 负责"怎么做"和"做多好"
|
||||
> **工作循环:** Init → Plan → Implement → Verify → Cleanup
|
||||
## 安全规范
|
||||
- 所有 API 接口需要权限验证
|
||||
- 敏感信息使用环境变量
|
||||
- SQL 注入防护
|
||||
- XSS 攻击防护
|
||||
|
||||
## 性能优化
|
||||
- 后端使用连接池(Druid)
|
||||
- 前端使用路由懒加载
|
||||
- 图片使用 WebP 格式
|
||||
- 大列表使用虚拟滚动
|
||||
|
||||
## 常用工具类
|
||||
- 后端:`com.core.common.utils.*`
|
||||
- 前端:`@/utils/*`
|
||||
|
||||
## 注意事项
|
||||
1. 修改数据库结构需要同步 SQL 脚本
|
||||
2. 新增功能需要添加权限配置
|
||||
3. 前端路由需要在权限系统中注册
|
||||
4. 接口变更需要更新 Swagger 文档
|
||||
5. 遵循现有代码风格,避免不必要的变化
|
||||
|
||||
## 故障排除
|
||||
- 后端端口:18080
|
||||
- 前端端口:81
|
||||
- API 前缀:`/openhis`
|
||||
- Swagger UI:`/openhis/swagger-ui/index.html`
|
||||
- Druid 监控:`/openhis/druid/login.html`
|
||||
2
his-repo
2
his-repo
Submodule his-repo updated: 515ed84118...5de8a22418
@@ -1,7 +1,6 @@
|
||||
package com.core.framework.config;
|
||||
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||
@@ -35,9 +34,7 @@ public class ApplicationConfig {
|
||||
// 设置日期格式为 yyyy/M/d HH:mm:ss,支持多种格式反序列化
|
||||
builder.simpleDateFormat("yyyy/M/d HH:mm:ss");
|
||||
// 添加JavaTimeModule支持,用于LocalDateTime
|
||||
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
||||
javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
builder.modules(javaTimeModule);
|
||||
builder.modules(new JavaTimeModule());
|
||||
builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy/M/d HH:mm:ss")));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.openhis.web.Inspection.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,17 +11,30 @@ import java.util.List;
|
||||
* @author
|
||||
* @date
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class InstrumentManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<InstrumentType> instrumentTypeList;
|
||||
private List<InstrumentStatusEnumOption> instrumentStatusEnumList;
|
||||
private List<InstrumentType> InstrumentTypeList;
|
||||
private List<InstrumentStatusEnumOption> InstrumentStatusEnumList;
|
||||
|
||||
// 手动添加 setter 方法
|
||||
public void setStatusFlagOptions(List<statusEnumOption> statusFlagOptions) {
|
||||
this.statusFlagOptions = statusFlagOptions;
|
||||
}
|
||||
|
||||
public void setInstrumentTypeList(List<InstrumentType> InstrumentTypeList) {
|
||||
this.InstrumentTypeList = InstrumentTypeList;
|
||||
}
|
||||
|
||||
public void setInstrumentStatusEnumList(List<InstrumentStatusEnumOption> InstrumentStatusEnumList) {
|
||||
this.InstrumentStatusEnumList = InstrumentStatusEnumList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Getter
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
@@ -31,7 +44,7 @@ public class InstrumentManageInitDto {
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Data
|
||||
public static class InstrumentStatusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
@@ -41,7 +54,7 @@ public class InstrumentManageInitDto {
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Data
|
||||
public static class InstrumentType {
|
||||
private Integer value;
|
||||
private String info;
|
||||
@@ -50,4 +63,6 @@ public class InstrumentManageInitDto {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ public class TicketAppServiceImpl implements ITicketAppService {
|
||||
if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) {
|
||||
dto.setStatus("已退号");
|
||||
} else {
|
||||
dto.setStatus("已预约");
|
||||
dto.setStatus("已锁定");
|
||||
}
|
||||
} else if (status == SlotStatus.BOOKED) {
|
||||
if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) {
|
||||
@@ -380,7 +380,7 @@ public class TicketAppServiceImpl implements ITicketAppService {
|
||||
if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) {
|
||||
dto.setStatus("已退号");
|
||||
} else {
|
||||
dto.setStatus("已预约");
|
||||
dto.setStatus("已锁定");
|
||||
}
|
||||
} else if (status == SlotStatus.BOOKED) {
|
||||
if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) {
|
||||
|
||||
@@ -169,9 +169,11 @@ public class OrganizationLocationAppServiceImpl implements IOrganizationLocation
|
||||
if (DateTimeUtils.isOverlap(organizationLocation.getStartTime(), organizationLocation.getEndTime(),
|
||||
orgLoc.getStartTime(), orgLoc.getEndTime())) {
|
||||
Organization org = organizationService.getById(organizationLocation.getOrganizationId());
|
||||
String organizationName = org != null ? org.getName() : ("科室[" + organizationLocation.getOrganizationId() + "]已删除");
|
||||
if (org == null) {
|
||||
continue;
|
||||
}
|
||||
return R.fail("当前诊疗:" + activityName + CommonConstants.Common.DASH + orgLoc.getStartTime()
|
||||
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + organizationName + "时间冲突");
|
||||
+ CommonConstants.Common.DASH + orgLoc.getEndTime() + "与" + org.getName() + "时间冲突");
|
||||
}
|
||||
|
||||
if (orgLocQueryDto.getId() != null) {
|
||||
|
||||
@@ -31,9 +31,4 @@ public class OrgLocQueryParam implements Serializable {
|
||||
/** 发放类别 */
|
||||
private String distributionCategoryCode;
|
||||
|
||||
/**
|
||||
* 项目编码 | 药品:1 耗材:2
|
||||
*/
|
||||
private String itemCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -215,10 +215,7 @@ public class SurgicalScheduleAppServiceImpl implements ISurgicalScheduleAppServi
|
||||
if (surgery != null) {
|
||||
surgery.setStatusEnum(1); // 1 = 已排期
|
||||
surgery.setUpdateTime(new Date());
|
||||
// Bug #558: 手术安排时同步写入手术室确认时间和确认人
|
||||
surgery.setOperatingRoomConfirmTime(new Date());
|
||||
surgery.setOperatingRoomConfirmUser(loginUser.getUsername());
|
||||
|
||||
|
||||
// 填充缺失的申请科室和主刀医生名称
|
||||
fillSurgeryMissingNames(surgery);
|
||||
|
||||
|
||||
@@ -36,7 +36,4 @@ public class PerformInfoDto {
|
||||
/** 分组id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long groupId;
|
||||
|
||||
/** 退回原因 */
|
||||
private String backReason;
|
||||
}
|
||||
|
||||
@@ -147,6 +147,6 @@ public interface IDoctorStationAdviceAppService {
|
||||
*/
|
||||
IPage<SurgeryItemDto> getSurgeryPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey);
|
||||
|
||||
IPage<SurgeryItemDto> getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey, String categoryCode);
|
||||
IPage<SurgeryItemDto> getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey);
|
||||
|
||||
}
|
||||
|
||||
@@ -63,21 +63,17 @@ public interface IDoctorStationEmrAppService {
|
||||
* 获取待写病历列表
|
||||
*
|
||||
* @param doctorId 医生ID
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 每页条数
|
||||
* @param patientName 患者姓名(可选)
|
||||
* @return 待写病历分页数据
|
||||
* @return 待写病历列表
|
||||
*/
|
||||
R<?> getPendingEmrList(Long doctorId, Integer pageNo, Integer pageSize, String patientName);
|
||||
R<?> getPendingEmrList(Long doctorId);
|
||||
|
||||
/**
|
||||
* 获取待写病历数量
|
||||
*
|
||||
* @param doctorId 医生ID
|
||||
* @param patientName 患者姓名(可选)
|
||||
* @return 待写病历数量
|
||||
*/
|
||||
R<?> getPendingEmrCount(Long doctorId, String patientName);
|
||||
R<?> getPendingEmrCount(Long doctorId);
|
||||
|
||||
/**
|
||||
* 检查患者是否需要写病历
|
||||
|
||||
@@ -48,9 +48,6 @@ import com.openhis.web.personalization.dto.ActivityDeviceDto;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
import com.openhis.workflow.domain.DeviceRequest;
|
||||
import com.openhis.workflow.domain.InventoryItem;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
import com.openhis.workflow.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -949,27 +946,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
/**
|
||||
* 处理药品
|
||||
*/
|
||||
|
||||
/**
|
||||
* 将 remark 合并到 contentJson 中,确保 Mapper 能从 content_json 提取 remark
|
||||
*/
|
||||
private String injectRemarkIntoContentJson(String contentJson, String remark) {
|
||||
if (remark == null || remark.isEmpty() || contentJson == null || contentJson.isEmpty()) {
|
||||
return contentJson;
|
||||
}
|
||||
try {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
JsonNode node = mapper.readTree(contentJson);
|
||||
if (node instanceof ObjectNode) {
|
||||
((ObjectNode) node).put("remark", remark);
|
||||
return mapper.writeValueAsString(node);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to inject remark into contentJson: {}", e.getMessage());
|
||||
}
|
||||
return contentJson;
|
||||
}
|
||||
|
||||
private List<String> handMedication(List<AdviceSaveDto> medicineList, Date curDate, String adviceOpType,
|
||||
Long organizationId, String signCode) {
|
||||
// 当前登录账号的科室id
|
||||
@@ -1186,10 +1162,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
if (medicationRequest.getId() == null) {
|
||||
firstTimeSave = true;
|
||||
}
|
||||
// 确保 contentJson 包含 remark
|
||||
if (adviceSaveDto.getRemark() != null && !adviceSaveDto.getRemark().isEmpty()) {
|
||||
medicationRequest.setContentJson(injectRemarkIntoContentJson(medicationRequest.getContentJson(), adviceSaveDto.getRemark()));
|
||||
}
|
||||
iMedicationRequestService.saveOrUpdate(medicationRequest);
|
||||
if (firstTimeSave) {
|
||||
medRequestIdList.add(medicationRequest.getId().toString());
|
||||
@@ -1650,10 +1622,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
deviceRequest.setConditionId(adviceSaveDto.getConditionId()); // 诊断id
|
||||
deviceRequest.setEncounterDiagnosisId(adviceSaveDto.getEncounterDiagnosisId()); // 就诊诊断id
|
||||
|
||||
// 确保 contentJson 包含 remark
|
||||
if (adviceSaveDto.getRemark() != null && !adviceSaveDto.getRemark().isEmpty()) {
|
||||
deviceRequest.setContentJson(injectRemarkIntoContentJson(deviceRequest.getContentJson(), adviceSaveDto.getRemark()));
|
||||
}
|
||||
iDeviceRequestService.saveOrUpdate(deviceRequest);
|
||||
if (is_save) {
|
||||
// 处理耗材发放
|
||||
@@ -2065,9 +2033,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
serviceRequest.setBasedOnTable(CommonConstants.TableName.MED_MEDICATION_REQUEST);
|
||||
}
|
||||
|
||||
// 备注
|
||||
serviceRequest.setRemark(adviceSaveDto.getRemark());
|
||||
|
||||
iServiceRequestService.saveOrUpdate(serviceRequest);
|
||||
|
||||
// 保存时保存诊疗费用项
|
||||
@@ -2240,10 +2205,6 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
// 收费状态
|
||||
requestBaseDto.setChargeStatus_enumText(
|
||||
EnumUtils.getInfoByValue(ChargeItemStatus.class, requestBaseDto.getChargeStatus()));
|
||||
// 单位字典翻译失败时回退使用原始值(如手术申请硬编码了中文单位名)
|
||||
if (StringUtils.isNotBlank(requestBaseDto.getUnitCode()) && StringUtils.isBlank(requestBaseDto.getUnitCode_dictText())) {
|
||||
requestBaseDto.setUnitCode_dictText(requestBaseDto.getUnitCode());
|
||||
}
|
||||
}
|
||||
return R.ok(requestBaseInfo);
|
||||
}
|
||||
@@ -2325,7 +2286,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
log.info("BugFix: signOffAdvice - 签退所有请求,状态改为待签发, requestIdList={}", requestIdList);
|
||||
|
||||
// 尝试签退药品请求(只有存在的才会更新)
|
||||
iMedicationRequestService.updateDraftStatusBatch(requestIdList, null, null, null);
|
||||
iMedicationRequestService.updateDraftStatusBatch(requestIdList, null, null);
|
||||
// 尝试签退耗材请求(只有存在的才会更新)
|
||||
iDeviceRequestService.updateDraftStatusBatch(requestIdList);
|
||||
// 尝试签退诊疗请求(只有存在的才会更新)
|
||||
@@ -2605,13 +2566,12 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<SurgeryItemDto> getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey, String categoryCode) {
|
||||
public IPage<SurgeryItemDto> getExaminationPage(Long organizationId, Integer pageNo, Integer pageSize, String searchKey) {
|
||||
IPage<SurgeryItemDto> result = doctorStationAdviceAppMapper.getExaminationPage(
|
||||
new Page<>(pageNo, pageSize),
|
||||
PublicationStatus.ACTIVE.getValue(),
|
||||
organizationId,
|
||||
searchKey,
|
||||
categoryCode);
|
||||
searchKey);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.openhis.document.service.IEmrTemplateService;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
|
||||
import com.openhis.web.doctorstation.dto.EmrTemplateDto;
|
||||
import com.openhis.web.doctorstation.dto.PatientEmrDto;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -42,7 +41,6 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 医生站-电子病历 应用实现类
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppService {
|
||||
|
||||
@@ -62,7 +60,13 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
|
||||
IDocRecordService docRecordService;
|
||||
|
||||
@Resource
|
||||
private com.openhis.web.doctorstation.mapper.DoctorStationEmrAppMapper doctorStationEmrAppMapper;
|
||||
private EncounterMapper encounterMapper;
|
||||
|
||||
@Resource
|
||||
private PatientMapper patientMapper;
|
||||
|
||||
@Resource
|
||||
private com.openhis.administration.mapper.EncounterParticipantMapper encounterParticipantMapper;
|
||||
|
||||
/**
|
||||
* 添加病人病历信息
|
||||
@@ -219,29 +223,52 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
|
||||
* @return 待写病历列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getPendingEmrList(Long doctorId, Integer pageNo, Integer pageSize, String patientName) {
|
||||
// 先查询总数
|
||||
Long total = doctorStationEmrAppMapper.getPendingEmrCount(doctorId, patientName);
|
||||
public R<?> getPendingEmrList(Long doctorId) {
|
||||
// 由于Encounter实体中没有jzPractitionerUserId字段,我们需要通过关联查询来获取相关信息
|
||||
// 使用医生工作站的mapper来查询相关数据
|
||||
// 这里我们直接使用医生工作站的查询逻辑
|
||||
|
||||
// 计算分页偏移量,再查询分页数据
|
||||
int offset = (pageNo - 1) * pageSize;
|
||||
List<Map<String, Object>> pageRows = doctorStationEmrAppMapper.getPendingEmrList(doctorId, patientName, pageSize, offset);
|
||||
// 查询当前医生负责的、状态为"就诊中"但还没有写病历的患者
|
||||
// 需要通过EncounterParticipant表来关联医生信息
|
||||
List<Encounter> encounters = encounterMapper.selectList(
|
||||
new LambdaQueryWrapper<Encounter>()
|
||||
.eq(Encounter::getStatusEnum, EncounterStatus.IN_PROGRESS.getValue())
|
||||
);
|
||||
|
||||
// 计算年龄列
|
||||
for (Map<String, Object> row : pageRows) {
|
||||
Object birthDate = row.get("birthDate");
|
||||
if (birthDate instanceof Date) {
|
||||
row.put("age", calculateAge((Date) birthDate));
|
||||
} else {
|
||||
row.put("age", null);
|
||||
// 过滤出由指定医生负责且还没有写病历的就诊记录
|
||||
List<Map<String, Object>> pendingEmrs = new ArrayList<>();
|
||||
for (Encounter encounter : encounters) {
|
||||
// 检查该就诊记录是否已经有病历
|
||||
Emr existingEmr = emrService.getOne(
|
||||
new LambdaQueryWrapper<Emr>().eq(Emr::getEncounterId, encounter.getId())
|
||||
);
|
||||
|
||||
// 检查该就诊是否由指定医生负责
|
||||
boolean isAssignedToDoctor = isEncounterAssignedToDoctor(encounter.getId(), doctorId);
|
||||
|
||||
if (existingEmr == null && isAssignedToDoctor) {
|
||||
// 如果没有病历且由该医生负责,则添加到待写病历列表
|
||||
Map<String, Object> pendingEmr = new java.util.HashMap<>();
|
||||
|
||||
// 获取患者信息
|
||||
Patient patient = patientMapper.selectById(encounter.getPatientId());
|
||||
|
||||
pendingEmr.put("encounterId", encounter.getId());
|
||||
pendingEmr.put("patientId", encounter.getPatientId());
|
||||
pendingEmr.put("patientName", patient != null ? patient.getName() : "未知");
|
||||
pendingEmr.put("gender", patient != null ? patient.getGenderEnum() : null);
|
||||
// 使用出生日期计算年龄
|
||||
pendingEmr.put("age", patient != null && patient.getBirthDate() != null ?
|
||||
calculateAge(patient.getBirthDate()) : null);
|
||||
// 使用创建时间作为挂号时间
|
||||
pendingEmr.put("registerTime", encounter.getCreateTime());
|
||||
pendingEmr.put("busNo", encounter.getBusNo()); // 病历号
|
||||
|
||||
pendingEmrs.add(pendingEmr);
|
||||
}
|
||||
row.remove("birthDate");
|
||||
}
|
||||
|
||||
Map<String, Object> result = new java.util.HashMap<>();
|
||||
result.put("rows", pageRows);
|
||||
result.put("total", total != null ? total : 0L);
|
||||
return R.ok(result);
|
||||
return R.ok(pendingEmrs);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,9 +278,14 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
|
||||
* @return 待写病历数量
|
||||
*/
|
||||
@Override
|
||||
public R<?> getPendingEmrCount(Long doctorId, String patientName) {
|
||||
Long count = doctorStationEmrAppMapper.getPendingEmrCount(doctorId, patientName);
|
||||
return R.ok(count != null ? count.intValue() : 0);
|
||||
public R<?> getPendingEmrCount(Long doctorId) {
|
||||
// 获取待写病历列表,然后返回数量
|
||||
R<?> result = getPendingEmrList(doctorId);
|
||||
if (result.getCode() == 200) {
|
||||
List<?> pendingEmrs = (List<?>) result.getData();
|
||||
return R.ok(pendingEmrs.size());
|
||||
}
|
||||
return R.ok(0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -274,6 +306,24 @@ public class DoctorStationEmrAppServiceImpl implements IDoctorStationEmrAppServi
|
||||
return R.ok(needWrite);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查就诊是否分配给指定医生
|
||||
*
|
||||
* @param encounterId 就诊ID
|
||||
* @param doctorId 医生ID
|
||||
* @return 是否分配给指定医生
|
||||
*/
|
||||
private boolean isEncounterAssignedToDoctor(Long encounterId, Long doctorId) {
|
||||
// 查询就诊参与者表,检查是否有指定医生的接诊记录
|
||||
com.openhis.administration.domain.EncounterParticipant participant =
|
||||
encounterParticipantMapper.selectOne(
|
||||
new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<com.openhis.administration.domain.EncounterParticipant>()
|
||||
.eq(com.openhis.administration.domain.EncounterParticipant::getEncounterId, encounterId)
|
||||
.eq(com.openhis.administration.domain.EncounterParticipant::getPractitionerId, doctorId)
|
||||
);
|
||||
|
||||
return participant != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据出生日期计算年龄
|
||||
|
||||
@@ -77,10 +77,8 @@ public class DoctorStationAdviceController {
|
||||
*/
|
||||
@PostMapping(value = "/save-advice")
|
||||
@RepeatSubmit(interval = 5000, message = "请勿重复提交医嘱,请稍候再试")
|
||||
public R<?> saveAdvice(@RequestBody AdviceSaveParam adviceSaveParam,
|
||||
@RequestParam(required = false, defaultValue = "1") String adviceOpType) {
|
||||
// 🔧 Bug #445 修复:使用前端传入的 adviceOpType 参数(1=保存草稿,2=签发),而非硬编码
|
||||
return iDoctorStationAdviceAppService.saveAdvice(adviceSaveParam, adviceOpType);
|
||||
public R<?> saveAdvice(@RequestBody AdviceSaveParam adviceSaveParam) {
|
||||
return iDoctorStationAdviceAppService.saveAdvice(adviceSaveParam, AdviceOpType.SAVE_ADVICE.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -228,9 +226,8 @@ public class DoctorStationAdviceController {
|
||||
@RequestParam(value = "organizationId", required = false) Long organizationId,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "500") Integer pageSize,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "categoryCode", defaultValue = "23") String categoryCode) {
|
||||
return R.ok(iDoctorStationAdviceAppService.getExaminationPage(organizationId, pageNo, pageSize, searchKey, categoryCode));
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey) {
|
||||
return R.ok(iDoctorStationAdviceAppService.getExaminationPage(organizationId, pageNo, pageSize, searchKey));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,36 +26,34 @@ public class PendingEmrController {
|
||||
* 获取待写病历列表
|
||||
*
|
||||
* @param doctorId 医生ID
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 每页条数
|
||||
* @param patientName 患者姓名(可选)
|
||||
* @return 待写病历分页数据
|
||||
* @return 待写病历列表
|
||||
*/
|
||||
@GetMapping("/pending-list")
|
||||
public R<?> getPendingEmrList(@RequestParam(required = false) Long doctorId,
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(required = false) String patientName) {
|
||||
public R<?> getPendingEmrList(@RequestParam(required = false) Long doctorId) {
|
||||
// 如果没有传递医生ID,则使用当前登录用户ID
|
||||
if (doctorId == null) {
|
||||
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId();
|
||||
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId();
|
||||
}
|
||||
return iDoctorStationEmrAppService.getPendingEmrList(doctorId, pageNum, pageSize, patientName);
|
||||
|
||||
// 调用服务获取待写病历列表
|
||||
return iDoctorStationEmrAppService.getPendingEmrList(doctorId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待写病历数量
|
||||
*
|
||||
*
|
||||
* @param doctorId 医生ID
|
||||
* @param patientName 患者姓名(可选)
|
||||
* @return 待写病历数量
|
||||
*/
|
||||
@GetMapping("/pending-count")
|
||||
public R<?> getPendingEmrCount(@RequestParam(required = false) Long doctorId,
|
||||
@RequestParam(required = false) String patientName) {
|
||||
public R<?> getPendingEmrCount(@RequestParam(required = false) Long doctorId) {
|
||||
// 如果没有传递医生ID,则使用当前登录用户ID
|
||||
if (doctorId == null) {
|
||||
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getPractitionerId();
|
||||
doctorId = com.core.common.utils.SecurityUtils.getLoginUser().getUserId();
|
||||
}
|
||||
return iDoctorStationEmrAppService.getPendingEmrCount(doctorId, patientName);
|
||||
|
||||
// 调用服务获取待写病历数量
|
||||
return iDoctorStationEmrAppService.getPendingEmrCount(doctorId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -198,10 +198,8 @@ public class AdviceBaseDto {
|
||||
/**
|
||||
* 所属科室
|
||||
*/
|
||||
@Dict(dictTable = "adm_organization", dictCode = "id", dictText = "name")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long orgId;
|
||||
private String orgId_dictText;
|
||||
|
||||
/**
|
||||
* 所在位置
|
||||
@@ -250,9 +248,4 @@ public class AdviceBaseDto {
|
||||
* 是否缺少取药科室配置(仅药品类型使用)
|
||||
*/
|
||||
private Boolean pharmacyConfigMissing;
|
||||
|
||||
/**
|
||||
* 备注(最长50字)
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,6 @@ import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonSetter;
|
||||
import com.fasterxml.jackson.annotation.Nulls;
|
||||
|
||||
@@ -30,14 +26,6 @@ public class AdviceSaveDto {
|
||||
/** 医嘱类型 */
|
||||
private Integer adviceType; // 1:药品 , 2: 耗材 , 3:项目
|
||||
|
||||
/**
|
||||
* 医嘱开始时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
|
||||
/**
|
||||
* 请求id
|
||||
*/
|
||||
@@ -282,11 +270,6 @@ public class AdviceSaveDto {
|
||||
*/
|
||||
private String sourceBillNo;
|
||||
|
||||
/**
|
||||
* 备注(最长50字)
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 设置默认值
|
||||
*/
|
||||
|
||||
@@ -63,18 +63,6 @@ public class PatientDetailsDto {
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/** 地址省 */
|
||||
private String addressProvince;
|
||||
|
||||
/** 地址市 */
|
||||
private String addressCity;
|
||||
|
||||
/** 地址区 */
|
||||
private String addressDistrict;
|
||||
|
||||
/** 地址街道 */
|
||||
private String addressStreet;
|
||||
|
||||
/**
|
||||
* 工作单位
|
||||
*/
|
||||
|
||||
@@ -22,12 +22,6 @@ public class RequestBaseDto {
|
||||
*/
|
||||
private Integer adviceType; // 1:药品 , 2: 耗材 , 3:项目
|
||||
|
||||
/**
|
||||
* 医嘱开始时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 唯一标识
|
||||
*/
|
||||
@@ -127,11 +121,6 @@ public class RequestBaseDto {
|
||||
* 请求状态
|
||||
*/
|
||||
private Integer statusEnum;
|
||||
|
||||
/**
|
||||
* 退回原因
|
||||
*/
|
||||
private String reasonText;
|
||||
private String statusEnum_enumText;
|
||||
|
||||
/**
|
||||
@@ -249,15 +238,4 @@ public class RequestBaseDto {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 停嘱医生
|
||||
*/
|
||||
private String stopUserName;
|
||||
|
||||
/**
|
||||
* 停嘱时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date stopTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -203,7 +203,6 @@ public interface DoctorStationAdviceAppMapper {
|
||||
IPage<SurgeryItemDto> getExaminationPage(@Param("page") Page<SurgeryItemDto> page,
|
||||
@Param("statusEnum") Integer statusEnum,
|
||||
@Param("organizationId") Long organizationId,
|
||||
@Param("searchKey") String searchKey,
|
||||
@Param("categoryCode") String categoryCode);
|
||||
@Param("searchKey") String searchKey);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,22 +1,11 @@
|
||||
package com.openhis.web.doctorstation.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 医生站-电子病历 应用Mapper
|
||||
*/
|
||||
@Repository
|
||||
public interface DoctorStationEmrAppMapper {
|
||||
|
||||
List<Map<String, Object>> getPendingEmrList(@Param("doctorId") Long doctorId,
|
||||
@Param("patientName") String patientName,
|
||||
@Param("pageSize") Integer pageSize,
|
||||
@Param("offset") Integer offset);
|
||||
|
||||
Long getPendingEmrCount(@Param("doctorId") Long doctorId,
|
||||
@Param("patientName") String patientName);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeParseException;
|
||||
import java.util.*;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -179,25 +178,11 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
inpatientAdviceParam.setEncounterIds(null);
|
||||
Integer exeStatus = inpatientAdviceParam.getExeStatus();
|
||||
inpatientAdviceParam.setExeStatus(null);
|
||||
// 提取requestStatus手动处理,支持COMPLETED(3)和CHECK_VERIFIED(10)同时查询
|
||||
Integer requestStatus = inpatientAdviceParam.getRequestStatus();
|
||||
inpatientAdviceParam.setRequestStatus(null);
|
||||
// requestStatus由前端tab传入,通过QueryWrapper自动添加到SQL外层WHERE过滤
|
||||
// 构建查询条件
|
||||
QueryWrapper<InpatientAdviceParam> queryWrapper
|
||||
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
|
||||
|
||||
// 手动拼接requestStatus条件:COMPLETED(3)时同时包含CHECK_VERIFIED(10)和PENDING_RECEIVE(11)
|
||||
// UNION查询外层列名为request_status(T1.status_enum AS request_status),不是status_enum
|
||||
if (requestStatus != null) {
|
||||
if (RequestStatus.COMPLETED.getValue().equals(requestStatus)) {
|
||||
queryWrapper.in("request_status",
|
||||
RequestStatus.COMPLETED.getValue(), RequestStatus.CHECK_VERIFIED.getValue(),
|
||||
RequestStatus.PENDING_RECEIVE.getValue());
|
||||
} else {
|
||||
queryWrapper.eq("request_status", requestStatus);
|
||||
}
|
||||
}
|
||||
|
||||
// 手动拼接住院患者id条件
|
||||
if (encounterIds != null && !encounterIds.isEmpty()) {
|
||||
List<Long> encounterIdList
|
||||
@@ -330,29 +315,19 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Date checkDate = new Date();
|
||||
if (!serviceRequestList.isEmpty()) {
|
||||
List<Long> serviceReqIds = serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList();
|
||||
// 先查询服务请求,按 categoryEnum 分流:检查类(23)走 CHECK_VERIFIED,其余走 COMPLETED
|
||||
List<ServiceRequest> allServiceRequests = serviceRequestService.listByIds(serviceReqIds);
|
||||
List<Long> checkReqIds = allServiceRequests.stream()
|
||||
.filter(sr -> ActivityDefCategory.TEST.getValue().equals(sr.getCategoryEnum()))
|
||||
.map(ServiceRequest::getId).toList();
|
||||
List<Long> otherReqIds = allServiceRequests.stream()
|
||||
.filter(sr -> !ActivityDefCategory.TEST.getValue().equals(sr.getCategoryEnum()))
|
||||
.map(ServiceRequest::getId).toList();
|
||||
// 检查类 → 已校对(CHECK_VERIFIED=10)
|
||||
if (!checkReqIds.isEmpty()) {
|
||||
serviceRequestService.updateCheckVerifiedStatus(checkReqIds, practitionerId, checkDate);
|
||||
}
|
||||
// 其他类 → 已完成(COMPLETED=3)
|
||||
if (!otherReqIds.isEmpty()) {
|
||||
serviceRequestService.updateCompleteRequestStatus(otherReqIds, practitionerId, checkDate);
|
||||
}
|
||||
// 处理转科/出院等特殊医嘱
|
||||
for (ServiceRequest serviceRequest : allServiceRequests) {
|
||||
// 更新服务请求状态已完成
|
||||
serviceRequestService.updateCompleteRequestStatus(
|
||||
serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate);
|
||||
List<ServiceRequest> serviceRequests = serviceRequestService
|
||||
.listByIds(serviceRequestList.stream().map(PerformInfoDto::getRequestId).collect(Collectors.toList()));
|
||||
for (ServiceRequest serviceRequest : serviceRequests) {
|
||||
// 判断医嘱类型
|
||||
if (ActivityDefCategory.TRANSFER.getValue().equals(serviceRequest.getCategoryEnum())) {
|
||||
// 更新患者状态 待转科
|
||||
encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
||||
EncounterZyStatus.PENDING_TRANSFER.getValue());
|
||||
} else if (ActivityDefCategory.DISCHARGE.getValue().equals(serviceRequest.getCategoryEnum())) {
|
||||
// 更新患者状态 待出院
|
||||
encounterService.updateEncounterStatus(serviceRequest.getEncounterId(),
|
||||
EncounterZyStatus.AWAITING_DISCHARGE.getValue());
|
||||
}
|
||||
@@ -384,24 +359,6 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
medRequestList.add(item);
|
||||
}
|
||||
}
|
||||
// 校验医嘱是否已执行,已执行的医嘱需要先取消执行后才能退回
|
||||
List<Long> allRequestIds = performInfoList.stream().map(PerformInfoDto::getRequestId).toList();
|
||||
List<Procedure> allProcedures = procedureService.list(
|
||||
new LambdaQueryWrapper<Procedure>()
|
||||
.in(Procedure::getRequestId, allRequestIds)
|
||||
.eq(Procedure::getDeleteFlag, "0"));
|
||||
Set<Long> executedIds = allProcedures.stream()
|
||||
.filter(p -> EventStatus.COMPLETED.getValue().equals(p.getStatusEnum()))
|
||||
.map(Procedure::getId)
|
||||
.collect(Collectors.toSet());
|
||||
Set<Long> cancelledRefundIds = allProcedures.stream()
|
||||
.filter(p -> EventStatus.CANCEL.getValue().equals(p.getStatusEnum()) && p.getRefundId() != null)
|
||||
.map(Procedure::getRefundId)
|
||||
.collect(Collectors.toSet());
|
||||
executedIds.removeAll(cancelledRefundIds);
|
||||
if (!executedIds.isEmpty()) {
|
||||
return R.fail("该医嘱已执行,请先取消执行后再退回");
|
||||
}
|
||||
// 校验药品医嘱是否已发药,已发药的医嘱不允许退回
|
||||
if (!medRequestList.isEmpty()) {
|
||||
List<Long> medReqIds = medRequestList.stream().map(PerformInfoDto::getRequestId).toList();
|
||||
@@ -415,21 +372,15 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
}
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Date checkDate = new Date();
|
||||
// 从请求中提取退回原因(所有项目共享同一原因)
|
||||
String backReason = performInfoList.stream()
|
||||
.map(PerformInfoDto::getBackReason)
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (!serviceRequestList.isEmpty()) {
|
||||
// 更新服务请求状态待发送
|
||||
serviceRequestService.updateDraftStatus(
|
||||
serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate, backReason);
|
||||
serviceRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate);
|
||||
}
|
||||
if (!medRequestList.isEmpty()) {
|
||||
// 更新药品请求状态待发送
|
||||
medicationRequestService.updateDraftStatusBatch(
|
||||
medRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate, backReason);
|
||||
medRequestList.stream().map(PerformInfoDto::getRequestId).toList(), practitionerId, checkDate);
|
||||
}
|
||||
return R.ok(null, "退回成功");
|
||||
}
|
||||
@@ -473,15 +424,6 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
|
||||
List<ServiceRequestUseExe> actUseExeList = this.assemblyActivity(activityList);
|
||||
// 处理诊疗执行
|
||||
this.exeActivity(actUseExeList, exeDate);
|
||||
// 检查类医嘱执行后,状态改为"待接收"(PENDING_RECEIVE=11)
|
||||
List<Long> actReqIds = activityList.stream().map(AdviceExecuteDetailParam::getRequestId).toList();
|
||||
List<ServiceRequest> executedReqs = serviceRequestService.listByIds(actReqIds);
|
||||
List<Long> checkReqIds = executedReqs.stream()
|
||||
.filter(sr -> ActivityDefCategory.TEST.getValue().equals(sr.getCategoryEnum()))
|
||||
.map(ServiceRequest::getId).toList();
|
||||
if (!checkReqIds.isEmpty()) {
|
||||
serviceRequestService.updatePendingReceiveStatus(checkReqIds);
|
||||
}
|
||||
}
|
||||
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱执行"}));
|
||||
|
||||
@@ -78,10 +78,12 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService
|
||||
.map(notPerformedReason -> new DispenseInitDto.NotPerformedReasonOption(notPerformedReason.getValue(),
|
||||
notPerformedReason.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
// 发药状态(汇总单:待配药→已提交,已发放→已发药)
|
||||
// 发药状态
|
||||
List<DispenseStatusOption> dispenseStatusOptions = new ArrayList<>();
|
||||
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.PREPARATION.getValue(), "已提交"));
|
||||
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.COMPLETED.getValue(), "已发药"));
|
||||
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.PREPARATION.getValue(),
|
||||
DispenseStatus.PREPARATION.getInfo()));
|
||||
dispenseStatusOptions.add(new DispenseStatusOption(DispenseStatus.COMPLETED.getValue(),
|
||||
DispenseStatus.COMPLETED.getInfo()));
|
||||
|
||||
initDto.setNotPerformedReasonOptions(notPerformedReasonOptions).setDispenseStatusOptions(dispenseStatusOptions);
|
||||
return R.ok(initDto);
|
||||
@@ -159,8 +161,8 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService
|
||||
new Page<>(pageNo, pageSize), queryWrapper, DispenseStatus.COMPLETED.getValue(),
|
||||
DispenseStatus.PREPARATION.getValue(), SupplyType.SUMMARY_DISPENSE.getValue());
|
||||
medicineSummaryFormPage.getRecords().forEach(e -> {
|
||||
// 发药状态(汇总单展示文案)
|
||||
e.setStatusEnum_enumText(getSummaryFormStatusText(e.getStatusEnum()));
|
||||
// 发药状态
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(DispenseStatus.class, e.getStatusEnum()));
|
||||
});
|
||||
return R.ok(medicineSummaryFormPage);
|
||||
}
|
||||
@@ -290,17 +292,4 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService
|
||||
}
|
||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"取消"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 汇总发药单状态展示文案(药品医嘱状态映射表:汇总申请→已提交,发药→已发药)
|
||||
*/
|
||||
private String getSummaryFormStatusText(Integer statusEnum) {
|
||||
if (DispenseStatus.PREPARATION.getValue().equals(statusEnum)) {
|
||||
return "已提交";
|
||||
}
|
||||
if (DispenseStatus.COMPLETED.getValue().equals(statusEnum)) {
|
||||
return "已发药";
|
||||
}
|
||||
return EnumUtils.getInfoByValue(DispenseStatus.class, statusEnum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ public class OutpatientInfusionAppServiceImpl implements IOutpatientInfusionAppS
|
||||
}
|
||||
boolean result = serviceRequestService.updateCancelledStatus(serviceReqId, now, practitionerId, orgId);
|
||||
// 更新主服务请求状态为待执行
|
||||
serviceRequestService.updateDraftStatus(List.of(serviceRequest.getBasedOnId()), null, null, null);
|
||||
serviceRequestService.updateDraftStatus(List.of(serviceRequest.getBasedOnId()), null, null);
|
||||
if (result) {
|
||||
// 判断是否全部取消执行
|
||||
boolean exists = serviceRequestMapper.exists(new LambdaQueryWrapper<ServiceRequest>()
|
||||
|
||||
@@ -86,12 +86,7 @@ public class OutpatientRecordServiceImpl implements IOutpatientRecordService {
|
||||
|
||||
// 处理就诊对象状态筛选
|
||||
if (outpatientRecordSearchParam.getSubjectStatusEnum() != null) {
|
||||
if (outpatientRecordSearchParam.getSubjectStatusEnum() == 0) {
|
||||
// 前端选择"无状态"(0)时,过滤 status_enum IS NULL 的记录
|
||||
queryWrapper.isNull("enc.status_enum");
|
||||
} else {
|
||||
queryWrapper.eq("enc.status_enum", outpatientRecordSearchParam.getSubjectStatusEnum());
|
||||
}
|
||||
queryWrapper.eq("enc.status_enum", outpatientRecordSearchParam.getSubjectStatusEnum());
|
||||
}
|
||||
|
||||
// 处理医生姓名查询(支持模糊查询)
|
||||
|
||||
@@ -133,13 +133,47 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
@Override
|
||||
public IPage<PatientBaseInfoDto> getPatientInfo(PatientBaseInfoDto patientBaseInfoDto, String searchKey,
|
||||
Integer pageNo, Integer pageSize, HttpServletRequest request) {
|
||||
// 构建基础查询条件
|
||||
// 获取登录者信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long userId = loginUser.getUserId();
|
||||
Integer tenantId = loginUser.getTenantId().intValue();
|
||||
|
||||
// 先构建基础查询条件
|
||||
QueryWrapper<PatientBaseInfoDto> queryWrapper = HisQueryUtils.buildQueryWrapper(
|
||||
patientBaseInfoDto, searchKey, new HashSet<>(Arrays.asList(CommonConstants.FieldName.Name,
|
||||
CommonConstants.FieldName.BusNo, CommonConstants.FieldName.PyStr, CommonConstants.FieldName.WbStr)),
|
||||
request);
|
||||
|
||||
// 检查是否是精确ID查询(从门诊挂号页面跳转时使用)
|
||||
boolean hasExactIdQuery = (patientBaseInfoDto.getId() != null);
|
||||
|
||||
// 只有非精确ID查询时,才添加医生患者过滤条件
|
||||
if (!hasExactIdQuery) {
|
||||
// 查询当前用户对应的医生信息
|
||||
LambdaQueryWrapper<com.openhis.administration.domain.Practitioner> practitionerQuery = new LambdaQueryWrapper<>();
|
||||
practitionerQuery.eq(com.openhis.administration.domain.Practitioner::getUserId, userId);
|
||||
// 使用list()避免TooManyResultsException异常,然后取第一个记录
|
||||
List<com.openhis.administration.domain.Practitioner> practitionerList = practitionerService.list(practitionerQuery);
|
||||
com.openhis.administration.domain.Practitioner practitioner = practitionerList != null && !practitionerList.isEmpty() ? practitionerList.get(0) : null;
|
||||
|
||||
// 如果当前用户是医生,添加医生患者过滤条件
|
||||
if (practitioner != null) {
|
||||
// 查询该医生作为接诊医生(ADMITTER, code="1")和挂号医生(REGISTRATION_DOCTOR, code="12")的所有就诊记录的患者ID
|
||||
List<Long> doctorPatientIds = patientManageMapper.getPatientIdsByPractitionerId(
|
||||
practitioner.getId(),
|
||||
Arrays.asList(ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode()),
|
||||
tenantId);
|
||||
|
||||
if (doctorPatientIds != null && !doctorPatientIds.isEmpty()) {
|
||||
// 添加患者ID过滤条件 - 注意:这里使用列名而不是表别名
|
||||
queryWrapper.in("id", doctorPatientIds);
|
||||
} else {
|
||||
// 如果没有相关患者,返回空结果
|
||||
queryWrapper.eq("id", -1); // 设置一个不存在的ID
|
||||
}
|
||||
}
|
||||
// 如果不是医生,查询所有患者
|
||||
}
|
||||
|
||||
IPage<PatientBaseInfoDto> patientInformationPage
|
||||
= patientManageMapper.getPatientPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
|
||||
@@ -52,8 +52,7 @@ public class PendingMedicationDetailsAppServiceImpl implements IPendingMedicatio
|
||||
Page<PendingMedicationPageDto> pendingMedicationPage = pendingMedicationDetailsMapper
|
||||
.selectPendingMedicationDetailsPage(new Page<>(pageNo, pageSize), queryWrapper,
|
||||
DispenseStatus.IN_PROGRESS.getValue(), DispenseStatus.PREPARATION.getValue(),
|
||||
DispenseStatus.PREPARED.getValue(), DispenseStatus.SUMMARIZED.getValue(),
|
||||
EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue());
|
||||
DispenseStatus.PREPARED.getValue(), EncounterClass.AMB.getValue(), EncounterClass.IMP.getValue());
|
||||
|
||||
pendingMedicationPage.getRecords().forEach(e -> {
|
||||
// 发药类型
|
||||
|
||||
@@ -22,7 +22,6 @@ public interface PendingMedicationDetailsMapper {
|
||||
* @param inProgress 发药类型:待发药
|
||||
* @param preparation 发药类型:待配药
|
||||
* @param prepared 发药类型:已配药
|
||||
* @param summarized 发药类型:已汇总
|
||||
* @param amb 门诊类型
|
||||
* @param imp 住院类型
|
||||
* @return 待发药明细
|
||||
@@ -33,7 +32,6 @@ public interface PendingMedicationDetailsMapper {
|
||||
@Param("inProgress") Integer inProgress,
|
||||
@Param("preparation") Integer preparation,
|
||||
@Param("prepared") Integer prepared,
|
||||
@Param("summarized") Integer summarized,
|
||||
@Param("amb") Integer amb,
|
||||
@Param("imp") Integer imp);
|
||||
|
||||
|
||||
@@ -69,12 +69,4 @@ public interface IAdviceManageAppService {
|
||||
*/
|
||||
R<?> stopRegAdvice(List<AdviceBatchOpParam> paramList);
|
||||
|
||||
/**
|
||||
* 住院医嘱取消停嘱(恢复)
|
||||
*
|
||||
* @param paramList 恢复参数
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> cancelStopRegAdvice(List<AdviceBatchOpParam> paramList);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.medication.domain.MedicationDispense;
|
||||
import com.openhis.medication.domain.MedicationRequest;
|
||||
import com.openhis.medication.service.IMedicationDispenseService;
|
||||
import com.openhis.medication.service.IMedicationRequestService;
|
||||
@@ -31,9 +30,6 @@ import com.openhis.web.regdoctorstation.dto.*;
|
||||
import com.openhis.web.regdoctorstation.mapper.AdviceManageAppMapper;
|
||||
import com.openhis.web.regdoctorstation.utils.RegPrescriptionUtils;
|
||||
import com.openhis.workflow.domain.DeviceRequest;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.openhis.workflow.domain.ServiceRequest;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
@@ -355,27 +351,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
/**
|
||||
* 处理药品
|
||||
*/
|
||||
|
||||
/**
|
||||
* 将 remark 合并到 contentJson 中,确保 Mapper 能从 content_json 提取 remark
|
||||
*/
|
||||
private String injectRemarkIntoContentJson(String contentJson, String remark) {
|
||||
if (remark == null || remark.isEmpty() || contentJson == null || contentJson.isEmpty()) {
|
||||
return contentJson;
|
||||
}
|
||||
try {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
JsonNode node = mapper.readTree(contentJson);
|
||||
if (node instanceof ObjectNode) {
|
||||
((ObjectNode) node).put("remark", remark);
|
||||
return mapper.writeValueAsString(node);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to inject remark into contentJson: {}", e.getMessage());
|
||||
}
|
||||
return contentJson;
|
||||
}
|
||||
|
||||
private List<String> handMedication(List<RegAdviceSaveDto> medicineList, Date startTime, Date authoredTime,
|
||||
Date curDate, String adviceOpType, Long organizationId, String signCode) {
|
||||
// 当前登录账号的科室id
|
||||
@@ -440,7 +415,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
}
|
||||
// 保存时处理的字段属性
|
||||
if (is_save) {
|
||||
longMedicationRequest.setEffectiveDoseStart(regAdviceSaveDto.getStartTime() != null ? regAdviceSaveDto.getStartTime() : startTime); // 医嘱开始时间
|
||||
longMedicationRequest.setEffectiveDoseStart(startTime); // 医嘱开始时间
|
||||
longMedicationRequest
|
||||
.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.MEDICATION_RES_NO.getPrefix(), 4));
|
||||
longMedicationRequest.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||
@@ -474,10 +449,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
if (longMedicationRequest.getId() == null) {
|
||||
firstTimeSave = true;
|
||||
}
|
||||
// 确保 contentJson 包含 remark
|
||||
if (regAdviceSaveDto.getRemark() != null && !regAdviceSaveDto.getRemark().isEmpty()) {
|
||||
longMedicationRequest.setContentJson(injectRemarkIntoContentJson(longMedicationRequest.getContentJson(), regAdviceSaveDto.getRemark()));
|
||||
}
|
||||
iMedicationRequestService.saveOrUpdate(longMedicationRequest);
|
||||
if (firstTimeSave) {
|
||||
medRequestIdList.add(longMedicationRequest.getId().toString());
|
||||
@@ -532,7 +503,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
}
|
||||
// 保存时处理的字段属性
|
||||
if (is_save) {
|
||||
tempMedicationRequest.setEffectiveDoseStart(regAdviceSaveDto.getStartTime() != null ? regAdviceSaveDto.getStartTime() : startTime); // 医嘱开始时间
|
||||
tempMedicationRequest.setEffectiveDoseStart(startTime); // 医嘱开始时间
|
||||
tempMedicationRequest
|
||||
.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.MEDICATION_RES_NO.getPrefix(), 4));
|
||||
tempMedicationRequest.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||
@@ -565,10 +536,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
if (tempMedicationRequest.getId() == null) {
|
||||
firstTimeSave = true;
|
||||
}
|
||||
// 确保 contentJson 包含 remark
|
||||
if (regAdviceSaveDto.getRemark() != null && !regAdviceSaveDto.getRemark().isEmpty()) {
|
||||
tempMedicationRequest.setContentJson(injectRemarkIntoContentJson(tempMedicationRequest.getContentJson(), regAdviceSaveDto.getRemark()));
|
||||
}
|
||||
iMedicationRequestService.saveOrUpdate(tempMedicationRequest);
|
||||
if (firstTimeSave) {
|
||||
medRequestIdList.add(tempMedicationRequest.getId().toString());
|
||||
@@ -648,7 +615,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
}
|
||||
// 保存时处理的字段属性
|
||||
if (is_save) {
|
||||
longServiceRequest.setOccurrenceStartTime(regAdviceSaveDto.getStartTime() != null ? regAdviceSaveDto.getStartTime() : startTime); // 医嘱开始时间
|
||||
longServiceRequest.setOccurrenceStartTime(startTime); // 医嘱开始时间
|
||||
longServiceRequest.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.SERVICE_RES_NO.getPrefix(), 4));
|
||||
longServiceRequest.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||
longServiceRequest.setQuantity(new BigDecimal("1")); // 请求数量 | 诊疗的长期医嘱数量都是1
|
||||
@@ -672,7 +639,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
longServiceRequest.setBasedOnTable(CommonConstants.TableName.MED_MEDICATION_REQUEST);
|
||||
}
|
||||
}
|
||||
longServiceRequest.setRemark(regAdviceSaveDto.getRemark());
|
||||
iServiceRequestService.saveOrUpdate(longServiceRequest);
|
||||
if (longServiceRequest.getId() != null) {
|
||||
processedRequestIds.add(longServiceRequest.getId());
|
||||
@@ -700,7 +666,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
}
|
||||
// 保存时处理的字段属性
|
||||
if (is_save) {
|
||||
tempServiceRequest.setOccurrenceStartTime(regAdviceSaveDto.getStartTime() != null ? regAdviceSaveDto.getStartTime() : startTime); // 医嘱开始时间
|
||||
tempServiceRequest.setOccurrenceStartTime(startTime); // 医嘱开始时间
|
||||
tempServiceRequest.setBusNo(assignSeqUtil.getSeqByDay(AssignSeqEnum.SERVICE_RES_NO.getPrefix(), 4));
|
||||
tempServiceRequest.setGenerateSourceEnum(GenerateSource.DOCTOR_PRESCRIPTION.getValue()); // 生成来源
|
||||
tempServiceRequest.setQuantity(regAdviceSaveDto.getQuantity()); // 请求数量
|
||||
@@ -724,7 +690,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
tempServiceRequest.setBasedOnTable(CommonConstants.TableName.MED_MEDICATION_REQUEST);
|
||||
}
|
||||
}
|
||||
tempServiceRequest.setRemark(regAdviceSaveDto.getRemark());
|
||||
iServiceRequestService.saveOrUpdate(tempServiceRequest);
|
||||
if (tempServiceRequest.getId() != null) {
|
||||
processedRequestIds.add(tempServiceRequest.getId());
|
||||
@@ -847,7 +812,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
deviceRequest.setPatientId(regAdviceSaveDto.getPatientId()); // 患者
|
||||
deviceRequest.setRequesterId(regAdviceSaveDto.getPractitionerId()); // 开方医生
|
||||
deviceRequest.setOrgId(regAdviceSaveDto.getFounderOrgId()); // 开方人科室
|
||||
deviceRequest.setReqAuthoredTime(regAdviceSaveDto.getStartTime() != null ? regAdviceSaveDto.getStartTime() : startTime); // 医嘱开始时间
|
||||
deviceRequest.setReqAuthoredTime(startTime); // 医嘱开始时间
|
||||
deviceRequest.setPerformLocation(regAdviceSaveDto.getLocationId()); // 发放科室
|
||||
deviceRequest.setEncounterId(regAdviceSaveDto.getEncounterId()); // 就诊id
|
||||
deviceRequest.setPackageId(regAdviceSaveDto.getPackageId()); // 组套id
|
||||
@@ -856,10 +821,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
deviceRequest.setConditionId(regAdviceSaveDto.getConditionId()); // 诊断id
|
||||
deviceRequest.setEncounterDiagnosisId(regAdviceSaveDto.getEncounterDiagnosisId()); // 就诊诊断id
|
||||
}
|
||||
// 确保 contentJson 包含 remark
|
||||
if (regAdviceSaveDto.getRemark() != null && !regAdviceSaveDto.getRemark().isEmpty()) {
|
||||
deviceRequest.setContentJson(injectRemarkIntoContentJson(deviceRequest.getContentJson(), regAdviceSaveDto.getRemark()));
|
||||
}
|
||||
iDeviceRequestService.saveOrUpdate(deviceRequest);
|
||||
}
|
||||
|
||||
@@ -890,7 +851,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
deviceRequest.setPatientId(regAdviceSaveDto.getPatientId()); // 患者
|
||||
deviceRequest.setRequesterId(regAdviceSaveDto.getPractitionerId()); // 开方医生
|
||||
deviceRequest.setOrgId(regAdviceSaveDto.getFounderOrgId()); // 开方人科室
|
||||
deviceRequest.setReqAuthoredTime(regAdviceSaveDto.getStartTime() != null ? regAdviceSaveDto.getStartTime() : startTime); // 医嘱开始时间
|
||||
deviceRequest.setReqAuthoredTime(startTime); // 医嘱开始时间
|
||||
deviceRequest.setPerformLocation(regAdviceSaveDto.getLocationId()); // 发放科室
|
||||
deviceRequest.setEncounterId(regAdviceSaveDto.getEncounterId()); // 就诊id
|
||||
deviceRequest.setPackageId(regAdviceSaveDto.getPackageId()); // 组套id
|
||||
@@ -899,10 +860,6 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
deviceRequest.setConditionId(regAdviceSaveDto.getConditionId()); // 诊断id
|
||||
deviceRequest.setEncounterDiagnosisId(regAdviceSaveDto.getEncounterDiagnosisId()); // 就诊诊断id
|
||||
}
|
||||
// 确保 contentJson 包含 remark
|
||||
if (regAdviceSaveDto.getRemark() != null && !regAdviceSaveDto.getRemark().isEmpty()) {
|
||||
deviceRequest.setContentJson(injectRemarkIntoContentJson(deviceRequest.getContentJson(), regAdviceSaveDto.getRemark()));
|
||||
}
|
||||
iDeviceRequestService.saveOrUpdate(deviceRequest);
|
||||
|
||||
// 保存时,保存耗材费用项
|
||||
@@ -1059,7 +1016,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
}
|
||||
if (!medicineRequestIds.isEmpty()) {
|
||||
// 根据请求id更新请求状态
|
||||
iMedicationRequestService.updateDraftStatusBatch(medicineRequestIds, null, null, null);
|
||||
iMedicationRequestService.updateDraftStatusBatch(medicineRequestIds, null, null);
|
||||
}
|
||||
if (!activityRequestIds.isEmpty()) {
|
||||
// 根据请求id更新请求状态
|
||||
@@ -1086,14 +1043,8 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
*/
|
||||
@Override
|
||||
public R<?> stopRegAdvice(List<AdviceBatchOpParam> paramList) {
|
||||
// 获取停嘱时间:优先从前端传入的 stopTime,否则用当前时间
|
||||
Date stopTime = paramList.stream()
|
||||
.map(AdviceBatchOpParam::getStopTime)
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst()
|
||||
.orElse(new Date());
|
||||
// 获取当前操作用户昵称作为停嘱医生
|
||||
String stopUserName = SecurityUtils.getNickName();
|
||||
// 当前时间
|
||||
Date date = new Date();
|
||||
// 药品
|
||||
List<AdviceBatchOpParam> medicineList = paramList.stream()
|
||||
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
|
||||
@@ -1108,112 +1059,15 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
= activityList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
|
||||
if (!medicineRequestIds.isEmpty()) {
|
||||
iMedicationRequestService.update(new LambdaUpdateWrapper<MedicationRequest>()
|
||||
.in(MedicationRequest::getId, medicineRequestIds)
|
||||
.set(MedicationRequest::getEffectiveDoseEnd, stopTime)
|
||||
.set(MedicationRequest::getStatusEnum, RequestStatus.STOPPED.getValue())
|
||||
.set(MedicationRequest::getUpdateBy, stopUserName));
|
||||
.in(MedicationRequest::getId, medicineRequestIds).set(MedicationRequest::getEffectiveDoseEnd, date)
|
||||
.set(MedicationRequest::getStatusEnum, RequestStatus.STOPPED.getValue()));
|
||||
}
|
||||
if (!activityRequestIds.isEmpty()) {
|
||||
iServiceRequestService.update(new LambdaUpdateWrapper<ServiceRequest>()
|
||||
.in(ServiceRequest::getId, activityRequestIds)
|
||||
.set(ServiceRequest::getOccurrenceEndTime, stopTime)
|
||||
.set(ServiceRequest::getStatusEnum, RequestStatus.STOPPED.getValue())
|
||||
.set(ServiceRequest::getUpdateBy, stopUserName));
|
||||
.in(ServiceRequest::getId, activityRequestIds).set(ServiceRequest::getOccurrenceEndTime, date)
|
||||
.set(ServiceRequest::getStatusEnum, RequestStatus.STOPPED.getValue()));
|
||||
}
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱停止"}));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 住院医嘱取消停嘱(恢复)
|
||||
*
|
||||
* 核心业务逻辑:
|
||||
* 1. 护士站校验:护士站尚未对该医嘱的停止进行"停止核对/确认"(即 dispense 状态未进入已发药/完成状态)
|
||||
* 2. 药房端校验:药房尚未对该停嘱单进行退药接收/退费入库确认
|
||||
* 3. 若校验通过,将医嘱状态复原为"已签发";清空停嘱时间与停嘱医生字段;
|
||||
* 同时自动作废已生成的待发药退回/退药申请
|
||||
*
|
||||
* @param paramList 恢复参数
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> cancelStopRegAdvice(List<AdviceBatchOpParam> paramList) {
|
||||
// 药品
|
||||
List<AdviceBatchOpParam> medicineList = paramList.stream()
|
||||
.filter(e -> ItemType.MEDICINE.getValue().equals(e.getAdviceType())).collect(Collectors.toList());
|
||||
List<Long> medicineRequestIds
|
||||
= medicineList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
|
||||
// 诊疗(包含护理adviceType=26)
|
||||
List<AdviceBatchOpParam> activityList = paramList.stream()
|
||||
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|
||||
|| (e.getAdviceType() != null && e.getAdviceType() == 26))
|
||||
.collect(Collectors.toList());
|
||||
List<Long> activityRequestIds
|
||||
= activityList.stream().map(AdviceBatchOpParam::getRequestId).collect(Collectors.toList());
|
||||
|
||||
// ============ 前置校验 ============
|
||||
// 1. 护士站校验:查询药品发放记录,确认护士站是否已执行停止核对(发药)
|
||||
if (!medicineRequestIds.isEmpty()) {
|
||||
List<MedicationDispense> dispenseList = iMedicationDispenseService.selectByRequestIdList(medicineRequestIds);
|
||||
for (MedicationDispense dispense : dispenseList) {
|
||||
// 如果发放状态 >= COMPLETED(4),说明护士站已发药/已确认停止
|
||||
if (dispense.getStatusEnum() != null && dispense.getStatusEnum() >= DispenseStatus.COMPLETED.getValue()
|
||||
&& !DispenseStatus.ON_HOLD.getValue().equals(dispense.getStatusEnum())
|
||||
&& !DispenseStatus.STOPPED.getValue().equals(dispense.getStatusEnum())
|
||||
&& !DispenseStatus.CANCELLED.getValue().equals(dispense.getStatusEnum())) {
|
||||
throw new ServiceException("护士站已确认停止该医嘱,无法取消停嘱!");
|
||||
}
|
||||
// 2. 药房端校验:如果已有退药/退费记录,说明药房已处理
|
||||
if (DispenseStatus.RETURNED.getValue().equals(dispense.getStatusEnum())
|
||||
|| DispenseStatus.REFUNDED.getValue().equals(dispense.getStatusEnum())
|
||||
|| DispenseStatus.PART_REFUND.getValue().equals(dispense.getStatusEnum())) {
|
||||
throw new ServiceException("药房已完成退药处理,无法取消停嘱!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ============ 执行恢复 ============
|
||||
if (!medicineRequestIds.isEmpty()) {
|
||||
// 恢复药品请求状态为"已发送"(ACTIVE=2),清空停嘱时间和更新人
|
||||
iMedicationRequestService.update(new LambdaUpdateWrapper<MedicationRequest>()
|
||||
.in(MedicationRequest::getId, medicineRequestIds)
|
||||
.set(MedicationRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(MedicationRequest::getEffectiveDoseEnd, null)
|
||||
.set(MedicationRequest::getUpdateBy, null));
|
||||
|
||||
// 作废/删除与这些药品请求相关的待退药发放记录
|
||||
List<MedicationDispense> relatedDispenseList = iMedicationDispenseService.selectByRequestIdList(medicineRequestIds);
|
||||
for (MedicationDispense dispense : relatedDispenseList) {
|
||||
if (DispenseStatus.PENDING_REFUND.getValue().equals(dispense.getStatusEnum())
|
||||
|| DispenseStatus.CANCELLED.getValue().equals(dispense.getStatusEnum())
|
||||
|| DispenseStatus.ON_HOLD.getValue().equals(dispense.getStatusEnum())) {
|
||||
// 将待退药/暂停/撤回的记录标记为草稿,或删除
|
||||
iMedicationDispenseService.update(new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.eq(MedicationDispense::getId, dispense.getId())
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.DRAFT.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, new Date()));
|
||||
}
|
||||
// 如果 dispense 已处于 STOPPED(6) 状态,也恢复为草稿以重新触发配药流程
|
||||
if (DispenseStatus.STOPPED.getValue().equals(dispense.getStatusEnum())) {
|
||||
iMedicationDispenseService.update(new LambdaUpdateWrapper<MedicationDispense>()
|
||||
.eq(MedicationDispense::getId, dispense.getId())
|
||||
.set(MedicationDispense::getStatusEnum, DispenseStatus.PREPARATION.getValue())
|
||||
.set(MedicationDispense::getStatusChangedTime, new Date()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!activityRequestIds.isEmpty()) {
|
||||
// 恢复诊疗请求状态为"已发送"(ACTIVE=2),清空停嘱时间和更新人
|
||||
iServiceRequestService.update(new LambdaUpdateWrapper<ServiceRequest>()
|
||||
.in(ServiceRequest::getId, activityRequestIds)
|
||||
.set(ServiceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue())
|
||||
.set(ServiceRequest::getOccurrenceEndTime, null)
|
||||
.set(ServiceRequest::getUpdateBy, null));
|
||||
}
|
||||
|
||||
return R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"医嘱恢复"}));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.enums.DelFlag;
|
||||
import com.core.common.exception.ServiceException;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
@@ -18,8 +17,6 @@ import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.document.domain.RequestForm;
|
||||
import com.openhis.document.service.IRequestFormService;
|
||||
import com.openhis.lab.domain.Specimen;
|
||||
import com.openhis.lab.service.ISpecimenService;
|
||||
import com.openhis.web.doctorstation.dto.ActivityChildrenJsonParams;
|
||||
import com.openhis.web.doctorstation.utils.AdviceUtils;
|
||||
import com.openhis.web.regdoctorstation.appservice.IRequestFormManageAppService;
|
||||
@@ -70,39 +67,6 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
@Resource
|
||||
IActivityDefinitionService iActivityDefinitionService;
|
||||
|
||||
@Resource
|
||||
ISpecimenService iSpecimenService;
|
||||
|
||||
/**
|
||||
* 校验当前用户是否有权操作该申请单(申请者本人或管理员)
|
||||
*/
|
||||
private R<?> validateRequestFormPermission(RequestForm requestForm) {
|
||||
if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
|
||||
return null;
|
||||
}
|
||||
Long currentPractitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
Long requesterId = requestForm.getRequesterId();
|
||||
if (currentPractitionerId == null || requesterId == null
|
||||
|| !currentPractitionerId.equals(requesterId)) {
|
||||
return R.fail("无操作权限,仅申请开立者或管理员可操作");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验关联医嘱是否已采证(存在已采集/已接收标本则不可撤回)
|
||||
*/
|
||||
private boolean hasCollectedSpecimen(List<Long> serviceRequestIds) {
|
||||
if (serviceRequestIds == null || serviceRequestIds.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
long count = iSpecimenService.count(
|
||||
new LambdaQueryWrapper<Specimen>()
|
||||
.in(Specimen::getServiceId, serviceRequestIds)
|
||||
.ge(Specimen::getCollectionStatusEnum, SpecCollectStatus.COLLECTED.getValue()));
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存申请单
|
||||
*
|
||||
@@ -155,13 +119,10 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
return R.fail("无待签发的医嘱,该申请单不可编辑");
|
||||
}
|
||||
} else {
|
||||
// 根据申请单类型生成不同前缀的单号
|
||||
// 检查申请单号:JC(检查)+ Z(住院标识)+ yyMMdd(日期)+ 5位顺序号
|
||||
String dateStr = new java.text.SimpleDateFormat("yyMMdd").format(new Date());
|
||||
AssignSeqEnum seqEnum = ActivityDefCategory.PROCEDURE.getCode().equals(typeCode)
|
||||
? AssignSeqEnum.SURGERY_APPLY_NO
|
||||
: AssignSeqEnum.CHECK_APPLY_NO;
|
||||
int seq = assignSeqUtil.getSeqNoByDay(seqEnum.getPrefix());
|
||||
prescriptionNo = seqEnum.getPrefix() + dateStr + String.format("%05d", seq);
|
||||
int seq = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.CHECK_APPLY_NO.getPrefix());
|
||||
prescriptionNo = "JCZ" + dateStr + String.format("%05d", seq);
|
||||
}
|
||||
|
||||
// 当前时间
|
||||
@@ -567,17 +528,12 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
if (requestForm == null) {
|
||||
return R.fail("申请单不存在");
|
||||
}
|
||||
R<?> permissionResult = validateRequestFormPermission(requestForm);
|
||||
if (permissionResult != null) {
|
||||
return permissionResult;
|
||||
}
|
||||
String prescriptionNo = requestForm.getPrescriptionNo();
|
||||
|
||||
// 查询该申请单下所有 ServiceRequest(含子项)
|
||||
List<ServiceRequest> serviceRequests = iServiceRequestService.list(
|
||||
new LambdaQueryWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo));
|
||||
if (serviceRequests == null || serviceRequests.isEmpty()) {
|
||||
return R.fail("未找到关联的诊疗医嘱");
|
||||
}
|
||||
@@ -607,7 +563,7 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
// 4. 删除申请单
|
||||
iRequestFormService.removeById(requestFormId);
|
||||
|
||||
log.info("检验申请单删除成功,requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
|
||||
log.info("检查申请单删除成功,requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
|
||||
return R.ok("删除成功");
|
||||
}
|
||||
|
||||
@@ -620,47 +576,32 @@ public class RequestFormManageAppServiceImpl implements IRequestFormManageAppSer
|
||||
if (requestForm == null) {
|
||||
return R.fail("申请单不存在");
|
||||
}
|
||||
R<?> permissionResult = validateRequestFormPermission(requestForm);
|
||||
if (permissionResult != null) {
|
||||
return permissionResult;
|
||||
}
|
||||
String prescriptionNo = requestForm.getPrescriptionNo();
|
||||
|
||||
// 查询该申请单下所有 ServiceRequest
|
||||
List<ServiceRequest> serviceRequests = iServiceRequestService.list(
|
||||
new LambdaQueryWrapper<ServiceRequest>()
|
||||
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
.eq(ServiceRequest::getPrescriptionNo, prescriptionNo));
|
||||
if (serviceRequests == null || serviceRequests.isEmpty()) {
|
||||
return R.fail("未找到关联的诊疗医嘱");
|
||||
}
|
||||
|
||||
// 校验:只有已签发(status=2)的申请单可撤回
|
||||
boolean allActive = serviceRequests.stream()
|
||||
.allMatch(sr -> RequestStatus.ACTIVE.getValue().equals(sr.getStatusEnum()));
|
||||
if (!allActive) {
|
||||
return R.fail("只有已签发状态的申请单可撤回");
|
||||
}
|
||||
|
||||
// 将所有 ServiceRequest 状态改回待签发(DRAFT=0)
|
||||
List<Long> serviceRequestIds = serviceRequests.stream()
|
||||
.map(ServiceRequest::getId).collect(Collectors.toList());
|
||||
|
||||
// 校验:标本已采集则不可撤回
|
||||
if (hasCollectedSpecimen(serviceRequestIds)) {
|
||||
return R.fail("标本已采集,无法撤回");
|
||||
}
|
||||
|
||||
// 校验:任一ServiceRequest为ACTIVE(status=2)即可撤回,与SQL的EXISTS逻辑一致
|
||||
boolean hasActive = serviceRequests.stream()
|
||||
.anyMatch(sr -> RequestStatus.ACTIVE.getValue().equals(sr.getStatusEnum()));
|
||||
if (!hasActive) {
|
||||
return R.fail("只有已签发且未采证的申请单可撤回");
|
||||
}
|
||||
|
||||
// 将所有已签发的 ServiceRequest 状态改回待签发,与申请单展示状态同步
|
||||
boolean updated = iServiceRequestService.update(
|
||||
iServiceRequestService.update(
|
||||
new ServiceRequest().setStatusEnum(RequestStatus.DRAFT.getValue()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>()
|
||||
.in(ServiceRequest::getId, serviceRequestIds)
|
||||
.eq(ServiceRequest::getStatusEnum, RequestStatus.ACTIVE.getValue()));
|
||||
if (!updated) {
|
||||
return R.fail("撤回失败,医嘱状态已变更,请刷新后重试");
|
||||
}
|
||||
.in(ServiceRequest::getId, serviceRequestIds));
|
||||
|
||||
log.info("检验申请单撤回成功,requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
|
||||
log.info("检查申请单撤回成功,requestFormId={}, prescriptionNo={}", requestFormId, prescriptionNo);
|
||||
return R.ok("撤回成功");
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -162,7 +161,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
adviceBaseDto.setAdviceDefinitionId(definitionId); // 医嘱定义id
|
||||
// 对应的诊疗医嘱信息
|
||||
activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null, null,
|
||||
null, null, 1, 1, null, List.of(3), null, null).getRecords().get(0);
|
||||
null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords().get(0);
|
||||
// 逻辑1---------------------直接新增
|
||||
longServiceRequest.setStatusEnum(RequestStatus.DRAFT.getValue());// 请求状态
|
||||
longServiceRequest.setOccurrenceStartTime(startTime); // 医嘱开始时间
|
||||
@@ -209,7 +208,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
adviceBaseDto.setAdviceDefinitionId(definitionId); // 医嘱定义id
|
||||
// 对应的诊疗医嘱信息
|
||||
activityAdviceBaseDto = iDoctorStationAdviceAppService
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, null, List.of(3), null, null)
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null)
|
||||
.getRecords().get(0);
|
||||
|
||||
longServiceRequest.setStatusEnum(RequestStatus.DRAFT.getValue());// 请求状态
|
||||
@@ -349,7 +348,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
adviceBaseDto.setAdviceDefinitionId(transferOrganizationDefinitionId); // 医嘱定义id
|
||||
// 转科的医嘱信息
|
||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, null, List.of(3), null, null)
|
||||
.getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null)
|
||||
.getRecords().get(0);
|
||||
// 保存转科医嘱请求
|
||||
ServiceRequest serviceRequest = new ServiceRequest();
|
||||
@@ -401,7 +400,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
// 计划出院时间
|
||||
Date endTime = leaveHospitalParam.getEndTime();
|
||||
if (endTime == null) {
|
||||
endTime = new Date();
|
||||
endTime = endTime;
|
||||
}
|
||||
// 就诊id
|
||||
Long encounterId = leaveHospitalParam.getEncounterId();
|
||||
@@ -430,12 +429,9 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService {
|
||||
}
|
||||
|
||||
// 出院的医嘱信息
|
||||
List<AdviceBaseDto> adviceList = iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null,
|
||||
List.of(transferOrganizationDefinitionId), null, 1, 1, null, List.of(3), null, null).getRecords();
|
||||
if (CollectionUtils.isEmpty(adviceList)) {
|
||||
return R.fail("未找到出院医嘱定义数据,请确认诊疗目录中已配置出院医嘱");
|
||||
}
|
||||
AdviceBaseDto activityAdviceBaseDto = adviceList.get(0);
|
||||
AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null,
|
||||
List.of(transferOrganizationDefinitionId), null, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords()
|
||||
.get(0);
|
||||
// 保存出院医嘱请求
|
||||
ServiceRequest serviceRequest = new ServiceRequest();
|
||||
serviceRequest.setStatusEnum(RequestStatus.DRAFT.getValue());// 请求状态
|
||||
|
||||
@@ -143,15 +143,4 @@ public class AdviceManageController {
|
||||
return iAdviceManageAppService.stopRegAdvice(paramList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 住院医嘱取消停嘱(恢复)
|
||||
*
|
||||
* @param paramList 恢复参数
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/cancel-stop-reg-advice")
|
||||
public R<?> cancelStopRegAdvice(@RequestBody List<AdviceBatchOpParam> paramList) {
|
||||
return iAdviceManageAppService.cancelStopRegAdvice(paramList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -143,23 +143,14 @@ public class RequestFormManageController {
|
||||
* 查询手术申请单
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
||||
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
||||
* @param status 单据状态(可选)
|
||||
* @param keyword 关键字(可选,申请单号/手术项目名称模糊匹配)
|
||||
* @return 手术申请单
|
||||
*/
|
||||
@GetMapping(value = "/get-surgery")
|
||||
public R<?> getSurgeryRequestForm(
|
||||
@RequestParam(required = false) Long encounterId,
|
||||
@RequestParam(required = false) String startDate,
|
||||
@RequestParam(required = false) String endDate,
|
||||
@RequestParam(required = false) String status,
|
||||
@RequestParam(required = false) String keyword) {
|
||||
public R<?> getSurgeryRequestForm(@RequestParam(required = false) Long encounterId) {
|
||||
if (encounterId == null) {
|
||||
return R.fail("就诊ID不能为空");
|
||||
}
|
||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROCEDURE.getCode(), startDate, endDate, status, keyword));
|
||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.PROCEDURE.getCode()));
|
||||
}
|
||||
/**
|
||||
* 分页查询手术申请单(全局,不需要encounterId,用于门诊手术安排查找弹窗)
|
||||
@@ -203,8 +194,8 @@ public class RequestFormManageController {
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/delete")
|
||||
public R<?> deleteRequestForm(@RequestBody Map<String, Object> data) {
|
||||
return iRequestFormManageAppService.deleteRequestForm(parseLong(data.get("requestFormId")));
|
||||
public R<?> deleteRequestForm(@RequestBody Map<String, Long> data) {
|
||||
return iRequestFormManageAppService.deleteRequestForm(data.get("requestFormId"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,24 +205,7 @@ public class RequestFormManageController {
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping(value = "/withdraw")
|
||||
public R<?> withdrawRequestForm(@RequestBody Map<String, Object> data) {
|
||||
return iRequestFormManageAppService.withdrawRequestForm(parseLong(data.get("requestFormId")));
|
||||
}
|
||||
|
||||
private Long parseLong(Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (value instanceof Long) {
|
||||
return (Long) value;
|
||||
}
|
||||
if (value instanceof Number) {
|
||||
return ((Number) value).longValue();
|
||||
}
|
||||
try {
|
||||
return Long.parseLong(value.toString());
|
||||
} catch (NumberFormatException e) {
|
||||
return null;
|
||||
}
|
||||
public R<?> withdrawRequestForm(@RequestBody Map<String, Long> data) {
|
||||
return iRequestFormManageAppService.withdrawRequestForm(data.get("requestFormId"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
package com.openhis.web.regdoctorstation.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 医嘱批量操作参数类
|
||||
*/
|
||||
@@ -24,10 +21,4 @@ public class AdviceBatchOpParam {
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long requestId;
|
||||
|
||||
/**
|
||||
* 停嘱时间
|
||||
*/
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date stopTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -50,9 +50,4 @@ public class RegRequestBaseDto extends RequestBaseDto {
|
||||
private String doseUnitCode;
|
||||
private String doseUnitCode_dictText;
|
||||
|
||||
|
||||
/**
|
||||
* 备注(最长50字)
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ public class HomeController {
|
||||
HomeStatisticsDto statisticsDto = homeStatisticsService.getHomeStatistics();
|
||||
|
||||
// 获取待写病历数量
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(practitionerId, null);
|
||||
Long userId = SecurityUtils.getLoginUser().getUserId();
|
||||
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(userId);
|
||||
|
||||
// 将待写病历数量添加到统计数据中
|
||||
statisticsDto.setPendingEmr((Integer) pendingEmrCount.getData());
|
||||
|
||||
@@ -74,6 +74,7 @@ public class TriageQueueAppServiceImpl implements TriageQueueAppService {
|
||||
.eq(TriageQueueItem::getTenantId, tenantId)
|
||||
.eq(TriageQueueItem::getQueueDate, qd)
|
||||
.eq(TriageQueueItem::getDeleteFlag, "0")
|
||||
.ne(TriageQueueItem::getStatus, TriageQueueStatus.COMPLETED.getValue())
|
||||
.orderByAsc(TriageQueueItem::getQueueOrder);
|
||||
|
||||
// 如果指定了科室,按科室过滤;否则查询所有科室(全科模式)
|
||||
@@ -91,6 +92,14 @@ public class TriageQueueAppServiceImpl implements TriageQueueAppService {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 双重保险:再次过滤掉 COMPLETED 状态的患者(防止数据库中有异常数据)
|
||||
if (list != null && !list.isEmpty()) {
|
||||
int beforeSize = list.size();
|
||||
list = list.stream()
|
||||
.filter(item -> !TriageQueueStatus.COMPLETED.getValue().equals(item.getStatus()))
|
||||
.collect(java.util.stream.Collectors.toList());
|
||||
}
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
AND T1.inventory_status_enum != 3
|
||||
AND T1.delete_flag = '0'
|
||||
<choose>
|
||||
<when test="lotNumber != null and lotNumber != ''">
|
||||
<when test="lotNumber != null">
|
||||
AND T1.lot_number = #{lotNumber}
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
@@ -516,8 +516,6 @@
|
||||
T1.patient_id AS patient_id,
|
||||
'med_medication_definition' AS advice_table_name,
|
||||
T1.medication_id AS advice_definition_id
|
||||
, T1.content_json::jsonb ->> 'remark' AS remark
|
||||
, T1.back_reason AS reason_text
|
||||
FROM med_medication_request AS T1
|
||||
LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id
|
||||
AND T2.delete_flag = '0'
|
||||
@@ -579,8 +577,6 @@
|
||||
T1.patient_id AS patient_id,
|
||||
'med_medication_definition' AS advice_table_name,
|
||||
T3.ID AS advice_definition_id
|
||||
, T2.content_json::jsonb ->> 'remark' AS remark
|
||||
, T2.back_reason AS reason_text
|
||||
FROM adm_charge_item AS T1
|
||||
INNER JOIN med_medication_request AS T2 ON T2.ID = T1.service_id AND T2.delete_flag = '0'
|
||||
LEFT JOIN med_medication_definition AS T3 ON T3.ID = T2.medication_id AND T3.delete_flag = '0'
|
||||
@@ -588,9 +584,6 @@
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.service_table = #{MED_MEDICATION_REQUEST}
|
||||
<if test="historyFlag == '0'.toString()">
|
||||
<if test="generateSourceEnum != null">
|
||||
AND (T2.generate_source_enum IS NULL OR T2.generate_source_enum = #{generateSourceEnum})
|
||||
</if>
|
||||
AND T1.encounter_id = #{encounterId}
|
||||
</if>
|
||||
<if test="historyFlag == '1'.toString()">
|
||||
@@ -644,8 +637,6 @@
|
||||
CI.patient_id AS patient_id,
|
||||
'adm_device_definition' AS advice_table_name,
|
||||
CI.product_id AS advice_definition_id
|
||||
, NULL AS remark
|
||||
, NULL AS reason_text
|
||||
FROM adm_charge_item AS CI
|
||||
LEFT JOIN adm_charge_item_definition CID ON CID.id = CI.definition_id AND CID.delete_flag = '0'
|
||||
LEFT JOIN wor_device_request DR ON DR.id = CI.service_id AND DR.delete_flag = '0'
|
||||
@@ -700,8 +691,6 @@
|
||||
T1.patient_id AS patient_id,
|
||||
'adm_device_definition' AS advice_table_name,
|
||||
T1.device_def_id AS advice_definition_id
|
||||
, T1.content_json::jsonb ->> 'remark' AS remark
|
||||
, NULL AS reason_text
|
||||
FROM wor_device_request AS T1
|
||||
LEFT JOIN adm_device_definition AS T2 ON T2.ID = T1.device_def_id
|
||||
AND T2.delete_flag = '0'
|
||||
@@ -757,9 +746,7 @@
|
||||
T1.encounter_id AS encounter_id,
|
||||
T1.patient_id AS patient_id,
|
||||
'wor_activity_definition' AS advice_table_name,
|
||||
T1.activity_id AS advice_definition_id,
|
||||
T1.remark AS remark
|
||||
, T1.reason_text AS reason_text
|
||||
T1.activity_id AS advice_definition_id
|
||||
FROM wor_service_request AS T1
|
||||
LEFT JOIN wor_activity_definition AS T2
|
||||
ON T2.ID = T1.activity_id
|
||||
@@ -907,9 +894,10 @@
|
||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||
</if>
|
||||
ORDER BY t1.ID, t1.name ASC, t2.ID ASC
|
||||
LIMIT #{limit} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<!-- 检查/检验项目专用分页查询:仅查指定 category_code + 定价,无库存/草稿库存/取药科室等无关逻辑 -->
|
||||
<!-- 检查项目专用分页查询:仅查检查(23) + 定价,无库存/草稿库存/取药科室等无关逻辑 -->
|
||||
<select id="getExaminationPage" resultType="com.openhis.web.doctorstation.dto.SurgeryItemDto">
|
||||
SELECT DISTINCT ON (t1.ID)
|
||||
t1.ID AS advice_definition_id,
|
||||
@@ -931,11 +919,11 @@
|
||||
ON t3.id = t1.org_id
|
||||
AND t3.delete_flag = '0'
|
||||
WHERE t1.delete_flag = '0'
|
||||
AND t1.category_code = #{categoryCode}
|
||||
AND t1.category_code = '23'
|
||||
<if test="searchKey != null and searchKey != ''">
|
||||
AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%')
|
||||
</if>
|
||||
ORDER BY t1.ID, t1.name ASC, t2.ID ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -4,38 +4,4 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.web.doctorstation.mapper.DoctorStationEmrAppMapper">
|
||||
|
||||
<select id="getPendingEmrList" resultType="java.util.HashMap">
|
||||
SELECT e.id AS "encounterId",
|
||||
e.patient_id AS "patientId",
|
||||
p.name AS "patientName",
|
||||
p.gender_enum AS "gender",
|
||||
p.birth_date AS "birthDate",
|
||||
e.create_time AS "registerTime",
|
||||
e.bus_no AS "busNo"
|
||||
FROM adm_encounter e
|
||||
INNER JOIN adm_encounter_participant ep ON e.id = ep.encounter_id AND ep.practitioner_id = #{doctorId}
|
||||
LEFT JOIN adm_patient p ON e.patient_id = p.id
|
||||
LEFT JOIN doc_emr emr ON e.id = emr.encounter_id
|
||||
WHERE e.status_enum = 2
|
||||
AND emr.id IS NULL
|
||||
<if test="patientName != null and patientName != ''">
|
||||
AND p.name LIKE CONCAT('%', #{patientName}, '%')
|
||||
</if>
|
||||
ORDER BY e.create_time DESC
|
||||
LIMIT #{pageSize} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="getPendingEmrCount" resultType="java.lang.Long">
|
||||
SELECT COUNT(*)
|
||||
FROM adm_encounter e
|
||||
INNER JOIN adm_encounter_participant ep ON e.id = ep.encounter_id AND ep.practitioner_id = #{doctorId}
|
||||
LEFT JOIN adm_patient p ON e.patient_id = p.id
|
||||
LEFT JOIN doc_emr emr ON e.id = emr.encounter_id
|
||||
WHERE e.status_enum = 2
|
||||
AND emr.id IS NULL
|
||||
<if test="patientName != null and patientName != ''">
|
||||
AND p.name LIKE CONCAT('%', #{patientName}, '%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
@@ -11,10 +11,6 @@
|
||||
p.birth_date,
|
||||
p.phone,
|
||||
p.address,
|
||||
p.address_province,
|
||||
p.address_city,
|
||||
p.address_district,
|
||||
p.address_street,
|
||||
p.work_company,
|
||||
p.nationality_code,
|
||||
p.marital_status_enum,
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
ON T5.medication_def_id = T6.id
|
||||
AND T5.delete_flag = '0'
|
||||
WHERE T1.delete_flag = '0'
|
||||
AND T1.status_enum IN (#{inProgress}, #{preparation}, #{prepared}, #{summarized})
|
||||
AND T1.status_enum IN (#{inProgress}, #{preparation}, #{prepared})
|
||||
ORDER BY T1.create_time DESC
|
||||
) AS T7
|
||||
${ew.customSqlSegment}
|
||||
|
||||
@@ -216,11 +216,8 @@
|
||||
ccd.name AS condition_definition_name,
|
||||
T1.therapy_enum AS therapyEnum,
|
||||
T1.sort_number AS sort_number,
|
||||
T1.effective_dose_start AS start_time,
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.medication_id AS advice_definition_id,
|
||||
T1.effective_dose_end AS stop_time,
|
||||
T1.update_by AS stop_user_name
|
||||
T1.medication_id AS advice_definition_id
|
||||
FROM med_medication_request AS T1
|
||||
LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id
|
||||
AND T2.delete_flag = '0'
|
||||
@@ -272,11 +269,8 @@
|
||||
'' AS condition_definition_name,
|
||||
2 AS therapyEnum,
|
||||
99 AS sort_number,
|
||||
T1.req_authored_time AS start_time,
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.device_def_id AS advice_definition_id,
|
||||
NULL::timestamp AS stop_time,
|
||||
'' AS stop_user_name
|
||||
T1.device_def_id AS advice_definition_id
|
||||
FROM wor_device_request AS T1
|
||||
LEFT JOIN adm_device_definition AS T2 ON T2.ID = T1.device_def_id
|
||||
AND T2.delete_flag = '0'
|
||||
@@ -325,11 +319,8 @@
|
||||
'' AS condition_definition_name,
|
||||
COALESCE(T1.therapy_enum, 2) AS therapyEnum,
|
||||
99 AS sort_number,
|
||||
T1.occurrence_start_time AS start_time,
|
||||
T1.based_on_id AS based_on_id,
|
||||
T1.activity_id AS advice_definition_id,
|
||||
T1.occurrence_end_time AS stop_time,
|
||||
T1.update_by AS stop_user_name
|
||||
T1.activity_id AS advice_definition_id
|
||||
FROM wor_service_request AS T1
|
||||
LEFT JOIN wor_activity_definition AS T2
|
||||
ON T2.ID = T1.activity_id
|
||||
|
||||
@@ -35,36 +35,21 @@
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 8
|
||||
) THEN 6
|
||||
WHEN EXISTS (
|
||||
SELECT 1 FROM wor_service_request ws
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 5
|
||||
) THEN 7
|
||||
WHEN EXISTS (
|
||||
SELECT 1 FROM wor_service_request ws
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 3
|
||||
) THEN 5
|
||||
WHEN EXISTS (
|
||||
SELECT 1 FROM wor_service_request ws
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 12
|
||||
) THEN 4
|
||||
WHEN EXISTS (
|
||||
SELECT 1 FROM wor_service_request ws
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 11
|
||||
) THEN 3
|
||||
WHEN EXISTS (
|
||||
SELECT 1 FROM wor_service_request ws
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 10
|
||||
) THEN 2
|
||||
WHEN EXISTS (
|
||||
SELECT 1 FROM wor_service_request ws
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 2
|
||||
) THEN 1
|
||||
WHEN EXISTS (
|
||||
SELECT 1 FROM wor_service_request ws
|
||||
WHERE ws.prescription_no = drf.prescription_no AND ws.delete_flag = '0'
|
||||
AND ws.status_enum = 5
|
||||
) THEN 7
|
||||
ELSE 0
|
||||
END AS computed_status
|
||||
FROM doc_request_form AS drf
|
||||
|
||||
@@ -274,10 +274,6 @@ public enum AssignSeqEnum {
|
||||
* 检查申请单号(住院)
|
||||
*/
|
||||
CHECK_APPLY_NO("72", "检查申请单号", "JCZ"),
|
||||
/**
|
||||
* 手术申请单号(住院)
|
||||
*/
|
||||
SURGERY_APPLY_NO("73", "手术申请单号", "SSZ"),
|
||||
/**
|
||||
* b 病历文书
|
||||
*/
|
||||
|
||||
@@ -57,22 +57,7 @@ public enum RequestStatus implements HisEnumInterface {
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
UNKNOWN(9, "unknown", "未知"),
|
||||
|
||||
/**
|
||||
* 已校对(检查申请:护士校对通过)
|
||||
*/
|
||||
CHECK_VERIFIED(10, "check_verified", "已校对"),
|
||||
|
||||
/**
|
||||
* 待接收(检查申请:等待医技科室接单)
|
||||
*/
|
||||
PENDING_RECEIVE(11, "pending_receive", "待接收"),
|
||||
|
||||
/**
|
||||
* 已接收(检查申请:医技科室已接单)
|
||||
*/
|
||||
CHECK_RECEIVED(12, "check_received", "已接收");
|
||||
UNKNOWN(9, "unknown", "未知");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
|
||||
@@ -111,9 +111,6 @@ public class MedicationRequest extends HisBaseEntity {
|
||||
/** 支持用药信息 */
|
||||
private String supportInfo;
|
||||
|
||||
/** 退回原因 */
|
||||
private String backReason;
|
||||
|
||||
/** 请求开始时间 */
|
||||
private Date reqAuthoredTime;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface IMedicationRequestService extends IService<MedicationRequest> {
|
||||
* @param practitionerId 校对人
|
||||
* @param checkDate 校对时间
|
||||
*/
|
||||
void updateDraftStatusBatch(List<Long> requestIdList, Long practitionerId, Date checkDate, String backReason);
|
||||
void updateDraftStatusBatch(List<Long> requestIdList, Long practitionerId, Date checkDate);
|
||||
|
||||
/**
|
||||
* 更新请求状态:取消
|
||||
|
||||
@@ -44,7 +44,7 @@ public class MedicationRequestServiceImpl extends ServiceImpl<MedicationRequestM
|
||||
* @param checkDate 校对时间
|
||||
*/
|
||||
@Override
|
||||
public void updateDraftStatusBatch(List<Long> requestIdList, Long practitionerId, Date checkDate, String backReason) {
|
||||
public void updateDraftStatusBatch(List<Long> requestIdList, Long practitionerId, Date checkDate) {
|
||||
LambdaUpdateWrapper<MedicationRequest> updateWrapper =
|
||||
new LambdaUpdateWrapper<MedicationRequest>().in(MedicationRequest::getId, requestIdList)
|
||||
.set(MedicationRequest::getStatusEnum, RequestStatus.DRAFT.getValue());
|
||||
@@ -54,9 +54,6 @@ public class MedicationRequestServiceImpl extends ServiceImpl<MedicationRequestM
|
||||
if (checkDate != null) {
|
||||
updateWrapper.set(MedicationRequest::getCheckTime, checkDate);
|
||||
}
|
||||
if (backReason != null) {
|
||||
updateWrapper.set(MedicationRequest::getBackReason, backReason);
|
||||
}
|
||||
baseMapper.update(null, updateWrapper);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,13 +79,11 @@ public class OpSchedule extends HisBaseEntity {
|
||||
private String surgerySite;
|
||||
|
||||
/** 入院时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
private LocalDateTime admissionTime;
|
||||
|
||||
/** 入手术室时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
private LocalDateTime entryTime;
|
||||
|
||||
/** 手术室编码 */
|
||||
@@ -144,23 +142,19 @@ public class OpSchedule extends HisBaseEntity {
|
||||
private String assistant3Code;
|
||||
|
||||
/** 手术开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/** 手术结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/** 麻醉开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
private LocalDateTime anesStart;
|
||||
|
||||
/** 麻醉结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
|
||||
private LocalDateTime anesEnd;
|
||||
|
||||
/** 手术状态 */
|
||||
|
||||
@@ -173,9 +173,4 @@ public class ServiceRequest extends HisBaseEntity {
|
||||
*/
|
||||
private Integer generateSourceEnum;
|
||||
|
||||
/**
|
||||
* 备注(最长50字)
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
@@ -39,22 +39,6 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
*/
|
||||
void updateCompleteRequestStatus(List<Long> serReqIdList, Long practitionerId, Date checkDate);
|
||||
|
||||
/**
|
||||
* 更新检查申请状态:已校对(护士校对检查申请后状态为CHECK_VERIFIED,而非COMPLETED)
|
||||
*
|
||||
* @param serReqIdList 服务请求id列表
|
||||
* @param practitionerId 校对人
|
||||
* @param checkDate 校对时间
|
||||
*/
|
||||
void updateCheckVerifiedStatus(List<Long> serReqIdList, Long practitionerId, Date checkDate);
|
||||
|
||||
/**
|
||||
* 更新检查申请状态:待接收(护士执行检查申请后状态为PENDING_RECEIVE)
|
||||
*
|
||||
* @param serReqIdList 服务请求id列表
|
||||
*/
|
||||
void updatePendingReceiveStatus(List<Long> serReqIdList);
|
||||
|
||||
/**
|
||||
* 获取执行过的诊疗数据
|
||||
*
|
||||
@@ -109,7 +93,7 @@ public interface IServiceRequestService extends IService<ServiceRequest> {
|
||||
* @param practitionerId 校对人
|
||||
* @param checkDate 校对时间
|
||||
*/
|
||||
void updateDraftStatus(List<Long> serviceRequestIdList, Long practitionerId, Date checkDate, String backReason);
|
||||
void updateDraftStatus(List<Long> serviceRequestIdList, Long practitionerId, Date checkDate);
|
||||
|
||||
/**
|
||||
* 更新服务状态:待发送
|
||||
|
||||
@@ -66,31 +66,6 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新检查申请状态:已校对(护士校对检查申请后状态为CHECK_VERIFIED,而非COMPLETED)
|
||||
*
|
||||
* @param serReqIdList 服务请求id列表
|
||||
*/
|
||||
@Override
|
||||
public void updateCheckVerifiedStatus(List<Long> serReqIdList, Long practitionerId, Date checkDate) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.CHECK_VERIFIED.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新检查申请状态:待接收(护士执行检查申请后状态为PENDING_RECEIVE)
|
||||
*
|
||||
* @param serReqIdList 服务请求id列表
|
||||
*/
|
||||
@Override
|
||||
public void updatePendingReceiveStatus(List<Long> serReqIdList) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.PENDING_RECEIVE.getValue()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serReqIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取执行过的诊疗数据
|
||||
*
|
||||
@@ -197,15 +172,9 @@ public class ServiceRequestServiceImpl extends ServiceImpl<ServiceRequestMapper,
|
||||
* @param checkDate 校对时间
|
||||
*/
|
||||
@Override
|
||||
public void updateDraftStatus(List<Long> serviceRequestIdList, Long practitionerId, Date checkDate, String backReason) {
|
||||
ServiceRequest updateEntity = new ServiceRequest()
|
||||
.setStatusEnum(RequestStatus.DRAFT.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setCheckTime(DateUtils.getNowDate());
|
||||
if (backReason != null && !backReason.isEmpty()) {
|
||||
updateEntity.setReasonText(backReason);
|
||||
}
|
||||
baseMapper.update(updateEntity,
|
||||
public void updateDraftStatus(List<Long> serviceRequestIdList, Long practitionerId, Date checkDate) {
|
||||
baseMapper.update(new ServiceRequest().setStatusEnum(RequestStatus.DRAFT.getValue())
|
||||
.setPerformerCheckId(SecurityUtils.getLoginUser().getPractitionerId()).setCheckTime(DateUtils.getNowDate()),
|
||||
new LambdaUpdateWrapper<ServiceRequest>().in(ServiceRequest::getId, serviceRequestIdList)
|
||||
.eq(ServiceRequest::getDeleteFlag, DelFlag.NO.getCode()));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
AND T1.delete_flag = '0'
|
||||
AND T2.delete_flag = '0'
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -162,24 +162,6 @@ export function getG(svg, viewConfig) {
|
||||
// 设置数据
|
||||
export function getData(allData) {
|
||||
const rowsData = allData.rows; // allData, '【全部数据】'
|
||||
// 兼容旧数据:将旧 typeCode 映射到新 typeCode(心率 004→014,脉搏 005→002,呼吸 006→001)
|
||||
const OLD_CODE_MAP = { '004': '014', '005': '002', '006': '001' };
|
||||
rowsData.forEach(row => {
|
||||
if (row.rowBOS) {
|
||||
const prependItems = [];
|
||||
row.rowBOS.forEach(item => {
|
||||
const newCode = OLD_CODE_MAP[item.typeCode];
|
||||
// 始终添加映射条目,用 unshift 插入数组头部
|
||||
// 这样 getType 的 find() 优先匹配映射后的编码(如脉冲、呼吸)
|
||||
// 即使存在同编码的旧条目(如血压舒张压用 002、收缩压用 001),
|
||||
// 映射后的脉搏(002)和呼吸(001)条目排在前面,确保图表正确渲染
|
||||
if (newCode) {
|
||||
prependItems.push({ ...item, typeCode: newCode });
|
||||
}
|
||||
});
|
||||
row.rowBOS.unshift(...prependItems);
|
||||
}
|
||||
});
|
||||
const infoData = allData.grParamBOS;
|
||||
const typesData = getTypeDatas(allData.types, allData.grParamBOS.beginDate);
|
||||
const selectOp = allData.selectOp;
|
||||
|
||||
@@ -10,27 +10,15 @@
|
||||
@click="clickAct"
|
||||
>
|
||||
<div v-if="data.bedOperationalStatus==='U'">
|
||||
<img
|
||||
:src="emptyBed"
|
||||
class="pf_card_emptyBed_img"
|
||||
>
|
||||
<div class="pf_card_emptyBed_text">
|
||||
{{ data.bedName }}
|
||||
</div>
|
||||
<img :src="emptyBed" class="pf_card_emptyBed_img">
|
||||
<div class="pf_card_emptyBed_text">{{ data.bedName }}</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div
|
||||
v-if="data.isDischarge"
|
||||
class="pf_card_discharge"
|
||||
>
|
||||
<div v-if="data.isDischarge" class="pf_card_discharge">
|
||||
<span style="margin-left: 6px">离</span>
|
||||
</div>
|
||||
<div class="pf_card_card">
|
||||
<CardSign
|
||||
:color="getBedBackColor(data.triageLevel)"
|
||||
:title="data.bedName"
|
||||
:tail="getDisplay(data.triageLevel)"
|
||||
/>
|
||||
<CardSign :color="getBedBackColor(data.triageLevel)" :title="data.bedName" :tail="getDisplay(data.triageLevel)" />
|
||||
</div>
|
||||
<div class="pf_card_nameSexAndAge">
|
||||
<span class="pf_card_name">{{ data.patientName }}</span>
|
||||
@@ -40,48 +28,20 @@
|
||||
<span style="margin-right: 16px">入室时间</span>
|
||||
{{ moment(data.checkInWardTime).format('YYYY-MM-DD HH:mm') }}
|
||||
</div>
|
||||
<div class="pf_card_noCode">
|
||||
{{ data.hisId }}
|
||||
</div>
|
||||
<div class="pf_card_rescueTimeText">
|
||||
{{ rescueTimeText() }}
|
||||
</div>
|
||||
<div
|
||||
v-if="data.diag!==''"
|
||||
class="pf_card_diagnosis"
|
||||
>
|
||||
<div class="card-rectangle-text">
|
||||
{{ data.diag }}
|
||||
</div>
|
||||
<div class="pf_card_noCode">{{ data.hisId }}</div>
|
||||
<div class="pf_card_rescueTimeText">{{ rescueTimeText() }}</div>
|
||||
<div v-if="data.diag!==''" class="pf_card_diagnosis">
|
||||
<div class="card-rectangle-text">{{ data.diag }}</div>
|
||||
<span style="margin-left: 4px">(诊断)</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="isNewSign()"
|
||||
class="card-rectangle"
|
||||
>
|
||||
新
|
||||
</div>
|
||||
<div
|
||||
v-if="is72HourSign()"
|
||||
class="card-rectangle2"
|
||||
>
|
||||
超72H
|
||||
</div>
|
||||
<div v-if="isNewSign()" class="card-rectangle">新</div>
|
||||
<div v-if="is72HourSign()" class="card-rectangle2">超72H</div>
|
||||
<hr class="pf_card_line">
|
||||
<div class="pf_card_nursingMeasuresString">
|
||||
{{ getStringByCode(data.nursingMeasures, nursingMeasures) }}
|
||||
</div>
|
||||
<div class="pf_card_specialArrangementString">
|
||||
{{ getStringByCode(data.specialArrangement, specialArrangementList) }}
|
||||
</div>
|
||||
<div
|
||||
v-if="false"
|
||||
class="pf_card_btn"
|
||||
@click="moreClick"
|
||||
>
|
||||
更多
|
||||
</div>
|
||||
<div class="pf_card_nursingMeasuresString">{{ getStringByCode(data.nursingMeasures, nursingMeasures) }}</div>
|
||||
<div class="pf_card_specialArrangementString">{{ getStringByCode(data.specialArrangement, specialArrangementList) }}</div>
|
||||
<div v-if="false" class="pf_card_btn" @click="moreClick">更多</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
:data="item"
|
||||
:bed-config="bedConfig"
|
||||
@click="clickAct"
|
||||
@more-click="moreClickAct"
|
||||
@moreClick="moreClickAct"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,19 +1,9 @@
|
||||
<template>
|
||||
<div class="printCard">
|
||||
<div
|
||||
ref="refQr"
|
||||
style="float: left; margin: 30px 15px"
|
||||
>
|
||||
<img
|
||||
:src="emptyBed"
|
||||
style="height: 120px"
|
||||
class="pf_card_emptyBed_img"
|
||||
>
|
||||
<div ref="refQr" style="float: left; margin: 30px 15px">
|
||||
<img :src="emptyBed" style="height: 120px" class="pf_card_emptyBed_img">
|
||||
</div>
|
||||
<div
|
||||
class="printView_content"
|
||||
style=" margin: 30px 0"
|
||||
>
|
||||
<div class="printView_content" style=" margin: 30px 0">
|
||||
<div>
|
||||
<span>床号:</span>
|
||||
<span>{{ printData.bedName }}</span>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<div class="recordBill">
|
||||
<div
|
||||
id="div1"
|
||||
class="printView_header"
|
||||
>
|
||||
<div id="div1" class="printView_header">
|
||||
<div style="text-align: center; height: 40px">
|
||||
护理交接班
|
||||
</div>
|
||||
@@ -21,83 +18,35 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
id="div2"
|
||||
class="printView_content"
|
||||
>
|
||||
<table
|
||||
border="1"
|
||||
cellSpacing="0"
|
||||
width="98%"
|
||||
cellPadding="1"
|
||||
style=" border-collapse:collapse; font-size: 14px"
|
||||
bordercolor="#333333"
|
||||
>
|
||||
<div id="div2" class="printView_content">
|
||||
<table border="1" cellSpacing="0" width="98%" cellPadding="1" style=" border-collapse:collapse; font-size: 14px" bordercolor="#333333">
|
||||
<thead>
|
||||
<TR>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 40px"
|
||||
align="center"
|
||||
>
|
||||
类别
|
||||
</DIV>
|
||||
<DIV style="width: 40px" align="center">类别</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 50px"
|
||||
align="center"
|
||||
>
|
||||
床号
|
||||
</DIV>
|
||||
<DIV style="width: 50px" align="center">床号</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 60px"
|
||||
align="center"
|
||||
>
|
||||
姓名
|
||||
</DIV>
|
||||
<DIV style="width: 60px" align="center">姓名</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 90px"
|
||||
align="center"
|
||||
>
|
||||
主诉
|
||||
</DIV>
|
||||
<DIV style="width: 90px" align="center">主诉</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 90px"
|
||||
align="center"
|
||||
>
|
||||
既往史
|
||||
</DIV>
|
||||
<DIV style="width: 90px" align="center">既往史</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 90px"
|
||||
align="center"
|
||||
>
|
||||
诊断
|
||||
</DIV>
|
||||
<DIV style="width: 90px" align="center">诊断</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 155px"
|
||||
align="center"
|
||||
>
|
||||
交接信息
|
||||
</DIV>
|
||||
<DIV style="width: 155px" align="center">交接信息</DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="item in printData.shiftRecordItems"
|
||||
:key="item.id"
|
||||
>
|
||||
<tr v-for="item in printData.shiftRecordItems" :key="item.id">
|
||||
<td v-html="item.typeDisplay" />
|
||||
<td v-html="item.bedName" />
|
||||
<td v-html="item.patientName" />
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<div class="recordBill">
|
||||
<div
|
||||
:id="'exeSheetTitle' + printData.id"
|
||||
class="printView_header"
|
||||
>
|
||||
<div :id="'exeSheetTitle' + printData.id" class="printView_header">
|
||||
<div style="text-align: center; height: 60px">
|
||||
{{ userStore.hospitalName }}医嘱执行单
|
||||
</div>
|
||||
@@ -19,119 +16,51 @@
|
||||
<span style="display: inline-block; width: 140px">性别:{{!printData.patientInfo.gender? '':printData.patientInfo.gender.display}}</span>
|
||||
</div>-->
|
||||
</div>
|
||||
<div
|
||||
:id="'exeSheet' + printData.id"
|
||||
class="printView_content"
|
||||
>
|
||||
<table
|
||||
border="1"
|
||||
cellSpacing="0"
|
||||
width="97%"
|
||||
cellPadding="1"
|
||||
style=" border-collapse:collapse; font-size: 13px"
|
||||
bordercolor="#333333"
|
||||
>
|
||||
<div :id="'exeSheet' + printData.id" class="printView_content">
|
||||
<table border="1" cellSpacing="0" width="97%" cellPadding="1" style=" border-collapse:collapse; font-size: 13px" bordercolor="#333333">
|
||||
<thead>
|
||||
<TR>
|
||||
<TD rowspan="1">
|
||||
<DIV style="width: 65px;text-align: center">
|
||||
医嘱日期
|
||||
</DIV>
|
||||
<DIV style="width: 65px;text-align: center">医嘱日期</DIV>
|
||||
</TD>
|
||||
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 120px"
|
||||
align="center"
|
||||
>
|
||||
医嘱
|
||||
</DIV>
|
||||
<DIV style="width: 120px" align="center">医嘱</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 10px"
|
||||
align="center"
|
||||
/>
|
||||
<DIV style="width: 10px" align="center" />
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 70px"
|
||||
align="center"
|
||||
>
|
||||
嘱托
|
||||
</DIV>
|
||||
<DIV style="width: 70px" align="center">嘱托</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV
|
||||
style="width: 60px"
|
||||
align="center"
|
||||
>
|
||||
用量
|
||||
</DIV>
|
||||
<DIV style="width: 60px" align="center">用量</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 40px"
|
||||
align="center"
|
||||
>
|
||||
用法
|
||||
</DIV>
|
||||
<DIV style="width: 40px" align="center">用法</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 40px"
|
||||
align="center"
|
||||
>
|
||||
频次
|
||||
</DIV>
|
||||
<DIV style="width: 40px" align="center">频次</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV
|
||||
style="width: 65px"
|
||||
align="center"
|
||||
>
|
||||
开立医生
|
||||
</DIV>
|
||||
<DIV style="width: 65px" align="center">开立医生</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV
|
||||
style="width: 65px"
|
||||
align="center"
|
||||
>
|
||||
执行时间
|
||||
</DIV>
|
||||
<DIV style="width: 65px" align="center">执行时间</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 65px"
|
||||
align="center"
|
||||
>
|
||||
执行护士
|
||||
</DIV>
|
||||
<DIV style="width: 65px" align="center">执行护士</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 55px"
|
||||
align="center"
|
||||
>
|
||||
终止时间
|
||||
</DIV>
|
||||
<DIV style="width: 55px" align="center">终止时间</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 55px"
|
||||
align="center"
|
||||
>
|
||||
终止人
|
||||
</DIV>
|
||||
<DIV style="width: 55px" align="center">终止人</DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="item in printData.recordData"
|
||||
:key="item.id"
|
||||
>
|
||||
<tr v-for="item in printData.recordData" :key="item.id">
|
||||
<td v-html="item.moTime" />
|
||||
<td v-html="item.orderName" />
|
||||
<td v-html="item.flag" />
|
||||
@@ -141,20 +70,12 @@
|
||||
<td v-html="item.frequency" />
|
||||
<td :id="item.id">
|
||||
<span v-if="(item.docSignImage === ''||item.docSignImage === null)">{{ item.moDocName }}</span>
|
||||
<img
|
||||
v-if="(item.docSignImage !== ''&&item.docSignImage !== null)"
|
||||
:src="'data:image/png;base64,'+ item.docSignImage"
|
||||
style="height: 100%; width: 100%;object-fit: cover;"
|
||||
>
|
||||
<img v-if="(item.docSignImage !== ''&&item.docSignImage !== null)" :src="'data:image/png;base64,'+ item.docSignImage" style="height: 100%; width: 100%;object-fit: cover;">
|
||||
</td>
|
||||
<td v-html="item.occurrence" />
|
||||
<td :id="item.id">
|
||||
<span v-if="(item.perNurserSignImage === ''||item.perNurserSignImage === null)">{{ item.performName }}</span>
|
||||
<img
|
||||
v-if="(item.perNurserSignImage !== ''&&item.perNurserSignImage !== null)"
|
||||
:src="'data:image/png;base64,'+ item.perNurserSignImage"
|
||||
style="height: 100%; width: 100%;object-fit: cover;"
|
||||
>
|
||||
<img v-if="(item.perNurserSignImage !== ''&&item.perNurserSignImage !== null)" :src="'data:image/png;base64,'+ item.perNurserSignImage" style="height: 100%; width: 100%;object-fit: cover;">
|
||||
</td>
|
||||
<td />
|
||||
<td />
|
||||
@@ -170,6 +91,10 @@ import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
@@ -178,10 +103,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
|
||||
@@ -12,51 +12,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: block; width: 120px; height: 60px; float:left; ">
|
||||
<div
|
||||
:id="getId(printData.id)"
|
||||
style="float: left; margin: 5px;"
|
||||
/>
|
||||
<div :id="getId(printData.id)" style="float: left; margin: 5px;" />
|
||||
<span style="float: left; margin: 5px">{{ printData.priority }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div :id="printData.id + 'div2'">
|
||||
<table
|
||||
border="1"
|
||||
cellSpacing="0"
|
||||
width="390px"
|
||||
cellPadding="1"
|
||||
style="margin-left: 8px; border-collapse:collapse; table-layout: fixed; font-size: 14px"
|
||||
bordercolor="#333333"
|
||||
>
|
||||
<table border="1" cellSpacing="0" width="390px" cellPadding="1" style="margin-left: 8px; border-collapse:collapse; table-layout: fixed; font-size: 14px" bordercolor="#333333">
|
||||
<thead>
|
||||
<TR>
|
||||
<Th
|
||||
style="width: 160px"
|
||||
v-html="'药品名称'"
|
||||
/>
|
||||
<Th
|
||||
style="width: 75px"
|
||||
v-html="'用量'"
|
||||
/>
|
||||
<Th
|
||||
style="width: 10px"
|
||||
v-html="''"
|
||||
/>
|
||||
<Th
|
||||
style="width: 50px"
|
||||
v-html="'频次'"
|
||||
/>
|
||||
<Th
|
||||
style="width: 75px"
|
||||
v-html="'用法'"
|
||||
/>
|
||||
<Th style="width: 160px" v-html="'药品名称'" />
|
||||
<Th style="width: 75px" v-html="'用量'" />
|
||||
<Th style="width: 10px" v-html="''" />
|
||||
<Th style="width: 50px" v-html="'频次'" />
|
||||
<Th style="width: 75px" v-html="'用法'" />
|
||||
</TR>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="item in printData.orderDetail"
|
||||
:key="item.id"
|
||||
>
|
||||
<tr v-for="item in printData.orderDetail" :key="item.id">
|
||||
<td v-html="item.orderName" />
|
||||
<td v-html="item.doseOnce + item.doseUnit" />
|
||||
<td v-html="item.flag" />
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<div class="recordBill">
|
||||
<div
|
||||
id="div1"
|
||||
class="printView_header"
|
||||
>
|
||||
<div id="div1" class="printView_header">
|
||||
<div style="text-align: center; font-size: 20px; height: 40px">
|
||||
{{ userStore.hospitalName }}输液执行单
|
||||
</div>
|
||||
@@ -16,88 +13,38 @@
|
||||
<span style="margin-left: 18px">科室:{{ printData.patientInfo.deptName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
id="div2"
|
||||
class="printView_content"
|
||||
>
|
||||
<table
|
||||
border="1"
|
||||
cellSpacing="0"
|
||||
cellPadding="1"
|
||||
style=" border-collapse:collapse; font-size: 14px"
|
||||
bordercolor="#333333"
|
||||
>
|
||||
<div id="div2" class="printView_content">
|
||||
<table border="1" cellSpacing="0" cellPadding="1" style=" border-collapse:collapse; font-size: 14px" bordercolor="#333333">
|
||||
<thead>
|
||||
<TR style="height: 30px">
|
||||
<TD rowspan="1">
|
||||
<DIV
|
||||
style="width: 35px"
|
||||
align="center"
|
||||
>
|
||||
时间
|
||||
</DIV>
|
||||
<DIV style="width: 35px" align="center">时间</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 280px"
|
||||
align="center"
|
||||
>
|
||||
药品名称
|
||||
</DIV>
|
||||
<DIV style="width: 280px" align="center">药品名称</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 10px"
|
||||
align="center"
|
||||
/>
|
||||
<DIV style="width: 10px" align="center" />
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV
|
||||
style="width: 55px"
|
||||
align="center"
|
||||
>
|
||||
剂量
|
||||
</DIV>
|
||||
<DIV style="width: 55px" align="center">剂量</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 30px"
|
||||
align="center"
|
||||
>
|
||||
频次
|
||||
</DIV>
|
||||
<DIV style="width: 30px" align="center">频次</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV
|
||||
style="width: 55px"
|
||||
align="center"
|
||||
>
|
||||
用法
|
||||
</DIV>
|
||||
<DIV style="width: 55px" align="center">用法</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV
|
||||
style="width: 70px"
|
||||
align="center"
|
||||
>
|
||||
执行时间
|
||||
</DIV>
|
||||
<DIV style="width: 70px" align="center">执行时间</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV
|
||||
style="width: 55px"
|
||||
align="center"
|
||||
>
|
||||
执行人
|
||||
</DIV>
|
||||
<DIV style="width: 55px" align="center">执行人</DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
</thead>
|
||||
<tbody style=" border-collapse:collapse;">
|
||||
<tr
|
||||
v-for="item in printData.recordData"
|
||||
:key="item.id"
|
||||
>
|
||||
<tr v-for="item in printData.recordData" :key="item.id">
|
||||
<td v-html="item.moTime.substring(0,16)" />
|
||||
<td v-html="item.orderName" />
|
||||
<td v-html="item.flag" />
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="print">
|
||||
<div
|
||||
v-for="item in printData"
|
||||
:key="item.id"
|
||||
>
|
||||
<div v-for="item in printData" :key="item.id">
|
||||
<div class="myccs2">
|
||||
<injectLabel
|
||||
:ref="item.id"
|
||||
:print-data="item"
|
||||
/>
|
||||
<injectLabel :ref="item.id" :print-data="item" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="print">
|
||||
<div
|
||||
v-for="item in printData"
|
||||
:key="item.id"
|
||||
>
|
||||
<div v-for="item in printData" :key="item.id">
|
||||
<div class="myccs2">
|
||||
<orderSheet
|
||||
v-if="!item.type"
|
||||
:ref="item.id"
|
||||
:print-data="item"
|
||||
/>
|
||||
<exeOrderSheet
|
||||
v-if="item.type"
|
||||
:ref="item.id"
|
||||
:print-data="item"
|
||||
/>
|
||||
<orderSheet v-if="!item.type" :ref="item.id" :print-data="item" />
|
||||
<exeOrderSheet v-if="item.type" :ref="item.id" :print-data="item" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<Graphics
|
||||
v-if="graphicsDataDone"
|
||||
:value="resInfo"
|
||||
print
|
||||
@done="printPage"
|
||||
/>
|
||||
<Graphics v-if="graphicsDataDone" :value="resInfo" print @done="printPage" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
<span>分诊时间:</span>
|
||||
<span>{{ printData.triageTime }}</span>
|
||||
</div>
|
||||
<img
|
||||
ref="refQr"
|
||||
style="position: absolute; top: 10px; left: 100px"
|
||||
>
|
||||
<img ref="refQr" style="position: absolute; top: 10px; left: 100px" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -33,6 +30,10 @@ import useUserStore from '@/store/modules/user';
|
||||
|
||||
export default {
|
||||
name: 'TriageTicket',
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
@@ -47,10 +48,6 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
<div>
|
||||
<div ref="print">
|
||||
<div class="myccs2">
|
||||
<triageTicketNew
|
||||
ref="printTriage"
|
||||
:print-data="printData"
|
||||
/>
|
||||
<triageTicketNew ref="printTriage" :print-data="printData" />
|
||||
</div>
|
||||
<!-- <div v-for="item in printData" :key="item.id">-->
|
||||
<!-- <div class="myccs2">-->
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
<span style="font-weight: bolder; font-size: 18px; line-height: 36px">{{ printData.greenText }}</span>
|
||||
<span style="font-weight: bolder; font-size: 18px; line-height: 36px">分诊单</span>
|
||||
</div>
|
||||
<div style="position: absolute; top: 135px; text-align: center; width: 300px">
|
||||
{{ printData.hisId }}
|
||||
</div>
|
||||
<div style="position: absolute; top: 135px; text-align: center; width: 300px">{{ printData.hisId }}</div>
|
||||
<div style="position: absolute; top: 155px; text-align: center; width: 300px">
|
||||
{{ printData.triageLevel }}({{ printData.dept }})
|
||||
</div>
|
||||
@@ -109,18 +107,10 @@
|
||||
"
|
||||
/>
|
||||
<div style="margin-left: 15px">
|
||||
<div style="font-size: 14px; margin-top: 15px; font-weight: bolder">
|
||||
请仔细核对个人信息后进行挂号
|
||||
</div>
|
||||
<div style="margin-top: 5px; font-size: 14px">
|
||||
为了您家人和其他患者的健康
|
||||
</div>
|
||||
<div style="font-size: 14px">
|
||||
请您保持就诊秩序保持诊区安静
|
||||
</div>
|
||||
<div style="font-size: 14px">
|
||||
祝您早日康复
|
||||
</div>
|
||||
<div style="font-size: 14px; margin-top: 15px; font-weight: bolder">请仔细核对个人信息后进行挂号</div>
|
||||
<div style="margin-top: 5px; font-size: 14px">为了您家人和其他患者的健康</div>
|
||||
<div style="font-size: 14px">请您保持就诊秩序保持诊区安静</div>
|
||||
<div style="font-size: 14px">祝您早日康复</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<div class="printWrist">
|
||||
<div
|
||||
id="div1"
|
||||
class="printView_content"
|
||||
>
|
||||
<div id="div1" class="printView_content">
|
||||
<div style="margin: 1px;font-size: 12px">
|
||||
<span>姓名: </span>
|
||||
<span>{{ printData.patientName }}</span>
|
||||
@@ -25,11 +22,7 @@
|
||||
<span style="position: absolute; left: 140px">{{ printData.triageLevel }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
id="qrcode"
|
||||
ref="refQr"
|
||||
style="padding-top: 1px"
|
||||
/>
|
||||
<div id="qrcode" ref="refQr" style="padding-top: 1px" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -1,21 +1,9 @@
|
||||
<template>
|
||||
<el-breadcrumb
|
||||
class="app-breadcrumb"
|
||||
separator="/"
|
||||
>
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item
|
||||
v-for="(item,index) in levelList"
|
||||
:key="item.path"
|
||||
>
|
||||
<span
|
||||
v-if="item.redirect === 'noRedirect' || index == levelList.length - 1"
|
||||
class="no-redirect"
|
||||
>{{ item.meta.title }}</span>
|
||||
<a
|
||||
v-else
|
||||
@click.prevent="handleLink(item)"
|
||||
>{{ item.meta.title }}</a>
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect === 'noRedirect' || index == levelList.length - 1" class="no-redirect">{{ item.meta.title }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
|
||||
@@ -1,107 +1,55 @@
|
||||
<template>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="1"
|
||||
>
|
||||
日,允许的通配符[, - * ? / L W]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="1">
|
||||
日,允许的通配符[, - * ? / L W]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="2"
|
||||
>
|
||||
不指定
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="2">
|
||||
不指定
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="3"
|
||||
>
|
||||
周期从
|
||||
<el-input-number
|
||||
v-model="cycle01"
|
||||
:min="1"
|
||||
:max="30"
|
||||
/> -
|
||||
<el-input-number
|
||||
v-model="cycle02"
|
||||
:min="cycle01 + 1"
|
||||
:max="31"
|
||||
/> 日
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="3">
|
||||
周期从
|
||||
<el-input-number v-model='cycle01' :min="1" :max="30" /> -
|
||||
<el-input-number v-model='cycle02' :min="cycle01 + 1" :max="31" /> 日
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="4"
|
||||
>
|
||||
从
|
||||
<el-input-number
|
||||
v-model="average01"
|
||||
:min="1"
|
||||
:max="30"
|
||||
/> 号开始,每
|
||||
<el-input-number
|
||||
v-model="average02"
|
||||
:min="1"
|
||||
:max="31 - average01"
|
||||
/> 日执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="4">
|
||||
从
|
||||
<el-input-number v-model='average01' :min="1" :max="30" /> 号开始,每
|
||||
<el-input-number v-model='average02' :min="1" :max="31 - average01" /> 日执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="5"
|
||||
>
|
||||
每月
|
||||
<el-input-number
|
||||
v-model="workday"
|
||||
:min="1"
|
||||
:max="31"
|
||||
/> 号最近的那个工作日
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="5">
|
||||
每月
|
||||
<el-input-number v-model='workday' :min="1" :max="31" /> 号最近的那个工作日
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="6"
|
||||
>
|
||||
本月最后一天
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="6">
|
||||
本月最后一天
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="7"
|
||||
>
|
||||
指定
|
||||
<el-select
|
||||
v-model="checkboxList"
|
||||
clearable
|
||||
placeholder="可多选"
|
||||
multiple
|
||||
:multiple-limit="10"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in 31"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="7">
|
||||
指定
|
||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple :multiple-limit="10">
|
||||
<el-option v-for="item in 31" :key="item" :label="item" :value="item" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup>
|
||||
const emit = defineEmits(['update'])
|
||||
|
||||
@@ -1,75 +1,36 @@
|
||||
<template>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="1"
|
||||
>
|
||||
小时,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="1">
|
||||
小时,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="2"
|
||||
>
|
||||
周期从
|
||||
<el-input-number
|
||||
v-model="cycle01"
|
||||
:min="0"
|
||||
:max="22"
|
||||
/> -
|
||||
<el-input-number
|
||||
v-model="cycle02"
|
||||
:min="cycle01 + 1"
|
||||
:max="23"
|
||||
/> 时
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="2">
|
||||
周期从
|
||||
<el-input-number v-model='cycle01' :min="0" :max="22" /> -
|
||||
<el-input-number v-model='cycle02' :min="cycle01 + 1" :max="23" /> 时
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="3"
|
||||
>
|
||||
从
|
||||
<el-input-number
|
||||
v-model="average01"
|
||||
:min="0"
|
||||
:max="22"
|
||||
/> 时开始,每
|
||||
<el-input-number
|
||||
v-model="average02"
|
||||
:min="1"
|
||||
:max="23 - average01"
|
||||
/> 小时执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="3">
|
||||
从
|
||||
<el-input-number v-model='average01' :min="0" :max="22" /> 时开始,每
|
||||
<el-input-number v-model='average02' :min="1" :max="23 - average01" /> 小时执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="4"
|
||||
>
|
||||
指定
|
||||
<el-select
|
||||
v-model="checkboxList"
|
||||
clearable
|
||||
placeholder="可多选"
|
||||
multiple
|
||||
:multiple-limit="10"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in 24"
|
||||
:key="item"
|
||||
:label="item - 1"
|
||||
:value="item - 1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="4">
|
||||
指定
|
||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple :multiple-limit="10">
|
||||
<el-option v-for="item in 24" :key="item" :label="item - 1" :value="item - 1" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,211 +1,123 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane
|
||||
v-if="shouldHide('second')"
|
||||
label="秒"
|
||||
>
|
||||
<CrontabSecond
|
||||
ref="cronsecond"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
@update="updateCrontabValue"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="秒" v-if="shouldHide('second')">
|
||||
<CrontabSecond
|
||||
@update="updateCrontabValue"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
ref="cronsecond"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane
|
||||
v-if="shouldHide('min')"
|
||||
label="分钟"
|
||||
>
|
||||
<CrontabMin
|
||||
ref="cronmin"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
@update="updateCrontabValue"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="分钟" v-if="shouldHide('min')">
|
||||
<CrontabMin
|
||||
@update="updateCrontabValue"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
ref="cronmin"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane
|
||||
v-if="shouldHide('hour')"
|
||||
label="小时"
|
||||
>
|
||||
<CrontabHour
|
||||
ref="cronhour"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
@update="updateCrontabValue"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="小时" v-if="shouldHide('hour')">
|
||||
<CrontabHour
|
||||
@update="updateCrontabValue"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
ref="cronhour"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane
|
||||
v-if="shouldHide('day')"
|
||||
label="日"
|
||||
>
|
||||
<CrontabDay
|
||||
ref="cronday"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
@update="updateCrontabValue"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="日" v-if="shouldHide('day')">
|
||||
<CrontabDay
|
||||
@update="updateCrontabValue"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
ref="cronday"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane
|
||||
v-if="shouldHide('month')"
|
||||
label="月"
|
||||
>
|
||||
<CrontabMonth
|
||||
ref="cronmonth"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
@update="updateCrontabValue"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="月" v-if="shouldHide('month')">
|
||||
<CrontabMonth
|
||||
@update="updateCrontabValue"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
ref="cronmonth"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane
|
||||
v-if="shouldHide('week')"
|
||||
label="周"
|
||||
>
|
||||
<CrontabWeek
|
||||
ref="cronweek"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
@update="updateCrontabValue"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="周" v-if="shouldHide('week')">
|
||||
<CrontabWeek
|
||||
@update="updateCrontabValue"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
ref="cronweek"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane
|
||||
v-if="shouldHide('year')"
|
||||
label="年"
|
||||
>
|
||||
<CrontabYear
|
||||
ref="cronyear"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
@update="updateCrontabValue"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tab-pane label="年" v-if="shouldHide('year')">
|
||||
<CrontabYear
|
||||
@update="updateCrontabValue"
|
||||
:check="checkNumber"
|
||||
:cron="crontabValueObj"
|
||||
ref="cronyear"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<div class="popup-main">
|
||||
<div class="popup-result">
|
||||
<p class="title">
|
||||
时间表达式
|
||||
</p>
|
||||
<table>
|
||||
<thead>
|
||||
<th
|
||||
v-for="item of tabTitles"
|
||||
:key="item"
|
||||
>
|
||||
{{ item }}
|
||||
</th>
|
||||
<th>Cron 表达式</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.second.length < 10">{{ crontabValueObj.second }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueObj.second"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueObj.second }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.min.length < 10">{{ crontabValueObj.min }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueObj.min"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueObj.min }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.hour.length < 10">{{ crontabValueObj.hour }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueObj.hour"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueObj.hour }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.day.length < 10">{{ crontabValueObj.day }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueObj.day"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueObj.day }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.month.length < 10">{{ crontabValueObj.month }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueObj.month"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueObj.month }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.week.length < 10">{{ crontabValueObj.week }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueObj.week"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueObj.week }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.year.length < 10">{{ crontabValueObj.year }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueObj.year"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueObj.year }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
<td class="result">
|
||||
<span v-if="crontabValueString.length < 90">{{ crontabValueString }}</span>
|
||||
<el-tooltip
|
||||
v-else
|
||||
:content="crontabValueString"
|
||||
placement="top"
|
||||
>
|
||||
<span>{{ crontabValueString }}</span>
|
||||
</el-tooltip>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<CrontabResult :ex="crontabValueString" />
|
||||
<div class="popup-main">
|
||||
<div class="popup-result">
|
||||
<p class="title">时间表达式</p>
|
||||
<table>
|
||||
<thead>
|
||||
<th v-for="item of tabTitles" :key="item">{{item}}</th>
|
||||
<th>Cron 表达式</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.second.length < 10">{{crontabValueObj.second}}</span>
|
||||
<el-tooltip v-else :content="crontabValueObj.second" placement="top"><span>{{crontabValueObj.second}}</span></el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.min.length < 10">{{crontabValueObj.min}}</span>
|
||||
<el-tooltip v-else :content="crontabValueObj.min" placement="top"><span>{{crontabValueObj.min}}</span></el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.hour.length < 10">{{crontabValueObj.hour}}</span>
|
||||
<el-tooltip v-else :content="crontabValueObj.hour" placement="top"><span>{{crontabValueObj.hour}}</span></el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.day.length < 10">{{crontabValueObj.day}}</span>
|
||||
<el-tooltip v-else :content="crontabValueObj.day" placement="top"><span>{{crontabValueObj.day}}</span></el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.month.length < 10">{{crontabValueObj.month}}</span>
|
||||
<el-tooltip v-else :content="crontabValueObj.month" placement="top"><span>{{crontabValueObj.month}}</span></el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.week.length < 10">{{crontabValueObj.week}}</span>
|
||||
<el-tooltip v-else :content="crontabValueObj.week" placement="top"><span>{{crontabValueObj.week}}</span></el-tooltip>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="crontabValueObj.year.length < 10">{{crontabValueObj.year}}</span>
|
||||
<el-tooltip v-else :content="crontabValueObj.year" placement="top"><span>{{crontabValueObj.year}}</span></el-tooltip>
|
||||
</td>
|
||||
<td class="result">
|
||||
<span v-if="crontabValueString.length < 90">{{crontabValueString}}</span>
|
||||
<el-tooltip v-else :content="crontabValueString" placement="top"><span>{{crontabValueString}}</span></el-tooltip>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<CrontabResult :ex="crontabValueString"></CrontabResult>
|
||||
|
||||
<div class="pop_btn">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitFill"
|
||||
>
|
||||
确定
|
||||
</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
@click="clearCron"
|
||||
>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button @click="hidePopup">
|
||||
取消
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="pop_btn">
|
||||
<el-button type="primary" @click="submitFill">确定</el-button>
|
||||
<el-button type="warning" @click="clearCron">重置</el-button>
|
||||
<el-button @click="hidePopup">取消</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,75 +1,36 @@
|
||||
<template>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="1"
|
||||
>
|
||||
分钟,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="1">
|
||||
分钟,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="2"
|
||||
>
|
||||
周期从
|
||||
<el-input-number
|
||||
v-model="cycle01"
|
||||
:min="0"
|
||||
:max="58"
|
||||
/> -
|
||||
<el-input-number
|
||||
v-model="cycle02"
|
||||
:min="cycle01 + 1"
|
||||
:max="59"
|
||||
/> 分钟
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="2">
|
||||
周期从
|
||||
<el-input-number v-model='cycle01' :min="0" :max="58" /> -
|
||||
<el-input-number v-model='cycle02' :min="cycle01 + 1" :max="59" /> 分钟
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="3"
|
||||
>
|
||||
从
|
||||
<el-input-number
|
||||
v-model="average01"
|
||||
:min="0"
|
||||
:max="58"
|
||||
/> 分钟开始, 每
|
||||
<el-input-number
|
||||
v-model="average02"
|
||||
:min="1"
|
||||
:max="59 - average01"
|
||||
/> 分钟执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="3">
|
||||
从
|
||||
<el-input-number v-model='average01' :min="0" :max="58" /> 分钟开始, 每
|
||||
<el-input-number v-model='average02' :min="1" :max="59 - average01" /> 分钟执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="4"
|
||||
>
|
||||
指定
|
||||
<el-select
|
||||
v-model="checkboxList"
|
||||
clearable
|
||||
placeholder="可多选"
|
||||
multiple
|
||||
:multiple-limit="10"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in 60"
|
||||
:key="item"
|
||||
:label="item - 1"
|
||||
:value="item - 1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="4">
|
||||
指定
|
||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple :multiple-limit="10">
|
||||
<el-option v-for="item in 60" :key="item" :label="item - 1" :value="item - 1" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup>
|
||||
const emit = defineEmits(['update'])
|
||||
|
||||
@@ -1,75 +1,36 @@
|
||||
<template>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="1"
|
||||
>
|
||||
月,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="1">
|
||||
月,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="2"
|
||||
>
|
||||
周期从
|
||||
<el-input-number
|
||||
v-model="cycle01"
|
||||
:min="1"
|
||||
:max="11"
|
||||
/> -
|
||||
<el-input-number
|
||||
v-model="cycle02"
|
||||
:min="cycle01 + 1"
|
||||
:max="12"
|
||||
/> 月
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="2">
|
||||
周期从
|
||||
<el-input-number v-model='cycle01' :min="1" :max="11" /> -
|
||||
<el-input-number v-model='cycle02' :min="cycle01 + 1" :max="12" /> 月
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="3"
|
||||
>
|
||||
从
|
||||
<el-input-number
|
||||
v-model="average01"
|
||||
:min="1"
|
||||
:max="11"
|
||||
/> 月开始,每
|
||||
<el-input-number
|
||||
v-model="average02"
|
||||
:min="1"
|
||||
:max="12 - average01"
|
||||
/> 月月执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="3">
|
||||
从
|
||||
<el-input-number v-model='average01' :min="1" :max="11" /> 月开始,每
|
||||
<el-input-number v-model='average02' :min="1" :max="12 - average01" /> 月月执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="4"
|
||||
>
|
||||
指定
|
||||
<el-select
|
||||
v-model="checkboxList"
|
||||
clearable
|
||||
placeholder="可多选"
|
||||
multiple
|
||||
:multiple-limit="8"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in monthList"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="4">
|
||||
指定
|
||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple :multiple-limit="8">
|
||||
<el-option v-for="item in monthList" :key="item.key" :label="item.value" :value="item.key" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
<template>
|
||||
<div class="popup-result">
|
||||
<p class="title">
|
||||
最近5次运行时间
|
||||
</p>
|
||||
<ul class="popup-result-scroll">
|
||||
<template v-if="isShow">
|
||||
<li
|
||||
v-for="item in resultList"
|
||||
:key="item"
|
||||
>
|
||||
{{ item }}
|
||||
</li>
|
||||
</template>
|
||||
<li v-else>
|
||||
计算结果中...
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="popup-result">
|
||||
<p class="title">最近5次运行时间</p>
|
||||
<ul class="popup-result-scroll">
|
||||
<template v-if='isShow'>
|
||||
<li v-for='item in resultList' :key="item">{{item}}</li>
|
||||
</template>
|
||||
<li v-else>计算结果中...</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,75 +1,36 @@
|
||||
<template>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="1"
|
||||
>
|
||||
秒,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="1">
|
||||
秒,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="2"
|
||||
>
|
||||
周期从
|
||||
<el-input-number
|
||||
v-model="cycle01"
|
||||
:min="0"
|
||||
:max="58"
|
||||
/> -
|
||||
<el-input-number
|
||||
v-model="cycle02"
|
||||
:min="cycle01 + 1"
|
||||
:max="59"
|
||||
/> 秒
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="2">
|
||||
周期从
|
||||
<el-input-number v-model='cycle01' :min="0" :max="58" /> -
|
||||
<el-input-number v-model='cycle02' :min="cycle01 + 1" :max="59" /> 秒
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="3"
|
||||
>
|
||||
从
|
||||
<el-input-number
|
||||
v-model="average01"
|
||||
:min="0"
|
||||
:max="58"
|
||||
/> 秒开始,每
|
||||
<el-input-number
|
||||
v-model="average02"
|
||||
:min="1"
|
||||
:max="59 - average01"
|
||||
/> 秒执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="3">
|
||||
从
|
||||
<el-input-number v-model='average01' :min="0" :max="58" /> 秒开始,每
|
||||
<el-input-number v-model='average02' :min="1" :max="59 - average01" /> 秒执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="4"
|
||||
>
|
||||
指定
|
||||
<el-select
|
||||
v-model="checkboxList"
|
||||
clearable
|
||||
placeholder="可多选"
|
||||
multiple
|
||||
:multiple-limit="10"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in 60"
|
||||
:key="item"
|
||||
:label="item - 1"
|
||||
:value="item - 1"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="4">
|
||||
指定
|
||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple :multiple-limit="10">
|
||||
<el-option v-for="item in 60" :key="item" :label="item - 1" :value="item - 1" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,130 +1,71 @@
|
||||
<template>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="1"
|
||||
>
|
||||
周,允许的通配符[, - * ? / L #]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="1">
|
||||
周,允许的通配符[, - * ? / L #]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="2"
|
||||
>
|
||||
不指定
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="2">
|
||||
不指定
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="3"
|
||||
>
|
||||
周期从
|
||||
<el-select
|
||||
v-model="cycle01"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) of weekList"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
:disabled="item.key === 7"
|
||||
>
|
||||
{{ item.value }}
|
||||
</el-option>
|
||||
</el-select>
|
||||
-
|
||||
<el-select
|
||||
v-model="cycle02"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="(item,index) of weekList"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
:disabled="item.key <= cycle01"
|
||||
>
|
||||
{{ item.value }}
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="3">
|
||||
周期从
|
||||
<el-select clearable v-model="cycle01">
|
||||
<el-option
|
||||
v-for="(item,index) of weekList"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
:disabled="item.key === 7"
|
||||
>{{item.value}}</el-option>
|
||||
</el-select>
|
||||
-
|
||||
<el-select clearable v-model="cycle02">
|
||||
<el-option
|
||||
v-for="(item,index) of weekList"
|
||||
:key="index"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
:disabled="item.key <= cycle01"
|
||||
>{{item.value}}</el-option>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="4"
|
||||
>
|
||||
第
|
||||
<el-input-number
|
||||
v-model="average01"
|
||||
:min="1"
|
||||
:max="4"
|
||||
/> 周的
|
||||
<el-select
|
||||
v-model="average02"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in weekList"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="4">
|
||||
第
|
||||
<el-input-number v-model='average01' :min="1" :max="4" /> 周的
|
||||
<el-select clearable v-model="average02">
|
||||
<el-option v-for="item in weekList" :key="item.key" :label="item.value" :value="item.key" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="5"
|
||||
>
|
||||
本月最后一个
|
||||
<el-select
|
||||
v-model="weekday"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in weekList"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="5">
|
||||
本月最后一个
|
||||
<el-select clearable v-model="weekday">
|
||||
<el-option v-for="item in weekList" :key="item.key" :label="item.value" :value="item.key" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="6"
|
||||
>
|
||||
指定
|
||||
<el-select
|
||||
v-model="checkboxList"
|
||||
class="multiselect"
|
||||
clearable
|
||||
placeholder="可多选"
|
||||
multiple
|
||||
:multiple-limit="6"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in weekList"
|
||||
:key="item.key"
|
||||
:label="item.value"
|
||||
:value="item.key"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form-item>
|
||||
<el-radio v-model='radioValue' :label="6">
|
||||
指定
|
||||
<el-select class="multiselect" clearable v-model="checkboxList" placeholder="可多选" multiple :multiple-limit="6">
|
||||
<el-option v-for="item in weekList" :key="item.key" :label="item.value" :value="item.key" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -1,84 +1,43 @@
|
||||
<template>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="1"
|
||||
>
|
||||
不填,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form>
|
||||
<el-form-item>
|
||||
<el-radio :label="1" v-model='radioValue'>
|
||||
不填,允许的通配符[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="2"
|
||||
>
|
||||
每年
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio :label="2" v-model='radioValue'>
|
||||
每年
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="3"
|
||||
>
|
||||
周期从
|
||||
<el-input-number
|
||||
v-model="cycle01"
|
||||
:min="fullYear"
|
||||
:max="2098"
|
||||
/> -
|
||||
<el-input-number
|
||||
v-model="cycle02"
|
||||
:min="cycle01 ? cycle01 + 1 : fullYear + 1"
|
||||
:max="2099"
|
||||
/>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio :label="3" v-model='radioValue'>
|
||||
周期从
|
||||
<el-input-number v-model='cycle01' :min='fullYear' :max="2098"/> -
|
||||
<el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : fullYear + 1" :max="2099"/>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="4"
|
||||
>
|
||||
从
|
||||
<el-input-number
|
||||
v-model="average01"
|
||||
:min="fullYear"
|
||||
:max="2098"
|
||||
/> 年开始,每
|
||||
<el-input-number
|
||||
v-model="average02"
|
||||
:min="1"
|
||||
:max="2099 - average01 || fullYear"
|
||||
/> 年执行一次
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-radio :label="4" v-model='radioValue'>
|
||||
从
|
||||
<el-input-number v-model='average01' :min='fullYear' :max="2098"/> 年开始,每
|
||||
<el-input-number v-model='average02' :min="1" :max="2099 - average01 || fullYear"/> 年执行一次
|
||||
</el-radio>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio
|
||||
v-model="radioValue"
|
||||
:label="5"
|
||||
>
|
||||
指定
|
||||
<el-select
|
||||
v-model="checkboxList"
|
||||
clearable
|
||||
placeholder="可多选"
|
||||
multiple
|
||||
:multiple-limit="8"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in 9"
|
||||
:key="item"
|
||||
:value="item - 1 + fullYear"
|
||||
:label="item -1 + fullYear"
|
||||
/>
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio :label="5" v-model='radioValue'>
|
||||
指定
|
||||
<el-select clearable v-model="checkboxList" placeholder="可多选" multiple :multiple-limit="8">
|
||||
<el-option v-for="item in 9" :key="item" :value="item - 1 + fullYear" :label="item -1 + fullYear" />
|
||||
</el-select>
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -10,14 +10,12 @@
|
||||
>{{ item.label + " " }}</span>
|
||||
<el-tag
|
||||
v-else
|
||||
:key="item.value + ''"
|
||||
:disable-transitions="true"
|
||||
:key="item.value + ''"
|
||||
:index="index"
|
||||
:type="getValidTagType(item.elTagType)"
|
||||
:class="item.elTagClass"
|
||||
>
|
||||
{{ item.label + " " }}
|
||||
</el-tag>
|
||||
>{{ item.label + " " }}</el-tag>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="unmatch && showValue">
|
||||
|
||||
@@ -1,33 +1,15 @@
|
||||
<template>
|
||||
<div class="editor-container">
|
||||
<div>
|
||||
<el-upload
|
||||
v-if="type == 'url'"
|
||||
:action="uploadUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:on-success="handleUploadSuccess"
|
||||
:on-error="handleUploadError"
|
||||
name="file"
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
class="editor-img-uploader"
|
||||
>
|
||||
<i
|
||||
ref="uploadRef"
|
||||
class="editor-img-uploader"
|
||||
/>
|
||||
<el-upload :action="uploadUrl" :before-upload="handleBeforeUpload" :on-success="handleUploadSuccess"
|
||||
:on-error="handleUploadError" name="file" :show-file-list="false" :headers="headers" class="editor-img-uploader"
|
||||
v-if="type == 'url'">
|
||||
<i ref="uploadRef" class="editor-img-uploader"></i>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div class="editor">
|
||||
<quill-editor
|
||||
ref="quillEditorRef"
|
||||
:content="content"
|
||||
content-type="html"
|
||||
:options="options"
|
||||
:style="styles"
|
||||
@update:content="content = $event"
|
||||
@text-change="(e) => $emit('update:modelValue', content)"
|
||||
/>
|
||||
<quill-editor ref="quillEditorRef" :content="content" @update:content="content = $event" contentType="html"
|
||||
@textChange="(e) => $emit('update:modelValue', content)" :options="options" :style="styles" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<div class="upload-file">
|
||||
<el-upload
|
||||
multiple
|
||||
ref="fileUpload"
|
||||
:action="uploadFileUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:file-list="fileList"
|
||||
@@ -13,52 +12,26 @@
|
||||
:show-file-list="false"
|
||||
:headers="headers"
|
||||
class="upload-file-uploader"
|
||||
ref="fileUpload"
|
||||
>
|
||||
<!-- 上传按钮 -->
|
||||
<el-button type="primary">
|
||||
选取文件
|
||||
</el-button>
|
||||
<el-button type="primary">选取文件</el-button>
|
||||
</el-upload>
|
||||
<!-- 上传提示 -->
|
||||
<div
|
||||
v-if="showTip"
|
||||
class="el-upload__tip"
|
||||
>
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="fileType">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
|
||||
</template>
|
||||
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
|
||||
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
||||
的文件
|
||||
</div>
|
||||
<!-- 文件列表 -->
|
||||
<transition-group
|
||||
class="upload-file-list el-upload-list el-upload-list--text"
|
||||
name="el-fade-in-linear"
|
||||
tag="ul"
|
||||
>
|
||||
<li
|
||||
v-for="(file, index) in fileList"
|
||||
:key="file.uid"
|
||||
class="el-upload-list__item ele-upload-list__item-content"
|
||||
>
|
||||
<el-link
|
||||
:href="`${baseUrl}${file.url}`"
|
||||
:underline="false"
|
||||
target="_blank"
|
||||
>
|
||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
||||
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
|
||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||
</el-link>
|
||||
<div class="ele-upload-list__item-content-action">
|
||||
<el-link
|
||||
:underline="false"
|
||||
type="danger"
|
||||
@click="handleDelete(index)"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
||||
</div>
|
||||
</li>
|
||||
</transition-group>
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<div
|
||||
style="padding: 0 15px;"
|
||||
@click="toggleClick"
|
||||
>
|
||||
<div style="padding: 0 15px;" @click="toggleClick">
|
||||
<svg
|
||||
:class="{'is-active':isActive}"
|
||||
class="hamburger"
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{ show: show }"
|
||||
class="header-search"
|
||||
>
|
||||
<svg-icon
|
||||
v-if="!show"
|
||||
class-name="search-icon"
|
||||
icon-class="search"
|
||||
@click.stop="click"
|
||||
/>
|
||||
<div :class="{ show: show }" class="header-search">
|
||||
<svg-icon class-name="search-icon" icon-class="search" @click.stop="click" v-if="!show" />
|
||||
<el-select
|
||||
v-else
|
||||
ref="headerSearchSelectRef"
|
||||
|
||||
@@ -8,24 +8,13 @@
|
||||
@clear="filterIcons"
|
||||
@input="filterIcons"
|
||||
>
|
||||
<template #suffix>
|
||||
<i class="el-icon-search el-input__icon" />
|
||||
</template>
|
||||
<template #suffix><i class="el-icon-search el-input__icon" /></template>
|
||||
</el-input>
|
||||
<div class="icon-list">
|
||||
<div class="list-container">
|
||||
<div
|
||||
v-for="(item, index) in iconList"
|
||||
:key="index"
|
||||
class="icon-item-wrapper"
|
||||
@click="selectedIcon(item)"
|
||||
>
|
||||
<div v-for="(item, index) in iconList" class="icon-item-wrapper" :key="index" @click="selectedIcon(item)">
|
||||
<div :class="['icon-item', { active: activeIcon === item }]">
|
||||
<svg-icon
|
||||
:icon-class="item"
|
||||
class-name="icon"
|
||||
style="height: 25px;width: 16px;"
|
||||
/>
|
||||
<svg-icon :icon-class="item" class-name="icon" style="height: 25px;width: 16px;"/>
|
||||
<span>{{ item }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="component-upload-image">
|
||||
<el-upload
|
||||
ref="imageUpload"
|
||||
multiple
|
||||
:action="uploadImgUrl"
|
||||
list-type="picture-card"
|
||||
@@ -10,6 +9,7 @@
|
||||
:limit="limit"
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
ref="imageUpload"
|
||||
:before-remove="handleDelete"
|
||||
:show-file-list="true"
|
||||
:headers="headers"
|
||||
@@ -17,15 +17,10 @@
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:class="{ hide: fileList.length >= limit }"
|
||||
>
|
||||
<el-icon class="avatar-uploader-icon">
|
||||
<plus />
|
||||
</el-icon>
|
||||
<el-icon class="avatar-uploader-icon"><plus /></el-icon>
|
||||
</el-upload>
|
||||
<!-- 上传提示 -->
|
||||
<div
|
||||
v-if="showTip"
|
||||
class="el-upload__tip"
|
||||
>
|
||||
<div class="el-upload__tip" v-if="showTip">
|
||||
请上传
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
@@ -45,7 +40,7 @@
|
||||
<img
|
||||
:src="dialogImageUrl"
|
||||
style="display: block; max-width: 100%; margin: 0 auto"
|
||||
>
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<div
|
||||
v-if="$slots.header"
|
||||
class="page-header"
|
||||
>
|
||||
<div v-if="$slots.header" class="page-header">
|
||||
<slot name="header" />
|
||||
</div>
|
||||
<div class="page-content">
|
||||
<slot />
|
||||
</div>
|
||||
<div
|
||||
v-if="$slots.footer"
|
||||
class="page-footer"
|
||||
>
|
||||
<div v-if="$slots.footer" class="page-footer">
|
||||
<slot name="footer" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,51 +1,20 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
v-model="noticeVisible"
|
||||
title="公告/通知"
|
||||
direction="rtl"
|
||||
size="400px"
|
||||
destroy-on-close
|
||||
>
|
||||
<el-empty
|
||||
v-if="noticeList.length === 0"
|
||||
description="暂无公告/通知"
|
||||
/>
|
||||
<div
|
||||
v-else
|
||||
class="notice-list"
|
||||
>
|
||||
<div
|
||||
v-for="item in noticeList"
|
||||
:key="item.noticeId"
|
||||
class="notice-item"
|
||||
:class="{ 'is-read': isRead(item.noticeId), 'unread': !isRead(item.noticeId) }"
|
||||
@click="viewDetail(item)"
|
||||
>
|
||||
<el-drawer v-model="noticeVisible" title="公告/通知" direction="rtl" size="400px" destroy-on-close>
|
||||
<el-empty v-if="noticeList.length === 0" description="暂无公告/通知" />
|
||||
<div v-else class="notice-list">
|
||||
<div v-for="item in noticeList" :key="item.noticeId" class="notice-item" :class="{ 'is-read': isRead(item.noticeId), 'unread': !isRead(item.noticeId) }" @click="viewDetail(item)">
|
||||
<div class="notice-title">
|
||||
<span
|
||||
v-if="!isRead(item.noticeId)"
|
||||
class="unread-dot"
|
||||
/>
|
||||
<span v-if="!isRead(item.noticeId)" class="unread-dot"></span>
|
||||
{{ item.noticeTitle }}
|
||||
</div>
|
||||
<div class="notice-info">
|
||||
<span class="notice-type">
|
||||
<el-tag
|
||||
:type="getNoticeTypeTagType(item.noticeType)"
|
||||
size="small"
|
||||
>
|
||||
<el-tag :type="getNoticeTypeTagType(item.noticeType)" size="small">
|
||||
{{ getNoticeTypeText(item.noticeType) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span
|
||||
v-if="item.priority"
|
||||
class="notice-priority"
|
||||
>
|
||||
<el-tag
|
||||
:type="getPriorityTagType(item.priority)"
|
||||
size="small"
|
||||
effect="plain"
|
||||
>
|
||||
<span class="notice-priority" v-if="item.priority">
|
||||
<el-tag :type="getPriorityTagType(item.priority)" size="small" effect="plain">
|
||||
{{ getPriorityText(item.priority) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
@@ -55,41 +24,23 @@
|
||||
</div>
|
||||
|
||||
<!-- 公告/通知详情对话框 -->
|
||||
<el-dialog
|
||||
v-model="detailVisible"
|
||||
:title="currentNotice.noticeTitle"
|
||||
width="800px"
|
||||
append-to-body
|
||||
>
|
||||
<el-dialog v-model="detailVisible" :title="currentNotice.noticeTitle" width="800px" append-to-body>
|
||||
<div class="notice-detail">
|
||||
<div class="detail-header">
|
||||
<div class="detail-type">
|
||||
<el-tag
|
||||
:type="getNoticeTypeTagType(currentNotice.noticeType)"
|
||||
size="small"
|
||||
>
|
||||
<el-tag :type="getNoticeTypeTagType(currentNotice.noticeType)" size="small">
|
||||
{{ getNoticeTypeText(currentNotice.noticeType) }}
|
||||
</el-tag>
|
||||
<el-tag
|
||||
:type="getPriorityTagType(currentNotice.priority)"
|
||||
size="small"
|
||||
effect="plain"
|
||||
style="margin-left: 8px;"
|
||||
>
|
||||
<el-tag :type="getPriorityTagType(currentNotice.priority)" size="small" effect="plain" style="margin-left: 8px;">
|
||||
{{ getPriorityText(currentNotice.priority) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<span class="detail-time">{{ parseTime(currentNotice.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="detail-content"
|
||||
v-html="currentNotice.noticeContent"
|
||||
/>
|
||||
<div class="detail-content" v-html="currentNotice.noticeContent"></div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailVisible = false">
|
||||
关闭
|
||||
</el-button>
|
||||
<el-button @click="detailVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user