Merge branch 'develop' of https://gitea.gentronhealth.com/py/his into develop
This commit is contained in:
349
md/需求/103-医生个人报卡管理界面-2026-1-29.md
Normal file
349
md/需求/103-医生个人报卡管理界面-2026-1-29.md
Normal file
@@ -0,0 +1,349 @@
|
||||
## 医生个人报卡管理界面PRD文档
|
||||
|
||||
### 一、页面概述
|
||||
|
||||
**页面名称**:医生个人报卡管理界面
|
||||
**页面目标**:为医生提供传染病报告卡的管理功能,包括查看、编辑、提交、撤回、导出等操作,并提供数据统计和筛选功能。
|
||||
**适用场景**:医生需要查看/编辑或管理已填写的传染病报告卡,进行批量操作或筛选特定状态的报告卡
|
||||
**页面类型**:列表页(含筛选功能) + 表单页(编辑/查看模态框)。
|
||||
|
||||
**核心功能**:
|
||||
|
||||
1. 报卡数据统计展示(总报卡数/待处理失败/已成功上报)
|
||||
2. 报卡列表筛选与查询(按日期/状态/关键词)
|
||||
3. 报卡详情查看与编辑
|
||||
4. 批量操作(全选/批量提交/批量删除)
|
||||
5. 报卡导出为Word格式
|
||||
|
||||
**用户价值**:
|
||||
|
||||
- 快速掌握个人报卡工作整体情况
|
||||
- 高效管理不同状态的报卡记录
|
||||
- 规范疾病报告卡流程,确保数据及时准确上报
|
||||
**原型图地址**:https://static.pm-ai.cn/prototype/20260129/865d147e5650ff42c054b38244ed8239/index.html
|
||||
**流程图**:
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([医生进入个人报卡管理界面]) --> Load[展示数据统计卡片]
|
||||
Load --> Stats[展示统计卡片\n总报卡数待处理已上报]
|
||||
Stats --> Filter[渲染筛选区日期状态名称]
|
||||
Filter --> Table[展示报卡列表]
|
||||
|
||||
Table --> Op{用户操作选择}
|
||||
|
||||
Op -->|点击查看| View1[弹出只读模态框]
|
||||
View1 --> View2[展示完整报卡信息]
|
||||
View2 --> View3[关闭模态框]
|
||||
View3 --> Table
|
||||
|
||||
Op -->|点击编辑| Edit1{状态是待提交?}
|
||||
Edit1 -->|否| Table
|
||||
Edit1 -->|是| Edit2[弹出编辑模态框]
|
||||
Edit2 --> Edit3[修改表单字段]
|
||||
Edit3 --> Edit4[点击保存]
|
||||
Edit4 --> Edit5{验证必填项}
|
||||
Edit5 -->|失败| Edit6[显示错误原因]
|
||||
Edit6 --> Edit2
|
||||
Edit5 -->|通过| Edit7[保存数据]
|
||||
Edit7 --> Edit8[提示成功]
|
||||
Edit8 --> Table
|
||||
|
||||
Op -->|点击提交| Sub1{状态是待提交?}
|
||||
Sub1 -->|是| Sub2[确认对话框]
|
||||
Sub2 --> Sub3[变更为已提交]
|
||||
Sub3 --> Sub4[刷新表格统计]
|
||||
Sub4 --> Table
|
||||
Sub1 -->|否| Table
|
||||
|
||||
Op -->|点击撤回| Back1{状态是已提交?}
|
||||
Back1 -->|是| Back2[变更为待提交]
|
||||
Back2 --> Table
|
||||
Back1 -->|否| Table
|
||||
|
||||
Op -->|点击导出| Exp1{状态是已上报?}
|
||||
Exp1 -->|是| Exp2[报告卡导出预览]
|
||||
Exp2 --> Exp3[导出Word文档]
|
||||
Exp3 --> Table
|
||||
Exp1 -->|否| Table
|
||||
|
||||
Op -->|应用筛选| Filt1[触发筛选条件]
|
||||
Filt1 --> Filt2[重新加载列表]
|
||||
Filt2 --> Table
|
||||
|
||||
Op -->|批量操作| Batch1{已选记录?}
|
||||
Batch1 -->|否| Batch2[提示请选择记录]
|
||||
Batch2 --> Table
|
||||
Batch1 -->|是| Batch3{操作类型}
|
||||
|
||||
Batch3 -->|批量提交| Batch4{全是待提交?}
|
||||
Batch4 -->|否| Batch5[提示只能提交待提交]
|
||||
Batch5 --> Table
|
||||
Batch4 -->|是| Batch6[确认数量]
|
||||
Batch6 --> Batch7[更新为已提交]
|
||||
Batch7 --> Batch8[刷新统计数据]
|
||||
Batch8 --> Table
|
||||
|
||||
Batch3 -->|批量删除| Batch9{全是待提交?}
|
||||
Batch9 -->|否| Batch10[提示只能删除待提交]
|
||||
Batch10 --> Table
|
||||
Batch9 -->|是| Batch11[确认删除]
|
||||
Batch11 --> Batch12[状态变为作废]
|
||||
Batch12 --> Batch13[刷新数据]
|
||||
Batch13 --> Table
|
||||
```
|
||||
|
||||
### 二、整体布局分析
|
||||
|
||||
**页面宽度**:自适应布局
|
||||
**主要区域划分**:
|
||||
|
||||
1. **顶部标题区**(5%):页面标题。
|
||||
2. **数据统计区**(15%):展示总报卡数、待处理失败数、已成功上报数。
|
||||
3. **高级筛选区**(15%):提供日期范围、状态、报卡名称等筛选条件。
|
||||
4. **数据表格区**(55%):展示报卡列表,支持多选和操作按钮。
|
||||
5. **底部批量操作区**(10%):全选、批量删除、批量提交功能。
|
||||
|
||||
**布局特点**:上下布局,采用卡片式设计,主内容区为表格展示
|
||||
|
||||
### 三、页面区域详细描述
|
||||
|
||||
#### 1. 顶部标题区
|
||||
|
||||
**区域位置**:页面最上方
|
||||
**区域尺寸**:高度60px,宽度100%。
|
||||
**区域功能**:展示页面标题和主要操作入口
|
||||
**包含元素**:
|
||||
|
||||
- **页面标题**:
|
||||
|
||||
- - 元素类型:文本
|
||||
- 显示内容:“我的报卡”
|
||||
- 样式特征:20px/600,深灰色(#1e293b)
|
||||
|
||||
#### 2. 数据统计卡片区
|
||||
|
||||
**区域位置**:标题区下方
|
||||
**区域尺寸**:高度150px,宽度100%。
|
||||
**区域功能**:展示关键统计数据,帮助医生快速了解报卡状态分布。
|
||||
**包含元素**:
|
||||
|
||||
- **总报卡数卡片**:
|
||||
|
||||
- - 元素类型:统计卡片
|
||||
- 显示内容:图标+数值+“总报卡数”
|
||||
- 样式特征:紫色渐变背景,圆角12px
|
||||
|
||||
- **待处理失败卡片**:
|
||||
|
||||
- - 同总报卡数卡片,红色系配色
|
||||
|
||||
- **已成功上报卡片**:
|
||||
|
||||
- - 同总报卡数卡片,绿色系配色
|
||||
|
||||
#### 3. 高级筛选区
|
||||
|
||||
**区域位置**:统计卡片下方
|
||||
**区域尺寸**:高度150px,宽度100%
|
||||
**区域功能**:提供多维筛选条件,支持快速定位目标报卡。
|
||||
**包含元素**:
|
||||
|
||||
- **日期范围选择器**:
|
||||
|
||||
- - 元素类型:表单控件(两个date输入框)
|
||||
- 交互行为:选择日期后触发筛选。
|
||||
- 限制条件:结束日期不能早于开始日期。
|
||||
|
||||
- **状态筛选下拉框**:
|
||||
|
||||
- - 元素类型:下拉选择
|
||||
- 可选值:全部状态/待提交/已提交/已审核/已上报/失败/作废
|
||||
|
||||
- **报卡名称搜索框**:
|
||||
|
||||
- - 元素类型:文本输入框
|
||||
- 占位文本:“输入报卡名称…”
|
||||
|
||||
- **应用筛选按钮**:
|
||||
|
||||
- - 元素类型:主要操作按钮
|
||||
- 交互行为:点击后触发表格数据刷新
|
||||
|
||||
- **重置条件按钮**:
|
||||
|
||||
- - 元素类型:次要操作按钮
|
||||
- 交互行为:清空所有筛选条件
|
||||
|
||||
#### 4. 数据表格区
|
||||
|
||||
**区域位置**:页面中部
|
||||
**区域尺寸**:高度自适应,宽度100%。
|
||||
**区域功能**:展示报卡列表及提供行级操作
|
||||
**包含元素**:
|
||||
|
||||
- **表格头部**:
|
||||
|
||||
**数据主要取值于传染病报卡表(infectious_card)**
|
||||
|
||||
- - 包含字段:选择框、卡片ID、患者姓名、身份证号、联系电话、就诊卡号、报卡名称、提交时间、状态、操作
|
||||
- 样式特征:灰色背景,13px字号,大写字母
|
||||
|
||||
- **表格内容行**:
|
||||
|
||||
- - 展示方式:每行显示一条报卡记录
|
||||
|
||||
- 数据字段:
|
||||
|
||||
- - 卡片ID:文本 - HOSP202601150001 - 不可操作
|
||||
- 患者姓名:文本 - 张三 - 不可操作
|
||||
- 身份证号:不脱敏文本 - 110101199001011234 - 不可操作
|
||||
- 联系电话:文本 - 13800138000 - 不可操作
|
||||
- 就诊卡号:文本 - M12345678 - 不可操作
|
||||
- 报卡名称:文本 - 中华人民共和国传染病报告卡 - 不可操作
|
||||
- 提交时间:时间 - 2026-01-15 14:30 - 不可操作
|
||||
- 状态标签:根据状态值显示不同颜色
|
||||
|
||||
- 操作功能:
|
||||
|
||||
- - 查看按钮:所有状态可见
|
||||
- 编辑按钮:仅"待提交"状态可见
|
||||
- 提交按钮:仅"待提交"状态可见
|
||||
- 撤回按钮:仅"已提交"状态可见
|
||||
- 导出按钮:仅"已上报"状态可见
|
||||
|
||||
#### 5. 底部批量操作区
|
||||
|
||||
**区域位置**:页面底部
|
||||
**区域尺寸**:高度60px,宽度100%。
|
||||
**区域功能**:支持批量操作选中报卡。
|
||||
**包含元素**:
|
||||
|
||||
- **全选复选框**:
|
||||
|
||||
- - 交互行为:勾选后选中当前页所有记录
|
||||
|
||||
- **批量删除按钮**:
|
||||
|
||||
- - 元素类型:文本按钮
|
||||
- 限制条件:仅对"待提交"状态记录有效
|
||||
- 交互行为:提交后状态变为"作废"。
|
||||
|
||||
- **批量提交按钮**:
|
||||
|
||||
- - 元素类型:主要操作按钮
|
||||
- 限制条件:仅对"待提交"状态记录有效
|
||||
- 交互行为:提交后状态变为"已提交"。
|
||||
|
||||
#### 6. 报卡详情弹窗(界面内容功能与需求编号102界面保持一致,建议用同一个界面)
|
||||
|
||||
**区域位置**:页面居中模态框
|
||||
**区域功能**:查看/编辑完整报卡信息
|
||||
**包含元素**:
|
||||
|
||||
- 表单字段(按模块分组):
|
||||
|
||||
- 1. 患者基本信息(姓名/身份证号/联系方式*)
|
||||
2. 临床信息(发病日期/诊断日期*)
|
||||
3. 传染病分类(甲/乙/丙类多选*)
|
||||
4. 报告信息(报告单位/医生*)
|
||||
|
||||
- 操作按钮:
|
||||
|
||||
o 取消:关闭弹窗不保存
|
||||
|
||||
o 保存:验证必填项后保持数据
|
||||
|
||||
### 四、交互功能详细说明
|
||||
|
||||
#### 1. 报卡查看功能
|
||||
|
||||
**功能描述**:查看报卡详细信息
|
||||
**触发条件**:点击任意行的"查看"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 弹出模态框展示完整报卡信息
|
||||
2. 所有字段为只读状态
|
||||
3. 点击关闭按钮或蒙层关闭模态框
|
||||
|
||||
#### 2. 报卡编辑功能
|
||||
|
||||
**功能描述**:修改待提交的报卡信息
|
||||
**触发条件**:点击"待提交"状态的"编辑"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 弹出可编辑的报卡表单模态框
|
||||
2. 修改必要字段(带*号为必填项)
|
||||
3. 点击"保存"按钮提交修改
|
||||
4. 成功提示后关闭模态框
|
||||
|
||||
#### 3. 批量提交功能
|
||||
|
||||
**功能描述**:批量提交选中的待提交报卡
|
||||
**触发条件**:勾选记录后点击"批量提交"按钮
|
||||
**操作流程**:
|
||||
|
||||
1. 校验是否选中有效记录(状态为待提交)
|
||||
2. 弹出确认对话框显示待提交数量
|
||||
3. 确认后更新记录状态为"已提交"
|
||||
4. 刷新表格数据和统计卡片
|
||||
|
||||
**异常处理**:
|
||||
|
||||
- 未选中记录:提示"请选择待提交的记录"
|
||||
- 包含不可提交记录:提示"只能提交待提交状态的记录"
|
||||
|
||||
#### 4. 报卡状态流转
|
||||
|
||||
**触发方式**:点击操作列按钮
|
||||
**执行流程**:
|
||||
|
||||
1. 待提交 → 已提交:点击"提交"按钮 → 弹窗确认 → 状态变更
|
||||
2. 已提交 → 待提交:点击"撤回"按钮 → 状态回滚
|
||||
3. 已上报 → 导出:生成标准疾病报告卡Word文档(含医院红头格式)
|
||||
|
||||
**异常处理**:
|
||||
|
||||
- 提交失败:显示具体错误原因(如:必填项未完成)
|
||||
|
||||
### 五、数据结构说明
|
||||
|
||||
**关键数据字段**:
|
||||
|
||||
**传染病报卡表(infectious_card)**
|
||||
|
||||
### 六、开发实现要点
|
||||
|
||||
**样式规范**:
|
||||
|
||||
- **主色调**:#6366f1(紫色)
|
||||
|
||||
- **状态色**:
|
||||
|
||||
- - 待提交:#f59e0b(橙色)
|
||||
- 已提交:#2563eb(蓝色)
|
||||
- 已上报:#16a34a(绿色)
|
||||
- 失败:#dc2626(红色)
|
||||
|
||||
- **字体规范**:
|
||||
|
||||
- - 标题:20px/600
|
||||
- 正文:14px/400
|
||||
|
||||
- **间距系统**:
|
||||
|
||||
- - 卡片内边距:24px
|
||||
- 元素间距:16px
|
||||
|
||||
**技术要求**:
|
||||
|
||||
- **表格组件**:需支持虚拟滚动(大数据量场景)
|
||||
- **导出功能**:实现Word导出
|
||||
|
||||
**注意事项**:
|
||||
|
||||
1. 身份证号等敏感信息不需做脱敏处理
|
||||
2. 批量操作需考虑性能优化(分页处理)
|
||||
3. 状态变更需同步更新统计卡片数据
|
||||
4. 移动端需特别处理表格的横向滚动体验
|
||||
5. ‘待提交’状态就是‘暂存’状态
|
||||
6. 只能查询医生本人报卡的数据
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.core.web.controller.common;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* 前端路由 fallback 控制器
|
||||
* 处理 Vue Router History 模式下的路由
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
@Controller
|
||||
public class FrontRouterController {
|
||||
|
||||
/**
|
||||
* 处理前端路由,将所有前端路由请求转发到 index.html
|
||||
*/
|
||||
@RequestMapping(value = {
|
||||
"/ybmanagement/**",
|
||||
"/system/**",
|
||||
"/monitor/**",
|
||||
"/tool/**",
|
||||
"/doctorstation/**",
|
||||
"/features/**",
|
||||
"/todo/**",
|
||||
"/appoinmentmanage/**",
|
||||
"/clinicmanagement/**",
|
||||
"/medicationmanagement/**",
|
||||
"/yb/**",
|
||||
"/patient/**",
|
||||
"/charge/**",
|
||||
"/nurse/**",
|
||||
"/pharmacy/**",
|
||||
"/report/**",
|
||||
"/document/**",
|
||||
"/triage/**",
|
||||
"/check/**",
|
||||
"/lab/**",
|
||||
"/financial/**",
|
||||
"/crosssystem/**",
|
||||
"/workflow/**"
|
||||
})
|
||||
public String index() {
|
||||
return "forward:/index.html";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.core.common.core.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分页结果类
|
||||
*
|
||||
* @author
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageResult<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 数据列表
|
||||
*/
|
||||
private List<T> rows;
|
||||
|
||||
/**
|
||||
* 总数
|
||||
*/
|
||||
private long total;
|
||||
}
|
||||
@@ -10,16 +10,21 @@ import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.core.common.core.domain.entity.SysRole;
|
||||
import com.core.common.core.domain.model.LoginUser;
|
||||
import com.openhis.administration.domain.*;
|
||||
import com.openhis.administration.mapper.PatientMapper;
|
||||
import com.openhis.administration.service.*;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.enums.ybenums.YbPayment;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.financial.domain.PaymentReconciliation;
|
||||
import com.openhis.financial.domain.RefundLog;
|
||||
import com.openhis.financial.service.IRefundLogService;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceDto;
|
||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||
import com.openhis.web.chargemanage.appservice.IOutpatientRegistrationAppService;
|
||||
@@ -40,10 +45,14 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 门诊挂号 应用实现类
|
||||
@@ -85,6 +94,9 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
@Resource
|
||||
TriageCandidateExclusionService triageCandidateExclusionService;
|
||||
|
||||
@Resource
|
||||
IRefundLogService iRefundLogService;
|
||||
|
||||
/**
|
||||
* 门诊挂号 - 查询患者信息
|
||||
*
|
||||
@@ -260,7 +272,7 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
R<?> result = iPaymentRecService.cancelRegPayment(cancelPaymentDto);
|
||||
|
||||
PaymentReconciliation paymentRecon = null;
|
||||
if (PaymentReconciliation.class.isAssignableFrom(result.getData().getClass())) {
|
||||
if (result.getData() != null && PaymentReconciliation.class.isAssignableFrom(result.getData().getClass())) {
|
||||
paymentRecon = (PaymentReconciliation)result.getData();
|
||||
}
|
||||
if (paymentRecon != null) {
|
||||
@@ -275,6 +287,9 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
}
|
||||
}
|
||||
|
||||
// 记录退号日志
|
||||
recordRefundLog(cancelRegPaymentDto, byId, result, paymentRecon);
|
||||
|
||||
// 2025/05/05 该处保存费用项后,会通过统一收费处理进行收费
|
||||
return R.ok(paymentRecon, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"退号"}));
|
||||
}
|
||||
@@ -394,4 +409,124 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
|
||||
return R.ok(null, "补打挂号成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录退号日志
|
||||
*
|
||||
* @param cancelRegPaymentDto 退号请求对象
|
||||
* @param encounter 就诊信息
|
||||
* @param result 退号结果
|
||||
* @param paymentRecon 支付对账信息
|
||||
*/
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public void recordRefundLog(CancelRegPaymentDto cancelRegPaymentDto,
|
||||
Encounter encounter,
|
||||
R<?> result,
|
||||
PaymentReconciliation paymentRecon) {
|
||||
RefundLog refundLog = new RefundLog();
|
||||
try {
|
||||
// 1. 订单ID(唯一)
|
||||
String orderId = String.valueOf(cancelRegPaymentDto.getEncounterId());
|
||||
refundLog.setOrderId(orderId);
|
||||
|
||||
// 已存在则不重复插入(防止唯一约束异常)
|
||||
long exist = iRefundLogService.lambdaQuery()
|
||||
.eq(RefundLog::getOrderId, orderId)
|
||||
.count();
|
||||
if (exist > 0) {
|
||||
log.warn("退号日志已存在,orderId={}", orderId);
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 患者信息
|
||||
if (encounter != null) {
|
||||
refundLog.setPatientId(String.valueOf(encounter.getPatientId()));
|
||||
Patient patient = patientMapper.selectById(encounter.getPatientId());
|
||||
refundLog.setPatientName(patient != null ? patient.getName() : "未知");
|
||||
} else {
|
||||
refundLog.setPatientId("0");
|
||||
refundLog.setPatientName("未知");
|
||||
}
|
||||
|
||||
// 3. 金额
|
||||
// 优先使用paymentRecon中的displayAmount,如果没有则尝试使用cancelRegPaymentDto中的displayAmount
|
||||
BigDecimal refundAmount = BigDecimal.ZERO;
|
||||
if (paymentRecon != null) {
|
||||
// 使用退号后生成的paymentRecon的实际金额(这个金额应该是负数)
|
||||
refundAmount = paymentRecon.getDisplayAmount() != null
|
||||
? paymentRecon.getDisplayAmount().abs() // 取绝对值,因为退费金额通常显示为正数
|
||||
: BigDecimal.ZERO;
|
||||
} else if (cancelRegPaymentDto.getDisplayAmount() != null) {
|
||||
refundAmount = cancelRegPaymentDto.getDisplayAmount();
|
||||
}
|
||||
refundLog.setRefundAmount(refundAmount);
|
||||
|
||||
// 4. 原因 & 类型
|
||||
refundLog.setRefundReason(
|
||||
StringUtils.isNotEmpty(cancelRegPaymentDto.getReason())
|
||||
? cancelRegPaymentDto.getReason()
|
||||
: "诊前退号-已缴费签到未就诊"
|
||||
);
|
||||
refundLog.setRefundType("FULL");
|
||||
|
||||
// 5. 退款方式
|
||||
String refundMethod = "UNKNOWN";
|
||||
if (cancelRegPaymentDto.getPaymentDetails() != null
|
||||
&& !cancelRegPaymentDto.getPaymentDetails().isEmpty()) {
|
||||
Integer payEnum = cancelRegPaymentDto.getPaymentDetails().get(0).getPayEnum();
|
||||
if (payEnum != null) {
|
||||
YbPayment ybPayment = YbPayment.getByValue(payEnum);
|
||||
refundMethod = (ybPayment != null ? ybPayment.getInfo() : payEnum.toString());
|
||||
}
|
||||
}
|
||||
refundLog.setRefundMethod(refundMethod);
|
||||
|
||||
// 6. 原交易号
|
||||
refundLog.setOriginalTradeNo(
|
||||
paymentRecon != null ? paymentRecon.getPaymentNo() : null
|
||||
);
|
||||
|
||||
// 7. 时间
|
||||
refundLog.setRefundTime(LocalDateTime.now());
|
||||
|
||||
// 8. 操作人
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null) {
|
||||
refundLog.setOpUserId(String.valueOf(loginUser.getUserId()));
|
||||
refundLog.setOpUserName(loginUser.getUsername());
|
||||
List<SysRole> roles = loginUser.getRoleList();
|
||||
refundLog.setOpRole(
|
||||
roles != null && !roles.isEmpty() ? roles.get(0).getRoleName() : "SYSTEM"
|
||||
);
|
||||
} else {
|
||||
refundLog.setOpUserId("0");
|
||||
refundLog.setOpUserName("SYSTEM");
|
||||
refundLog.setOpRole("SYSTEM");
|
||||
}
|
||||
|
||||
// 9. 状态
|
||||
if (result != null && result.getCode() == 200) {
|
||||
refundLog.setState(1);
|
||||
} else {
|
||||
refundLog.setState(0);
|
||||
refundLog.setFailReason(result != null ? result.getMsg() : "未知错误");
|
||||
}
|
||||
|
||||
// 10. 创建时间
|
||||
refundLog.setCreatedAt(LocalDateTime.now());
|
||||
refundLog.setUpdatedAt(LocalDateTime.now());
|
||||
|
||||
// 11. 保存
|
||||
boolean saved = iRefundLogService.save(refundLog);
|
||||
if (!saved) {
|
||||
throw new RuntimeException("退号日志保存失败");
|
||||
}
|
||||
|
||||
log.info("退号日志入库成功, orderId={}", orderId);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("退号日志入库失败,数据={}", refundLog, e);
|
||||
throw e; // 让事务感知(你也可以只记录不抛)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -59,4 +59,14 @@ public class HomeStatisticsDto {
|
||||
* 待审核数量
|
||||
*/
|
||||
private Integer pendingApprovals;
|
||||
|
||||
/**
|
||||
* 我的患者数量(医生专属)
|
||||
*/
|
||||
private Integer myPatients;
|
||||
|
||||
/**
|
||||
* 待写病历数量
|
||||
*/
|
||||
private Integer pendingEmr;
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
// 获取登录者信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Long userId = loginUser.getUserId();
|
||||
Integer tenantId = loginUser.getTenantId().intValue();
|
||||
|
||||
// 先构建基础查询条件
|
||||
QueryWrapper<PatientBaseInfoDto> queryWrapper = HisQueryUtils.buildQueryWrapper(
|
||||
@@ -160,7 +161,8 @@ public class PatientInformationServiceImpl implements IPatientInformationService
|
||||
// 查询该医生作为接诊医生(ADMITTER, code="1")和挂号医生(REGISTRATION_DOCTOR, code="12")的所有就诊记录的患者ID
|
||||
List<Long> doctorPatientIds = patientManageMapper.getPatientIdsByPractitionerId(
|
||||
practitioner.getId(),
|
||||
Arrays.asList(ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode()));
|
||||
Arrays.asList(ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode()),
|
||||
tenantId);
|
||||
|
||||
if (doctorPatientIds != null && !doctorPatientIds.isEmpty()) {
|
||||
// 添加患者ID过滤条件 - 注意:这里使用列名而不是表别名
|
||||
|
||||
@@ -64,8 +64,10 @@ public interface PatientManageMapper extends BaseMapper<Patient> {
|
||||
*
|
||||
* @param practitionerId 医生ID
|
||||
* @param typeCodes 参与者类型代码列表
|
||||
* @param tenantId 租户ID
|
||||
* @return 患者ID列表
|
||||
*/
|
||||
List<Long> getPatientIdsByPractitionerId(@Param("practitionerId") Long practitionerId,
|
||||
@Param("typeCodes") List<String> typeCodes);
|
||||
@Param("typeCodes") List<String> typeCodes,
|
||||
@Param("tenantId") Integer tenantId);
|
||||
}
|
||||
|
||||
@@ -66,22 +66,33 @@ public class HomeStatisticsServiceImpl implements IHomeStatisticsService {
|
||||
Practitioner practitioner = practitionerList != null && !practitionerList.isEmpty() ? practitionerList.get(0) : null;
|
||||
|
||||
int totalPatients = 0;
|
||||
int myPatients = 0;
|
||||
|
||||
// 如果当前用户是医生,查询该医生接诊和被挂号的所有患者
|
||||
if (practitioner != null) {
|
||||
// 获取当前登录用户的租户ID
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId().intValue();
|
||||
|
||||
// 查询该医生作为接诊医生(ADMITTER, code="1")和挂号医生(REGISTRATION_DOCTOR, code="12")的所有就诊记录的患者ID
|
||||
List<Long> doctorPatientIds = patientManageMapper.getPatientIdsByPractitionerId(
|
||||
practitioner.getId(),
|
||||
Arrays.asList(ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode()));
|
||||
Arrays.asList(ParticipantType.ADMITTER.getCode(), ParticipantType.REGISTRATION_DOCTOR.getCode()),
|
||||
tenantId);
|
||||
|
||||
totalPatients = doctorPatientIds != null ? doctorPatientIds.size() : 0;
|
||||
myPatients = doctorPatientIds != null ? doctorPatientIds.size() : 0;
|
||||
|
||||
// 对于医生,"我的患者"数量即为该医生负责的患者数量
|
||||
statistics.setMyPatients(myPatients);
|
||||
} else {
|
||||
// 如果不是医生,查询所有患者(与患者管理页面逻辑保持一致)
|
||||
// 如果不是医生,"我的患者"数量为0
|
||||
statistics.setMyPatients(0);
|
||||
}
|
||||
|
||||
// 查询所有患者作为总患者数
|
||||
LambdaQueryWrapper<Patient> patientQuery = new LambdaQueryWrapper<>();
|
||||
patientQuery.eq(Patient::getDeleteFlag, "0");
|
||||
List<Patient> patientList = patientService.list(patientQuery);
|
||||
totalPatients = patientList != null ? patientList.size() : 0;
|
||||
}
|
||||
|
||||
statistics.setTotalPatients(totalPatients);
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.openhis.web.system.controller;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
|
||||
import com.openhis.web.dto.HomeStatisticsDto;
|
||||
import com.openhis.web.service.IHomeStatisticsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -20,19 +22,21 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class HomeController {
|
||||
|
||||
private final IDoctorStationEmrAppService doctorStationEmrAppService;
|
||||
private final IHomeStatisticsService homeStatisticsService;
|
||||
|
||||
@ApiOperation("获取首页统计数据")
|
||||
@GetMapping("/statistics")
|
||||
public R<?> getStatistics() {
|
||||
// 这里可以返回各种统计数据
|
||||
// 为了简化,我们只返回待写病历数量
|
||||
// 获取基础统计数据
|
||||
HomeStatisticsDto statisticsDto = homeStatisticsService.getHomeStatistics();
|
||||
|
||||
// 获取待写病历数量
|
||||
Long userId = SecurityUtils.getLoginUser().getUserId();
|
||||
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(userId);
|
||||
|
||||
// 构建返回数据
|
||||
java.util.Map<String, Object> data = new java.util.HashMap<>();
|
||||
data.put("pendingEmr", pendingEmrCount.getData());
|
||||
// 将待写病历数量添加到统计数据中
|
||||
statisticsDto.setPendingEmr((Integer) pendingEmrCount.getData());
|
||||
|
||||
return R.ok(data);
|
||||
return R.ok(statisticsDto);
|
||||
}
|
||||
}
|
||||
@@ -136,13 +136,13 @@
|
||||
<select id="getPatientIdsByPractitionerId" resultType="java.lang.Long">
|
||||
SELECT DISTINCT enc.patient_id
|
||||
FROM adm_encounter_participant AS ep
|
||||
LEFT JOIN adm_encounter AS enc ON ep.encounter_id = enc.ID AND enc.delete_flag = '0'
|
||||
INNER JOIN adm_encounter AS enc ON ep.encounter_id = enc.ID AND enc.delete_flag = '0'
|
||||
INNER JOIN adm_patient AS pt ON enc.patient_id = pt.id AND pt.delete_flag = '0'
|
||||
WHERE ep.delete_flag = '0'
|
||||
AND ep.practitioner_id = #{practitionerId}
|
||||
AND ep.tenant_id = 1
|
||||
AND enc.tenant_id = 1
|
||||
AND pt.tenant_id = 1
|
||||
AND ep.tenant_id = #{tenantId}
|
||||
AND enc.tenant_id = #{tenantId}
|
||||
AND pt.tenant_id = #{tenantId}
|
||||
<if test="typeCodes != null and !typeCodes.isEmpty()">
|
||||
AND ep.type_code IN
|
||||
<foreach collection="typeCodes" item="typeCode" open="(" separator="," close=")">
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.openhis.financial.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 退号日志表
|
||||
*/
|
||||
@TableName(value = "refund_log")
|
||||
@Data
|
||||
public class RefundLog implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@TableField(value = "order_id")
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 患者ID
|
||||
*/
|
||||
@TableField(value = "patient_id")
|
||||
private String patientId;
|
||||
|
||||
/**
|
||||
* 患者姓名
|
||||
*/
|
||||
@TableField(value = "patient_name")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
@TableField(value = "refund_amount")
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
/**
|
||||
* 退款原因
|
||||
*/
|
||||
@TableField(value = "refund_reason")
|
||||
private String refundReason;
|
||||
|
||||
/**
|
||||
* 退款类型(FULL-全额退号,PART-部分退号)
|
||||
*/
|
||||
@TableField(value = "refund_type")
|
||||
private String refundType;
|
||||
|
||||
/**
|
||||
* 退款方式
|
||||
*/
|
||||
@TableField(value = "refund_method")
|
||||
private String refundMethod;
|
||||
|
||||
/**
|
||||
* 原交易流水号
|
||||
*/
|
||||
@TableField(value = "original_trade_no")
|
||||
private String originalTradeNo;
|
||||
|
||||
/**
|
||||
* 退款交易流水号
|
||||
*/
|
||||
@TableField(value = "refund_trade_no")
|
||||
private String refundTradeNo;
|
||||
|
||||
/**
|
||||
* 退款时间
|
||||
*/
|
||||
@TableField(value = "refund_time")
|
||||
private LocalDateTime refundTime;
|
||||
|
||||
/**
|
||||
* 操作用户ID
|
||||
*/
|
||||
@TableField(value = "op_user_id")
|
||||
private String opUserId;
|
||||
|
||||
/**
|
||||
* 操作用户名
|
||||
*/
|
||||
@TableField(value = "op_user_name")
|
||||
private String opUserName;
|
||||
|
||||
/**
|
||||
* 操作角色
|
||||
*/
|
||||
@TableField(value = "op_role")
|
||||
private String opRole;
|
||||
|
||||
/**
|
||||
* 状态(0-失败,1-成功,2-处理中)
|
||||
*/
|
||||
@TableField(value = "state")
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
@TableField(value = "fail_reason")
|
||||
private String failReason;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.openhis.financial.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.financial.domain.RefundLog;
|
||||
|
||||
/**
|
||||
* 退号日志 Mapper接口
|
||||
*/
|
||||
public interface RefundLogMapper extends BaseMapper<RefundLog> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.openhis.financial.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.financial.domain.RefundLog;
|
||||
|
||||
/**
|
||||
* 退号日志 Service接口
|
||||
*/
|
||||
public interface IRefundLogService extends IService<RefundLog> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.openhis.financial.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.financial.domain.RefundLog;
|
||||
import com.openhis.financial.mapper.RefundLogMapper;
|
||||
import com.openhis.financial.service.IRefundLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 退号日志 Service实现类
|
||||
*/
|
||||
@Service
|
||||
public class RefundLogServiceImpl extends ServiceImpl<RefundLogMapper, RefundLog> implements IRefundLogService {
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.openhis.yb.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 日结医保结算实体类
|
||||
*
|
||||
* @author
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("yb_day_end_settlement")
|
||||
public class DayEndMedicalInsuranceSettlement extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 结算单号
|
||||
*/
|
||||
@TableField("settlement_no")
|
||||
private String settlementNo;
|
||||
|
||||
/**
|
||||
* 结算日期
|
||||
*/
|
||||
@TableField("settlement_date")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date settlementDate;
|
||||
|
||||
/**
|
||||
* 结算类型 (daily, weekly, monthly)
|
||||
*/
|
||||
@TableField("settlement_type")
|
||||
private String settlementType;
|
||||
|
||||
/**
|
||||
* 医保类型 (城镇职工, 城乡居民等)
|
||||
*/
|
||||
@TableField("insurance_type")
|
||||
private String insuranceType;
|
||||
|
||||
/**
|
||||
* 总人次
|
||||
*/
|
||||
@TableField("total_visits")
|
||||
private Integer totalVisits;
|
||||
|
||||
/**
|
||||
* 总金额
|
||||
*/
|
||||
@TableField("total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 医保统筹支付金额
|
||||
*/
|
||||
@TableField("insurance_pay_amount")
|
||||
private BigDecimal insurancePayAmount;
|
||||
|
||||
/**
|
||||
* 个人账户支付金额
|
||||
*/
|
||||
@TableField("account_pay_amount")
|
||||
private BigDecimal accountPayAmount;
|
||||
|
||||
/**
|
||||
* 个人自付金额
|
||||
*/
|
||||
@TableField("personal_pay_amount")
|
||||
private BigDecimal personalPayAmount;
|
||||
|
||||
/**
|
||||
* 医保基金支付总额
|
||||
*/
|
||||
@TableField("fund_pay_sum_amount")
|
||||
private BigDecimal fundPaySumAmount;
|
||||
|
||||
/**
|
||||
* 状态 (0正常 1停用)
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 操作员
|
||||
*/
|
||||
@TableField("operator")
|
||||
private String operator;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.openhis.yb.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.yb.domain.DayEndMedicalInsuranceSettlement;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 日结医保结算Mapper接口
|
||||
*
|
||||
* @author
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface DayEndMedicalInsuranceSettlementMapper extends BaseMapper<DayEndMedicalInsuranceSettlement> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.openhis.yb.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.yb.domain.DayEndMedicalInsuranceSettlement;
|
||||
import com.core.common.core.domain.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 日结医保结算Service接口
|
||||
*
|
||||
* @author
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
public interface IDayEndMedicalInsuranceSettlementService extends IService<DayEndMedicalInsuranceSettlement> {
|
||||
|
||||
/**
|
||||
* 查询日结医保结算
|
||||
*
|
||||
* @param id 日结医保结算ID
|
||||
* @return 日结医保结算
|
||||
*/
|
||||
DayEndMedicalInsuranceSettlement selectDayEndMedicalInsuranceSettlementById(Long id);
|
||||
|
||||
/**
|
||||
* 查询日结医保结算列表
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @return 日结医保结算集合
|
||||
*/
|
||||
List<DayEndMedicalInsuranceSettlement> selectDayEndMedicalInsuranceSettlementList(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement);
|
||||
|
||||
/**
|
||||
* 新增日结医保结算
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @return 结果
|
||||
*/
|
||||
int insertDayEndMedicalInsuranceSettlement(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement);
|
||||
|
||||
/**
|
||||
* 修改日结医保结算
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @return 结果
|
||||
*/
|
||||
int updateDayEndMedicalInsuranceSettlement(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement);
|
||||
|
||||
/**
|
||||
* 批量删除日结医保结算
|
||||
*
|
||||
* @param ids 需要删除的日结医保结算ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDayEndMedicalInsuranceSettlementByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除日结医保结算信息
|
||||
*
|
||||
* @param id 日结医保结算ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteDayEndMedicalInsuranceSettlementById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询日结医保结算列表
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 页面大小
|
||||
* @return 分页结果
|
||||
*/
|
||||
PageResult<DayEndMedicalInsuranceSettlement> selectDayEndMedicalInsuranceSettlementPage(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement, int pageNum, int pageSize);
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.openhis.yb.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.core.common.core.domain.PageResult;
|
||||
import com.openhis.yb.domain.DayEndMedicalInsuranceSettlement;
|
||||
import com.openhis.yb.mapper.DayEndMedicalInsuranceSettlementMapper;
|
||||
import com.openhis.yb.service.IDayEndMedicalInsuranceSettlementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 日结医保结算Service业务层处理
|
||||
*
|
||||
* @author
|
||||
* @date 2026-02-02
|
||||
*/
|
||||
@Service
|
||||
public class DayEndMedicalInsuranceSettlementServiceImpl extends ServiceImpl<DayEndMedicalInsuranceSettlementMapper, DayEndMedicalInsuranceSettlement> implements IDayEndMedicalInsuranceSettlementService {
|
||||
|
||||
@Autowired
|
||||
private DayEndMedicalInsuranceSettlementMapper dayEndMedicalInsuranceSettlementMapper;
|
||||
|
||||
/**
|
||||
* 查询日结医保结算
|
||||
*
|
||||
* @param id 日结医保结算ID
|
||||
* @return 日结医保结算
|
||||
*/
|
||||
@Override
|
||||
public DayEndMedicalInsuranceSettlement selectDayEndMedicalInsuranceSettlementById(Long id) {
|
||||
return dayEndMedicalInsuranceSettlementMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询日结医保结算列表
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @return 日结医保结算
|
||||
*/
|
||||
@Override
|
||||
public List<DayEndMedicalInsuranceSettlement> selectDayEndMedicalInsuranceSettlementList(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement) {
|
||||
LambdaQueryWrapper<DayEndMedicalInsuranceSettlement> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(dayEndMedicalInsuranceSettlement.getSettlementNo() != null, DayEndMedicalInsuranceSettlement::getSettlementNo, dayEndMedicalInsuranceSettlement.getSettlementNo());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementDate() != null, DayEndMedicalInsuranceSettlement::getSettlementDate, dayEndMedicalInsuranceSettlement.getSettlementDate());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementType() != null, DayEndMedicalInsuranceSettlement::getSettlementType, dayEndMedicalInsuranceSettlement.getSettlementType());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getInsuranceType() != null, DayEndMedicalInsuranceSettlement::getInsuranceType, dayEndMedicalInsuranceSettlement.getInsuranceType());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getStatus() != null, DayEndMedicalInsuranceSettlement::getStatus, dayEndMedicalInsuranceSettlement.getStatus());
|
||||
lqw.orderByDesc(DayEndMedicalInsuranceSettlement::getCreateTime);
|
||||
return dayEndMedicalInsuranceSettlementMapper.selectList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增日结医保结算
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDayEndMedicalInsuranceSettlement(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement) {
|
||||
return dayEndMedicalInsuranceSettlementMapper.insert(dayEndMedicalInsuranceSettlement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改日结医保结算
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDayEndMedicalInsuranceSettlement(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement) {
|
||||
return dayEndMedicalInsuranceSettlementMapper.updateById(dayEndMedicalInsuranceSettlement);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除日结医保结算
|
||||
*
|
||||
* @param ids 需要删除的日结医保结算ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDayEndMedicalInsuranceSettlementByIds(Long[] ids) {
|
||||
return dayEndMedicalInsuranceSettlementMapper.deleteBatchIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日结医保结算信息
|
||||
*
|
||||
* @param id 日结医保结算ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDayEndMedicalInsuranceSettlementById(Long id) {
|
||||
return dayEndMedicalInsuranceSettlementMapper.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询日结医保结算列表
|
||||
*
|
||||
* @param dayEndMedicalInsuranceSettlement 日结医保结算
|
||||
* @param pageNum 页码
|
||||
* @param pageSize 页面大小
|
||||
* @return 分页结果
|
||||
*/
|
||||
@Override
|
||||
public PageResult<DayEndMedicalInsuranceSettlement> selectDayEndMedicalInsuranceSettlementPage(DayEndMedicalInsuranceSettlement dayEndMedicalInsuranceSettlement, int pageNum, int pageSize) {
|
||||
LambdaQueryWrapper<DayEndMedicalInsuranceSettlement> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(dayEndMedicalInsuranceSettlement.getSettlementNo() != null, DayEndMedicalInsuranceSettlement::getSettlementNo, dayEndMedicalInsuranceSettlement.getSettlementNo());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementDate() != null, DayEndMedicalInsuranceSettlement::getSettlementDate, dayEndMedicalInsuranceSettlement.getSettlementDate());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getSettlementType() != null, DayEndMedicalInsuranceSettlement::getSettlementType, dayEndMedicalInsuranceSettlement.getSettlementType());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getInsuranceType() != null, DayEndMedicalInsuranceSettlement::getInsuranceType, dayEndMedicalInsuranceSettlement.getInsuranceType());
|
||||
lqw.eq(dayEndMedicalInsuranceSettlement.getStatus() != null, DayEndMedicalInsuranceSettlement::getStatus, dayEndMedicalInsuranceSettlement.getStatus());
|
||||
lqw.orderByDesc(DayEndMedicalInsuranceSettlement::getCreateTime);
|
||||
|
||||
Page<DayEndMedicalInsuranceSettlement> page = new Page<>(pageNum, pageSize);
|
||||
Page<DayEndMedicalInsuranceSettlement> result = dayEndMedicalInsuranceSettlementMapper.selectPage(page, lqw);
|
||||
|
||||
return PageResult.<DayEndMedicalInsuranceSettlement>builder()
|
||||
.rows(result.getRecords())
|
||||
.total(result.getTotal())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询日结医保结算列表
|
||||
export function listDayEndMedicalInsuranceSettlement(query) {
|
||||
return request({
|
||||
url: '/ybmanage/dayEndMedicalInsuranceSettlement/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询日结医保结算详细
|
||||
export function getDayEndMedicalInsuranceSettlement(id) {
|
||||
return request({
|
||||
url: '/ybmanage/dayEndMedicalInsuranceSettlement/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增日结医保结算
|
||||
export function addDayEndMedicalInsuranceSettlement(data) {
|
||||
return request({
|
||||
url: '/ybmanage/dayEndMedicalInsuranceSettlement',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改日结医保结算
|
||||
export function updateDayEndMedicalInsuranceSettlement(data) {
|
||||
return request({
|
||||
url: '/ybmanage/dayEndMedicalInsuranceSettlement',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除日结医保结算
|
||||
export function delDayEndMedicalInsuranceSettlement(id) {
|
||||
return request({
|
||||
url: '/ybmanage/dayEndMedicalInsuranceSettlement/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@@ -629,7 +629,7 @@ const currentStats = computed(() => {
|
||||
statWith.value = statisticsData.value.pendingApprovals;
|
||||
break;
|
||||
case 'myPatients':
|
||||
statWith.value = statisticsData.value.totalPatients;
|
||||
statWith.value = statisticsData.value.myPatients || 0;
|
||||
statWith.trend = statisticsData.value.patientTrend;
|
||||
break;
|
||||
case 'todayAppointments':
|
||||
|
||||
@@ -65,7 +65,19 @@
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
|
||||
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.menuType === 'C'"
|
||||
class="menu-name-link"
|
||||
@click="handleMenuClick(scope.row)"
|
||||
:title="`点击跳转到${scope.row.menuName}模块`"
|
||||
style="cursor: pointer; color: #409EFF;">
|
||||
{{ scope.row.menuName }}
|
||||
</span>
|
||||
<span v-else>{{ scope.row.menuName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="icon" label="图标" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<svg-icon :icon-class="scope.row.icon" />
|
||||
@@ -302,10 +314,17 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.menu-name-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script setup name="Menu">
|
||||
import {addMenu, delMenu, getMenu, listMenu, updateMenu, treeselect} from "@/api/system/menu";
|
||||
import SvgIcon from "@/components/SvgIcon";
|
||||
import IconSelect from "@/components/IconSelect";
|
||||
import {getNormalPath} from "@/utils/openhis";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_show_hide, sys_normal_disable } = proxy.useDict("sys_show_hide", "sys_normal_disable");
|
||||
@@ -495,5 +514,70 @@ function handleDelete(row) {
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 处理菜单点击事件,跳转到对应功能模块 */
|
||||
function handleMenuClick(row) {
|
||||
// 只有菜单类型(C)才会进入此函数,因为模板中已限制
|
||||
// 检查菜单是否有对应的路由路径
|
||||
if (!row.path) {
|
||||
proxy.$modal.msgWarning(`${row.menuName} 暂无对应的功能模块`);
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果是外部链接,新开窗口打开
|
||||
if (row.isFrame === '0' && (row.path.startsWith('http://') || row.path.startsWith('https://'))) {
|
||||
window.open(row.path, '_blank');
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用完整路径作为主要路径,但如果它包含 /system 前缀而原始路径不包含,
|
||||
// 则使用原始路径,以避免路由系统添加额外的 /system 前缀
|
||||
let routePath = row.fullPath || row.path;
|
||||
|
||||
// 特殊处理:如果完整路径以 /system/ 开头,但菜单本身路径不包含 /system/,
|
||||
// 则使用菜单路径,避免重复添加 /system 前缀
|
||||
if (row.fullPath && row.path &&
|
||||
row.fullPath.startsWith('/system/') &&
|
||||
!row.path.startsWith('/system/')) {
|
||||
routePath = row.path;
|
||||
}
|
||||
|
||||
// 确保路径以 / 开头
|
||||
if (!routePath.startsWith('/')) {
|
||||
routePath = '/' + routePath;
|
||||
}
|
||||
|
||||
// 规范化路径,处理可能的路径问题
|
||||
const normalizedPath = getNormalPath(routePath);
|
||||
|
||||
// 尝试导航到对应路由
|
||||
try {
|
||||
// 使用 router.push 导航到目标路由
|
||||
proxy.$router.push({
|
||||
path: normalizedPath
|
||||
}).catch(err => {
|
||||
// 如果路由导航失败,尝试另一种方式
|
||||
console.error(`路由导航失败,尝试备用方案: ${normalizedPath}`, err);
|
||||
|
||||
// 尝试使用 name 进行路由跳转(如果菜单有路由名称)
|
||||
if (row.routeName) {
|
||||
try {
|
||||
proxy.$router.push({ name: row.routeName }).catch(nameErr => {
|
||||
console.error(`使用路由名称跳转也失败: ${row.routeName}`, nameErr);
|
||||
proxy.$modal.msgError(`${row.menuName} 模块暂无法访问,请检查权限或联系管理员`);
|
||||
});
|
||||
} catch (nameErr) {
|
||||
console.error(`使用路由名称跳转异常: ${row.routeName}`, nameErr);
|
||||
proxy.$modal.msgError(`${row.menuName} 模块跳转失败`);
|
||||
}
|
||||
} else {
|
||||
proxy.$modal.msgError(`${row.menuName} 模块暂无法访问,请检查权限或联系管理员`);
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(`跳转到 ${row.menuName} 模块失败:`, error);
|
||||
proxy.$modal.msgError(`${row.menuName} 模块跳转失败`);
|
||||
}
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,498 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结算单号" prop="settlementNo">
|
||||
<el-input
|
||||
v-model="queryParams.settlementNo"
|
||||
placeholder="请输入结算单号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结算日期">
|
||||
<el-date-picker
|
||||
v-model="queryTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 240px"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结算类型" prop="settlementType">
|
||||
<el-select
|
||||
v-model="queryParams.settlementType"
|
||||
placeholder="请选择结算类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="日结" value="daily" />
|
||||
<el-option label="周结" value="weekly" />
|
||||
<el-option label="月结" value="monthly" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="医保类型" prop="insuranceType">
|
||||
<el-select
|
||||
v-model="queryParams.insuranceType"
|
||||
placeholder="请选择医保类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="城镇职工" value="urbanEmployee" />
|
||||
<el-option label="城乡居民" value="urbanRuralResident" />
|
||||
<el-option label="新农合" value="newRuralCooperative" />
|
||||
<el-option label="自费" value="selfPaid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="Document"
|
||||
@click="handleSettle"
|
||||
v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:settle']"
|
||||
>日结</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="dayEndMedicalInsuranceSettlementList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="结算单号" align="center" prop="settlementNo" />
|
||||
<el-table-column label="结算日期" align="center" prop="settlementDate" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.settlementDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" align="center" prop="settlementType">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.settlementType === 'daily'" type="success">日结</el-tag>
|
||||
<el-tag v-else-if="scope.row.settlementType === 'weekly'" type="warning">周结</el-tag>
|
||||
<el-tag v-else-if="scope.row.settlementType === 'monthly'" type="info">月结</el-tag>
|
||||
<span v-else>{{ scope.row.settlementType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="医保类型" align="center" prop="insuranceType">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.insuranceType === 'urbanEmployee'" type="primary">城镇职工</el-tag>
|
||||
<el-tag v-else-if="scope.row.insuranceType === 'urbanRuralResident'" type="success">城乡居民</el-tag>
|
||||
<el-tag v-else-if="scope.row.insuranceType === 'newRuralCooperative'" type="warning">新农合</el-tag>
|
||||
<el-tag v-else-if="scope.row.insuranceType === 'selfPaid'" type="info">自费</el-tag>
|
||||
<span v-else>{{ scope.row.insuranceType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总人次" align="center" prop="totalVisits" />
|
||||
<el-table-column label="总金额" align="center" prop="totalAmount" />
|
||||
<el-table-column label="医保统筹支付" align="center" prop="insurancePayAmount" />
|
||||
<el-table-column label="个人账户支付" align="center" prop="accountPayAmount" />
|
||||
<el-table-column label="个人自付" align="center" prop="personalPayAmount" />
|
||||
<el-table-column label="基金支付总额" align="center" prop="fundPaySumAmount" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作员" align="center" prop="operator" />
|
||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)" v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:query']">查看</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['ybmanage:dayEndMedicalInsuranceSettlement:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@size-change="getList"
|
||||
@current-change="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改日结医保结算对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="700px" append-to-body>
|
||||
<el-form ref="dayEndMedicalInsuranceSettlementRef" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算单号" prop="settlementNo">
|
||||
<el-input v-model="form.settlementNo" placeholder="请输入结算单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算日期" prop="settlementDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.settlementDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择结算日期" style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算类型" prop="settlementType">
|
||||
<el-select v-model="form.settlementType" placeholder="请选择结算类型" style="width: 100%">
|
||||
<el-option label="日结" value="daily" />
|
||||
<el-option label="周结" value="weekly" />
|
||||
<el-option label="月结" value="monthly" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保类型" prop="insuranceType">
|
||||
<el-select v-model="form.insuranceType" placeholder="请选择医保类型" style="width: 100%">
|
||||
<el-option label="城镇职工" value="urbanEmployee" />
|
||||
<el-option label="城乡居民" value="urbanRuralResident" />
|
||||
<el-option label="新农合" value="newRuralCooperative" />
|
||||
<el-option label="自费" value="selfPaid" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总人次" prop="totalVisits">
|
||||
<el-input-number v-model="form.totalVisits" placeholder="请输入总人次" style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总金额" prop="totalAmount">
|
||||
<el-input-number v-model="form.totalAmount" placeholder="请输入总金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保统筹支付" prop="insurancePayAmount">
|
||||
<el-input-number v-model="form.insurancePayAmount" placeholder="请输入医保统筹支付金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人账户支付" prop="accountPayAmount">
|
||||
<el-input-number v-model="form.accountPayAmount" placeholder="请输入个人账户支付金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="个人自付" prop="personalPayAmount">
|
||||
<el-input-number v-model="form.personalPayAmount" placeholder="请输入个人自付金额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="基金支付总额" prop="fundPaySumAmount">
|
||||
<el-input-number v-model="form.fundPaySumAmount" placeholder="请输入基金支付总额" style="width: 100%" :precision="2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="操作员" prop="operator">
|
||||
<el-input v-model="form.operator" placeholder="请输入操作员" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DayEndMedicalInsuranceSettlement">
|
||||
import { listDayEndMedicalInsuranceSettlement, getDayEndMedicalInsuranceSettlement, delDayEndMedicalInsuranceSettlement, addDayEndMedicalInsuranceSettlement, updateDayEndMedicalInsuranceSettlement } from "@/api/ybmanagement/dayEndMedicalInsuranceSettlement";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const open = ref(false);
|
||||
const queryTime = ref([]);
|
||||
|
||||
const dayEndMedicalInsuranceSettlementList = ref([]);
|
||||
const queryFormRef = ref();
|
||||
const dayEndMedicalInsuranceSettlementRef = ref();
|
||||
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
settlementNo: null,
|
||||
settlementDate: null,
|
||||
settlementType: null,
|
||||
insuranceType: null,
|
||||
status: null
|
||||
});
|
||||
|
||||
const form = ref({});
|
||||
const rules = ref({
|
||||
settlementNo: [
|
||||
{ required: true, message: "结算单号不能为空", trigger: "blur" }
|
||||
],
|
||||
settlementDate: [
|
||||
{ required: true, message: "结算日期不能为空", trigger: "blur" }
|
||||
],
|
||||
settlementType: [
|
||||
{ required: true, message: "结算类型不能为空", trigger: "change" }
|
||||
],
|
||||
insuranceType: [
|
||||
{ required: true, message: "医保类型不能为空", trigger: "change" }
|
||||
],
|
||||
totalAmount: [
|
||||
{ required: true, message: "总金额不能为空", trigger: "blur" }
|
||||
]
|
||||
});
|
||||
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
|
||||
|
||||
/** 查询日结医保结算列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
try {
|
||||
const response = await listDayEndMedicalInsuranceSettlement(queryParams.value);
|
||||
dayEndMedicalInsuranceSettlementList.value = response.rows;
|
||||
total.value = response.total;
|
||||
} catch (error) {
|
||||
console.error('获取日结医保结算列表失败:', error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
/** 取消按钮 */
|
||||
const cancel = () => {
|
||||
open.value = false;
|
||||
reset();
|
||||
};
|
||||
|
||||
/** 表单重置 */
|
||||
const reset = () => {
|
||||
form.value = {
|
||||
id: null,
|
||||
settlementNo: null,
|
||||
settlementDate: null,
|
||||
settlementType: 'daily',
|
||||
insuranceType: null,
|
||||
totalVisits: null,
|
||||
totalAmount: null,
|
||||
insurancePayAmount: null,
|
||||
accountPayAmount: null,
|
||||
personalPayAmount: null,
|
||||
fundPaySumAmount: null,
|
||||
status: "0",
|
||||
operator: null,
|
||||
remark: null
|
||||
};
|
||||
proxy.resetForm("dayEndMedicalInsuranceSettlementRef");
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
if (queryTime.value && queryTime.value.length === 2) {
|
||||
queryParams.value.settlementDate = queryTime.value[0] + ',' + queryTime.value[1];
|
||||
} else {
|
||||
queryParams.value.settlementDate = null;
|
||||
}
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryTime.value = [];
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/** 多择框多选 */
|
||||
const handleSelectionChange = (selection) => {
|
||||
ids.value = selection.map(item => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加日结医保结算";
|
||||
};
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = (row) => {
|
||||
reset();
|
||||
const settlementId = row.id || ids.value[0];
|
||||
getDayEndMedicalInsuranceSettlement(settlementId).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改日结医保结算";
|
||||
});
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
proxy.$refs["dayEndMedicalInsuranceSettlementRef"].validate(valid => {
|
||||
if (valid) {
|
||||
if (form.value.id != null) {
|
||||
updateDayEndMedicalInsuranceSettlement(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addDayEndMedicalInsuranceSettlement(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = (row) => {
|
||||
const settlementIds = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除日结医保结算编号为"' + settlementIds + '"的数据项?').then(function() {
|
||||
return delDayEndMedicalInsuranceSettlement(settlementIds);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = () => {
|
||||
proxy.download("ybmanage/dayEndMedicalInsuranceSettlement/export", {
|
||||
...queryParams.value
|
||||
}, `dayEndMedicalInsuranceSettlement_${new Date().getTime()}.xlsx`);
|
||||
};
|
||||
|
||||
/** 日结按钮操作 */
|
||||
const handleSettle = () => {
|
||||
// TODO: 实现日结功能
|
||||
proxy.$modal.msgSuccess("日结功能待实现");
|
||||
};
|
||||
|
||||
/** 查看按钮操作 */
|
||||
const handleView = (row) => {
|
||||
// TODO: 实现查看功能
|
||||
proxy.$modal.msgSuccess("查看功能待实现");
|
||||
};
|
||||
|
||||
/** 初始化数据 */
|
||||
getList();
|
||||
</script>
|
||||
Reference in New Issue
Block a user