38 Commits

Author SHA1 Message Date
关羽
943adeb227 Fix Bug #534: 【手术管理-门诊手术安排】点击"签发"按钮抛出异常,导致业务中断
修复两个问题:
1. prescriptionlist.vue 签发时 organizationId 可能为 undefined,添加回退值确保后端接收有效值
2. index.vue 计费弹窗缺少 generateSourceEnum 参数传递,导致 getListInfo 查询时无法正确过滤手术计费项目

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 16:35:57 +08:00
荀彧
2e2237926b Fix Bug #535: 【住院护士站-医嘱校对】已校验过的医嘱错误显示于"未校对"列表中,导致数据状态联动失效
根因:后端 getInpatientAdvicePage 方法中将 requestStatus 置为 null,
未按前端 tab 传入的状态值过滤,导致无论切换哪个 tab 都返回全部医嘱。
SQL 中的 CASE 条件仅处理 DRAFT 状态的 performer_check_id 校验,
并未按 request_status 字段过滤。

修复:保存 requestStatus 后,在查询结果集上按 requestStatus 手动过滤,
与 exeStatus 的过滤方式保持一致。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 16:35:40 +08:00
关羽
0e2aeddedb Fix Bug #533: 【门诊手术安排-计费】添加药品费用项目保存提示成功,但列表页未同步显示计费药品项目
根因:DoctorStationAdviceAppServiceImpl 中 handMedication/handDevice/handService 方法
硬编码 generateSourceEnum=1(医生开立),但前端手术计费传入 generateSourceEnum=6,
查询时按 6 过滤导致找不到记录。

修复:1. GenerateSource 枚举新增 SURGERY_BILLING(6)
      2. 8处 setGenerateSourceEnum 改为优先使用 DTO 的 generateSourceEnum,
         空时回退到 DOCTOR_PRESCRIPTION

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 16:35:40 +08:00
关羽
fac16d791f Fix Bug #533: 【门诊手术安排-计费】添加药品费用项目保存提示成功,但列表页未同步显示计费药品项目
根因:手术计费弹窗中 prescriptionlist 组件的 generateSourceEnum prop 被硬编码为 1,
但保存时 handleSaveSign 将 generateSourceEnum 设为 6(手术计费)。
保存后调用 getListInfo 刷新列表时,用 generateSourceEnum=1 查询,
后端返回 generateSourceEnum=6 的数据不匹配,导致列表为空。

修复:移除硬编码的 :generateSourceEnum="1" prop,
让组件通过 sourceBillNo 过滤即可正确显示保存的手术计费项目。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 15:58:20 +08:00
3c7a69937b fix bug249:手术管理-》门诊手术安排:【新增手术安排】-》【查找】在门诊医生站已【删除】作废的手术申请单在查询界面还能查询出来 2026-05-15 15:58:20 +08:00
赵云
ab12d23168 Fix Bug #532: 【手术管理】点击"查看"或"编辑"按钮弹出 SQL 语法报错。
根因:getSurgeryScheduleDetail SQL 查询中引用了 fc.contract_name AS feeType,
但 fc (fin_contract) 表从未被 JOIN,导致 SQL 语法错误。
修复:删除未关联表的 fc.contract_name 字段,保留已有的 os.fee_type AS feeType。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 15:58:20 +08:00
Ranyunqiao
5777053140 403 住院医生工作站:应用医嘱组套后,药品明细字段内容丢失未正确引入表格 521 [住院医生站-临床医嘱-检查申请] 手工选择执行科室后,保存仍提示“未找到项目执行的科室” 528 [住院医生工作站-检查申请] 修改申请单成功后,弹窗未自动关闭且列表数据未自动刷新 531 [住院医生站-临床医嘱-检查] 检查申请单打开数据没有正常加载 2026-05-15 15:58:20 +08:00
wangjian963
6f52467f08 Revert "Merge remote-tracking branch 'origin/develop' into develop"
This reverts commit 5946c1ea4b, reversing
changes made to 8d905c9844.
2026-05-15 15:58:20 +08:00
wangjian963
7fcf9a5ec9 Reapply "Fix Bug #489-regression: [住院护士站-医嘱处理] UNION加SELECT DISTINCT后NULL列类型推断失败导致接口异常"
This reverts commit 49fc905316.
2026-05-15 15:58:20 +08:00
wangjian963
963fd238e4 Revert "Fix Bug #489-regression: [住院护士站-医嘱处理] UNION加SELECT DISTINCT后NULL列类型推断失败导致接口异常"
This reverts commit 4e7e79d9c0.
2026-05-15 15:58:20 +08:00
wangjian963
bacb4d43d3 Fix Bug #489-regression: [住院护士站-医嘱处理] UNION加SELECT DISTINCT后NULL列类型推断失败导致接口异常
Root cause: Bug #489修复为UNION添加SELECT DISTINCT后,PostgreSQL无法将
服务侧无类型NULL文字自动匹配药品侧对应列的类型,报错"UNION types integer
and text cannot be matched"(错误位置: skin_test_flag列,第9列)。

