From 50ceb98e83d9d14d16d7011b6ce4c8e47ade8556 Mon Sep 17 00:00:00 2001 From: HuangXinQuan Date: Wed, 11 Feb 2026 14:56:13 +0800 Subject: [PATCH] =?UTF-8?q?87=20=E9=97=A8=E8=AF=8A=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E7=AB=99-=E3=80=8B=E5=A2=9E=E5=8A=A0=E5=8C=BB=E7=94=9F?= =?UTF-8?q?=E5=B8=B8=E7=94=A8=E8=AF=AD=E7=BB=B4=E6=8A=A4=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=20=E5=8C=BB=E7=94=9F=E5=B8=B8=E7=94=A8=E8=AF=AD=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E5=AE=9E=E4=BD=93=E7=B1=BB=E7=BB=A7=E6=89=BF=E4=BA=86?= =?UTF-8?q?=E5=9F=BA=E7=B1=BBHisBaseEntity=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=87=8C=E9=9D=A2=E7=9A=84delete=5Fflag=E7=9A=84=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=BF=9B=E8=A1=8C=E9=80=BB=E8=BE=91=E5=88=A0=E9=99=A4?= =?UTF-8?q?=EF=BC=8C=E4=BF=9D=E7=95=99=E4=BA=86enable=5Fflag=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E6=96=B9=E4=BE=BF=E5=90=8E=E7=BB=AD=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E5=90=AF=E7=94=A8=E5=92=8C=E7=A6=81=E7=94=A8=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DoctorScheduleController.java | 9 +++++++++ .../appservice/impl/DoctorPhraseAppServiceImpl.java | 6 ++++++ .../java/com/openhis/template/domain/DoctorPhrase.java | 10 +++------- .../src/views/doctorstation/doctorphrase/index.vue | 10 ++++------ 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/controller/DoctorScheduleController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/controller/DoctorScheduleController.java index 77ab066a..2a7e8bf6 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/controller/DoctorScheduleController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/controller/DoctorScheduleController.java @@ -89,4 +89,13 @@ public class DoctorScheduleController { return R.ok(doctorScheduleAppService.getTodayDoctorScheduleList()); } + /* + * 获取当前登录医生今日排班List + * + * */ + @GetMapping("/today-my-schedule") + public R getTodayMySchedule() { + return doctorScheduleAppService.getTodayMySchedule(); + } + } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java index 64ba8ae2..ff763be5 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorPhraseAppServiceImpl.java @@ -27,6 +27,8 @@ public List getDoctorPhraseList() { log.debug("orgId: {}", orgId); } LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + // 添加启用状态过滤,只查询未被逻辑删除的记录 + wrapper.eq(DoctorPhrase::getEnableFlag, 1); // 1. 获取当前登录用户信息 Long userId = SecurityUtils.getUserId(); @@ -68,6 +70,8 @@ public List getDoctorPhraseList() { } String finalDeptCode = deptCode; LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + // 添加启用状态过滤,只查询未被逻辑删除的记录 + wrapper.eq(DoctorPhrase::getEnableFlag, 1); if (phraseName !=null && ObjectUtil.isNotEmpty(phraseName)) { wrapper.like(DoctorPhrase::getPhraseName, phraseName); } @@ -202,6 +206,8 @@ public List getDoctorPhraseList() { throw new SecurityException("无权操作:您只能删除自己创建的常用语"); } } + + // 使用MyBatis-Plus的内置逻辑删除功能 return doctorPhraseService.removeById(doctorPhraseId); } diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java index 0a15e4fe..ba303d11 100644 --- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java +++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/template/domain/DoctorPhrase.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.core.common.core.domain.HisBaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -14,8 +15,8 @@ import java.time.LocalDateTime; @Data @Accessors(chain = true) @TableName("adm_doctor_phrases") -@EqualsAndHashCode(callSuper = false) -public class DoctorPhrase { +@EqualsAndHashCode(callSuper = true) +public class DoctorPhrase extends HisBaseEntity { /** id */ @TableId(value = "id", type = IdType.AUTO) private Integer id; @@ -61,9 +62,4 @@ public class DoctorPhrase { /** 审核时间 */ private LocalDateTime auditTime; - /** 创建时间 */ - private LocalDateTime createTime; - - /** 更新时间 */ - private LocalDateTime updateTime; } diff --git a/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue b/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue index 9ec4fea7..6dac8b4f 100644 --- a/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/doctorphrase/index.vue @@ -394,10 +394,8 @@ const handleAdd = async () => { const formData = { ...addForm.value, phraseCode: 'PHR000', // 建议后端自动生成,前端可传空 - enableFlag: 1, - staffId: 1001, // 建议从登录态获取,不要硬编码 - deptCode: 'DEPT001', // 建议从登录态获取 - creatorId: 1001 // 建议从登录态获取 + enableFlag: 1 + // 不手动设置 createTime、updateTime 等审计字段,让后端自动填充 } // 调用新增接口 @@ -481,8 +479,8 @@ const handleEditSave = async () => { // 3. 准备数据 const updateData = { ...editForm.value, - enableFlag: 1, - updateTime: new Date().toISOString() + enableFlag: 1 + // 不手动设置 updateTime,让后端自动填充 } // 4. 调用接口