Compare commits

109 Commits

Author SHA1 Message Date
46c9787216 修改套餐管理页面操作图标设置 2025-12-05 16:50:37 +08:00
e0a768de2e 新增套餐设置页面中的套餐管理页面并增加相应跳转逻辑 2025-12-05 16:37:34 +08:00
fc7f931728 新增套餐设置页面中的套餐管理页面并增加相应跳转逻辑 2025-12-05 16:34:12 +08:00
qk123
3ccb970a09 维护系统->检查方法、部位导出表格功能OK 2025-12-05 15:54:57 +08:00
ljj
8a9a622aeb 72.系统管理--》基础数据-》科室管理 2025-12-05 13:39:23 +08:00
qk123
29e7f0937b 维护系统->检查方法、部位条件搜索前后端实现 2025-12-04 14:47:39 +08:00
029d534b3c 新增检验项目设置中的检验类型页面并实现相关逻辑 2025-12-04 09:47:34 +08:00
qk123
213723b220 维护系统->检查方法后端接口数据校验修改 2025-12-04 09:33:44 +08:00
qk123
c636e77fd0 维护系统->检查部位前端接口缺少导入。 2025-12-04 09:21:35 +08:00
qk123
7407562ec5 维护系统->检查部位后端接口优化。 2025-12-03 17:15:35 +08:00
qk123
b3c27ec789 维护系统->检查方法前端页面优化、接口功能完善(搜索栏和导出表格未处理),后端接口优化。 2025-12-03 16:00:24 +08:00
qk123
601ae40666 维护系统->LIS分组前端页面开发,基础功能实现 2025-12-03 14:24:19 +08:00
3dda5ce72d 修改配置7 2025-12-03 13:48:25 +08:00
qk123
99d4c28b95 检查项目维护->Lis分组前端接口、后端实体优化。 2025-12-02 16:46:19 +08:00
qk123
0e70de6de7 Merge branch 'develop' of https://gitea.gentronhealth.com/Yajentine/his into develop 2025-12-02 16:44:57 +08:00
72eb1088df 修正前端PROD 2025-12-02 15:03:40 +08:00
a853c16854 修正prd 2025-12-02 14:43:35 +08:00
73a349f98a 冗余prod 2025-12-02 14:25:10 +08:00
5fb7a3f488 production 2025-12-02 14:12:06 +08:00
a8eb7d5697 prd->production 2025-12-02 14:08:09 +08:00
eb3b142ce4 修改配置 2025-12-02 14:03:49 +08:00
9f6a39ba30 修改配置文件 2025-12-02 14:02:25 +08:00
f7f2f98bbe 修改统一前端的PRD的标识 2025-12-02 13:52:18 +08:00
79e68ee14e 修改前端VUE的DEV环境配置 2025-12-02 12:53:01 +08:00
bc8987c463 配置3 2025-12-02 11:51:07 +08:00
3f7174fcd1 修复重复 2025-12-02 10:31:18 +08:00
080008f447 Merge branch 'develop' of https://gitea.gentronhealth.com/Yajentine/his into develop 2025-12-02 10:29:50 +08:00
5c3d935615 前端加上相关test的配置 2025-12-02 10:29:39 +08:00
a0845127c6 配置2 2025-12-02 10:28:02 +08:00
ba65ab303b 多环境配置 2025-12-02 09:25:35 +08:00
qk123
6fbdddf0ee 检查项目维护->Lis分组后端接口 2025-12-01 16:13:30 +08:00
py
173cbc7f87 门诊挂号-》完善新增患者字典信息 2025-12-01 14:45:27 +08:00
qk123
2e341a123e 检查项目维护检查方法、部位前端表格数据映射ok 2025-12-01 13:42:15 +08:00
qk123
8beff2ee14 检查方法、检查部位前端页面、完善后端接口逻辑 2025-11-28 17:03:08 +08:00
wzk
1b939ba5b7 刷新 2025-11-28 16:48:14 +08:00
wzk
577daabe1c 医嘱诊断和费用性质没有自动引入 2025-11-28 16:35:41 +08:00
wzk
327e88e6d4 检查项目设置-套餐设置-套餐管理界面放大或缩小数据显示不全 2025-11-28 15:24:52 +08:00
叶锦涛
548fabcffe 新建检验项目设置的检验类型页面 2025-11-28 13:56:27 +08:00
263e21e157 换卡bug 2025-11-28 10:41:14 +08:00
d7955aa628 配置 2025-11-28 09:58:52 +08:00
叶锦涛
d197f7555f 修复发票管理界面管理员和普通操作人员的筛选规则 2025-11-27 13:36:17 +08:00
wzk
a0e52da437 门诊号码管理维护界面前后端 2025-11-27 13:08:42 +08:00
qk123
88d79729fe 库房管理->采购管理->采购管理点击《详情》按钮跳转后无数据显示 2025-11-27 12:00:21 +08:00
6dc6480e64 Merge remote-tracking branch 'origin/develop' into develop 2025-11-27 10:40:12 +08:00
98c263a72b 患者档案和进货单bug 2025-11-27 10:39:56 +08:00
wzk
50a2ef9e00 门诊医生站->医嘱:新增独立的西药处方单补充 2025-11-27 09:41:59 +08:00
wzk
065f7052c6 检查项目设置->套餐设置->套餐管理补充 2025-11-27 09:24:26 +08:00
e23d42404d 患者档案和进货单bug 2025-11-27 08:56:19 +08:00
wzk
4120d4e001 检查项目设置->套餐设置->套餐管理 2025-11-27 08:44:32 +08:00
wzk
1bd2089047 检查项目设置-套餐设置 2025-11-26 16:18:47 +08:00
wzk
6d9ff7dc10 检查项目设置-套餐设置 2025-11-26 16:15:41 +08:00
wzk
ae7ca984f8 检查项目设置-套餐设置 2025-11-26 16:15:11 +08:00
wzk
69b7a4d865 检查项目设置-套餐设置界面 2025-11-26 14:39:57 +08:00
wzk
864bf55025 修复门诊医生站->【处方单】按钮,点击【处方单】按钮无响应问题 2025-11-26 13:34:41 +08:00
wzk
249ef5f87e 门诊挂号-》医生字段,对字段医生进行过滤,让医生和、就诊科室、挂号类型形成对照。 2025-11-26 13:15:42 +08:00
qk123
df3fb6c66c 检查方法、检查部位接口部分细节修改 2025-11-26 10:37:30 +08:00
qk123
10ec9f4c1b 检查方法、检查部位后端接口、实体、数据库表基本完成。 2025-11-26 10:31:30 +08:00
0b98763c05 门诊挂号查询优化 2025-11-25 16:14:03 +08:00
叶锦涛
3d3b21a775 修复操作员的工号的编辑功能 2025-11-25 15:58:17 +08:00
叶锦涛
4ba4f80946 修改发票管理页面 2025-11-25 15:39:29 +08:00
叶锦涛
ed7cb2dab5 修改发票管理页面 2025-11-25 15:30:33 +08:00
wzk
50ef9e6743 修复西药处方单bug 2025-11-25 13:49:38 +08:00
py
250d7dde34 门诊医生站-》开立处方医嘱:完善药品的字典信息 2025-11-25 11:27:58 +08:00
wzk
69f3e066db 门诊医生站-》医嘱:新增独立的西药处方单 2025-11-25 10:17:13 +08:00
叶锦涛
afb0c3933c 删除检查项目设置多余数据 2025-11-24 16:22:43 +08:00
叶锦涛
45ac07e57c 删除检查项目设置多余数据 2025-11-24 16:19:46 +08:00
qk123
262ea97824 同一患者保存病历后判断逻辑问题 2025-11-24 15:13:18 +08:00
ljj
dcfa13f239 系统管理-目录管理-》耗材目录。将该界面的字段标题设置可以手动拉宽每个字段的宽度,有的字段内容看不全,将界面的字段标题设置成可以调节每个字段的长度,使之能看全内容 2025-11-24 15:11:19 +08:00
叶锦涛
27c3c850d6 创建项目检查设置页面 2025-11-24 14:35:54 +08:00
wzk
122a15a73d 修复医嘱保存、签发不成功 2025-11-24 11:40:37 +08:00
wzk
61749aee4d 门诊号码管理修改关闭给予保存提示 2025-11-24 10:45:27 +08:00
97a29a31c5 门诊挂号查询优化 2025-11-24 09:39:23 +08:00
wzk
c3734f921c 用户管理中用户名字替换成用户姓名 2025-11-24 09:34:04 +08:00
c561586cfa 门诊换卡优化 2025-11-24 09:22:11 +08:00
qk123
60593233bc 中医添加医嘱后页面不显示BUG 2025-11-21 15:08:27 +08:00
wzk
992b03f9c2 解决退号记录的退号操作工作取值问题 2025-11-21 13:15:08 +08:00
wzk
36628342dc 用户管理将用户名称改成用户账号、用户昵称改成用户姓名。 2025-11-21 11:32:46 +08:00
qk123
3783e4a872 优化配方名称框、剂量单位框、脚注框 2025-11-21 09:59:09 +08:00
py
584f79294b 13 收费工作站-》门诊挂号1、将医生改成出诊医生。
2、将出诊医生字段选中‘内科医生1’,点击【确认】按钮,重新打开出诊医生字段的内容保存成功
2025-11-21 09:39:22 +08:00
wzk
a5884ec069 修复退号记录的退号操作工作取值问题 2025-11-21 09:25:39 +08:00
wzk
cc2f7db754 Merge remote-tracking branch 'origin/develop' into develop 2025-11-21 09:24:21 +08:00
wzk
fcccfc1959 解决医嘱确定后中成药项目名消失 2025-11-21 09:23:20 +08:00
c5ec91e7d3 新增医嘱中成药显示项目名称1 2025-11-21 09:22:35 +08:00
6b67e25d94 新增医嘱中成药显示项目名称 2025-11-21 09:17:24 +08:00
wzk
6da3b63012 医嘱保存成功 2025-11-20 16:29:14 +08:00
qk123
ea0f0e2294 中医:添加药品”确定“按钮能够正常起作用。 2025-11-20 11:14:37 +08:00
qk123
980f0aeb9c 中医:新增配方名称、煎药方式、脚注字段。 2025-11-20 11:02:55 +08:00
叶锦涛
17b40118ce 修复bug 2025-11-20 10:47:49 +08:00
叶锦涛
d10a78e5e8 修复处方标志保存的不正确 2025-11-20 09:18:54 +08:00
叶锦涛
f7ad010b2a 修复bug 2025-11-20 09:05:06 +08:00
叶锦涛
1a7ff0a686 修复bug 2025-11-20 08:58:26 +08:00
叶锦涛
3ad3f21362 实现药品目录处方标志保存 2025-11-19 16:47:35 +08:00
叶锦涛
c84fc3c236 删除重复函数 2025-11-19 16:43:12 +08:00
叶锦涛
a6561e2ca6 删除重复函数 2025-11-19 16:37:01 +08:00
叶锦涛
dfe35bb7f0 修改耗材/诊疗绑定,耗材项目药品的缺失 2025-11-19 16:33:12 +08:00
py
18c96e006f Merge branch 'develop' of https://gitea.gentronhealth.com/Yajentine/his into develop 2025-11-19 15:54:20 +08:00
py
f5db504363 feat(医生站): 添加处方单删除功能及相关UI
- 新增处方单删除按钮及交互逻辑
- 实现处方单删除前的条件检查(药品数量和收费状态)
- 添加删除按钮的样式和禁用状态
- 完善处方单药品数量和总价的计算方法
2025-11-19 15:54:15 +08:00
wzk
deb31c969a 修复耗材确定后显示成中成药 2025-11-19 14:06:04 +08:00
wzk
e7dac9762d 门诊号码管理编辑员工号 2025-11-19 13:19:48 +08:00
叶锦涛
89862878b5 修改耗材目录地点的缺失 2025-11-18 17:23:39 +08:00
叶锦涛
e105919dab 修改错误提示信息 2025-11-18 11:15:10 +08:00
叶锦涛
e83fc94334 新建发票管理页面 2025-11-18 10:40:57 +08:00
5bf7ab481f 编辑药品tab页面可以不显示数据了 新增之后勾选框还存在 2025-11-18 10:36:15 +08:00
wzk
afa904bd83 医嘱类别耗材项目从耗材目录获取数据 2025-11-18 10:09:30 +08:00
wzk
a343464d8d 门诊医生站-》开立医嘱:增加备注字段 2025-11-18 10:08:46 +08:00
wzk
4a2485e434 门诊医生站-》医嘱:皮试字段做成单选框。当开单医生选中检索出来的药品确认时,如果该药品是皮试药品,系统’药品:该药品名称+需要做皮试,是否做皮试? 2025-11-18 09:25:07 +08:00
Auora
4e2d4d85ec 【bug】解决撤回按钮弹出多余信息 2025-11-17 15:55:59 +08:00
wzk
7ddf6211ee Merge remote-tracking branch 'origin/develop' into develop 2025-11-17 13:29:55 +08:00
wzk
d44600b641 挂号退号 2025-11-17 13:28:33 +08:00
145 changed files with 15328 additions and 1258 deletions

76
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,76 @@
# OpenHIS — AI 编码助手 指南
目的:帮助自动化/AI 编码代理快速上手本仓库,包含架构要点、关键文件、常用构建/运行命令以及项目约定。请只按照仓库内真实可见的内容提出修改建议或补充说明。
- **代码组织**: 本项目是一个 Java 后端(多模块 Maven+ Vue3 前端Vite的大型应用。
- 后端主模块目录:`openhis-server-new/`(顶层为 `pom`,包含多个子模块)。关键子模块示例:`openhis-application`, `openhis-domain`, `openhis-common`, `core-*` 系列。
- 前端目录:`openhis-ui-vue3/`Vite + Vue 3使用 Pinia、Element Plus 等)。
- **大局观Big Picture**: 后端以 Spring BootJava 17实现使用多模块 Maven 管理公共库与业务模块;前端由单独仓库目录通过 Vite 构建并以环境变量(`VITE_APP_BASE_API`)与后端交互。后端扫描 `com.core``com.openhis` 包(见 `OpenHisApplication.java`),启动类位于:`openhis-server-new/openhis-application/src/main/java/com/openhis/OpenHisApplication.java`
- **运行/构建Windows PowerShell 示例)**:
- 构建后端(从仓库根执行):
```powershell
cd openhis-server-new
mvn clean package -DskipTests
```
- 仅运行后端模块(开发时常用):
```powershell
cd openhis-server-new/openhis-application
mvn spring-boot:run
# 或在 IDE 中运行 `com.openhis.OpenHisApplication` 的 main()
```
- 前端启动与构建(需要 Node.js v16.x仓库 README 建议 v16.15
```powershell
cd openhis-ui-vue3
npm install
npm run dev # 本地开发(热重载)
npm run build:prod # 生产构建
```
- **环境与配置**:
- 后端配置:`openhis-server-new/openhis-application/src/main/resources/application.yml`数据库、端口、profile 等。README 还提及 `application-druid.yml`(若存在请优先查看)。
- 前端配置:多个 `.env.*` 文件(例如 `.env.development`, `.env.staging`, `.env.production`),关键变量:`VITE_APP_BASE_API`(例如 `/dev-api`),前端通过 `import.meta.env.VITE_APP_BASE_API` 拼接后端 URL`src/utils/request.js`、多个视图与组件)。
- **重要约定 / 模式**:
- 后端采用 Java 17、Spring Boot 2.5.x 家族,父 POM在 `openhis-server-new/pom.xml` 定义。常用依赖版本在该 POM 的 `<properties>` 中集中维护。
- 模块间以 Maven 模块依赖与 `com.core` / `com.openhis` 包名分层(见 `pom.xml``<modules>``dependencyManagement`)。
- 前端通过 Vite 插件配置(`openhis-ui-vue3/vite/plugins`)管理 svg、自动导入等。UI 框架为 Element Plus状态管理为 Pinia。
- **集成点 & 外部依赖**:
- 数据库PostgreSQLREADME 建议 v16.2),仓库根含一个大型初始化 SQL`数据库初始话脚本请使用navicat16版本导入.sql`,用于初始化表与演示数据。
- 缓存/会话Redis需自行配置
- 其他Flowable工作流Druid连接池监控第三方服务通过特定配置类例如 `YbServiceConfig``OpenHisApplication` 中启用)。
- **调试与常见位置**:
- 启动类:`openhis-server-new/openhis-application/src/main/java/com/openhis/OpenHisApplication.java`
- 全局配置:`openhis-server-new/openhis-application/src/main/resources/``application.yml`、profile 文件等)。
- 前端入口:`openhis-ui-vue3/src/main.js`、路由在 `openhis-ui-vue3/src/router/index.js`
- API 文档与监控路径(通常由后端暴露并被前端访问):
- Swagger UI: `<VITE_APP_BASE_API>/swagger-ui/index.html`(前端视图在 `src/views/tool/swagger/index.vue`)。
- Druid: `<VITE_APP_BASE_API>/druid/login.html`(见前端相关视图引用)。
- **为 AI 代理的具体建议(如何安全、有效地修改代码)**:
- 修改后端时:优先在子模块(例如 `openhis-application`)本地运行 `mvn spring-boot:run` 验证启动与基础 API大量改动前先执行 `mvn -T1C -DskipTests clean package` 在 CI 环境上验证构建(本地机器也可用)。
- 修改前端时:检查/调整对应 `.env.*` 文件中的 `VITE_APP_BASE_API`,使用 `npm run dev` 本地联调后端接口(可通过代理或将 `VITE_APP_BASE_API` 指向后端地址)。
- 修改数据库结构或 seed请参考仓库根的 SQL 初始化脚本,任何 DDL/数据变更需同步该脚本并通知数据库管理员/运维。
- **举例(常见任务示例)**:
- 本地联调前端 + 后端PowerShell:
```powershell
# 启动后端
cd openhis-server-new/openhis-application
mvn spring-boot:run
# 启动前端(另开终端)
cd openhis-ui-vue3
npm run dev
```
如需我把这些内容合并为更短或更详细的版本,或把其中某部分(例如后端模块依赖关系图、关键 Java 包说明)展开,请告诉我要增强哪一节。