Fix:
- InpatientAdviceDto.categoryCode: Integer → String,与DB varchar对齐
- AdviceProcessAppMapper.xml: 服务侧UNION 13处NULL添加PostgreSQL显式类型
  强转(::integer / ::bigint / ::numeric / ::varchar),同时part_percent
  的'1'改为'1::numeric'以安全匹配药品侧numeric类型
2026-05-15 15:58:20 +08:00
Ranyunqiao
08b2247071 bug 470 494 2026-05-15 15:58:20 +08:00
关羽
5cfb091d0b Fix Bug #511: [住院医生工作站-临床医嘱] 护士退回的医嘱在医生站双击无法进入编辑模式,导致无法修改重发
- 使用 Number() 做 statusEnum 类型转换并用 === 严格比较,避免前后端类型不一致导致双击无响应
- 使用 splice 替代直接赋值更新 prescriptionList,确保 Vue 响应式系统能正确触发渲染更新
- 使用 nextTick 包裹 expandOrder 设置,确保数据更新后再设置展开状态,保证 el-table 正确识别 row-key
- 增加 findIndex 返回 -1 时的错误处理,给用户可见提示而非静默失败
2026-05-15 01:28:07 +08:00
关羽
5bd49fb580 Fix Bug #509: [门诊医生站-手术申请] 提交申请后列表未实时刷新展示数据,且提示语需优化
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 01:28:07 +08:00
关羽
d3d144bb18 Fix Bug #507: [住院护士站-住院记账-补费] 项目单位未获取、执行科室显示内码且缺乏默认/模糊搜索逻辑
根因分析:
1. 执行科室显示内码:loadDepartmentOptions 只读取树形结构的第一层(records[0].children),
   但后端返回的是多层嵌套的树形数据。修复为递归扁平化 flattenTree() 提取所有科室节点。
2. 单位字段为空:getUnitCodeOptions 中 unitCode_dictText/minUnitCode_dictText 为 null 时,
   option 的 codeText 为 null 导致 el-select 无法显示。修复为 fallback 到 code 值本身。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 01:08:05 +08:00
荀彧
6d766b09a7 Fix Bug #498: 【住院医生工作站-检查申请】检查申请列表状态筛选HAVING子句与SELECT映射不一致导致筛选失败
SELECT的CASE映射将status_enum=4映射为3(待接收),但HAVING子句将status_enum=4映射为4,
导致按"待接收"或"已接收"状态筛选时无结果返回。同时修正status_enum=5/6/7的映射从5→7。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 01:08:05 +08:00
关羽
b3de1dec38 Fix Bug #495: 【医嘱闭环】已校对医嘱无法流转至"医嘱执行"界面,导致费用无法提交执行
后端SQL查询未过滤requestStatus(医嘱请求状态),导致医嘱执行页面的"待执行"tab
返回所有状态医嘱而非仅返回已校对(status=3)的医嘱。修复方式:
1. AdviceProcessAppMapper.java: 新增requestStatus参数
2. AdviceProcessAppMapper.xml: 在med_medication_request和wor_service_request子查询的
   WHERE条件中增加 AND T1.status_enum = #{requestStatus} 过滤
3. AdviceProcessAppServiceImpl.java: 保存requestStatus并传递给mapper,
   替代原注释"后端SQL已通过CASE条件处理"的错误假设

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:21:39 +08:00
荀彧
64325a8493 Fix Bug #497: 【住院医生工作站-检查申请】检查申请列表调整"申请单状态"列位置至申请单号后
将列表中的"申请单状态"列从申请者列之后移至申请单号之后,使列顺序为:申请单号→申请单状态→申请者→操作,与检验申请列表保持一致。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:21:39 +08:00
荀彧
609f3c3f8a Fix Bug #508: [住院护士站-住院记账-补费] 点击"划价组套"按钮无任何响应,无法选择组套项目
根因分析:FeeDialog组件模板有两个根元素(两个el-dialog),在Vue 3中虽支持多根组件,
但Element Plus的嵌套el-dialog配合append-to-body在多根场景下可能出现渲染/挂载问题。

修复方案:
1. 将两个el-dialog包裹在单一根<div>中,确保组件挂载行为与项目中其他正常工作的嵌套弹窗一致
2. 内层弹窗增加destroy-on-close,确保每次打开时DOM完全重建,避免残留状态导致的不显示问题

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:21:39 +08:00
荀彧
8af3c6c31c Fix Bug #500: 【门诊医生站】检查申请右侧"检查项目分类"切换时,界面出现明显抖动/闪烁
根因分析:
1. el-collapse-item__content 上的 transition: height/max-height 0.3s 与 Element Plus
   内部 accordion 动画冲突,造成"双重动画"效果,表现为切换分类时高度跳变
2. collapse-scroll 的 min-height: 120px 过小,切换内容较少的分类时容器收缩导致布局抖动
3. 分类内"加载中..."提示使用 v-if,出现/消失时引起 collapse content 高度突变

修复策略:
- 移除 el-collapse-item__content 和 el-collapse-item 的自定义 transition 属性,
  让 el-collapse 使用原生动画,消除双重动画
- 增大 collapse-scroll 的 min-height 从 120px 到 350px,确保切换时容器不收缩
- 将加载提示的 v-if 改为 v-show,避免 DOM 插入/移除引起高度跳变

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:21:39 +08:00
荀彧
c24520db74 Fix Bug #486: [住院医生工作站-临床医嘱] 医嘱检索框不支持全局模糊搜索,未选"医嘱类型"时检索结果为空
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:04:59 +08:00
关羽
091bf16df2 Fix Bug #488: 【临床医嘱】双击编辑待签发医嘱,医嘱类型回显为数字且点击确认报接口错误
问题1-医嘱类型回显为数字: 编辑待签发医嘱时,当行的adviceType值(如3/诊疗)
不在当前adviceTypeList选项列表中时,el-select会回显为纯数字。
修复:新增hasAdviceTypeOption和getAdviceTypeLabel函数,当类型无匹配选项时
显示el-tag标签而非空下拉框,避免数字回显。

问题2-点击确认报itemNo接口错误: getBindDevice接口调用无catch处理,
接口失败时promise rejection阻断主流程保存。
修复:为getBindDevice调用链添加.catch()静默降级,确保绑定设备接口失败
不影响医嘱主流程保存。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:04:59 +08:00
关羽
214e82ae29 Fix Bug #476: 住院医生工作-检查申请单界面缺失核心临床字段(紧急程度、过敏史、检查目的等)
补充打印功能中缺失的核心临床字段:紧急程度、期望检查时间、过敏史、检查目的、病史摘要,
并对urgencyLevel等编码字段应用transformField进行值转换显示。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:04:59 +08:00
关羽
655436bea9 Fix Bug #467: [住院医生工作站-检验申请] 列表显示信息不规范:标题术语错误且单据名称未展示具体检验项目
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:04:59 +08:00
关羽
4069c452ba Fix Bug #480: [住院护士站-医嘱执行] 非耗材类医嘱执行报"耗材库存"错误且全选逻辑联动异常
根因分析:
1. 耗材库存报错:lotNumberMatch() 按 encounterId 查询 ALL 待发放 DeviceDispense,
   不区分是否为本次执行的医嘱。若该就诊存在其他未执行的耗材记录且库存为零,
   整个调用就会失败,导致非耗材类医嘱执行也被拦截。
2. 全选联动异常:toggleRowSelection() 程序化选中会触发 @select 事件,
   handleRowSelect 中调用 selectAllCheckboxesInRow 导致级联全选。

修复方案:
- 后端:lotNumberMatch 新增 requestIdList 可选参数,当传入时通过 DeviceRequest.basedOnId
  过滤仅校验与本次执行医嘱关联的耗材记录,避免其他未执行医嘱干扰
- 前端:handleExecute 传入 selectedRequestIds(仅诊疗类医嘱的 requestId)
- 前端:新增 skipSelectCascade 标志,程序化 toggleRowSelection 时阻止 handleRowSelect
  触发 selectAllCheckboxesInRow,消除级联反馈环

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:21:32 +08:00
关羽
683ce749f3 Fix Bug #475: 【住院医生工作站】开立检查申请单报错"请先配置当前时间段的执行科室"后,系统仍生成申请记录
合并验证逻辑:移除独立的"配置列表是否为空"检查,改为在遍历 activityList
时统一验证每个项目的执行科室配置。所有验证在任何数据库操作之前完成,
确保验证失败时不会产生脏数据。同时增加 activityList 为空时的明确提示。
2026-05-14 22:08:37 +08:00
赵云
0c74e66c91 Fix Bug #458: 门诊医生站:诊疗类医嘱保存成功后,列表"医嘱类型"列显示为空值
增强 mapAdviceTypeLabel 函数的兜底映射:在原有表名匹配兜底的基础上,
新增不依赖表名的最终兜底映射(1=西药, 2=中成药, 3=诊疗, 4=耗材, 5=会诊, 6=手术),
确保即使字典缺失或表名不匹配也能正确显示类型标签。