View File

@@ -0,0 +1,39 @@
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
public class TestDeleteInspectionType {
public static void main(String[] args) {
try {
// 测试删除ID为1的检验类型
long inspectionTypeId = 1;
URL url = new URL("http://localhost:8080/system/inspection-type/" + inspectionTypeId);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
// 发送请求
int responseCode = connection.getResponseCode();
System.out.println("响应代码: " + responseCode);
// 读取响应
Scanner scanner;
if (responseCode >= 200 && responseCode < 300) {
scanner = new Scanner(connection.getInputStream());
} else {
scanner = new Scanner(connection.getErrorStream());
}
String response = scanner.useDelimiter("\\A").next();
System.out.println("响应内容: " + response);
scanner.close();
connection.disconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,27 @@
-- 向adm_organization表添加缺失字段的SQL脚本
-- 添加register_flag字段对应registerFlag属性
ALTER TABLE "adm_organization"
ADD COLUMN "register_flag" int4;
-- 添加location字段
ALTER TABLE "adm_organization"
ADD COLUMN "location" varchar(255);
-- 添加intro字段
ALTER TABLE "adm_organization"
ADD COLUMN "intro" varchar(1000);
-- 添加remark字段
ALTER TABLE "adm_organization"
ADD COLUMN "remark" varchar(1000);
-- 添加字段注释
COMMENT ON COLUMN "adm_organization"."register_flag" IS '挂号标志';
COMMENT ON COLUMN "adm_organization"."location" IS '科室位置';
COMMENT ON COLUMN "adm_organization"."intro" IS '科室简介';
COMMENT ON COLUMN "adm_organization"."remark" IS '备注';
-- 设置register_flag默认值为0不允许挂号
ALTER TABLE "adm_organization"
ALTER COLUMN "register_flag" SET DEFAULT 0;

View File

@@ -0,0 +1,45 @@
package com.openhis.tool;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
/**
* Database field adder tool
*/
public class DatabaseFieldAdder {
public static void main(String[] args) {
String url = "jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public";
String username = "postgresql";
String password = "Jchl1528";
try (Connection conn = DriverManager.getConnection(url, username, password);
Statement stmt = conn.createStatement()) {
// Check if field exists
String checkSql = "SELECT column_name FROM information_schema.columns " +
"WHERE table_name = 'adm_healthcare_service' AND column_name = 'practitioner_id'";
boolean fieldExists = stmt.executeQuery(checkSql).next();
if (!fieldExists) {
// Add field
String addSql = "ALTER TABLE \"public\".\"adm_healthcare_service\" " +
"ADD COLUMN \"practitioner_id\" int8";
stmt.execute(addSql);
// Add comment
String commentSql = "COMMENT ON COLUMN \"public\".\"adm_healthcare_service\".\"practitioner_id\" IS 'practitioner_id'";
stmt.execute(commentSql);
System.out.println("Successfully added practitioner_id field to adm_healthcare_service table");
} else {
System.out.println("practitioner_id field already exists");
}
} catch (Exception e) {
System.err.println("Error executing SQL: " + e.getMessage());
e.printStackTrace();
}
}
}

View File

@@ -58,6 +58,7 @@ public class GenController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo genList(GenTable genTable) { public TableDataInfo genList(GenTable genTable) {
startPage(); startPage();
List<GenTable> list = genTableService.selectGenTableList(genTable); List<GenTable> list = genTableService.selectGenTableList(genTable);
return getDataTable(list); return getDataTable(list);
} }
@@ -251,12 +252,10 @@ public class GenController extends BaseController {
InputStream is = file.getInputStream(); InputStream is = file.getInputStream();
Workbook wb = WorkbookFactory.create(is); Workbook wb = WorkbookFactory.create(is);
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
// 遍历每个sheet页每个表 // 遍历每个sheet页每个表
for (int i = 0; i < wb.getNumberOfSheets(); i++) { for (int i = 0; i < wb.getNumberOfSheets(); i++) {
sb.append("-- ----------------------------------------------------------------------------------\n"); sb.append("-- ----------------------------------------------------------------------------------\n");
Sheet st = wb.getSheetAt(i); Sheet st = wb.getSheetAt(i);
// 从第一行读取表名表注释 // 从第一行读取表名表注释
Row row0 = st.getRow(0);// 表名 Row row0 = st.getRow(0);// 表名
String tableName = row0.getCell(4).toString();// 表名 String tableName = row0.getCell(4).toString();// 表名

View File

@@ -100,7 +100,18 @@ public class OrganizationAppServiceImpl implements IOrganizationAppService {
@Override @Override
public R<?> getOrgInfo(Long orgId) { public R<?> getOrgInfo(Long orgId) {
Organization organization = organizationService.getById(orgId); Organization organization = organizationService.getById(orgId);
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构信息查询"})); if (organization == null) {
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息"}));
}
// 转换为DTO对象确保数据格式一致
OrganizationDto organizationDto = new OrganizationDto();
BeanUtils.copyProperties(organization, organizationDto);
organizationDto.setTypeEnum_dictText(EnumUtils.getInfoByValue(OrganizationType.class, organizationDto.getTypeEnum()));
organizationDto.setClassEnum_dictText(EnumUtils.getInfoByValue(OrganizationClass.class, organizationDto.getClassEnum()));
organizationDto.setActiveFlag_dictText(EnumUtils.getInfoByValue(AccountStatus.class, organizationDto.getActiveFlag()));
return R.ok(organizationDto, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构信息查询"}));
} }
/** /**

View File

@@ -60,4 +60,16 @@ public class OrganizationDto {
/** 子集合 */ /** 子集合 */
private List<OrganizationDto> children = new ArrayList<>(); private List<OrganizationDto> children = new ArrayList<>();
/** 挂号科室标记 */
private Integer registerFlag;
/** 科室位置 */
private String location;
/** 科室简介 */
private String intro;
/** 备注 */
private String remark;
} }

View File

@@ -0,0 +1,53 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.service.IInvoiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* 发票管理控制器
*
* @author system
* @date 2025-02-20
*/
@RestController
@RequestMapping("/basicmanage/invoice")
public class InvoiceController {
@Autowired
private IInvoiceService invoiceService;
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票列表
*/
@GetMapping("/page")
public R<?> selectInvoicePage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "10") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票列表
Page<Invoice> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceService.selectInvoicePage(page, isAdmin, userId));
}
}

View File

@@ -0,0 +1,88 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.core.domain.R;
import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.InvoiceSegment;
import com.openhis.administration.service.IInvoiceSegmentService;
import com.openhis.web.basicmanage.domain.InvoiceSegmentDeleteRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* 发票段管理控制器
*
* @author system
* @date 2025-11-18
*/
@RestController
@RequestMapping("/basicmanage/invoice-segment")
public class InvoiceSegmentController {
@Autowired
private IInvoiceSegmentService invoiceSegmentService;
/**
* 分页查询发票段列表(带用户角色权限过滤)
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param request 请求对象
* @return 发票段列表
*/
@GetMapping("/page")
public R<?> selectInvoiceSegmentPage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "100") Integer pageSize,
HttpServletRequest request) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 判断当前用户是否为管理员
boolean isAdmin = SecurityUtils.isAdmin(userId);
// 分页查询发票段列表
Page<InvoiceSegment> page = new Page<>(pageNo, pageSize);
return R.ok(invoiceSegmentService.selectInvoiceSegmentPage(page, isAdmin, userId));
}
/**
* 新增发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/add")
public R<?> addInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置创建人信息
invoiceSegment.setCreateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.insertInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 修改发票段
*
* @param invoiceSegment 发票段信息
* @return 操作结果
*/
@PostMapping("/update")
public R<?> updateInvoiceSegment(@RequestBody InvoiceSegment invoiceSegment) {
// 设置更新人信息
invoiceSegment.setUpdateBy(SecurityUtils.getUsername());
int result = invoiceSegmentService.updateInvoiceSegment(invoiceSegment);
return result > 0 ? R.ok() : R.fail();
}
/**
* 删除发票段
*/
@PostMapping("/delete")
public R<?> delete(@RequestBody InvoiceSegmentDeleteRequest request) {
int rows = invoiceSegmentService.deleteInvoiceSegmentByIds(request.getIds());
return rows > 0 ? R.ok("删除成功") : R.fail("删除失败");
}
}

View File

@@ -0,0 +1,219 @@
package com.openhis.web.basicmanage.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.core.common.annotation.Log;
import com.core.common.core.domain.R;
import com.core.common.enums.BusinessType;
import com.core.common.utils.SecurityUtils;
import com.core.common.utils.StringUtils;
import com.openhis.administration.domain.OutpatientNoSegment;
import com.openhis.administration.service.IOutpatientNoSegmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/**
* 门诊号码段管理控制器
*
* @author system
* @date 2025-01-XX
*/
@RestController
@RequestMapping("/business-rule/outpatient-no")
public class OutpatientNoSegmentController {
@Autowired
private IOutpatientNoSegmentService outpatientNoSegmentService;
/**
* 分页查询门诊号码段列表
*
* @param pageNo 页码
* @param pageSize 每页条数
* @param onlySelf 是否只查询自己的true=只查询自己的false=查询所有)
* @return 门诊号码段列表
*/
@GetMapping("/page")
public R<?> selectOutpatientNoSegmentPage(
@RequestParam(defaultValue = "1") Integer pageNo,
@RequestParam(defaultValue = "10") Integer pageSize,
@RequestParam(required = false) Boolean onlySelf) {
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
// 如果onlySelf为null默认只查询自己的
boolean onlySelfFlag = onlySelf != null ? onlySelf : true;
// 分页查询门诊号码段列表
Page<OutpatientNoSegment> page = new Page<>(pageNo, pageSize);
Page<OutpatientNoSegment> result = outpatientNoSegmentService.selectOutpatientNoSegmentPage(page, onlySelfFlag, userId);
return R.ok(result);
}
/**
* 新增门诊号码段
*
* @param outpatientNoSegment 门诊号码段信息
* @return 操作结果
*/
@Log(title = "门诊号码管理", businessType = BusinessType.INSERT)
@PostMapping
public R<?> addOutpatientNoSegment(@RequestBody OutpatientNoSegment outpatientNoSegment) {
// 校验必填字段
if (StringUtils.isEmpty(outpatientNoSegment.getStartNo()) ||
StringUtils.isEmpty(outpatientNoSegment.getEndNo()) ||
StringUtils.isEmpty(outpatientNoSegment.getUsedNo())) {
return R.fail("起始号码、终止号码和使用号码不能为空");
}
// 校验号码段是否重复
if (outpatientNoSegmentService.checkNumberSegmentOverlap(
outpatientNoSegment.getStartNo(),
outpatientNoSegment.getEndNo(),
null)) {
return R.fail("门诊号码设置重复");
}
// 设置创建人信息
outpatientNoSegment.setOperatorId(SecurityUtils.getUserId());
if (StringUtils.isEmpty(outpatientNoSegment.getOperatorName())) {
outpatientNoSegment.setOperatorName(SecurityUtils.getUsername());
}
outpatientNoSegment.setCreateBy(SecurityUtils.getUsername());
int result = outpatientNoSegmentService.insertOutpatientNoSegment(outpatientNoSegment);
return result > 0 ? R.ok("保存成功") : R.fail("保存失败");
}
/**
* 修改门诊号码段
*
* @param outpatientNoSegment 门诊号码段信息
* @return 操作结果
*/
@Log(title = "门诊号码管理", businessType = BusinessType.UPDATE)
@PutMapping
public R<?> updateOutpatientNoSegment(@RequestBody OutpatientNoSegment outpatientNoSegment) {
// 校验必填字段
if (StringUtils.isEmpty(outpatientNoSegment.getStartNo()) ||
StringUtils.isEmpty(outpatientNoSegment.getEndNo()) ||
StringUtils.isEmpty(outpatientNoSegment.getUsedNo())) {
return R.fail("起始号码、终止号码和使用号码不能为空");
}
// 校验号码段是否重复(排除自身)
if (outpatientNoSegmentService.checkNumberSegmentOverlap(
outpatientNoSegment.getStartNo(),
outpatientNoSegment.getEndNo(),
outpatientNoSegment.getId())) {
return R.fail("门诊号码设置重复");
}
// 设置更新人信息
outpatientNoSegment.setUpdateBy(SecurityUtils.getUsername());
int result = outpatientNoSegmentService.updateOutpatientNoSegment(outpatientNoSegment);
return result > 0 ? R.ok("保存成功") : R.fail("保存失败");
}
/**
* 删除门诊号码段
*
* @param request 包含ids数组的请求对象
* @return 操作结果
*/
@Log(title = "门诊号码管理", businessType = BusinessType.DELETE)
@DeleteMapping
public R<?> deleteOutpatientNoSegment(@RequestBody java.util.Map<String, Object> request) {
// 支持接收 Long[] 或 String[] 或混合类型处理大整数ID
Object idsObj = request.get("ids");
System.out.println("删除请求 - 接收到的ids原始数据: " + idsObj);
System.out.println("删除请求 - 接收到的ids类型: " + (idsObj != null ? idsObj.getClass().getName() : "null"));
if (idsObj == null) {
return R.fail("请选择要删除的数据");
}
// 转换为 Long[] 数组
Long[] ids = null;
if (idsObj instanceof java.util.List) {
java.util.List<?> idList = (java.util.List<?>) idsObj;
ids = new Long[idList.size()];
for (int i = 0; i < idList.size(); i++) {
Object idObj = idList.get(i);
if (idObj instanceof Long) {
ids[i] = (Long) idObj;
} else if (idObj instanceof Integer) {
ids[i] = ((Integer) idObj).longValue();
} else if (idObj instanceof String) {
try {
String idStr = (String) idObj;
System.out.println("删除请求 - 转换字符串ID: " + idStr);
ids[i] = Long.parseLong(idStr);
System.out.println("删除请求 - 转换后的Long ID: " + ids[i]);
// 验证转换是否正确
if (!String.valueOf(ids[i]).equals(idStr)) {
System.out.println("删除请求 - 警告ID转换后值不匹配原始: " + idStr + ", 转换后: " + ids[i]);
}
} catch (NumberFormatException e) {
System.out.println("删除请求 - ID转换失败: " + idObj + ", 错误: " + e.getMessage());
return R.fail("无效的ID格式: " + idObj);
}
} else if (idObj instanceof Number) {
ids[i] = ((Number) idObj).longValue();
} else {
return R.fail("无效的ID类型: " + (idObj != null ? idObj.getClass().getName() : "null"));
}
}
} else if (idsObj instanceof Long[]) {
ids = (Long[]) idsObj;
} else {
return R.fail("无效的ID数组格式");
}
System.out.println("删除请求 - 转换后的ids: " + java.util.Arrays.toString(ids));
if (ids == null || ids.length == 0) {
return R.fail("请选择要删除的数据");
}
// 获取当前用户ID
Long userId = SecurityUtils.getUserId();
System.out.println("删除请求 - 当前用户ID: " + userId);
// 校验删除权限和使用状态
for (Long id : ids) {
System.out.println("删除验证 - 检查ID: " + id);
OutpatientNoSegment segment = outpatientNoSegmentService.getById(id);
if (segment == null) {
// 记录日志以便调试
System.out.println("删除失败记录不存在ID=" + id + ",可能已被软删除或不存在");
return R.fail("数据不存在ID: " + id);
}
System.out.println("删除验证 - 找到记录: ID=" + segment.getId() + ", operatorId=" + segment.getOperatorId() + ", usedNo=" + segment.getUsedNo() + ", startNo=" + segment.getStartNo());
// 校验归属权
if (!segment.getOperatorId().equals(userId)) {
System.out.println("删除验证 - 权限检查失败: segment.operatorId=" + segment.getOperatorId() + ", userId=" + userId);
return R.fail("只能删除自己维护的门诊号码段");
}
// 校验使用状态(使用号码=起始号码表示未使用)
if (!segment.getUsedNo().equals(segment.getStartNo())) {
System.out.println("删除验证 - 使用状态检查失败: usedNo=" + segment.getUsedNo() + ", startNo=" + segment.getStartNo());
return R.fail("已有门诊号码段已有使用的门诊号码,请核对!");
}
}
System.out.println("删除验证 - 所有检查通过,开始执行删除");
int rows = outpatientNoSegmentService.deleteOutpatientNoSegmentByIds(ids);
System.out.println("删除执行 - 影响行数: " + rows);
return rows > 0 ? R.ok("删除成功") : R.fail("删除失败");
}
}