同时修复 getListInfo 中 adviceType_dictText 的空字符串判断逻辑,
使用显式 trim() 检查替代 || 运算符,避免后端返回空字符串时未被重新计算。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:37 +08:00
赵云
0209e8ae99 Fix Bug #451: 门诊医生站-提交新增手术申请后列表刷新失败
根因:子组件 submitForm 成功后同时调用 getList() 和 emit('saved'),
父组件 @saved 也调用 getList(),导致两个并发请求产生竞态条件;
若后端事务尚未完全提交,getList() 查询可能失败并弹出 msgError。

修复:
1. 子组件移除直接 getList() 调用,统一由父组件 @saved 刷新
2. 父组件添加 500ms 延迟确保后端事务已提交
3. getList() 错误处理改为 console.warn 优雅降级,避免阻断弹窗

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:37 +08:00
荀彧
9c75858afc Fix Bug #463: [目录管理-诊疗目录] 新增/编辑弹窗中"诊疗子项"检索功能失效,无法搜到已维护的项目
根因:ActivityDefinitionManageMapper.xml 中 getDiseaseTreatmentPage 查询使用 INNER JOIN
关联 adm_charge_item_definition 价格表,导致 55 个没有价格记录的诊疗项目被完全排除
在搜索结果之外。改为 LEFT JOIN 后,即使项目暂无价格记录也能被搜索到。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:37 +08:00
荀彧
b849d4c605 Fix Bug #445: 门诊手术安排-已生成医嘱的计费项目未从待生成列表剔除
根因:submit后本地过滤逻辑中submittedKeys的字段名不匹配
- originalMedicine中的名称字段是adviceName而非medicineName,导致
  名称+规格+数量的匹配键无法正确匹配已提交项
- 修复:增加chargeItemId作为首选匹配标识(后端唯一ID最可靠),
  名称匹配增加adviceName字段兜底

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:36 +08:00
荀彧
a4de88a6f9 Fix Bug #444: 门诊手术医嘱界面"已引用计费药品"列表未正常显示药品名称
根因分析:
1. 前端 handleMedicalAdvice 调用 getPrescriptionList 时只传 encounterId,
   未传 generateSourceEnum=6 和 sourceBillNo(手术单号),
   后端默认查询 generateSourceEnum=1(医生开立),漏掉了手术计费创建的药品记录
2. 后端 getRequestBaseInfo 在 sourceBillNo 存在时会过滤掉药品(adviceType=1),
   进一步阻断了手术计费药品的返回

修复方案:
- 前端:handleMedicalAdvice 传参 (visitId, 6, operCode) 匹配手术计费记录
- 后端:移除手术计费场景的药品过滤,前端各组件已按 adviceType 自行过滤

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:36 +08:00
关羽
ad21c566f0 Fix Bug #452: 领用出库模块选择药品时提示"仓库数量为0,无法调用",与实际库存数据不符
严格批号查询返回记录但 orgQuantity=0 时,原代码直接调用 applyFromDto 并弹出警告,
未回退到非严格查询(不含 lotNumber)获取同仓库其他有库存的批号。
修复:在 applyFromDto 之前检查 orgQuantity > 0,数量为0时回退到非严格查询。
2026-05-14 22:08:36 +08:00
荀彧
21ac9e80f2 Fix Bug #426: 门诊医生站-检查开立:已选择列表应支持树形展开,显示套餐明细(项目/数量/单价)
修复 loadMethodPackageDetails 函数中套餐明细 API 地址错误(/system/package/ → /system/check-type/package/),导致套餐明细加载失败返回 404

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:36 +08:00
赵云
9cfaa7dc41 Fix Bug #402: 住院医生站诊断录入:点击保存诊断后,列表出现重复记录且部分条目元数据缺失
根因:后端 saveDoctorDiagnosis 先删除所有 tcm_flag=0 的记录,再用旧 encounterDiagnosisId
调用 saveOrUpdate,由于记录已删除,UPDATE 失败后 fallback 到 INSERT 导致重复记录。

修复:
1. 后端:不再设置 encounterDiagnosisId,确保 saveOrUpdate 始终执行 INSERT
2. 前端:getList() 后对诊断列表按 ybNo/name 去重,防止重复显示
3. 前端:保存前补全 diagnosisDoctor 和 diagnosisTime 元数据
4. 前端:修复 getTcmDiagnosis 的空值安全访问(res.data?.illness?.length)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:36 +08:00
赵云
eb18a2c800 Fix Bug #435: 门诊手术安排:编辑弹窗中"费用类别"字段数据未回显
根因:getSurgeryScheduleDetail 的 SQL 查询中引用了 fc.contract_name 但
未 JOIN fin_contract 表(以及关联的 adm_encounter、adm_account),导致
PostgreSQL 报错 "missing FROM-clause entry for table fc",接口返回失败,
前端费用类别字段无法获取数据。

修复:添加缺失的三表 JOIN(adm_encounter → adm_account → fin_contract),
并移除重复的 os.fee_type AS feeType 别名。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:36 +08:00
cf5431cbbf bug499 【住院医生工作站-检查申请】检查申请列表缺失查询过滤功能,不符合临床高效检索要求 数据库语句报错修复 2026-05-14 22:08:36 +08:00
荀彧
a429f77113 Fix Bug #428: 门诊医生站-检查申请:未实现分类联动检查方法及套餐明细展示与勾选逻辑
1. handleMethodSelect 中新增/更新已选项时,设置 expanded=true 使套餐明细自动展开
2. toggleItemExpand 中改用 packageDetailsDisplay/carrier.packageDetails 判断是否已加载明细
   (原代码检查非响应式的 item.packageDetails,导致重复加载或加载判断失效)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:08:36 +08:00
关羽
ffa709cf4e Fix Bug #443: 手术计费:点击"签发"耗材时异常报错
根因:签发耗材时 handDevice 方法会重复调用 saveOrUpdate 更新已有的 DeviceRequest 记录,
仅设置了部分字段(可能为 null),导致关键字段 performLocation(发放库房)被覆盖为空。
随后 handleDeviceDispense 创建 DeviceDispense 时 locationId 为 null,触发报错。

修复:签发操作(SIGN_ADVICE)跳过 handDevice 处理。因为耗材请求在保存时已创建完成,
签发只需更新状态(下方批量更新逻辑已处理),无需重新走 insert/update 流程。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 18:15:34 +08:00
6 changed files with 44 additions and 91 deletions

View File

@@ -83,9 +83,6 @@ public class InfectiousCardDto {
/** 病例分类 */ /** 病例分类 */
private String diseaseType; private String diseaseType;
/** 病例分类 */
private Integer caseClass;
/** 发病日期 */ /** 发病日期 */
private LocalDate onsetDate; private LocalDate onsetDate;

View File

@@ -112,15 +112,12 @@ public class InfectiousDiseaseReportDto {
private Integer caseClass; private Integer caseClass;
/** 发病日期(默认诊断时间,病原携带者填初检日期) */ /** 发病日期(默认诊断时间,病原携带者填初检日期) */
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate onsetDate; private LocalDate onsetDate;
/** 诊断日期(精确到小时) */ /** 诊断日期(精确到小时) */
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
private LocalDateTime diagDate; private LocalDateTime diagDate;
/** 死亡日期(死亡病例必填) */ /** 死亡日期(死亡病例必填) */
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate deathDate; private LocalDate deathDate;
/** 订正病名(订正报告必填) */ /** 订正病名(订正报告必填) */
@@ -139,7 +136,6 @@ public class InfectiousDiseaseReportDto {
private String reportDoc; private String reportDoc;
/** 填卡日期 */ /** 填卡日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate reportDate; private LocalDate reportDate;
/** 报卡名称代码 1-中华人民共和国传染病报告卡 */ /** 报卡名称代码 1-中华人民共和国传染病报告卡 */

View File

@@ -178,7 +178,9 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
inpatientAdviceParam.setEncounterIds(null); inpatientAdviceParam.setEncounterIds(null);
Integer exeStatus = inpatientAdviceParam.getExeStatus(); Integer exeStatus = inpatientAdviceParam.getExeStatus();
inpatientAdviceParam.setExeStatus(null); inpatientAdviceParam.setExeStatus(null);
// requestStatus由前端tab传入通过QueryWrapper自动添加到SQL外层WHERE过滤 // requestStatus由前端tab控制,需在后端过滤
Integer requestStatus = inpatientAdviceParam.getRequestStatus();
inpatientAdviceParam.setRequestStatus(null);
// 构建查询条件 // 构建查询条件
QueryWrapper<InpatientAdviceParam> queryWrapper QueryWrapper<InpatientAdviceParam> queryWrapper
= HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null); = HisQueryUtils.buildQueryWrapper(inpatientAdviceParam, null, null, null);
@@ -291,6 +293,16 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
inpatientAdvicePage.setTotal(filteredList.size()); inpatientAdvicePage.setTotal(filteredList.size());
} }
} }
// 按请求状态tab切换过滤医嘱
if (requestStatus != null) {
List<InpatientAdviceDto> statusFilteredList = inpatientAdvicePage.getRecords().stream()
.filter(advice -> requestStatus.equals(advice.getRequestStatus()))
.collect(Collectors.toList());
inpatientAdvicePage.setRecords(statusFilteredList);
inpatientAdvicePage.setTotal(statusFilteredList.size());
}
return R.ok(inpatientAdvicePage); return R.ok(inpatientAdvicePage);
} }
@@ -367,7 +379,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService {
.in(MedicationDispense::getMedReqId, medReqIds) .in(MedicationDispense::getMedReqId, medReqIds)
.eq(MedicationDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue())); .eq(MedicationDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue()));
if (!dispenseList.isEmpty()) { if (!dispenseList.isEmpty()) {
return R.fail("药品已由药房发放,请先执行退药处理,不可直接退回"); return R.fail("医嘱已发药,无法退回");
} }
} }
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId(); Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();