View File

@@ -0,0 +1,23 @@
package com.openhis.web.basicmanage.domain;
import java.io.Serializable;
/**
* 发票段删除请求类
*
* @author system
* @date 2024-06-19
*/
public class InvoiceSegmentDeleteRequest implements Serializable {
private static final long serialVersionUID = 1L;
private Long[] ids;
public Long[] getIds() {
return ids;
}
public void setIds(Long[] ids) {
this.ids = ids;
}
}

View File

@@ -90,6 +90,14 @@ public class HealthcareServiceDto {
private Integer appointmentRequiredFlag; private Integer appointmentRequiredFlag;
private String appointmentRequiredFlag_enumText; private String appointmentRequiredFlag_enumText;
/**
* 出诊医生ID
*/
@Dict(dictTable = "adm_practitioner", dictCode = "id", dictText = "name")
@JsonSerialize(using = ToStringSerializer.class)
private Long practitionerId;
private String practitionerId_dictText;
/** /**
* 费用定价ID * 费用定价ID
*/ */

View File

@@ -82,6 +82,11 @@ public class HealthcareServiceFormData {
@NotBlank(message = "预约要求不能为空") @NotBlank(message = "预约要求不能为空")
private Integer appointmentRequiredFlag; private Integer appointmentRequiredFlag;
/**
* 出诊医生ID
*/
private Long practitionerId;
/** 医保编码 */ /** 医保编码 */
private String ybNo; private String ybNo;

View File

@@ -12,6 +12,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import java.util.List;
/** /**
* 患者换卡服务实现类 * 患者换卡服务实现类
* *
@@ -43,8 +45,8 @@ public class PatientCardRenewalServiceImpl implements PatientCardRenewalService
// 2. 检查新卡号是否已被使用 // 2. 检查新卡号是否已被使用
LambdaQueryWrapper<PatientIdentifier> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<PatientIdentifier> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PatientIdentifier::getIdentifierNo, request.getNewCardNo()); queryWrapper.eq(PatientIdentifier::getIdentifierNo, request.getNewCardNo());
PatientIdentifier existingIdentifier = patientIdentifierService.getOne(queryWrapper); List<PatientIdentifier> existingIdentifiers = patientIdentifierService.list(queryWrapper);
if (existingIdentifier != null) { if (existingIdentifiers != null && !existingIdentifiers.isEmpty()) {
throw new IllegalArgumentException("新卡号已被其他患者使用,请更换新卡号"); throw new IllegalArgumentException("新卡号已被其他患者使用,请更换新卡号");
} }

View File

@@ -98,10 +98,20 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
queryWrapper.orderByDesc("update_time"); queryWrapper.orderByDesc("update_time");
// 通过证件号匹配 patient // 通过证件号匹配 patient
if (StringUtils.isNotEmpty(searchKey)) { if (StringUtils.isNotEmpty(searchKey)) {
PatientIdentifier patientIdentifier = patientIdentifierService List<PatientIdentifier> patientIdentifiers = patientIdentifierService
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getIdentifierNo, searchKey)); .list(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getIdentifierNo, searchKey));
if (patientIdentifier != null) { if (patientIdentifiers != null && !patientIdentifiers.isEmpty()) {
queryWrapper.or(q -> q.eq("id", patientIdentifier.getPatientId())); // 如果有多个匹配结果,将它们全部添加到查询条件中
if (patientIdentifiers.size() == 1) {
// 单个结果时直接添加条件
queryWrapper.or(q -> q.eq("id", patientIdentifiers.get(0).getPatientId()));
} else {
// 多个结果时使用in条件
List<Long> patientIds = patientIdentifiers.stream()
.map(PatientIdentifier::getPatientId)
.collect(Collectors.toList());
queryWrapper.or(q -> q.in("id", patientIds));
}
} }
} }
// 患者信息 // 患者信息
@@ -120,10 +130,11 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo() e.setFirstEnum_enumText(patientIdList.contains(e.getId()) ? EncounterType.FOLLOW_UP.getInfo()
: EncounterType.INITIAL.getInfo()); : EncounterType.INITIAL.getInfo());
// 患者标识 // 患者标识
PatientIdentifier patientIdentifier = patientIdentifierService List<PatientIdentifier> patientIdentifiers = patientIdentifierService
.getOne(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId())); .list(new LambdaQueryWrapper<PatientIdentifier>().eq(PatientIdentifier::getPatientId, e.getId()));
if (patientIdentifier != null) { if (patientIdentifiers != null && !patientIdentifiers.isEmpty()) {
e.setIdentifierNo(patientIdentifier.getIdentifierNo()); // 取第一个标识号,如果需要可以根据业务需求选择其他逻辑
e.setIdentifierNo(patientIdentifiers.get(0).getIdentifierNo());
} }
}); });

View File

@@ -147,10 +147,9 @@ public class CurrentDayEncounterDto {
private String operatorName; private String operatorName;
/** /**
* 退号操作工号 * 退号操作工号(用户账号)
*/ */
@JsonSerialize(using = ToStringSerializer.class) private String operatorId;
private Long operatorId;
/** /**
* 退款金额 * 退款金额

View File

@@ -0,0 +1,29 @@
package com.openhis.web.check.appservice;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckMethod;
import io.swagger.models.auth.In;
import javax.servlet.http.HttpServletResponse;
/**
* 检查方法Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckMethodAppService{
R<?> getCheckMethodList();
R<?> addCheckMethod(CheckMethod checkMethod);
R<?> updateCheckMethod(CheckMethod checkPart);
R<?> removeCheckMethod(Integer checkMethodId);
R<?> searchCheckMethodList(Integer pageNo, Integer pageSize, String checkType, String name, String packageName);
R<?> exportCheckMethod(String checkType, String name, String packageName, HttpServletResponse response);
}

View File

@@ -0,0 +1,48 @@
package com.openhis.web.check.appservice;
import com.core.common.core.domain.R;
import com.openhis.web.check.dto.CheckPackageDto;
/**
* 检查套餐AppService接口
*
* @author system
* @date 2025-11-26
*/
public interface ICheckPackageAppService {
/**
* 获取检查套餐列表
* @return 检查套餐列表
*/
R<?> getCheckPackageList();
/**
* 根据ID获取检查套餐详情
* @param id 套餐ID
* @return 套餐详情
*/
R<?> getCheckPackageById(Long id);
/**
* 新增检查套餐
* @param checkPackageDto 套餐信息
* @return 新增结果
*/
R<?> addCheckPackage(CheckPackageDto checkPackageDto);
/**
* 更新检查套餐
* @param checkPackageDto 套餐信息
* @return 更新结果
*/
R<?> updateCheckPackage(CheckPackageDto checkPackageDto);
/**
* 删除检查套餐
* @param id 套餐ID
* @return 删除结果
*/
R<?> deleteCheckPackage(Long id);
}

View File

@@ -0,0 +1,20 @@
package com.openhis.web.check.appservice;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckPart;
import javax.servlet.http.HttpServletResponse;
public interface ICheckPartAppService {
R<?> getCheckPartList();
R<?> addCheckPart(CheckPart checkPart);
R<?> removeCheckPart(Integer checkPartId);
R<?> updateCheckPart(CheckPart checkPart);
R<?> searchCheckPartList(Integer pageNo, Integer pageSize, String checkType, String name, String packageName);
R<?> exportCheckPart(String checkType, String name, String packageName, HttpServletResponse response);
}

View File

@@ -0,0 +1,14 @@
package com.openhis.web.check.appservice;
import com.core.common.core.domain.R;
import com.openhis.check.domain.LisGroupInfo;
public interface ILisGroupInfoAppService {
R<?> getLisGroupInfoList();
R<?> add(LisGroupInfo lisGroupInfo);
R<?> update(LisGroupInfo lisGroupInfo);
R<?> delete(Integer lisGroupInfoId);
}

View File

@@ -0,0 +1,129 @@
package com.openhis.web.check.appservice.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckMethod;
import com.openhis.check.service.ICheckMethodService;
import com.openhis.web.check.appservice.ICheckMethodAppService;
import com.openhis.web.reportmanage.utils.ExcelFillerUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Service
@Slf4j
public class CheckMethodAppServiceImpl implements ICheckMethodAppService {
@Resource
private ICheckMethodService checkMethodService;
@Override
public R<?> getCheckMethodList() {
List<CheckMethod> list = checkMethodService.list();
return R.ok(list);
}
@Override
public R<?> searchCheckMethodList(Integer pageNo, Integer pageSize, String checkType, String name, String packageName) {
LambdaQueryWrapper<CheckMethod> wrapper = new LambdaQueryWrapper<>();
if (checkType != null && ObjectUtil.isNotEmpty(checkType)) {
wrapper.eq(CheckMethod::getCheckType, checkType);
}
if (name != null && ObjectUtil.isNotEmpty(name)) {
wrapper.like(CheckMethod::getName, name);
}
if (packageName != null && ObjectUtil.isNotEmpty(packageName)) {
wrapper.eq(CheckMethod::getPackageName, packageName);
}
List<CheckMethod> list = checkMethodService.list(wrapper);
return R.ok(list);
}
@Override
public R<?> addCheckMethod(CheckMethod checkMethod) {
//1.数据校验
if (ObjectUtil.isEmpty(checkMethod.getName())) {
return R.fail("检查方法名称不能为空!");
}
if (ObjectUtil.isEmpty(checkMethod.getCode())) {
return R.fail("检查方法代码不能为空!");
}
if (ObjectUtil.isEmpty(checkMethod.getCheckType())) {
return R.fail("检查方法的检查类型不能为空!");
}
//2.保存
boolean save = checkMethodService.save(checkMethod);
return R.ok(save);
}
@Override
public R<?> updateCheckMethod(CheckMethod checkMethod) {
//1.数据校验
if (ObjectUtil.isEmpty(checkMethod.getName())) {
return R.fail("检查方法名称不能为空!");
}
if (ObjectUtil.isEmpty(checkMethod.getCode())) {
return R.fail("检查方法代码不能为空!");
}
if (ObjectUtil.isEmpty(checkMethod.getCheckType())) {
return R.fail("检查方法的检查类型不能为空!");
}
//2.更新
boolean b = checkMethodService.updateById(checkMethod);
return R.ok(b);
}
@Override
public R<?> removeCheckMethod(Integer checkMethodId) {
boolean remove = checkMethodService.removeById(checkMethodId);
return R.ok(remove);
}
@Override
public R<?> exportCheckMethod(String checkType, String name, String packageName, HttpServletResponse response) {
LambdaQueryWrapper<CheckMethod> wrapper = new LambdaQueryWrapper<>();
if (checkType != null && ObjectUtil.isNotEmpty(checkType)) {
wrapper.eq(CheckMethod::getCheckType, checkType);
}
if (name != null && ObjectUtil.isNotEmpty(name)) {
wrapper.like(CheckMethod::getName, name);
}
if (packageName != null && ObjectUtil.isNotEmpty(packageName)) {
wrapper.eq(CheckMethod::getPackageName, packageName);
}
List<CheckMethod> list = checkMethodService.list(wrapper);
if (list.isEmpty()) {
return R.fail("导出Excel失败,无数据。");
}
try {
// 准备表头key对应实体的字段名
Map<String, String> headers = new LinkedHashMap<>();
headers.put("checkType", "检查类型");
headers.put("code", "方法代码");
headers.put("name", "方法名称");
headers.put("packageName", "套餐名称");
headers.put("exposureNum", "曝光次数");
headers.put("orderNum", "序号");
headers.put("remark", "备注");
// 文件名,只传文字部分
String excelName = "检查方法列表";
// 导出到Excel
ExcelFillerUtil.makeExcelFile(response, list, headers, excelName, null);
} catch (IOException | IllegalAccessException e) {
e.printStackTrace();
return R.fail("导出Excel失败" + e.getMessage());
}
return R.ok(null, "导出Excel成功");
}
}

View File

@@ -0,0 +1,206 @@
package com.openhis.web.check.appservice.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckPackage;
import com.openhis.check.domain.CheckPackageDetail;
import com.openhis.check.service.ICheckPackageDetailService;
import com.openhis.check.service.ICheckPackageService;
import com.openhis.web.check.appservice.ICheckPackageAppService;
import com.openhis.web.check.dto.CheckPackageDetailDto;
import com.openhis.web.check.dto.CheckPackageDto;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 检查套餐AppService实现
*
* @author system
* @date 2025-11-26
*/
@Slf4j
@Service
@AllArgsConstructor
public class CheckPackageAppServiceImpl implements ICheckPackageAppService {
private final ICheckPackageService checkPackageService;
private final ICheckPackageDetailService checkPackageDetailService;
@Override
public R<?> getCheckPackageList() {
try {
List<CheckPackage> list = checkPackageService.list();
return R.ok(list);
} catch (Exception e) {
log.error("获取检查套餐列表失败", e);
return R.fail("获取检查套餐列表失败");
}
}
@Override
public R<?> getCheckPackageById(Long id) {
try {
CheckPackage checkPackage = checkPackageService.getById(id);
if (checkPackage == null) {
return R.fail("套餐不存在");
}
// 获取套餐明细
List<CheckPackageDetail> details = checkPackageDetailService.list(
new LambdaQueryWrapper<CheckPackageDetail>()
.eq(CheckPackageDetail::getPackageId, id)
.orderByAsc(CheckPackageDetail::getOrderNum)
);
// 转换为DTO
CheckPackageDto dto = new CheckPackageDto();
BeanUtils.copyProperties(checkPackage, dto);
List<CheckPackageDetailDto> detailDtos = details.stream().map(detail -> {
CheckPackageDetailDto detailDto = new CheckPackageDetailDto();
BeanUtils.copyProperties(detail, detailDto);
return detailDto;
}).collect(Collectors.toList());
dto.setItems(detailDtos);
return R.ok(dto);
} catch (Exception e) {
log.error("获取检查套餐详情失败", e);
return R.fail("获取检查套餐详情失败");
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public R<?> addCheckPackage(CheckPackageDto checkPackageDto) {
try {
// 创建套餐主表数据
CheckPackage checkPackage = new CheckPackage();
BeanUtils.copyProperties(checkPackageDto, checkPackage);
// 设置套餐维护日期为当前系统日期
checkPackage.setMaintainDate(LocalDate.now());
checkPackage.setCreateTime(LocalDateTime.now());
checkPackage.setUpdateTime(LocalDateTime.now());
// 保存套餐主表
boolean saveResult = checkPackageService.save(checkPackage);
if (!saveResult) {
return R.fail("保存套餐失败");
}
// 保存套餐明细
if (checkPackageDto.getItems() != null && !checkPackageDto.getItems().isEmpty()) {
List<CheckPackageDetail> details = new ArrayList<>();
int orderNum = 1;
for (CheckPackageDetailDto detailDto : checkPackageDto.getItems()) {
CheckPackageDetail detail = new CheckPackageDetail();
BeanUtils.copyProperties(detailDto, detail);
detail.setPackageId(checkPackage.getId());
detail.setOrderNum(orderNum++);
detail.setCreateTime(LocalDateTime.now());
detail.setUpdateTime(LocalDateTime.now());
details.add(detail);
}
checkPackageDetailService.saveBatch(details);
}
return R.ok(checkPackage.getId(), "保存成功");
} catch (Exception e) {
log.error("新增检查套餐失败", e);
return R.fail("新增检查套餐失败: " + e.getMessage());
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public R<?> updateCheckPackage(CheckPackageDto checkPackageDto) {
try {
// 检查套餐是否存在
CheckPackage existPackage = checkPackageService.getById(checkPackageDto.getId());
if (existPackage == null) {
return R.fail("套餐不存在");
}
// 更新套餐主表数据
CheckPackage checkPackage = new CheckPackage();
BeanUtils.copyProperties(checkPackageDto, checkPackage);
// 更新套餐维护日期为当前系统日期
checkPackage.setMaintainDate(LocalDate.now());
checkPackage.setUpdateTime(LocalDateTime.now());
boolean updateResult = checkPackageService.updateById(checkPackage);
if (!updateResult) {
return R.fail("更新套餐失败");
}
// 删除原有明细
checkPackageDetailService.remove(
new LambdaQueryWrapper<CheckPackageDetail>()
.eq(CheckPackageDetail::getPackageId, checkPackage.getId())
);
// 保存新的套餐明细
if (checkPackageDto.getItems() != null && !checkPackageDto.getItems().isEmpty()) {
List<CheckPackageDetail> details = new ArrayList<>();
int orderNum = 1;
for (CheckPackageDetailDto detailDto : checkPackageDto.getItems()) {
CheckPackageDetail detail = new CheckPackageDetail();
BeanUtils.copyProperties(detailDto, detail);
detail.setPackageId(checkPackage.getId());
detail.setOrderNum(orderNum++);
detail.setCreateTime(LocalDateTime.now());
detail.setUpdateTime(LocalDateTime.now());
details.add(detail);
}
checkPackageDetailService.saveBatch(details);
}
return R.ok("更新成功");
} catch (Exception e) {
log.error("更新检查套餐失败", e);
return R.fail("更新检查套餐失败: " + e.getMessage());
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public R<?> deleteCheckPackage(Long id) {
try {
// 检查套餐是否存在
CheckPackage existPackage = checkPackageService.getById(id);
if (existPackage == null) {
return R.fail("套餐不存在");
}
// 删除套餐明细
checkPackageDetailService.remove(
new LambdaQueryWrapper<CheckPackageDetail>()
.eq(CheckPackageDetail::getPackageId, id)
);
// 删除套餐主表
boolean deleteResult = checkPackageService.removeById(id);
if (!deleteResult) {
return R.fail("删除套餐失败");
}
return R.ok("删除成功");
} catch (Exception e) {
log.error("删除检查套餐失败", e);
return R.fail("删除检查套餐失败: " + e.getMessage());
}
}
}

View File

@@ -0,0 +1,109 @@
package com.openhis.web.check.appservice.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckPart;
import com.openhis.check.service.ICheckPartService;
import com.openhis.web.check.appservice.ICheckPartAppService;
import com.openhis.web.reportmanage.utils.ExcelFillerUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Service
@Slf4j
public class CheckPartAppServiceImpl implements ICheckPartAppService {
@Resource
private ICheckPartService checkPartService;
@Override
public R<?> getCheckPartList() {
List<CheckPart> list = checkPartService.list();
return R.ok(list);
}
@Override
public R<?> searchCheckPartList(Integer pageNo, Integer pageSize, String checkType, String name, String packageName) {
LambdaQueryWrapper<CheckPart> wrapper = new LambdaQueryWrapper<>();
if (checkType != null && ObjectUtil.isNotEmpty(checkType)) {
wrapper.eq(CheckPart::getCheckType, checkType);
}
if (name != null && ObjectUtil.isNotEmpty(name)) {
wrapper.like(CheckPart::getName, name);
}
if (packageName != null && ObjectUtil.isNotEmpty(packageName)) {
wrapper.eq(CheckPart::getPackageName, packageName);
}
List<CheckPart> list = checkPartService.list(wrapper);
return R.ok(list);
}
@Override
public R<?> addCheckPart(CheckPart checkPart) {
//数据检验
//保存
boolean save = checkPartService.save(checkPart);
return R.ok(save);
}
@Override
public R<?> removeCheckPart(Integer checkPartId) {
boolean remove = checkPartService.removeById(checkPartId);
return R.ok(remove);
}
@Override
public R<?> updateCheckPart(CheckPart checkPart) {
boolean b = checkPartService.updateById(checkPart);
return R.ok(b);
}
@Override
public R<?> exportCheckPart(String checkType, String name, String packageName, HttpServletResponse response) {
LambdaQueryWrapper<CheckPart> wrapper = new LambdaQueryWrapper<>();
if (checkType != null && ObjectUtil.isNotEmpty(checkType)) {
wrapper.eq(CheckPart::getCheckType, checkType);
}
if (name != null && ObjectUtil.isNotEmpty(name)) {
wrapper.like(CheckPart::getName, name);
}
if (packageName != null && ObjectUtil.isNotEmpty(packageName)) {
wrapper.eq(CheckPart::getPackageName, packageName);
}
List<CheckPart> list = checkPartService.list(wrapper);
if (list.isEmpty()) {
return R.fail("导出Excel失败,无数据。");
}
try {
// 准备表头key对应实体的字段名
Map<String, String> headers = new LinkedHashMap<>();
headers.put("checkType", "检查类型");
headers.put("code", "部位代码");
headers.put("name", "部位名称");
headers.put("packageName", "套餐名称");
headers.put("exposureNum", "曝光次数");
headers.put("price", "金额");
headers.put("number", "序号");
headers.put("serviceScope", "服务范围");
headers.put("subType", "下级医技类型");
headers.put("remark", "备注");
// 文件名,只传文字部分
String excelName = "检查部位列表";
// 导出到Excel
ExcelFillerUtil.makeExcelFile(response, list, headers, excelName, null);
} catch (IOException | IllegalAccessException e) {
e.printStackTrace();
return R.fail("导出Excel失败" + e.getMessage());
}
return R.ok(null, "导出Excel成功");
}
}

View File

@@ -0,0 +1,48 @@
package com.openhis.web.check.appservice.impl;
import cn.hutool.core.util.ObjectUtil;
import com.core.common.core.domain.R;
import com.openhis.check.domain.LisGroupInfo;
import com.openhis.check.service.ILisGroupInfoService;
import com.openhis.web.check.appservice.ILisGroupInfoAppService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
public class LisGroupInfoAppServiceImpl implements ILisGroupInfoAppService {
@Resource
private ILisGroupInfoService lisGroupInfoService;
@Override
public R<?> getLisGroupInfoList() {
List<LisGroupInfo> list = lisGroupInfoService.list();
return R.ok(list);
}
@Override
public R<?> add(LisGroupInfo lisGroupInfo) {
if (ObjectUtil.isEmpty(lisGroupInfo)) {
return R.fail("信息不能为空");
}
boolean save = lisGroupInfoService.save(lisGroupInfo);
return R.ok(save);
}
@Override
public R<?> update(LisGroupInfo lisGroupInfo) {
if (ObjectUtil.isEmpty(lisGroupInfo)) {
return R.fail("信息不能为空");
}
boolean update = lisGroupInfoService.updateById(lisGroupInfo);
return R.ok( update);
}
@Override
public R<?> delete(Integer lisGroupInfoId) {
boolean b = lisGroupInfoService.removeById(lisGroupInfoId);
return R.ok(b);
}
}

View File

@@ -0,0 +1,82 @@
package com.openhis.web.check.controller;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckMethod;
import com.openhis.web.check.appservice.ICheckMethodAppService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@RestController
@Slf4j
@RequestMapping("/check/method")
public class CheckMethodController {
@Resource
private ICheckMethodAppService checkMethodAppService;
/*
* 获取检查方法
* @Param 此处参数注释有问题,完全是按照需求给的图来注释的
*/
@GetMapping("/list")
public R<?> getCheckMethodList(){
return R.ok(checkMethodAppService.getCheckMethodList());
}
/*
* 条件查询检查方法
* @Para
* */
@GetMapping("/search")
public R<?> searchCheckMethodList(
@RequestParam(required = false) Integer pageNo,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String checkType,
@RequestParam(required = false) String name,
@RequestParam(required = false) String packageName) {
return R.ok(checkMethodAppService.searchCheckMethodList(pageNo,pageSize,checkType,name,packageName));
}
/*
* 新增检查方法
* @Param
*/
@PostMapping("/add")
public R<?> addCheckMethod(@RequestBody CheckMethod checkMethod){
return R.ok(checkMethodAppService.addCheckMethod(checkMethod));
}
/*
* 删除检查方法
* @Param code代码
*/
@DeleteMapping("/delete/{checkMethodId}")
public R<?> deleteCheckMethod(@PathVariable Integer checkMethodId){
return R.ok(checkMethodAppService.removeCheckMethod(checkMethodId));
}
/*
* 更新检查方法
* @Param
*/
@PutMapping("/update")
public R<?> updateCheckMethod(@RequestBody CheckMethod checkMethod){
return R.ok(checkMethodAppService.updateCheckMethod(checkMethod));
}
/*
* 导出检查方法列表
* @Param
*/
@GetMapping("/export")
public void exportCheckMethod(
@RequestParam(required = false) String checkType,
@RequestParam(required = false) String name,
@RequestParam(required = false) String packageName,
HttpServletResponse response) {
checkMethodAppService.exportCheckMethod(checkType, name, packageName, response);
}
}

View File

@@ -0,0 +1,80 @@
package com.openhis.web.check.controller;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckPart;
import com.openhis.web.check.appservice.ICheckPartAppService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
@RestController
@Slf4j
@RequestMapping("/check/part")
public class CheckPartController {
@Resource
private ICheckPartAppService checkPartAppService;
/*
* 获取检查部位
* @Param检查方法 此处参数注释有问题,完全是按照需求给的图来注释的
*/
@GetMapping("/list")
public R<?> getCheckPartList(){
return R.ok(checkPartAppService.getCheckPartList());
}
/*
* 条件搜索检查部位
* @Param
* */
@GetMapping("/search")
public R<?> searchCheckPartList(@RequestParam(required = false) Integer pageNo,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String checkType,
@RequestParam(required = false) String name,
@RequestParam(required = false) String packageName){
return R.ok(checkPartAppService.searchCheckPartList(pageNo,pageSize,checkType,name,packageName));
}
/*
* 新增检查部位
* @Param
*/
@PostMapping("/add")
public R<?> addCheckPart(@RequestBody CheckPart checkPart){
return R.ok(checkPartAppService.addCheckPart(checkPart));
}
/*
* 删除检查部位
* @Param code代码
*/
@DeleteMapping("/delete/{checkPartId}")
public R<?> deleteCheckPart(@PathVariable Integer checkPartId){
return R.ok(checkPartAppService.removeCheckPart(checkPartId));
}
/*
* 更新检查部位
* @Param
*/
@PutMapping("/update")
public R<?> updateCheckPart(@RequestBody CheckPart checkPart){
return R.ok(checkPartAppService.updateCheckPart(checkPart));
}
/*
* 导出检查部位列表
* @Param
*/
@GetMapping("/export")
public void exportCheckPart(
@RequestParam(required = false) String checkType,
@RequestParam(required = false) String name,
@RequestParam(required = false) String packageName,
HttpServletResponse response) {
checkPartAppService.exportCheckPart(checkType, name, packageName, response);
}
}

View File

@@ -0,0 +1,186 @@
package com.openhis.web.check.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.core.common.core.controller.BaseController;
import com.core.common.core.domain.AjaxResult;
import com.core.common.core.domain.R;
import com.openhis.check.domain.CheckMethod;
import com.openhis.check.domain.CheckPackage;
import com.openhis.check.domain.CheckPart;
import com.openhis.check.domain.CheckType;
import com.openhis.check.service.ICheckMethodService;
import com.openhis.check.service.ICheckPackageService;
import com.openhis.check.service.ICheckPartService;
import com.openhis.check.service.ICheckTypeService;
import com.openhis.web.check.appservice.ICheckPackageAppService;
import com.openhis.web.check.dto.CheckPackageDto;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.time.LocalDate;
import java.util.List;
/**
* 检查类型管理Controller
*
* @author system
* @date 2025-07-22
* @updated 2025-11-26 - 增加套餐设置相关接口
*/
@RestController
@RequestMapping({"/system/check-type", "/system"})
@Slf4j
@AllArgsConstructor
public class CheckTypeController extends BaseController {
private final ICheckTypeService checkTypeService;
private final ICheckMethodService checkMethodService;
private final ICheckPartService checkPartService;
private final ICheckPackageService checkPackageService;
private final ICheckPackageAppService checkPackageAppService;
/**
* 获取检查类型列表
*/
@GetMapping("/list")
public AjaxResult list() {
List<CheckType> list = checkTypeService.list();
return AjaxResult.success(list);
}
/**
* 获取检查方法列表
*/
@GetMapping({"/method/list", "/check-method/list"})
public AjaxResult methodList() {
List<CheckMethod> list = checkMethodService.list();
return AjaxResult.success(list);
}
/**
* 获取检查部位列表
*/
@GetMapping({"/part/list", "/check-part/list"})
public AjaxResult partList() {
List<CheckPart> list = checkPartService.list();
return AjaxResult.success(list);
}
/**
* 获取检查套餐列表(支持分页和筛选)
*/
@GetMapping({"/package/list", "/check-package/list"})
public AjaxResult packageList(
@RequestParam(required = false) Integer pageNo,
@RequestParam(required = false) Integer pageSize,
@RequestParam(required = false) String organization,
@RequestParam(required = false) String packageName,
@RequestParam(required = false) String packageLevel,
@RequestParam(required = false) String packageType,
@RequestParam(required = false) String department,
@RequestParam(required = false) String user,
@RequestParam(required = false) String startDate,
@RequestParam(required = false) String endDate) {
LambdaQueryWrapper<CheckPackage> wrapper = new LambdaQueryWrapper<>();
// 添加筛选条件
if (organization != null && !organization.isEmpty()) {
wrapper.eq(CheckPackage::getOrganization, organization);
}
if (packageName != null && !packageName.isEmpty()) {
wrapper.like(CheckPackage::getPackageName, packageName);
}
if (packageLevel != null && !packageLevel.isEmpty()) {
wrapper.eq(CheckPackage::getPackageLevel, packageLevel);
}
if (packageType != null && !packageType.isEmpty()) {
wrapper.eq(CheckPackage::getPackageType, packageType);
}
if (department != null && !department.isEmpty()) {
wrapper.like(CheckPackage::getDepartment, department);
}
if (user != null && !user.isEmpty()) {
wrapper.like(CheckPackage::getUser, user);
}
if (startDate != null && !startDate.isEmpty()) {
wrapper.ge(CheckPackage::getMaintainDate, LocalDate.parse(startDate));
}
if (endDate != null && !endDate.isEmpty()) {
wrapper.le(CheckPackage::getMaintainDate, LocalDate.parse(endDate));
}
// 按更新时间倒序排列
wrapper.orderByDesc(CheckPackage::getUpdateTime);
// 如果需要分页
if (pageNo != null && pageSize != null) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<CheckPackage> page =
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(pageNo, pageSize);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<CheckPackage> result =
checkPackageService.page(page, wrapper);
return AjaxResult.success(result);
} else {
List<CheckPackage> list = checkPackageService.list(wrapper);
return AjaxResult.success(list);
}
}
/**
* 新增检查类型
*/
@PostMapping
public AjaxResult add(@RequestBody CheckType checkType) {
return toAjax(checkTypeService.save(checkType));
}
/**
* 修改检查类型
*/
@PutMapping
public AjaxResult edit(@RequestBody CheckType checkType) {
return toAjax(checkTypeService.updateById(checkType));
}
/**
* 删除检查类型
*/
@DeleteMapping("/{checkTypeId}")
public AjaxResult remove(@PathVariable Long checkTypeId) {
return toAjax(checkTypeService.removeById(checkTypeId));
}
/**
* 根据ID获取检查套餐详情
*/
@GetMapping({"/package/{id}", "/check-package/{id}"})
public R<?> getCheckPackageById(@PathVariable Long id) {
return checkPackageAppService.getCheckPackageById(id);
}
/**
* 新增检查套餐
*/
@PostMapping({"/package", "/check-package"})
public R<?> addCheckPackage(@Valid @RequestBody CheckPackageDto checkPackageDto) {
return checkPackageAppService.addCheckPackage(checkPackageDto);
}
/**
* 更新检查套餐
*/
@PutMapping({"/package", "/check-package"})
public R<?> updateCheckPackage(@Valid @RequestBody CheckPackageDto checkPackageDto) {
return checkPackageAppService.updateCheckPackage(checkPackageDto);
}
/**
* 删除检查套餐
*/
@DeleteMapping({"/package/{id}", "/check-package/{id}"})
public R<?> deleteCheckPackage(@PathVariable Long id) {
return checkPackageAppService.deleteCheckPackage(id);
}
}

View File

@@ -0,0 +1,56 @@
package com.openhis.web.check.controller;
import com.core.common.core.domain.R;
import com.openhis.web.check.appservice.ILisGroupInfoAppService;
import org.springframework.web.bind.annotation.*;
import com.openhis.check.domain.LisGroupInfo;
import javax.annotation.Resource;
@RestController
@RequestMapping("/check/lisGroupInfo")
public class LisGroupInfoController {
@Resource
private ILisGroupInfoAppService lisGroupInfoAppService;
/*
*
* 获取Lis分组信息
*
* */
@GetMapping("/list")
public R<?> getLisGroupInfoList(){
return R.ok(lisGroupInfoAppService.getLisGroupInfoList());
}
/*
*
* 新增Lis分组信息
*
* */
@PostMapping("/add")
public R<?> addLisGroupInfo(@RequestBody LisGroupInfo lisGroupInfo){
return R.ok(lisGroupInfoAppService.add(lisGroupInfo));
}
/*
*
* 修改Lis分组信息
*
* */
@PutMapping("/update")
public R<?> updateLisGroupInfo(@RequestBody LisGroupInfo lisGroupInfo){
return R.ok(lisGroupInfoAppService.update(lisGroupInfo));
}
/*
*
* 删除Lis分组信息
*
* */
@DeleteMapping("/{lisGroupInfoId}")
public R<?> deleteLisGroupInfo(@PathVariable Integer lisGroupInfoId){
return R.ok(lisGroupInfoAppService.delete(lisGroupInfoId));
}
}

View File

@@ -0,0 +1,46 @@
package com.openhis.web.check.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
@Data
@Accessors(chain = true)
public class CheckMethodDto {
/**
* 检查方法ID
*/
@TableId(type = IdType.AUTO)
private Long id;
/* 检查类型 */
private String checkType;
/* 方法代码 */
private String code;
/* 方法名称 */
private String name;
/* 套餐名称 */
private String packageName;
/* 曝光次数 */
private Integer exposureNum;
/* 序号 */
private Integer orderNum;
/* 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,71 @@
package com.openhis.web.check.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
/**
* 检查套餐明细DTO
*
* @author system
* @date 2025-11-26
*/
@Data
@Accessors(chain = true)
public class CheckPackageDetailDto {
/** 套餐明细ID */
private Long id;
/** 套餐ID */
private Long packageId;
/** 项目编号 */
private String itemCode;
/** 项目名称/规格 */
@NotBlank(message = "项目名称不能为空")
private String itemName;
/** 检查项目ID(诊疗项目ID) */
private Long checkItemId;
/** 剂量 */
private String dose;
/** 途径 */
private String method;
/** 频次 */
private String frequency;
/** 天数 */
private String days;
/** 数量 */
@NotNull(message = "数量不能为空")
private Integer quantity;
/** 单价 */
@NotNull(message = "单价不能为空")
private BigDecimal unitPrice;
/** 金额 */
private BigDecimal amount;
/** 服务费 */
private BigDecimal serviceCharge;
/** 总金额 */
private BigDecimal total;
/** 产地 */
private String origin;
/** 序号 */
private Integer orderNum;
}

View File

@@ -0,0 +1,86 @@
package com.openhis.web.check.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
/**
* 检查套餐DTO
*
* @author system
* @date 2025-11-26
*/
@Data
@Accessors(chain = true)
public class CheckPackageDto {
/** 检查套餐ID */
private Long id;
/** 套餐名称 */
@NotBlank(message = "套餐名称不能为空")
private String packageName;
/** 套餐编码 */
private String code;
/** 套餐类别 */
@NotBlank(message = "套餐类别不能为空")
private String packageType;
/** 套餐级别 */
@NotBlank(message = "套餐级别不能为空")
private String packageLevel;
/** 适用科室 */
private String department;
/** 适用用户 */
private String user;
/** 卫生机构 */
private String organization;
/** 套餐金额 */
private BigDecimal packagePrice;
/** 折扣 */
private BigDecimal discount;
/** 制单人 */
private String creator;
/** 是否停用 */
private Integer isDisabled;
/** 显示套餐名 */
private Integer showPackageName;
/** 生成服务费 */
private Integer generateServiceFee;
/** 套餐价格启用状态 */
private Integer packagePriceEnabled;
/** 服务费 */
private BigDecimal serviceFee;
/** 备注 */
private String remark;
/** 描述 */
private String description;
/** 套餐维护日期 */
private LocalDate createDate;
/** 套餐明细列表 */
@NotNull(message = "套餐明细不能为空")
private List<CheckPackageDetailDto> items;
}

View File

@@ -0,0 +1,41 @@
package com.openhis.web.check.dto;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class CheckPartDto {
/** 检查部位id */
private Long id;
/** 检查部位名称 */
private String name;
/** 检查部位编码 */
private String code;
/** 检查部位检查类型 */
private String checkType;
/** 曝光次数 */
private Integer exposureNum;
/** 费用套餐 */
private String packageName;
/** 金额 */
private Double price;
/** 序号 */
private Integer number;
/** 服务范围 */
private String serviceScope;
/** 下级医技类型 */
private String subType;
/** 备注 */
private String remark;
}

View File

@@ -0,0 +1,10 @@
package com.openhis.web.check.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface CheckMethodAppMapper{
}

View File

@@ -0,0 +1,7 @@
package com.openhis.web.check.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface CheckPartAppMapper {
}

View File

@@ -0,0 +1,7 @@
package com.openhis.web.check.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface LisGroupInfoAppMapper {
}

View File

@@ -0,0 +1,190 @@
package com.openhis.web.lab.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.core.common.core.controller.BaseController;
import com.core.common.core.domain.AjaxResult;
import com.openhis.lab.domain.InspectionType;
import com.openhis.lab.service.IInspectionTypeService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.support.TransactionTemplate;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 检验类型管理Controller
*
* @author system
* @date 2025-12-09
*/
@RestController
@RequestMapping("/system/inspection-type")
@Slf4j
@AllArgsConstructor
public class InspectionTypeController extends BaseController {
// 辅助方法:将字节数组转换为十六进制字符串
private static String bytesToHex(byte[] bytes) {
StringBuilder sb = new StringBuilder();
for (byte b : bytes) {
sb.append(String.format("%02X ", b));
}
return sb.toString().trim();
}
private final IInspectionTypeService inspectionTypeService;
private final TransactionTemplate transactionTemplate;
/**
* 获取检验类型列表
*/
@GetMapping("/list")
public AjaxResult list(InspectionType inspectionType) {
// 使用Wrapper构建查询条件确保order字段被正确处理
QueryWrapper<InspectionType> queryWrapper = new QueryWrapper<>(inspectionType);
List<InspectionType> list = inspectionTypeService.list(queryWrapper);
return AjaxResult.success(list);
}
/**
* 获取检验类型详细
*/
@GetMapping("/{inspectionTypeId}")
public AjaxResult getInfo(@PathVariable Long inspectionTypeId) {
return AjaxResult.success(inspectionTypeService.getById(inspectionTypeId));
}
/**
* 新增检验类型
*/
@PostMapping
public AjaxResult add(@RequestBody InspectionType inspectionType) {
// 确保新增时ID为null强制使用数据库自增序列
inspectionType.setId(null);
// 去除code字段的前后空格确保唯一性验证准确
if (inspectionType.getCode() != null) {
inspectionType.setCode(inspectionType.getCode().trim());
}
// 验证code字段是否唯一
QueryWrapper<InspectionType> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("code", inspectionType.getCode());
// 输出调试信息
System.out.println("检查编码唯一性code=" + inspectionType.getCode() + ", 长度=" + inspectionType.getCode().length());
System.out.println("code的十六进制表示" + bytesToHex(inspectionType.getCode().getBytes()));
// 直接查询具体记录,而不仅仅是计数
List<InspectionType> existingRecords = inspectionTypeService.list(queryWrapper);
System.out.println("数据库中存在的记录数:" + existingRecords.size());
for (InspectionType record : existingRecords) {
System.out.println("已存在记录id=" + record.getId() + ", code=" + record.getCode() + ", code长度=" + record.getCode().length() + ", code十六进制=" + bytesToHex(record.getCode().getBytes()));
}
if (!existingRecords.isEmpty()) {
return AjaxResult.error("检验类型编码已存在");
}
// 保存前再次验证
System.out.println("准备保存数据:" + inspectionType);
try {
// 使用事务确保一致性
return transactionTemplate.execute(status -> {
// 再次检查,防止并发问题
QueryWrapper<InspectionType> checkWrapper = new QueryWrapper<>();
checkWrapper.eq("code", inspectionType.getCode());
List<InspectionType> finalCheck = inspectionTypeService.list(checkWrapper);
if (!finalCheck.isEmpty()) {
return AjaxResult.error("检验类型编码已存在");
}
boolean result = inspectionTypeService.save(inspectionType);
System.out.println("保存结果:" + result);
return toAjax(result);
});
} catch (Exception e) {
System.out.println("保存失败,错误信息:" + e.getMessage());
// 捕获唯一性约束冲突异常
if (e.getMessage().contains("uk_inspection_type_code") ||
e.getMessage().contains("duplicate key value") ||
e.getMessage().contains("检验类型编码已存在")) {
return AjaxResult.error("检验类型编码已存在");
}
return AjaxResult.error("保存失败:" + e.getMessage());
}
}
/**
* 修改检验类型
*/
@PutMapping
public AjaxResult edit(@RequestBody InspectionType inspectionType) {
// 去除code字段的前后空格确保唯一性验证准确
if (inspectionType.getCode() != null) {
inspectionType.setCode(inspectionType.getCode().trim());
}
// 验证code字段是否唯一排除自身
QueryWrapper<InspectionType> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("code", inspectionType.getCode())
.ne("id", inspectionType.getId());
if (inspectionTypeService.count(queryWrapper) > 0) {
return AjaxResult.error("检验类型编码已存在");
}
try {
boolean result = inspectionTypeService.updateById(inspectionType);
return toAjax(result);
} catch (Exception e) {
// 捕获唯一性约束冲突异常
if (e.getMessage().contains("uk_inspection_type_code") ||
e.getMessage().contains("duplicate key value") ||
e.getMessage().contains("检验类型编码已存在")) {
return AjaxResult.error("检验类型编码已存在");
}
return AjaxResult.error("更新失败:" + e.getMessage());
}
}
/**
* 删除检验类型
*/
@DeleteMapping("/{inspectionTypeId}")
public AjaxResult remove(@PathVariable Long inspectionTypeId) {
log.info("删除检验类型ID: {}", inspectionTypeId);
try {
// 检查记录是否存在
InspectionType existing = inspectionTypeService.getById(inspectionTypeId);
log.info("删除前检查记录是否存在: {}", existing != null);
if (existing == null) {
log.warn("删除失败检验类型ID: {} 不存在", inspectionTypeId);
return AjaxResult.error("删除失败: 记录不存在");
}
// 使用MyBatis Plus的removeById方法执行逻辑删除
boolean result = inspectionTypeService.removeById(inspectionTypeId);
log.info("逻辑删除检验类型结果: {}", result);
AjaxResult response = toAjax(result);
log.info("删除响应: {}", response);
return response;
} catch (Exception e) {
log.error("删除检验类型失败ID: {}, 错误: {}", inspectionTypeId, e.getMessage(), e);
return AjaxResult.error("删除失败: " + e.getMessage());
}
}
// 测试删除接口,直接返回成功
@DeleteMapping("/test-delete/{id}")
public AjaxResult testDelete(@PathVariable Long id) {
log.info("测试删除接口ID: {}", id);
return AjaxResult.success("测试删除成功");
}
}

View File

@@ -5,43 +5,32 @@ package com.openhis.web.ybmanage.vo;
import java.math.BigDecimal; import java.math.BigDecimal;
import javax.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
/** /**
* 【3201】后台计算结果 DB映射实体 * Settlement3202 Result DB mapping entity
* *
* @author SunJQ * @author SunJQ
* @date 2025-04-15 * @date 2025-04-15
*/ */
@Data @Data
public class Settlement3202VO { public class Settlement3202VO {
/** 医疗费用总额 */ /** Medical Fee Sum */
private BigDecimal medFeeSumAmt; private BigDecimal medFeeSumAmt;
/** 基金支付总额 */ /** Fund Pay Sum */
private BigDecimal fundPaySumAmt; private BigDecimal fundPaySumAmt;
/** 个人账户支付总额 */ /** Account Pay */
private BigDecimal acctPay; private BigDecimal acctPay;
/** 个人账户支付总额 */ /** Account Gj Pay */
private BigDecimal acctGjPay; private BigDecimal acctGjPay;
/** 现金支付总额 */ /** Self Pay Cash */
private BigDecimal selfPayCash; private BigDecimal selfPayCash;
/** 微信支付总额 */ /** Self Pay WeChat */
private BigDecimal selfPayVx; private BigDecimal selfPayVx;
/** 阿里支付总额 */ /** Self Pay Alipay */
private BigDecimal selfPayAli; private BigDecimal selfPayAli;
/** 银行卡支付总额 */ /** Self Pay Bank Card */
private BigDecimal selfPayUnion; private BigDecimal selfPayUnion;
/** 定点医药机构结算笔数 */ /** Settlement Count */
private Integer fixMedInsSetlCnt; private Integer fixMedInsSetlCnt;
} }

View File

@@ -6,7 +6,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8 url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=hisdev&characterEncoding=UTF-8&client_encoding=UTF-8
username: postgresql username: postgresql
password: Jchl1528 password: Jchl1528
# 从库数据源 # 从库数据源
@@ -59,6 +59,8 @@ spring:
wall: wall:
config: config:
multi-statement-allow: true multi-statement-allow: true
# redis 配置 # redis 配置
redis: redis:
# 地址 # 地址
@@ -85,3 +87,9 @@ spring:
messages: messages:
basename: i18n/general_message/messages basename: i18n/general_message/messages
encoding: utf-8 encoding: utf-8
server:
# 服务器的HTTP端口默认为18080
port: 18080
servlet:
# 应用的访问路径
context-path: /openhis

View File

@@ -6,7 +6,7 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=public&characterEncoding=UTF-8&client_encoding=UTF-8 url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=hisprd&characterEncoding=UTF-8&client_encoding=UTF-8
username: postgresql username: postgresql
password: Jchl1528 password: Jchl1528
# 从库数据源 # 从库数据源
@@ -85,3 +85,9 @@ spring:
messages: messages:
basename: i18n/general_message/messages basename: i18n/general_message/messages
encoding: utf-8 encoding: utf-8
server:
# 服务器的HTTP端口默认为18080
port: 18082
servlet:
# 应用的访问路径
context-path: /openhis

View File

@@ -0,0 +1,93 @@
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: org.postgresql.Driver
druid:
# 主库数据源
master:
url: jdbc:postgresql://192.168.110.252:15432/postgresql?currentSchema=histest&characterEncoding=UTF-8&client_encoding=UTF-8
username: postgresql
password: Jchl1528
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled:
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 # FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: openhis
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
# redis 配置
redis:
# 地址
host: 192.168.110.252
# 端口默认为6379
port: 6379
# 数据库索引
database: 1
# 密码
password: Jchl1528
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 文言
messages:
basename: i18n/general_message/messages
encoding: utf-8
server:
# 服务器的HTTP端口默认为18080
port: 18081
servlet:
# 应用的访问路径
context-path: /openhis

View File

@@ -15,11 +15,6 @@ core:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为18080
port: 18080
servlet:
# 应用的访问路径
context-path: /openhis
tomcat: tomcat:
# tomcat的URI编码 # tomcat的URI编码
uri-encoding: UTF-8 uri-encoding: UTF-8
@@ -54,7 +49,7 @@ spring:
# 国际化资源文件路径 # 国际化资源文件路径
basename: i18n/messages basename: i18n/messages
profiles: profiles:
active: local #本地local 生产prod (农大) active: dev
# 文件上传 # 文件上传
servlet: servlet:
multipart: multipart:
@@ -85,6 +80,11 @@ mybatis-plus:
mapperLocations: classpath*:mapper/**/*Mapper.xml mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件 # 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml configLocation: classpath:mybatis/mybatis-config.xml
global-config:
db-config:
logic-delete-field: validFlag # 全局逻辑删除的实体字段名
logic-delete-value: 0 # 逻辑已删除值(默认为 1)
logic-not-delete-value: 1 # 逻辑未删除值(默认为 0)
# PageHelper分页插件 # PageHelper分页插件
pagehelper: pagehelper:

View File

@@ -18,6 +18,7 @@
T3.extra_details, T3.extra_details,
T3.contact, T3.contact,
T3.appointment_required_flag, T3.appointment_required_flag,
T3.practitioner_id,
T3.definition_id, T3.definition_id,
T3.charge_name, T3.charge_name,
T3.price, T3.price,
@@ -36,6 +37,7 @@
T1.extra_details, T1.extra_details,
T1.contact, T1.contact,
T1.appointment_required_flag, T1.appointment_required_flag,
T1.practitioner_id,
T2.ID AS definition_id, T2.ID AS definition_id,
T2.charge_name, T2.charge_name,
T2.price, T2.price,

View File

@@ -96,7 +96,7 @@
T14.bill_date AS return_date, T14.bill_date AS return_date,
T14.refund_reason AS return_reason, T14.refund_reason AS return_reason,
T15."name" AS operator_name, T15."name" AS operator_name,
T14.enterer_id AS operator_id, T17.user_name AS operator_id,
ABS(T14.display_amount) AS refund_amount, ABS(T14.display_amount) AS refund_amount,
T6.contract_no AS contract_no, T6.contract_no AS contract_no,
T16.refund_method AS refund_method T16.refund_method AS refund_method
@@ -134,6 +134,7 @@
AND T14.status_enum = 3 AND T14.status_enum = 3
AND T14.payment_enum = 1 AND T14.payment_enum = 1
LEFT JOIN adm_practitioner AS T15 ON T15.ID = T14.enterer_id AND T15.delete_flag = '0' LEFT JOIN adm_practitioner AS T15 ON T15.ID = T14.enterer_id AND T15.delete_flag = '0'
LEFT JOIN sys_user AS T17 ON T17.user_id = T15.user_id AND T17.delete_flag = '0'
-- 关联退号支付详情,获取退款方式(聚合多个支付方式) -- 关联退号支付详情,获取退款方式(聚合多个支付方式)
LEFT JOIN ( LEFT JOIN (
SELECT reconciliation_id, SELECT reconciliation_id,

View File

@@ -32,6 +32,11 @@
<groupId>com.openhis</groupId> <groupId>com.openhis</groupId>
<artifactId>openhis-common</artifactId> <artifactId>openhis-common</artifactId>
</dependency> </dependency>
<!-- 核心共通模块 -->
<dependency>
<groupId>com.core</groupId>
<artifactId>core-common</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

View File

@@ -60,6 +60,9 @@ public class HealthcareService extends HisBaseEntity {
/** 预约要求 */ /** 预约要求 */
private Integer appointmentRequiredFlag; private Integer appointmentRequiredFlag;
/** 出诊医生ID */
private Long practitionerId;
/** 医保编码 */ /** 医保编码 */
private String ybNo; private String ybNo;

View File

@@ -0,0 +1,59 @@
package com.openhis.administration.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 发票段管理Entity实体
*
* @author system
* @date 2025-11-18
*/
@Data
@TableName("adm_invoice_segment")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class InvoiceSegment extends HisBaseEntity {
/** ID */
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/** 段ID */
private Long segmentId;
/** 开始号码 */
private String beginNumber;
/** 结束号码 */
private String endNumber;
/** 员工ID */
private Long employeeId;
/** 员工姓名 */
private String employeeName;
/** 开票员ID */
private Long invoicingStaffId;
/** 开票员姓名 */
private String invoicingStaffName;
/** 创建日期 */
private Date createDate;
/** 状态 */
private String status;
/** 备注 */
private String remark;
}

View File

@@ -77,4 +77,16 @@ public class Organization extends HisBaseEntity {
/** 默认挂号医生 */ /** 默认挂号医生 */
private Long defDoctorId; private Long defDoctorId;
/** 挂号科室标记 */
private Integer registerFlag;
/** 科室位置 */
private String location;
/** 科室简介 */
private String intro;
/** 备注 */
private String remark;
} }

View File

@@ -0,0 +1,56 @@
package com.openhis.administration.domain;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.core.common.core.domain.HisBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 门诊号码段管理Entity实体
*
* @author system
* @date 2025-01-XX
*/
@Data
@TableName("adm_outpatient_no_segment")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class OutpatientNoSegment extends HisBaseEntity {
/** ID */
@TableId(type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/** 操作员ID */
private Long operatorId;
/** 操作员姓名 */
private String operatorName;
/** 员工工号 */
private String staffNo;
/** 领用日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date receiveDate;
/** 起始号码 */
private String startNo;
/** 终止号码 */
private String endNo;
/** 使用号码 */
private String usedNo;
}

View File

@@ -0,0 +1,17 @@
package com.openhis.administration.mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.administration.domain.InvoiceSegment;
/**
* 发票段管理Mapper接口
*
* @author system
* @date 2025-11-18
*/
@Repository
public interface InvoiceSegmentMapper extends BaseMapper<InvoiceSegment> {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.administration.mapper;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.administration.domain.OutpatientNoSegment;
/**
* 门诊号码段管理Mapper接口
*
* @author system
* @date 2025-01-XX
*/
@Repository
public interface OutpatientNoSegmentMapper extends BaseMapper<OutpatientNoSegment> {
}

View File

@@ -0,0 +1,47 @@
package com.openhis.administration.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.openhis.administration.domain.InvoiceSegment;
/**
* 发票段管理Service接口
*
* @author system
* @date 2025-11-18
*/
public interface IInvoiceSegmentService {
/**
* 分页查询发票段列表
*
* @param page 分页对象
* @param isAdmin 是否管理员
* @param userId 用户ID
* @return 分页结果
*/
Page<InvoiceSegment> selectInvoiceSegmentPage(Page<InvoiceSegment> page, boolean isAdmin, Long userId);
/**
* 新增发票段
*
* @param invoiceSegment 发票段信息
* @return 结果
*/
int insertInvoiceSegment(InvoiceSegment invoiceSegment);
/**
* 修改发票段
*
* @param invoiceSegment 发票段信息
* @return 结果
*/
int updateInvoiceSegment(InvoiceSegment invoiceSegment);
/**
* 删除发票段
*
* @param ids 发票段ID列表
* @return 结果
*/
int deleteInvoiceSegmentByIds(Long[] ids);
}

View File

@@ -1,5 +1,7 @@
package com.openhis.administration.service; package com.openhis.administration.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.administration.domain.Invoice; import com.openhis.administration.domain.Invoice;
import com.openhis.administration.domain.Supplier; import com.openhis.administration.domain.Supplier;
@@ -18,4 +20,14 @@ public interface IInvoiceService extends IService<Invoice> {
* @return * @return
*/ */
Long addInvoice(Invoice invoice); Long addInvoice(Invoice invoice);
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param page 分页参数
* @param isAdmin 是否管理员
* @param userId 当前用户ID
* @return 发票列表
*/
IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId);
} }

View File

@@ -0,0 +1,66 @@
package com.openhis.administration.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.openhis.administration.domain.OutpatientNoSegment;
/**
* 门诊号码段管理Service接口
*
* @author system
* @date 2025-01-XX
*/
public interface IOutpatientNoSegmentService {
/**
* 分页查询门诊号码段列表
*
* @param page 分页对象
* @param onlySelf 是否只查询自己的true=只查询自己的false=查询所有)
* @param userId 用户ID
* @return 分页结果
*/
Page<OutpatientNoSegment> selectOutpatientNoSegmentPage(Page<OutpatientNoSegment> page, boolean onlySelf, Long userId);
/**
* 新增门诊号码段
*
* @param outpatientNoSegment 门诊号码段信息
* @return 结果
*/
int insertOutpatientNoSegment(OutpatientNoSegment outpatientNoSegment);
/**
* 修改门诊号码段
*
* @param outpatientNoSegment 门诊号码段信息
* @return 结果
*/
int updateOutpatientNoSegment(OutpatientNoSegment outpatientNoSegment);
/**
* 删除门诊号码段
*
* @param ids 门诊号码段ID列表
* @return 结果
*/
int deleteOutpatientNoSegmentByIds(Long[] ids);
/**
* 根据ID查询门诊号码段
*
* @param id 门诊号码段ID
* @return 门诊号码段信息
*/
OutpatientNoSegment getById(Long id);
/**
* 检查号码段是否重复(全系统范围)
*
* @param startNo 起始号码
* @param endNo 终止号码
* @param excludeId 排除的ID用于更新时排除自身
* @return true=重复false=不重复
*/
boolean checkNumberSegmentOverlap(String startNo, String endNo, Long excludeId);
}

View File

@@ -0,0 +1,196 @@
package com.openhis.administration.service.impl;
import java.util.List;
import java.util.Objects;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openhis.administration.domain.InvoiceSegment;
import com.openhis.administration.mapper.InvoiceSegmentMapper;
import com.openhis.administration.service.IInvoiceSegmentService;
/**
* 发票段管理Service实现
*
* @author system
* @date 2025-11-18
*/
@Service
public class InvoiceSegmentServiceImpl implements IInvoiceSegmentService {
@Autowired
private InvoiceSegmentMapper invoiceSegmentMapper;
/**
* 分页查询发票段列表
*/
@Override
public Page<InvoiceSegment> selectInvoiceSegmentPage(Page<InvoiceSegment> page, boolean isAdmin, Long userId) {
LambdaQueryWrapper<InvoiceSegment> queryWrapper = new LambdaQueryWrapper<>();
// 移除数据过滤限制,允许查看所有发票段数据
// 按创建时间倒序排列
queryWrapper.orderByDesc(InvoiceSegment::getCreateDate);
return invoiceSegmentMapper.selectPage(page, queryWrapper);
}
/**
* 新增发票段
*/
@Override
public int insertInvoiceSegment(InvoiceSegment invoiceSegment) {
return invoiceSegmentMapper.insert(invoiceSegment);
}
/**
* 修改发票段
*/
@Override
public int updateInvoiceSegment(InvoiceSegment invoiceSegment) {
System.out.println("===== 开始更新发票段 ====");
System.out.println("传入的invoiceSegment对象: id=" + invoiceSegment.getId() + ", segmentId=" + invoiceSegment.getSegmentId());
// 确保必填字段存在
if (invoiceSegment.getBeginNumber() == null || invoiceSegment.getEndNumber() == null) {
System.out.println("错误: beginNumber或endNumber为空无法更新");
return 0;
}
// 先尝试直接通过id更新
int rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("直接通过id更新结果: 影响行数=" + rows);
// 如果直接更新失败,尝试多种查询策略
if (rows == 0) {
// 策略1: 使用传入的id作为segmentId查询处理前端传入的keyId作为segment_id的情况
if (invoiceSegment.getId() != null) {
System.out.println("策略1: 尝试将id=" + invoiceSegment.getId() + "作为segment_id查询");
LambdaQueryWrapper<InvoiceSegment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getId());
queryWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(queryWrapper);
if (existingSegment != null) {
System.out.println("策略1成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略2: 使用传入的segmentId字段查询
if (rows == 0 && invoiceSegment.getSegmentId() != null) {
System.out.println("策略2: 尝试使用segmentId=" + invoiceSegment.getSegmentId() + "查询");
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
segmentIdWrapper.eq(InvoiceSegment::getSegmentId, invoiceSegment.getSegmentId());
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(segmentIdWrapper);
if (existingSegment != null) {
System.out.println("策略2成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略3: 基于业务键查询beginNumber和endNumber通常是唯一的业务组合
if (rows == 0) {
System.out.println("策略3: 尝试根据业务键查询beginNumber=" + invoiceSegment.getBeginNumber() + ", endNumber=" + invoiceSegment.getEndNumber());
LambdaQueryWrapper<InvoiceSegment> businessWrapper = new LambdaQueryWrapper<>();
businessWrapper.eq(InvoiceSegment::getBeginNumber, invoiceSegment.getBeginNumber());
businessWrapper.eq(InvoiceSegment::getEndNumber, invoiceSegment.getEndNumber());
businessWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
InvoiceSegment existingSegment = invoiceSegmentMapper.selectOne(businessWrapper);
if (existingSegment != null) {
System.out.println("策略3成功: 找到匹配的记录原始id=" + existingSegment.getId() + ", segmentId=" + existingSegment.getSegmentId());
invoiceSegment.setId(existingSegment.getId());
invoiceSegment.setSegmentId(existingSegment.getSegmentId()); // 确保segmentId正确
rows = invoiceSegmentMapper.updateById(invoiceSegment);
System.out.println("更新结果: 影响行数=" + rows);
}
}
// 策略4: 如果是特定场景下的已知ID问题添加特殊处理逻辑
if (rows == 0) {
System.out.println("策略4: 检查是否需要特殊处理");
// 检查是否是之前日志中提到的ID问题
if ("1990329963367977000".equals(invoiceSegment.getSegmentId() + "")) {
System.out.println("检测到特殊ID模式尝试替代查询");
// 这里可以添加更具体的替代查询逻辑
}
}
// 增强调试信息:显示当前表中所有可能相关的记录
if (rows == 0) {
System.out.println("所有查询策略都失败了,显示表中相关记录:");
// 查询条件可以根据实际情况调整
LambdaQueryWrapper<InvoiceSegment> debugWrapper = new LambdaQueryWrapper<>();
debugWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
// 可以添加时间范围或其他条件来限制结果数量
debugWrapper.last("LIMIT 10");
List<InvoiceSegment> segments = invoiceSegmentMapper.selectList(debugWrapper);
for (InvoiceSegment seg : segments) {
System.out.println("记录: id=" + seg.getId() + ", segmentId=" + seg.getSegmentId() + ", beginNumber=" + seg.getBeginNumber() + ", endNumber=" + seg.getEndNumber());
}
System.out.println("提示: 请检查前端传递的ID是否与数据库中的记录匹配");
}
}
System.out.println("===== 更新发票段结束 ==== 最终结果: " + (rows > 0 ? "成功" : "失败"));
return rows;
}
/**
* 删除发票段
*/
@Override
public int deleteInvoiceSegmentByIds(Long[] ids) {
System.out.println("删除发票段IDs: " + java.util.Arrays.toString(ids));
List<Long> idList = java.util.Arrays.asList(ids);
System.out.println("删除ID列表: " + idList);
// 检查记录是否存在且未被删除 - 先尝试通过id查找
LambdaQueryWrapper<InvoiceSegment> checkWrapper = new LambdaQueryWrapper<>();
checkWrapper.in(InvoiceSegment::getId, idList);
checkWrapper.eq(InvoiceSegment::getDeleteFlag, "0"); // 检查未被删除的记录
List<InvoiceSegment> existingRecords = invoiceSegmentMapper.selectList(checkWrapper);
System.out.println("通过id检查到的未删除记录数: " + existingRecords.size());
// 如果通过id没有找到记录尝试通过segment_id查找
if (existingRecords.isEmpty()) {
System.out.println("通过id未找到记录尝试通过segment_id查找");
LambdaQueryWrapper<InvoiceSegment> segmentIdWrapper = new LambdaQueryWrapper<>();
segmentIdWrapper.in(InvoiceSegment::getSegmentId, idList);
segmentIdWrapper.eq(InvoiceSegment::getDeleteFlag, "0");
existingRecords = invoiceSegmentMapper.selectList(segmentIdWrapper);
System.out.println("通过segment_id检查到的未删除记录数: " + existingRecords.size());
// 如果通过segment_id找到了记录使用这些记录的id进行删除
if (!existingRecords.isEmpty()) {
List<Long> actualIds = existingRecords.stream()
.map(InvoiceSegment::getId)
.collect(java.util.stream.Collectors.toList());
System.out.println("使用实际id列表进行删除: " + actualIds);
int rows = invoiceSegmentMapper.deleteBatchIds(actualIds);
System.out.println("删除影响行数: " + rows);
return rows;
}
}
// 直接通过id删除
int rows = invoiceSegmentMapper.deleteBatchIds(idList);
System.out.println("删除影响行数: " + rows);
return rows;
}
}

View File

@@ -2,17 +2,18 @@ package com.openhis.administration.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.core.common.utils.SecurityUtils; import com.core.common.utils.SecurityUtils;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.domain.Supplier; import com.openhis.administration.domain.Supplier;
import com.openhis.administration.mapper.InvoiceMapper;
import com.openhis.administration.service.IInvoiceService;
import com.openhis.common.enums.SupplyStatus; import com.openhis.common.enums.SupplyStatus;
import com.openhis.workflow.domain.SupplyRequest; import com.openhis.workflow.domain.SupplyRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.administration.domain.Invoice;
import com.openhis.administration.mapper.InvoiceMapper;
import com.openhis.administration.service.IInvoiceService;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@@ -30,6 +31,7 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
* @param invoice 发票实体 * @param invoice 发票实体
* @return * @return
*/ */
@Override
public Long addInvoice(Invoice invoice){ public Long addInvoice(Invoice invoice){
// 根据编码判断发票是否存在 // 根据编码判断发票是否存在
List<Invoice> invoices = List<Invoice> invoices =
@@ -46,4 +48,26 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
return invoice.getId(); return invoice.getId();
} }
/**
* 分页查询发票列表(带用户角色权限过滤)
*
* @param page 分页参数
* @param isAdmin 是否管理员
* @param userId 当前用户ID
* @return 发票列表
*/
@Override
public IPage<Invoice> selectInvoicePage(Page<Invoice> page, boolean isAdmin, Long userId) {
LambdaQueryWrapper<Invoice> queryWrapper = new LambdaQueryWrapper<>();
// 如果不是管理员,只查询当前用户创建的发票
if (!isAdmin) {
queryWrapper.eq(Invoice::getInvoicingStaffId, userId);
}
// 按创建时间降序排序
queryWrapper.orderByDesc(Invoice::getCreateTime);
return baseMapper.selectPage(page, queryWrapper);
}
} }

View File

@@ -0,0 +1,241 @@
package com.openhis.administration.service.impl;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openhis.administration.domain.OutpatientNoSegment;
import com.openhis.administration.mapper.OutpatientNoSegmentMapper;
import com.openhis.administration.service.IOutpatientNoSegmentService;
/**
* 门诊号码段管理Service实现
*
* @author system
* @date 2025-01-XX
*/
@Service
public class OutpatientNoSegmentServiceImpl implements IOutpatientNoSegmentService {
@Autowired
private OutpatientNoSegmentMapper outpatientNoSegmentMapper;
/**
* 分页查询门诊号码段列表
*/
@Override
public Page<OutpatientNoSegment> selectOutpatientNoSegmentPage(Page<OutpatientNoSegment> page, boolean onlySelf, Long userId) {
LambdaQueryWrapper<OutpatientNoSegment> queryWrapper = new LambdaQueryWrapper<>();
// 如果不是管理员,只查询自己的号码段
if (onlySelf && userId != null) {
queryWrapper.eq(OutpatientNoSegment::getOperatorId, userId);
}
// 按创建时间正序排列(新记录排在后面)
queryWrapper.orderByAsc(OutpatientNoSegment::getCreateTime);
return outpatientNoSegmentMapper.selectPage(page, queryWrapper);
}
/**
* 新增门诊号码段
*/
@Override
public int insertOutpatientNoSegment(OutpatientNoSegment outpatientNoSegment) {
return outpatientNoSegmentMapper.insert(outpatientNoSegment);
}
/**
* 修改门诊号码段
*/
@Override
public int updateOutpatientNoSegment(OutpatientNoSegment outpatientNoSegment) {
return outpatientNoSegmentMapper.updateById(outpatientNoSegment);
}
/**
* 删除门诊号码段
*/
@Override
public int deleteOutpatientNoSegmentByIds(Long[] ids) {
if (ids == null || ids.length == 0) {
return 0;
}
return outpatientNoSegmentMapper.deleteBatchIds(java.util.Arrays.asList(ids));
}
/**
* 根据ID查询门诊号码段
* 注意:由于 @TableLogic 注解selectById 会自动过滤已删除的记录delete_flag = '1'
* 这意味着如果记录已经被软删除,此方法会返回 null
*/
@Override
public OutpatientNoSegment getById(Long id) {
System.out.println("=== 查询门诊号码段开始 ===");
System.out.println("查询ID: " + id);
System.out.println("ID类型: " + (id != null ? id.getClass().getName() : "null"));
System.out.println("ID值字符串: " + String.valueOf(id));
// 使用 selectById 查询(会自动过滤 delete_flag = '1' 的记录)
OutpatientNoSegment segment = outpatientNoSegmentMapper.selectById(id);
if (segment != null) {
System.out.println("查询成功 - 找到记录:");
System.out.println(" - 记录ID: " + segment.getId());
System.out.println(" - 操作员ID: " + segment.getOperatorId());
System.out.println(" - 起始号码: " + segment.getStartNo());
System.out.println(" - 终止号码: " + segment.getEndNo());
System.out.println(" - 使用号码: " + segment.getUsedNo());
} else {
System.out.println("查询失败 - 未找到记录");
System.out.println("可能原因:");
System.out.println(" 1. 记录不存在");
System.out.println(" 2. 记录已被软删除delete_flag = '1'");
System.out.println(" 3. ID 不匹配");
// 尝试直接查询数据库(包括已删除的记录)来验证记录是否存在
try {
LambdaQueryWrapper<OutpatientNoSegment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(OutpatientNoSegment::getId, id);
// 注意:这里仍然会受到 @TableLogic 的影响,无法查询已删除的记录
// 如果需要查询已删除的记录,需要使用原生 SQL 或禁用逻辑删除
OutpatientNoSegment segmentWithDeleted = outpatientNoSegmentMapper.selectOne(queryWrapper);
if (segmentWithDeleted != null) {
System.out.println("使用 LambdaQueryWrapper 查询结果: 找到记录ID=" + segmentWithDeleted.getId());
} else {
System.out.println("使用 LambdaQueryWrapper 查询结果: 未找到记录");
}
} catch (Exception e) {
System.out.println("使用 LambdaQueryWrapper 查询时出错: " + e.getMessage());
}
// 尝试查询所有记录(不限制 delete_flag来验证 ID 是否存在
// 注意:由于 @TableLogic无法直接查询已删除的记录
// 但我们可以查询所有未删除的记录,看看是否有类似的 ID
try {
LambdaQueryWrapper<OutpatientNoSegment> allQuery = new LambdaQueryWrapper<>();
// 查询所有未删除的记录
List<OutpatientNoSegment> allSegments = outpatientNoSegmentMapper.selectList(allQuery);
System.out.println("数据库中所有未删除的记录数: " + allSegments.size());
System.out.println("所有记录的 ID 列表:");
for (OutpatientNoSegment seg : allSegments) {
System.out.println(" - ID: " + seg.getId() + " (类型: " + seg.getId().getClass().getName() + ")");
// 检查是否有接近的 ID可能是精度问题
if (seg.getId() != null) {
String segIdStr = String.valueOf(seg.getId());
String searchIdStr = String.valueOf(id);
if (segIdStr.length() == searchIdStr.length() &&
segIdStr.substring(0, Math.min(10, segIdStr.length())).equals(
searchIdStr.substring(0, Math.min(10, searchIdStr.length())))) {
System.out.println(" 警告:发现相似的 ID");
}
}
}
} catch (Exception e) {
System.out.println("查询所有记录时出错: " + e.getMessage());
}
}
System.out.println("=== 查询门诊号码段结束 ===");
return segment;
}
/**
* 检查号码段是否重复(全系统范围)
* 规则:从末位往前找到第一个字母作为前缀,比较前缀和数字范围
*/
@Override
public boolean checkNumberSegmentOverlap(String startNo, String endNo, Long excludeId) {
if (startNo == null || endNo == null) {
return false;
}
// 提取前缀(从末位往前找到第一个字母)
String prefix1 = extractPrefix(startNo);
String prefix2 = extractPrefix(endNo);
// 前缀必须一致
if (!prefix1.equals(prefix2)) {
return false;
}
// 提取尾部数字
Long num1 = extractTailNumber(startNo);
Long num2 = extractTailNumber(endNo);
if (num1 == null || num2 == null || num1 > num2) {
return false;
}
// 查询所有相同前缀的号码段
LambdaQueryWrapper<OutpatientNoSegment> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.likeRight(OutpatientNoSegment::getStartNo, prefix1);
if (excludeId != null) {
queryWrapper.ne(OutpatientNoSegment::getId, excludeId);
}
List<OutpatientNoSegment> segments = outpatientNoSegmentMapper.selectList(queryWrapper);
// 检查是否有重叠
for (OutpatientNoSegment segment : segments) {
String otherPrefix = extractPrefix(segment.getStartNo());
if (!prefix1.equals(otherPrefix)) {
continue;
}
Long otherNum1 = extractTailNumber(segment.getStartNo());
Long otherNum2 = extractTailNumber(segment.getEndNo());
if (otherNum1 != null && otherNum2 != null) {
// 检查范围是否重叠
if (Math.max(num1, otherNum1) <= Math.min(num2, otherNum2)) {
return true;
}
}
}
return false;
}
/**
* 从末位往前找到第一个字母,返回前缀(包含该字母)
*/
private String extractPrefix(String value) {
if (value == null || value.isEmpty()) {
return "";
}
char[] chars = value.toCharArray();
for (int i = chars.length - 1; i >= 0; i--) {
if (Character.isLetter(chars[i])) {
return value.substring(0, i + 1);
}
}
return "";
}
/**
* 提取尾部数字
*/
private Long extractTailNumber(String value) {
if (value == null || value.isEmpty()) {
return null;
}
Pattern pattern = Pattern.compile("(\\d+)$");
Matcher matcher = pattern.matcher(value);
if (matcher.find()) {
try {
return Long.parseLong(matcher.group(1));
} catch (NumberFormatException e) {
return null;
}
}
return null;
}
}

View File

@@ -0,0 +1,74 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 检查方法
*
* @author system
* @date 2025-07-22
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_method", autoResultMap = true)
public class CheckMethod {
private static final long serialVersionUID = 1L;
/**
* 检查方法ID
*/
@TableId(type = IdType.AUTO)
private Integer id;
/* 检查类型 */
private String checkType;
/* 方法代码 */
private String code;
/* 方法名称 */
private String name;
/* 套餐名称 */
private String packageName;
/* 曝光次数 */
private Integer exposureNum;
/* 序号 */
private Integer orderNum;
/* 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,127 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 检查套餐
*
* @author system
* @date 2025-07-22
* @updated 2025-11-26 - 扩展字段以支持套餐设置PRD需求
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_package", autoResultMap = true)
public class CheckPackage {
private static final long serialVersionUID = 1L;
/** 检查套餐ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 套餐名称 */
@TableField("package_name")
private String packageName;
/** 套餐编码 */
private String code;
/** 套餐类别 */
@TableField("package_type")
private String packageType;
/** 套餐级别 (1:全院套餐 2:科室套餐 3:个人套餐) */
@TableField("package_level")
private String packageLevel;
/** 适用科室 (当套餐级别为科室套餐时必填) */
@TableField("department")
private String department;
/** 适用用户 (当套餐级别为个人套餐时必填) */
@TableField("\"user\"")
private String user;
/** 卫生机构 */
@TableField("organization")
private String organization;
/** 套餐金额 */
@TableField("package_price")
private BigDecimal packagePrice;
/** 折扣 (百分比) */
@TableField("discount")
private BigDecimal discount;
/** 制单人 */
@TableField("creator")
private String creator;
/** 是否停用 (0:启用 1:停用) */
@TableField("is_disabled")
private Integer isDisabled;
/** 显示套餐名 (0:否 1:是) */
@TableField("show_package_name")
private Integer showPackageName;
/** 生成服务费 (0:否 1:是) */
@TableField("generate_service_fee")
private Integer generateServiceFee;
/** 套餐价格启用状态 (0:不启用 1:启用) */
@TableField("package_price_enabled")
private Integer packagePriceEnabled;
/** 服务费 */
@TableField("service_fee")
private BigDecimal serviceFee;
/** 备注 */
private String remark;
/** 描述 */
private String description;
/** 序号 */
private Integer number;
/** 套餐维护日期 (系统自动生成) */
@TableField("maintain_date")
private LocalDate maintainDate;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,95 @@
package com.openhis.check.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 lombok.Data;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 检查套餐明细表
*
* @author system
* @date 2025-11-26
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_package_detail", autoResultMap = true)
public class CheckPackageDetail {
private static final long serialVersionUID = 1L;
/** 套餐明细ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 套餐ID */
private Long packageId;
/** 项目编号 */
private String itemCode;
/** 项目名称/规格 */
private String itemName;
/** 检查项目ID(诊疗项目ID) */
private Long checkItemId;
/** 剂量 */
private String dose;
/** 途径 */
private String method;
/** 频次 */
private String frequency;
/** 天数 */
private String days;
/** 数量 */
private Integer quantity;
/** 单价 */
private BigDecimal unitPrice;
/** 金额 */
private BigDecimal amount;
/** 服务费 */
private BigDecimal serviceCharge;
/** 总金额 */
private BigDecimal total;
/** 产地 */
private String origin;
/** 序号 */
private Integer orderNum;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
@TableField(exist = false)
private String deleteFlag;
}

View File

@@ -0,0 +1,81 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 检查部位
*
* @author system
* @date 2025-07-22
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_part", autoResultMap = true)
public class CheckPart {
private static final long serialVersionUID = 1L;
/** 检查部位ID */
@TableId(type = IdType.AUTO)
private Integer id;
/** 检查部位名称 */
private String name;
/** 检查部位编码 */
private String code;
/** 检查部位检查类型 */
private String checkType;
/** 曝光次数 */
private Integer exposureNum;
/** 费用套餐 */
private String packageName;
/** 金额 */
private Double price;
/** 序号 */
private Integer number;
/** 服务范围 */
private String serviceScope;
/** 下级医技类型 */
private String subType;
/** 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,73 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 检查类型
*
* @author system
* @date 2025-07-22
*/
@Data
@Accessors(chain = true)
@TableName(value = "check_type", autoResultMap = true)
public class CheckType {
private static final long serialVersionUID = 1L;
/** 检查类型ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 检查类型名称 */
private String name;
/** 检查类型编码 */
private String code;
/** 检查类型 */
private String type;
/** 是否选中 */
private Boolean selected;
/** 科室 */
private String department;
/** 序号 */
private Integer number;
/** 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
/**
* 禁用逻辑删除因为数据库表中没有delete_flag字段
*/
@TableField(exist = false)
private String deleteFlag;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,40 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
@Accessors(chain = true)
@TableName(value = "lis_group_info",autoResultMap = true)
public class LisGroupInfo {
/** id */
@TableId(type = IdType.AUTO)
private Integer id;
/** 卫生机构 */
private String hospital;
/** 创建日期 */
private LocalDate date;
/** LIS分组名称 */
private String groupName;
/** 采血管类型 */
private String tube;
/** 备注 */
private String remark;
/** 创建时间 */
private LocalDateTime createTime;
/** 更新时间 */
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,33 @@
package com.openhis.check.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.core.common.core.domain.HisBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 套餐项目关系表
*
* @author system
* @date 2025-07-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("package_item")
public class PackageItem extends HisBaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private Long id;
/** 套餐ID */
private Long packageId;
/** 检查项目ID */
private Long checkItemId;
/** 项目类型1检查类型 2检查方法 3检查部位 */
private Integer itemType;
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckMethod;
import org.springframework.stereotype.Repository;
/**
* 检查方法Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckMethodMapper extends BaseMapper<CheckMethod> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckPackageDetail;
import org.apache.ibatis.annotations.Mapper;
/**
* 检查套餐明细Mapper接口
*
* @author system
* @date 2025-11-26
*/
@Mapper
public interface CheckPackageDetailMapper extends BaseMapper<CheckPackageDetail> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckPackage;
import org.springframework.stereotype.Repository;
/**
* 检查套餐Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckPackageMapper extends BaseMapper<CheckPackage> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckPart;
import org.springframework.stereotype.Repository;
/**
* 检查部位Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckPartMapper extends BaseMapper<CheckPart> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.CheckType;
import org.springframework.stereotype.Repository;
/**
* 检查类型Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface CheckTypeMapper extends BaseMapper<CheckType> {
}

View File

@@ -0,0 +1,9 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.LisGroupInfo;
import org.springframework.stereotype.Repository;
@Repository
public interface LisGroupInfoMapper extends BaseMapper<LisGroupInfo> {
}

View File

@@ -0,0 +1,16 @@
package com.openhis.check.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.check.domain.PackageItem;
import org.springframework.stereotype.Repository;
/**
* 套餐项目关系表Mapper接口
*
* @author system
* @date 2025-07-22
*/
@Repository
public interface PackageItemMapper extends BaseMapper<PackageItem> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckMethod;
/**
* 检查方法Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckMethodService extends IService<CheckMethod> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckPackageDetail;
/**
* 检查套餐明细Service接口
*
* @author system
* @date 2025-11-26
*/
public interface ICheckPackageDetailService extends IService<CheckPackageDetail> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckPackage;
/**
* 检查套餐Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckPackageService extends IService<CheckPackage> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckPart;
/**
* 检查部位Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckPartService extends IService<CheckPart> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.CheckType;
/**
* 检查类型Service接口
*
* @author system
* @date 2025-07-22
*/
public interface ICheckTypeService extends IService<CheckType> {
}

View File

@@ -0,0 +1,6 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.LisGroupInfo;
public interface ILisGroupInfoService extends IService<LisGroupInfo>{
}

View File

@@ -0,0 +1,14 @@
package com.openhis.check.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.check.domain.PackageItem;
/**
* 套餐项目关系表Service接口
*
* @author system
* @date 2025-07-22
*/
public interface IPackageItemService extends IService<PackageItem> {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckMethod;
import com.openhis.check.mapper.CheckMethodMapper;
import com.openhis.check.service.ICheckMethodService;
import org.springframework.stereotype.Service;
/**
* 检查方法Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckMethodServiceImpl extends ServiceImpl<CheckMethodMapper, CheckMethod> implements ICheckMethodService {
}

View File

@@ -0,0 +1,19 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckPackageDetail;
import com.openhis.check.mapper.CheckPackageDetailMapper;
import com.openhis.check.service.ICheckPackageDetailService;
import org.springframework.stereotype.Service;
/**
* 检查套餐明细Service实现
*
* @author system
* @date 2025-11-26
*/
@Service
public class CheckPackageDetailServiceImpl extends ServiceImpl<CheckPackageDetailMapper, CheckPackageDetail>
implements ICheckPackageDetailService {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckPackage;
import com.openhis.check.mapper.CheckPackageMapper;
import com.openhis.check.service.ICheckPackageService;
import org.springframework.stereotype.Service;
/**
* 检查套餐Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckPackageServiceImpl extends ServiceImpl<CheckPackageMapper, CheckPackage> implements ICheckPackageService {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckPart;
import com.openhis.check.mapper.CheckPartMapper;
import com.openhis.check.service.ICheckPartService;
import org.springframework.stereotype.Service;
/**
* 检查部位Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckPartServiceImpl extends ServiceImpl<CheckPartMapper, CheckPart> implements ICheckPartService {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.CheckType;
import com.openhis.check.mapper.CheckTypeMapper;
import com.openhis.check.service.ICheckTypeService;
import org.springframework.stereotype.Service;
/**
* 检查类型Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class CheckTypeServiceImpl extends ServiceImpl<CheckTypeMapper, CheckType> implements ICheckTypeService {
}

View File

@@ -0,0 +1,12 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.mapper.LisGroupInfoMapper;
import com.openhis.check.domain.LisGroupInfo;
import com.openhis.check.service.ILisGroupInfoService;
import org.springframework.stereotype.Service;
@Service
public class LisGroupInfoServiceImpl extends ServiceImpl<LisGroupInfoMapper,LisGroupInfo> implements ILisGroupInfoService{
}

View File

@@ -0,0 +1,18 @@
package com.openhis.check.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.check.domain.PackageItem;
import com.openhis.check.mapper.PackageItemMapper;
import com.openhis.check.service.IPackageItemService;
import org.springframework.stereotype.Service;
/**
* 套餐项目关系表Service实现类
*
* @author system
* @date 2025-07-22
*/
@Service
public class PackageItemServiceImpl extends ServiceImpl<PackageItemMapper, PackageItem> implements IPackageItemService {
}

View File

@@ -0,0 +1,72 @@
package com.openhis.lab.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 检验类型
*
* @author system
* @date 2025-12-09
*/
@Data
@Accessors(chain = true)
@TableName(value = "inspection_type", autoResultMap = true)
public class InspectionType {
private static final long serialVersionUID = 1L;
/** 主键ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 检验类型编码 */
private String code;
/** 检验类型名称 */
private String name;
/** 所属科室 */
private String department;
/** 排序 */
@TableField("\"order\"")
private Integer sortOrder;
/** 备注 */
private String remark;
/** 有效标志1有效0无效 */
@TableField("valid_flag")
@TableLogic(value = "1", delval = "0")
private Integer validFlag;
/** 创建时间 */
@TableField("created_at")
private LocalDateTime createdAt;
/** 更新时间 */
@TableField("updated_at")
private LocalDateTime updatedAt;
/** 版本号 */
private Integer version;
/**
* 以下字段数据库表中不存在用于禁用MyBatis Plus自动添加的字段
*/
@TableField(exist = false)
private String createBy;
@TableField(exist = false)
private String updateBy;
@TableField(exist = false)
private Integer tenantId;
}

View File

@@ -0,0 +1,16 @@
package com.openhis.lab.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.lab.domain.InspectionType;
import org.springframework.stereotype.Repository;
/**
* 检验类型Mapper接口
*
* @author system
* @date 2025-12-09
*/
@Repository
public interface InspectionTypeMapper extends BaseMapper<InspectionType> {
}

View File

@@ -0,0 +1,14 @@
package com.openhis.lab.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.lab.domain.InspectionType;
/**
* 检验类型Service接口
*
* @author system
* @date 2025-12-09
*/
public interface IInspectionTypeService extends IService<InspectionType> {
}

View File

@@ -0,0 +1,18 @@
package com.openhis.lab.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.openhis.lab.domain.InspectionType;
import com.openhis.lab.mapper.InspectionTypeMapper;
import com.openhis.lab.service.IInspectionTypeService;
import org.springframework.stereotype.Service;
/**
* 检验类型Service实现类
*
* @author system
* @date 2025-12-09
*/
@Service
public class InspectionTypeServiceImpl extends ServiceImpl<InspectionTypeMapper, InspectionType> implements IInspectionTypeService {
}

View File

@@ -4,4 +4,14 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.administration.mapper.OrganizationMapper"> <mapper namespace="com.openhis.administration.mapper.OrganizationMapper">
<!-- 自定义selectById方法确保包含所有字段包括新增字段 -->
<select id="selectById" parameterType="java.lang.Long" resultType="com.openhis.administration.domain.Organization">
SELECT id, bus_no, name, active_flag, type_enum, class_enum, py_str, wb_str,
yb_no, yb_name, caty, display_order, medins_id, medins_admdvs,
medins_type, medins_lv, def_doctor_id, create_by, create_time,
update_by, update_time, tenant_id, delete_flag,
register_flag, location, intro, remark
FROM adm_organization
WHERE id = #{id} AND delete_flag = '0'
</select>
</mapper> </mapper>

View File

@@ -2,7 +2,10 @@
VITE_APP_TITLE = 医院信息管理系统 VITE_APP_TITLE = 医院信息管理系统
# 开发环境配置 # 开发环境配置
VITE_APP_ENV = 'development' VITE_APP_ENV = 'dev'
# OpenHIS管理系统/开发环境 # OpenHIS管理系统/开发环境
VITE_APP_BASE_API = '/dev-api' VITE_APP_BASE_API = '/dev-api'
# 租户ID配置
VITE_APP_TENANT_ID = '1'

View File

@@ -2,10 +2,13 @@
VITE_APP_TITLE=医院信息管理系统 VITE_APP_TITLE=医院信息管理系统
# 生产环境配置 # 生产环境配置
VITE_APP_ENV=production VITE_APP_ENV= 'prod'
# OpenHIS管理系统/生产环境 # OpenHIS管理系统/生产环境
VITE_APP_BASE_API=/prod-api VITE_APP_BASE_API= '/prd-api'
# 租户ID配置
VITE_APP_TENANT_ID= '1'
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

View File

@@ -13,6 +13,9 @@ VITE_UPLOAD_TYPE=server
# OpenHIS管理系统/SPUG环境 # OpenHIS管理系统/SPUG环境
VITE_APP_BASE_API = '/admin-api' VITE_APP_BASE_API = '/admin-api'
# 租户ID配置
VITE_APP_TENANT_ID=1
# 是否删除debugger # 是否删除debugger
VITE_DROP_DEBUGGER=false VITE_DROP_DEBUGGER=false

View File

@@ -7,5 +7,8 @@ VITE_APP_ENV = 'staging'
# OpenHIS管理系统/生产环境 # OpenHIS管理系统/生产环境
VITE_APP_BASE_API = '/stage-api' VITE_APP_BASE_API = '/stage-api'
# 租户ID配置
VITE_APP_TENANT_ID=1
# 是否在打包时开启压缩,支持 gzip 和 brotli # 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip VITE_BUILD_COMPRESS = gzip

12
openhis-ui-vue3/.env.test Normal file
View File

@@ -0,0 +1,12 @@
# 页面标题
VITE_APP_TITLE = 医院信息管理系统
# 测试环境配置
VITE_APP_ENV = 'test'
# OpenHIS管理系统/测试环境
VITE_APP_BASE_API = '/test-api'
# 租户ID配置
VITE_APP_TENANT_ID = '1'

View File

@@ -44,7 +44,7 @@
"sass": "1.69.5", "sass": "1.69.5",
"unplugin-auto-import": "0.17.1", "unplugin-auto-import": "0.17.1",
"unplugin-vue-setup-extend-plus": "1.0.0", "unplugin-vue-setup-extend-plus": "1.0.0",
"vite": "5.0.4", "vite": "^5.0.4",
"vite-plugin-compression": "0.5.1", "vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons": "2.0.1" "vite-plugin-svg-icons": "2.0.1"
} }
@@ -7020,7 +7020,7 @@
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.0.4", "version": "5.0.4",
"resolved": "https://registry.npmmirror.com/vite/-/vite-5.0.4.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==", "integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
@@ -12419,7 +12419,7 @@
}, },
"vite": { "vite": {
"version": "5.0.4", "version": "5.0.4",
"resolved": "https://registry.npmmirror.com/vite/-/vite-5.0.4.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==", "integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
"dev": true, "dev": true,
"requires": { "requires": {

View File

@@ -6,9 +6,11 @@
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite --mode dev",
"build:prod": "vite build --mode production", "build:prod": "vite build --mode prod",
"build:stage": "vite build --mode staging", "build:stage": "vite build --mode staging",
"build:test": "vite build --mode test",
"build:dev": "vite build --mode dev",
"preview": "vite preview", "preview": "vite preview",
"build:spug": "vite build --mode spug" "build:spug": "vite build --mode spug"
}, },
@@ -52,7 +54,7 @@
"sass": "1.69.5", "sass": "1.69.5",
"unplugin-auto-import": "0.17.1", "unplugin-auto-import": "0.17.1",
"unplugin-vue-setup-extend-plus": "1.0.0", "unplugin-vue-setup-extend-plus": "1.0.0",
"vite": "5.0.4", "vite": "^5.0.4",
"vite-plugin-compression": "0.5.1", "vite-plugin-compression": "0.5.1",
"vite-plugin-svg-icons": "2.0.1" "vite-plugin-svg-icons": "2.0.1"
} }

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询检验类型列表
export function listInspectionType(query) {
return request({
url: '/system/inspection-type/list',
method: 'get',
params: query
})
}
// 查询检验类型详细
export function getInspectionType(inspectionTypeId) {
return request({
url: `/system/inspection-type/${inspectionTypeId}`,
method: 'get'
})
}
// 新增检验类型
export function addInspectionType(data) {
return request({
url: '/system/inspection-type',
method: 'post',
data: data
})
}
// 修改检验类型
export function updateInspectionType(data) {
return request({
url: '/system/inspection-type',
method: 'put',
data: data
})
}
// 删除检验类型
export function delInspectionType(inspectionTypeId) {
return request({
url: `/system/inspection-type/${inspectionTypeId}`,
method: 'delete'
})
}

View File

@@ -0,0 +1,239 @@
import request from '@/utils/request'
// 查询检查类型列表
export function listCheckType(query) {
return request({
url: '/system/check-type/list',
method: 'get',
params: query
})
}
// 查询检查类型详细
export function getCheckType(checkTypeId) {
return request({
url: '/system/check-type/' + checkTypeId,
method: 'get'
})
}
// 新增检查类型
export function addCheckType(data) {
return request({
url: '/system/check-type',
method: 'post',
data: data
})
}
// 修改检查类型
export function updateCheckType(data) {
return request({
url: '/system/check-type',
method: 'put',
data: data
})
}
// 删除检查类型
export function delCheckType(checkTypeId) {
return request({
url: '/system/check-type/' + checkTypeId,
method: 'delete'
})
}
// 查询检查方法列表
export function listCheckMethod(query) {
return request({
url: '/check/method/list',
method: 'get',
params: query
})
}
// 搜索检查方法列表
export function searchCheckMethod(query) {
return request({
url: '/check/method/search',
method: 'get',
params: query
})
}
// 新增检查方法
export function addCheckMethod(data) {
return request({
url: '/check/method/add',
method: 'post',
data: data
})
}
// 修改检查方法
export function updateCheckMethod(data) {
return request({
url: '/check/method/update',
method: 'put',
data: data
})
}
// 删除检查方法
export function delCheckMethod(checkMethodId) {
return request({
url: '/check/method/delete/' + checkMethodId,
method: 'delete'
})
}
// 导出检查方法
export function exportCheckMethod(query) {
return request({
url: '/check/method/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 导出检查部位
export function exportCheckPart(query) {
return request({
url: '/check/part/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 查询检查部位列表
export function listCheckPart(query) {
return request({
url: '/check/part/list',
method: 'get',
params: query
})
}
// 搜索检查部位列表
export function searchCheckPart(query) {
return request({
url: '/check/part/search',
method: 'get',
params: query
})
}
// 新增检查部位
export function addCheckPart(data) {
return request({
url: '/check/part/add',
method: 'post',
data: data
})
}
// 删除检查部位
export function delCheckPart(checkPartId) {
return request({
url: '/check/part/delete/' + checkPartId,
method: 'delete'
})
}
// 更新检查部位
export function updateCheckPart(data) {
return request({
url: '/check/part/update',
method: 'put',
data: data
})
}
// 查询检查套餐列表
export function listCheckPackage(query) {
return request({
url: '/system/check-package/list',
method: 'get',
params: query
})
}
// 根据ID查询检查套餐详情
export function getCheckPackage(id) {
return request({
url: `/system/check-package/${id}`,
method: 'get'
})
}
// 新增检查套餐
export function addCheckPackage(data) {
return request({
url: '/system/check-package',
method: 'post',
data: data
})
}
// 修改检查套餐
export function updateCheckPackage(data) {
return request({
url: '/system/check-package',
method: 'put',
data: data
})
}
// 删除检查套餐
export function delCheckPackage(id) {
return request({
url: `/system/check-package/${id}`,
method: 'delete'
})
}
// 查询LIS分组列表
export function listLisGroup(query) {
return request({
url: '/check/lisGroupInfo/list',
method: 'get',
params: query
})
}
// 根据ID查询LIS分组详情
export function getLisGroup(id) {
return request({
url: `/check/lisGroupInfo/${id}`,
method: 'get'
})
}
// 新增LIS分组
export function addLisGroup(data) {
return request({
url: '/check/lisGroupInfo/add',
method: 'post',
data: data
})
}
// 修改LIS分组
export function updateLisGroup(data) {
return request({
url: '/check/lisGroupInfo/update',
method: 'put',
data: data
})
}
// 删除LIS分组
export function delLisGroup(id) {
return request({
url: `/check/lisGroupInfo/${id}`,
method: 'delete'
})
}

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询检验类型列表
export function listInspectionType(query) {
return request({
url: '/system/inspection-type/list',
method: 'get',
params: query
})
}
// 查询检验类型详细
export function getInspectionType(inspectionTypeId) {
return request({
url: '/system/inspection-type/' + inspectionTypeId,
method: 'get'
})
}
// 新增检验类型
export function addInspectionType(data) {
return request({
url: '/system/inspection-type',
method: 'post',
data: data
})
}
// 修改检验类型
export function updateInspectionType(data) {
return request({
url: '/system/inspection-type',
method: 'put',
data: data
})
}
// 删除检验类型
export function delInspectionType(inspectionTypeId) {
return request({
url: '/system/inspection-type/' + inspectionTypeId,
method: 'delete'
})
}

View File

@@ -47,11 +47,6 @@ export const constantRoutes = [
component: () => import('@/views/register'), component: () => import('@/views/register'),
hidden: true hidden: true
}, },
{
path: "/:pathMatch(.*)*",
component: () => import('@/views/error/404'),
hidden: true
},
{ {
path: '/401', path: '/401',
component: () => import('@/views/error/401'), component: () => import('@/views/error/401'),
@@ -83,6 +78,20 @@ export const constantRoutes = [
meta: { title: '个人中心', icon: 'user' } meta: { title: '个人中心', icon: 'user' }
} }
] ]
},
// 添加套餐管理相关路由到公共路由,确保始终可用
{
path: '/maintainSystem/Inspection/PackageManagement',
component: Layout,
hidden: true,
children: [
{
path: '',
component: () => import('@/views/maintainSystem/Inspection/PackageManagement.vue'),
name: 'DirectPackageManagement',
meta: { title: '套餐管理' }
}
]
} }
] ]
@@ -134,6 +143,20 @@ export const constantRoutes = [
component: () => import('@/views/maintainSystem/chargeConfig/index.vue'), component: () => import('@/views/maintainSystem/chargeConfig/index.vue'),
name: 'ChargeConfig', name: 'ChargeConfig',
meta: { title: '挂号收费系统参数维护', icon: 'config', permissions: ['maintainSystem:chargeConfig:list'] } meta: { title: '挂号收费系统参数维护', icon: 'config', permissions: ['maintainSystem:chargeConfig:list'] }
},
{
path: 'Inspection',
component: () => import('@/views/maintainSystem/Inspection/index.vue'),
name: 'Inspection',
meta: { title: '检验管理', icon: 'inspection' },
children: [
{
path: 'PackageManagement',
component: () => import('@/views/maintainSystem/Inspection/PackageManagement.vue'),
name: 'PackageManagement',
meta: { title: '套餐管理' }
}
]
} }
] ]
}, },
@@ -345,6 +368,13 @@ export const constantRoutes = [
// 合并常量路由和动态路由,确保所有路由都能被访问 // 合并常量路由和动态路由,确保所有路由都能被访问
const allRoutes = [...constantRoutes, ...dynamicRoutes]; const allRoutes = [...constantRoutes, ...dynamicRoutes];
// 添加404路由到所有路由的最后
allRoutes.push({
path: "/:pathMatch(.*)*",
component: () => import('@/views/error/404'),
hidden: true
});
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),
routes: allRoutes, routes: allRoutes,

Some files were not shown because too many files have changed in this diff Show More