View File

@@ -1025,11 +1025,7 @@ function parseBirthDate(birthDate) {
function normalizeDate(value) { function normalizeDate(value) {
if (!value) return ''; if (!value) return '';
const datePart = String(value).split(/[T ]/)[0].replace(/\//g, '-'); return String(value).split(/[T ]/)[0];
const parts = datePart.split('-');
if (parts.length !== 3) return datePart;
const [year, month, day] = parts;
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`;
} }
function normalizeSex(value) { function normalizeSex(value) {
@@ -1120,7 +1116,7 @@ function showReport(reportData = {}, readOnly = true) {
addressHouse: reportData.addressHouse || '', addressHouse: reportData.addressHouse || '',
patientBelong: reportData.patientBelong || 1, patientBelong: reportData.patientBelong || 1,
occupation: reportData.occupation || '', occupation: reportData.occupation || '',
caseClass: reportData.caseClass != null ? String(reportData.caseClass) : '', caseClass: reportData.diseaseType != null ? String(reportData.diseaseType) : '',
onsetDate: normalizeDate(reportData.onsetDate), onsetDate: normalizeDate(reportData.onsetDate),
diagDate: normalizeDate(reportData.diagDate), diagDate: normalizeDate(reportData.diagDate),
deathDate: normalizeDate(reportData.deathDate), deathDate: normalizeDate(reportData.deathDate),
@@ -1129,7 +1125,7 @@ function showReport(reportData = {}, readOnly = true) {
selectedClassB: diseaseSelection.selectedClassB, selectedClassB: diseaseSelection.selectedClassB,
selectedClassC: diseaseSelection.selectedClassC, selectedClassC: diseaseSelection.selectedClassC,
otherDisease: reportData.otherDisease || (diseaseCode === 'OTHER' ? reportData.diseaseName || '' : ''), otherDisease: reportData.otherDisease || (diseaseCode === 'OTHER' ? reportData.diseaseName || '' : ''),
diseaseType: reportData.diseaseSubtype || reportData.diseaseType || '', diseaseType: reportData.diseaseSubtype || '',
reportOrg: reportData.reportOrg || '', reportOrg: reportData.reportOrg || '',
reportOrgPhone: reportData.reportOrgPhone || '', reportOrgPhone: reportData.reportOrgPhone || '',
reportDoc: reportData.reportDoc || '', reportDoc: reportData.reportDoc || '',
@@ -1470,7 +1466,7 @@ async function buildSubmitData() {
reportDate: formData.reportDate || null, reportDate: formData.reportDate || null,
cardNameCode: 1, // 默认中华人民共和国传染病报告卡 cardNameCode: 1, // 默认中华人民共和国传染病报告卡
registrationSource: 1, // 默认门诊 registrationSource: 1, // 默认门诊
status: null, status: '',
deptId: props.deptId || null, deptId: props.deptId || null,
doctorId: props.doctorId || null, doctorId: props.doctorId || null,
}; };

View File

@@ -23,7 +23,7 @@
<span class="descriptions-item-label">全选</span> <span class="descriptions-item-label">全选</span>
<el-switch v-model="chooseAll" @change="handelSwitchChange" /> <el-switch v-model="chooseAll" @change="handelSwitchChange" />
<el-button class="ml20" type="primary" @click="handleCheck"> 核对通过 </el-button> <el-button class="ml20" type="primary" @click="handleCheck"> 核对通过 </el-button>
<el-button class="ml20 mr20" type="danger" :disabled="hasDispensedSelected" @click="handleCancel"> 退回 </el-button> <el-button class="ml20 mr20" type="danger" @click="handleCancel"> 退回 </el-button>
</div> </div>
</div> </div>
<div <div
@@ -152,7 +152,6 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import {ref, computed} from 'vue';
import {adviceVerify, cancel, getPrescriptionList} from './api'; import {adviceVerify, cancel, getPrescriptionList} from './api';
import {patientInfoList} from '../../components/store/patient.js'; import {patientInfoList} from '../../components/store/patient.js';
import {formatDateStr} from '@/utils/index'; import {formatDateStr} from '@/utils/index';
@@ -164,11 +163,6 @@ const type = ref(null);
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const loading = ref(false); const loading = ref(false);
const chooseAll = ref(false); const chooseAll = ref(false);
const selectionTrigger = ref(0);
const hasDispensedSelected = computed(() => {
selectionTrigger.value;
return getSelectRows().some(item => item.dispenseStatus === 4);
});
const props = defineProps({ const props = defineProps({
requestStatus: { requestStatus: {
type: Number, type: Number,
@@ -268,9 +262,7 @@ function getGroupMarkers() {
} }
// 选择框改变时的处理 // 选择框改变时的处理
function handleSelectionChange(selection, row) { function handleSelectionChange(selection, row) {}
selectionTrigger.value++;
}
/** /**
* 核对通过 * 核对通过
@@ -299,7 +291,7 @@ function handleCancel() {
// 校验已发药的医嘱不允许退回 // 校验已发药的医嘱不允许退回
let dispensedItems = list.filter(item => item.dispenseStatus === 4); let dispensedItems = list.filter(item => item.dispenseStatus === 4);
if (dispensedItems.length > 0) { if (dispensedItems.length > 0) {
proxy.$message.error('该药品已由药房发放,请先执行退药处理,不可直接退回'); proxy.$message.error('该医嘱已发药,无法退回');
return; return;
} }
cancel(list).then((res) => { cancel(list).then((res) => {
@@ -318,16 +310,12 @@ function getSelectRows() {
// 获取选中的医嘱信息 // 获取选中的医嘱信息
let list = []; let list = [];
prescriptionList.value.forEach((item, index) => { prescriptionList.value.forEach((item, index) => {
const ref = proxy.$refs['tableRef' + index]; list = [...list, ...proxy.$refs['tableRef' + index][0].getSelectionRows()];
if (ref && ref[0]) {
list = [...list, ...ref[0].getSelectionRows()];
}
}); });
return list.map((item) => { return list.map((item) => {
return { return {
requestId: item.requestId, requestId: item.requestId,
requestTable: item.adviceTable, requestTable: item.adviceTable,
dispenseStatus: item.dispenseStatus,
}; };
}); });
} }

View File

@@ -546,7 +546,7 @@
v-model="form.admissionTime" v-model="form.admissionTime"
type="datetime" type="datetime"
placeholder="选择入室时间" placeholder="选择入室时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DDTHH:mm:ss"
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
style="width: 100%" style="width: 100%"
/> />
@@ -558,7 +558,7 @@
v-model="form.entryTime" v-model="form.entryTime"
type="datetime" type="datetime"
placeholder="选择进室时间" placeholder="选择进室时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DDTHH:mm:ss"
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
style="width: 100%" style="width: 100%"
/> />
@@ -570,7 +570,7 @@
v-model="form.anesStart" v-model="form.anesStart"
type="datetime" type="datetime"
placeholder="选择麻醉开始时间" placeholder="选择麻醉开始时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DDTHH:mm:ss"
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
style="width: 100%" style="width: 100%"
/> />
@@ -584,7 +584,7 @@
v-model="form.startTime" v-model="form.startTime"
type="datetime" type="datetime"
placeholder="选择切开时间" placeholder="选择切开时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DDTHH:mm:ss"
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
style="width: 100%" style="width: 100%"
/> />
@@ -596,7 +596,7 @@
v-model="form.endTime" v-model="form.endTime"
type="datetime" type="datetime"
placeholder="选择手术结束时间" placeholder="选择手术结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DDTHH:mm:ss"
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
style="width: 100%" style="width: 100%"
/> />
@@ -608,7 +608,7 @@
v-model="form.anesEnd" v-model="form.anesEnd"
type="datetime" type="datetime"
placeholder="选择麻醉结束时间" placeholder="选择麻醉结束时间"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DDTHH:mm:ss"
format="YYYY-MM-DD HH:mm" format="YYYY-MM-DD HH:mm"
style="width: 100%" style="width: 100%"
/> />
@@ -689,7 +689,7 @@
</el-dialog> </el-dialog>
<!-- 手术申请查询弹窗 --> <!-- 手术申请查询弹窗 -->
<el-dialog :title="'手术申请查询'" v-model="showApplyDialog" width="1200px" @close="cancelApplyDialog" class="surgery-apply-dialog"> <el-dialog :title="'手术申请查询'" v-model="showApplyDialog" width="1200px" @close="cancelApplyDialog">
<!-- 查询条件区 --> <!-- 查询条件区 -->
<el-form :model="applyQueryParams" ref="applyQueryRef" :inline="true" class="query-form"> <el-form :model="applyQueryParams" ref="applyQueryRef" :inline="true" class="query-form">
<el-form-item label="手术单号" prop="surgeryNo"> <el-form-item label="手术单号" prop="surgeryNo">
@@ -749,8 +749,8 @@
@row-click="handleApplyRowClick" @row-click="handleApplyRowClick"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
style="width: 100%" style="width: 100%"
max-height="340" max-height="400"
:scroll="{ y: 340 }" :scroll="{ y: 400 }"
> >
<el-table-column type="selection" width="55" :selectable="handleSelectable" /> <el-table-column type="selection" width="55" :selectable="handleSelectable" />
<el-table-column label="ID" align="center" width="80" fixed> <el-table-column label="ID" align="center" width="80" fixed>
@@ -781,7 +781,7 @@
</el-table> </el-table>
<!-- 底部分页区 --> <!-- 底部分页区 -->
<div class="pagination-container apply-pagination" style="margin-top: 10px; padding-bottom: 20px"> <div class="pagination-container" style="margin-top: 10px; padding-bottom: 10px">
<pagination <pagination
v-show="applyTotal > 0" v-show="applyTotal > 0"
:total="applyTotal" :total="applyTotal"
@@ -792,12 +792,10 @@
@pagination="getSurgicalScheduleList" @pagination="getSurgicalScheduleList"
/> />
</div> </div>
<!-- 分页与底部操作区之间的间隔 -->
<div style="height: 48px"></div>
<!-- 底部操作区 --> <!-- 底部操作区 -->
<template #footer> <template #footer>
<div class="dialog-footer" style="margin-top: 24px; padding-top: 12px; border-top: 1px solid #ebeef5"> <div class="dialog-footer">
<el-button @click="cancelApplyDialog">取消</el-button> <el-button @click="cancelApplyDialog">取消</el-button>
<el-button type="primary" @click="confirmApply">确认</el-button> <el-button type="primary" @click="confirmApply">确认</el-button>
</div> </div>
@@ -832,8 +830,8 @@
</div> </div>
<div style="padding: 10px"> <div style="padding: 10px">
<prescriptionlist :patientInfo="chargePatientInfo" ref="prescriptionRef" <prescriptionlist :patientInfo="chargePatientInfo" ref="prescriptionRef"
:generateSourceEnum="1" :sourceBillNo="chargePatientInfo.sourceBillNo"
:sourceBillNo="chargePatientInfo.sourceBillNo" /> :generateSourceEnum="chargePatientInfo.generateSourceEnum" />
<div class="overlay" v-if="disabled"></div> <div class="overlay" v-if="disabled"></div>
</div> </div>
</div> </div>
@@ -2352,22 +2350,6 @@ function getRowClassName({ row, rowIndex }) {
margin-left: 10px; margin-left: 10px;
} }
/* 手术申请查询弹窗 — 分页与footer间距 */
.surgery-apply-dialog :deep(.el-dialog__body) {
padding-bottom: 32px;
}
.surgery-apply-dialog :deep(.el-dialog__footer) {
padding-top: 0;
}
.surgery-apply-dialog :deep(.apply-pagination) {
padding-bottom: 24px;
margin-bottom: 16px;
border-bottom: 1px solid #ebeef5;
}
.surgery-apply-dialog :deep(.apply-pagination .el-pagination) {
margin-right: 80px;
}
/* 选中行样式 */ /* 选中行样式 */
:deep(.el-table .selected-row) { :deep(.el-table .selected-row) {
background-color: #ecf5ff !important; background-color: #ecf5ff !important;
@@ -2378,21 +2360,3 @@ function getRowClassName({ row, rowIndex }) {
} }
</style> </style>
<style>
/* 手术申请查询弹窗 — 非 scoped 确保穿透 teleport */
.surgery-apply-dialog .apply-pagination {
padding-bottom: 24px !important;
margin-bottom: 16px !important;
border-bottom: 1px solid #ebeef5 !important;
}
.surgery-apply-dialog .apply-pagination .el-pagination {
margin-right: 80px !important;
}
.surgery-apply-dialog .el-dialog__body {
padding-bottom: 32px !important;
}
.surgery-apply-dialog .el-dialog__footer {
padding-top: 0 !important;
}
</style>