From 49b8a975a88ffb04795763400da392827915fab4 Mon Sep 17 00:00:00 2001 From: chenqi Date: Tue, 30 Dec 2025 13:52:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(invoice):=20=E5=AE=8C=E5=96=84=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E7=AE=A1=E7=90=86=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=92=8C=E6=A3=80=E9=AA=8C=E7=94=B3=E8=AF=B7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 超级管理员可以编辑操作员字段,普通用户不可编辑 - 修改权限判断逻辑,只有用户名等于 'admin' 的用户才是超级管理员 - 非超级管理员用户只能查询自己的发票数据 - 添加根据员工ID更新操作员名称功能 - 新增行时根据用户权限填充信息 - 严格检查权限,超级管理员可以删除所有记录,普通用户只能删除自己维护的记录 - 在 bargain 组件中验证患者选择 - 添加检验申请单相关API接口 - 在医生工作站中添加检验申请tab页 - 实现检验申请单的增删改查功能 - 添加公告通知已读记录相关功能 - 实现用户未读公告数量统计和标记已读功能 --- .../system/mapper/SysNoticeReadMapper.java | 70 + .../system/service/ISysNoticeReadService.java | 58 + .../impl/SysNoticeReadServiceImpl.java | 130 ++ .../mapper/system/SysNoticeReadMapper.xml | 63 + .../CallNumberVoiceConfigAppService.java | 2 + .../src/components/NoticePanel.vue | 249 +++ .../basicmanage/InvoiceManagement/index.vue | 90 +- .../bargain/component/adviceBaseList.vue | 5 + .../bargain/component/prescriptionlist.vue | 6 + .../src/views/doctorstation/components/api.js | 32 + .../inspection/inspectionApplication.vue | 1431 +++++++++++++++++ .../src/views/doctorstation/index.vue | 9 + .../src/views/triageandqueuemanage/api.js | 27 + .../callnumbervoice/index.vue | 754 +++++++++ .../2025-12-24/~$ Microsoft Word 文档.docx | Bin 0 -> 162 bytes ...025-12-30 add_column_sys_notice_publish_status.sql | 8 + .../2025-12-30 add_table_sys_notice_read.sql | 26 + .../202512241430add_table_call_number_voice.sql | 50 + 18 files changed, 2983 insertions(+), 27 deletions(-) create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysNoticeReadMapper.java create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/service/ISysNoticeReadService.java create mode 100644 openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysNoticeReadServiceImpl.java create mode 100644 openhis-server-new/core-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml create mode 100644 openhis-ui-vue3/src/components/NoticePanel.vue create mode 100644 openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue create mode 100644 openhis-ui-vue3/src/views/triageandqueuemanage/api.js create mode 100644 openhis-ui-vue3/src/views/triageandqueuemanage/callnumbervoice/index.vue create mode 100644 发版记录/2025-12-24/~$ Microsoft Word 文档.docx create mode 100644 迁移记录-DB变更记录/2025-12-30 add_column_sys_notice_publish_status.sql create mode 100644 迁移记录-DB变更记录/2025-12-30 add_table_sys_notice_read.sql create mode 100644 迁移记录-DB变更记录/202512241430add_table_call_number_voice.sql diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysNoticeReadMapper.java b/openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysNoticeReadMapper.java new file mode 100644 index 00000000..66c960dc --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/mapper/SysNoticeReadMapper.java @@ -0,0 +1,70 @@ +package com.core.system.mapper; + +import java.util.List; + +import com.core.system.domain.SysNoticeRead; + +/** + * 公告/通知已读记录 Mapper接口 + * + * @author system + */ +public interface SysNoticeReadMapper { + + /** + * 查询公告/通知已读记录 + * + * @param readId 阅读ID + * @return 公告/通知已读记录 + */ + public SysNoticeRead selectNoticeReadById(Long readId); + + /** + * 查询用户的已读公告/通知ID列表 + * + * @param userId 用户ID + * @return 已读公告/通知ID列表 + */ + public List selectReadNoticeIdsByUserId(Long userId); + + /** + * 查询公告/通知的已读用户数量 + * + * @param noticeId 公告/通知ID + * @return 已读用户数量 + */ + public int countReadByNoticeId(Long noticeId); + + /** + * 新增公告/通知已读记录 + * + * @param noticeRead 公告/通知已读记录 + * @return 结果 + */ + public int insertNoticeRead(SysNoticeRead noticeRead); + + /** + * 删除公告/通知已读记录 + * + * @param readId 阅读ID + * @return 结果 + */ + public int deleteNoticeReadById(Long readId); + + /** + * 批量删除公告/通知已读记录 + * + * @param readIds 需要删除的阅读ID + * @return 结果 + */ + public int deleteNoticeReadByIds(Long[] readIds); + + /** + * 检查用户是否已阅读公告/通知 + * + * @param noticeId 公告/通知ID + * @param userId 用户ID + * @return 是否已阅读 + */ + public boolean checkNoticeRead(Long noticeId, Long userId); +} diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/service/ISysNoticeReadService.java b/openhis-server-new/core-system/src/main/java/com/core/system/service/ISysNoticeReadService.java new file mode 100644 index 00000000..8abd2240 --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/service/ISysNoticeReadService.java @@ -0,0 +1,58 @@ +package com.core.system.service; + +import java.util.List; + +import com.core.common.core.domain.AjaxResult; +import com.core.system.domain.SysNotice; +import com.core.system.domain.SysNoticeRead; + +/** + * 公告/通知已读记录 服务层 + * + * @author system + */ +public interface ISysNoticeReadService { + + /** + * 查询用户的未读公告/通知数量 + * + * @param userId 用户ID + * @return 未读数量 + */ + public int getUnreadCount(Long userId); + + /** + * 标记公告/通知为已读 + * + * @param noticeId 公告/通知ID + * @param userId 用户ID + * @return 结果 + */ + public AjaxResult markAsRead(Long noticeId, Long userId); + + /** + * 批量标记公告/通知为已读 + * + * @param noticeIds 公告/通知ID列表 + * @param userId 用户ID + * @return 结果 + */ + public AjaxResult markAllAsRead(Long[] noticeIds, Long userId); + + /** + * 查询用户的已读公告/通知ID列表 + * + * @param userId 用户ID + * @return 已读公告/通知ID列表 + */ + public List selectReadNoticeIdsByUserId(Long userId); + + /** + * 查询带已读状态的公告列表 + * + * @param notice 公告信息 + * @param userId 用户ID + * @return 公告集合 + */ + public List selectNoticeListWithReadStatus(SysNotice notice, Long userId); +} diff --git a/openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysNoticeReadServiceImpl.java b/openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysNoticeReadServiceImpl.java new file mode 100644 index 00000000..4ea7f249 --- /dev/null +++ b/openhis-server-new/core-system/src/main/java/com/core/system/service/impl/SysNoticeReadServiceImpl.java @@ -0,0 +1,130 @@ +package com.core.system.service.impl; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.core.common.core.domain.AjaxResult; +import com.core.system.domain.SysNotice; +import com.core.system.domain.SysNoticeRead; +import com.core.system.mapper.SysNoticeMapper; +import com.core.system.mapper.SysNoticeReadMapper; +import com.core.system.service.ISysNoticeReadService; + +/** + * 公告/通知已读记录 服务层实现 + * + * @author system + */ +@Service +public class SysNoticeReadServiceImpl implements ISysNoticeReadService { + + @Autowired + private SysNoticeReadMapper noticeReadMapper; + + @Autowired + private SysNoticeMapper noticeMapper; + + /** + * 查询用户的未读公告/通知数量 + * + * @param userId 用户ID + * @return 未读数量 + */ + @Override + public int getUnreadCount(Long userId) { + // 查询所有状态为正常(0)的公告/通知 + SysNotice notice = new SysNotice(); + notice.setStatus("0"); + List allNotices = noticeMapper.selectNoticeList(notice); + + // 查询用户已读的公告/通知ID + List readNoticeIds = noticeReadMapper.selectReadNoticeIdsByUserId(userId); + + // 计算未读数量 + int unreadCount = 0; + for (SysNotice n : allNotices) { + if (!readNoticeIds.contains(n.getNoticeId())) { + unreadCount++; + } + } + + return unreadCount; + } + + /** + * 标记公告/通知为已读 + * + * @param noticeId 公告/通知ID + * @param userId 用户ID + * @return 结果 + */ + @Override + public AjaxResult markAsRead(Long noticeId, Long userId) { + // 检查是否已读 + boolean isRead = noticeReadMapper.checkNoticeRead(noticeId, userId); + if (isRead) { + return AjaxResult.success("已标记为已读"); + } + + // 插入已读记录 + SysNoticeRead noticeRead = new SysNoticeRead(); + noticeRead.setNoticeId(noticeId); + noticeRead.setUserId(userId); + + int result = noticeReadMapper.insertNoticeRead(noticeRead); + if (result > 0) { + return AjaxResult.success("标记成功"); + } + return AjaxResult.error("标记失败"); + } + + /** + * 批量标记公告/通知为已读 + * + * @param noticeIds 公告/通知ID列表 + * @param userId 用户ID + * @return 结果 + */ + @Override + public AjaxResult markAllAsRead(Long[] noticeIds, Long userId) { + int successCount = 0; + for (Long noticeId : noticeIds) { + boolean isRead = noticeReadMapper.checkNoticeRead(noticeId, userId); + if (!isRead) { + SysNoticeRead noticeRead = new SysNoticeRead(); + noticeRead.setNoticeId(noticeId); + noticeRead.setUserId(userId); + noticeReadMapper.insertNoticeRead(noticeRead); + successCount++; + } + } + return AjaxResult.success("成功标记" + successCount + "条记录为已读"); + } + + /** + * 查询用户的已读公告/通知ID列表 + * + * @param userId 用户ID + * @return 已读公告/通知ID列表 + */ + @Override + public List selectReadNoticeIdsByUserId(Long userId) { + return noticeReadMapper.selectReadNoticeIdsByUserId(userId); + } + + /** + * 查询带已读状态的公告列表 + * + * @param notice 公告信息 + * @param userId 用户ID + * @return 公告集合 + */ + @Override + public List selectNoticeListWithReadStatus(SysNotice notice, Long userId) { + // 这里可以扩展为在查询结果中添加已读状态标记 + // 暂时返回普通列表 + return noticeMapper.selectNoticeList(notice); + } +} diff --git a/openhis-server-new/core-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml b/openhis-server-new/core-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml new file mode 100644 index 00000000..e7ea7683 --- /dev/null +++ b/openhis-server-new/core-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + insert into sys_notice_read ( + read_id, + notice_id, + user_id, + read_time + ) values ( + (SELECT COALESCE(MAX(read_id), 0) + 1 FROM sys_notice_read), + #{noticeId}, + #{userId}, + now() + ) + + + + delete from sys_notice_read where read_id = #{readId} + + + + delete from sys_notice_read where read_id in + + #{readId} + + + + diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/triageandqueuemanage/appservice/CallNumberVoiceConfigAppService.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/triageandqueuemanage/appservice/CallNumberVoiceConfigAppService.java index a4f8e84b..8bedc12d 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/triageandqueuemanage/appservice/CallNumberVoiceConfigAppService.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/triageandqueuemanage/appservice/CallNumberVoiceConfigAppService.java @@ -7,4 +7,6 @@ public interface CallNumberVoiceConfigAppService { R addCallNumberVoiceConfig(CallNumberVoiceConfig callNumberVoiceConfig); R updateCallNumberVoiceConfig(CallNumberVoiceConfig callNumberVoiceConfig); + + R getCallNumberVoiceConfig(); } diff --git a/openhis-ui-vue3/src/components/NoticePanel.vue b/openhis-ui-vue3/src/components/NoticePanel.vue new file mode 100644 index 00000000..57dc1dcf --- /dev/null +++ b/openhis-ui-vue3/src/components/NoticePanel.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/openhis-ui-vue3/src/views/basicmanage/InvoiceManagement/index.vue b/openhis-ui-vue3/src/views/basicmanage/InvoiceManagement/index.vue index f94a16c6..52cf4e99 100644 --- a/openhis-ui-vue3/src/views/basicmanage/InvoiceManagement/index.vue +++ b/openhis-ui-vue3/src/views/basicmanage/InvoiceManagement/index.vue @@ -52,8 +52,23 @@ {{ index + 1 }}
- - {{ item.operator || '-' }} + + + {{ item.operator || '-' }}
@@ -180,7 +195,7 @@ export default { name: '', nickName: '', employeeId: '', - status: '' // 0: 启用(管理员), 1: 禁用(普通人员) + status: '' // 0: 启用, 1: 禁用(仅用于显示,不再控制权限) }, // 用户列表,用于操作员下拉选择(将在created中从后端获取) userList: [], @@ -195,10 +210,11 @@ export default { } }, computed: { - // 计算属性:判断是否为管理员 + // 计算属性:判断是否为超级管理员 isAdmin() { - // 管理员是指在用户管理界面中状态为启用的用户 - return this.currentUser.status === '0'; + // 只有用户名等于 'admin' 的用户才是超级管理员,可以查看所有数据 + const userStore = useUserStore(); + return userStore.name === 'admin'; } }, created() { @@ -260,14 +276,25 @@ export default { }, // 从后端加载发票数据 loadInvoiceData() { + // 准备查询参数 + const queryParams = { + pageNo: 1, + pageSize: 10000 // 进一步增大分页大小,确保能获取数据库中的所有记录 + }; + + // 非超级管理员用户只能查询自己的发票数据 + if (!this.isAdmin && this.currentUser.employeeId) { + queryParams.invoicingStaffId = this.currentUser.employeeId; + console.log('普通用户模式,只查询自己的发票数据,员工ID:', this.currentUser.employeeId); + } else { + console.log('超级管理员模式,查询所有发票数据'); + } + // 使用request工具从后端API获取发票段数据 request({ url: '/basicmanage/invoice-segment/page', // 更新为发票段的API路径 method: 'get', - params: { - pageNo: 1, - pageSize: 10000 // 进一步增大分页大小,确保能获取数据库中的所有记录 - } + params: queryParams }).then(res => { console.log('获取到的发票段数据响应:', res); // 添加更多调试信息 @@ -400,24 +427,24 @@ export default { } }); }, - // 根据用户权限过滤数据 + // 根据用户权限过滤数据(作为后端过滤的补充保障) filterDataByPermission() { - console.log('开始过滤数据,当前用户状态:', this.currentUser.status); + console.log('开始过滤数据,当前用户:', this.currentUser.name, '是否超级管理员:', this.isAdmin); console.log('过滤前数据总量:', this.invoiceData.length); - + if (this.isAdmin) { - // 管理员可以看到所有数据 - console.log('管理员模式,显示所有数据'); + // 超级管理员可以看到所有数据 + console.log('超级管理员模式,显示所有数据'); this.filteredData = [...this.invoiceData]; } else { - // 普通操作员只能看到自己的数据,确保类型一致 - console.log('操作员模式,过滤条件:', this.currentUser.employeeId); + // 普通用户只能看到自己的数据,确保类型一致 + console.log('普通用户模式,过滤条件:', this.currentUser.employeeId); const currentEmployeeId = String(this.currentUser.employeeId); - this.filteredData = this.invoiceData.filter(item => + this.filteredData = this.invoiceData.filter(item => String(item.employeeId) === currentEmployeeId ); } - + console.log('过滤后显示的数据量:', this.filteredData.length); }, @@ -440,6 +467,15 @@ export default { updateEmployeeId(item, employeeId) { item.employeeId = employeeId; }, + + // 根据员工ID更新操作员名称(超级管理员使用) + updateOperatorFromEmployeeId(item) { + if (item.employeeId) { + item.operator = this.getUserNameById(item.employeeId); + } else { + item.operator = ''; + } + }, // 根据员工ID获取用户名称 getUserNameById(employeeId) { @@ -449,7 +485,7 @@ export default { }, addNewRow() { - // 新增行时自动填充当前用户信息 + // 新增行时根据用户权限填充信息 // 使用负数作为临时ID,避免与后端数据库ID冲突 let maxId = 0; if (this.invoiceData.length > 0) { @@ -458,12 +494,12 @@ export default { const newId = -(maxId + 1); const newSegmentId = Date.now(); // 生成唯一的segmentId const currentDate = new Date().toISOString().split('T')[0]; - + const newRecord = { id: newId, segmentId: newSegmentId, // 为新记录设置segmentId - operator: this.currentUser.name, // 自动使用当前用户名称 - employeeId: this.currentUser.employeeId, + operator: this.isAdmin ? '' : this.currentUser.name, // 超级管理员可选择,普通用户自动填充 + employeeId: this.isAdmin ? '' : this.currentUser.employeeId, // 超级管理员可选择,普通用户自动填充 date: currentDate, // 自动填充当日日期 startNum: '', endNum: '', @@ -472,8 +508,8 @@ export default { isActive: true, // 新增行默认处于编辑状态 isNewRecord: true // 添加标记表示这是新记录 }; - - console.log('添加新行,自动填充领用日期为当日:', { newRecord }); + + console.log('添加新行:', this.isAdmin ? '超级管理员模式,可选择操作员' : '普通用户模式,自动填充当前用户信息', { newRecord }); this.invoiceData.push(newRecord); }, @@ -496,8 +532,8 @@ export default { return; } - // 严格检查权限:只能删除自己维护的发票号码段 - if (record.operator !== this.currentUser.name) { + // 严格检查权限:超级管理员可以删除所有记录,普通用户只能删除自己维护的发票号码段 + if (!this.isAdmin && record.operator !== this.currentUser.name) { alert('您没有权限删除此记录!只能删除自己维护的发票号码段。'); return; } diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue index c7cc7fea..34cd2444 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue @@ -70,6 +70,11 @@ watch( getList(); function getList() { + // 验证是否已选择患者 + if (!props.patientInfo || Object.keys(props.patientInfo).length === 0) { + return; // 不执行API调用 + } + queryParams.value.organizationId = props.patientInfo.orgId; getAdviceBaseInfo(queryParams.value).then((res) => { adviceBaseList.value = res.data.records; diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue index d1705d4c..2eb6f84a 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue @@ -412,6 +412,12 @@ function getRowDisabled(row) { // 新增医嘱 function handleAddPrescription() { + // 验证是否已选择患者 + if (!props.patientInfo || Object.keys(props.patientInfo).length === 0) { + proxy.$modal.msgWarning('请先选择患者'); + return; + } + if (isAdding.value) { proxy.$modal.msgWarning('请先保存当前医嘱'); return; diff --git a/openhis-ui-vue3/src/views/doctorstation/components/api.js b/openhis-ui-vue3/src/views/doctorstation/components/api.js index 4084a5bf..561a546e 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/api.js +++ b/openhis-ui-vue3/src/views/doctorstation/components/api.js @@ -795,3 +795,35 @@ export function getTestResult(queryParams) { params: queryParams, }); } + +/** + * 获取检验申请单列表 + */ +export function getInspectionApplicationList(queryParams) { + return request({ + url: '/doctor-station/inspection/application-list', + method: 'get', + params: queryParams, + }); +} + +/** + * 保存检验申请单 + */ +export function saveInspectionApplication(data) { + return request({ + url: '/doctor-station/inspection/application', + method: 'post', + data: data, + }); +} + +/** + * 删除检验申请单 + */ +export function deleteInspectionApplication(id) { + return request({ + url: '/doctor-station/inspection/application/' + id, + method: 'delete', + }); +} diff --git a/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue new file mode 100644 index 00000000..312e9737 --- /dev/null +++ b/openhis-ui-vue3/src/views/doctorstation/components/inspection/inspectionApplication.vue @@ -0,0 +1,1431 @@ + + + + + diff --git a/openhis-ui-vue3/src/views/doctorstation/index.vue b/openhis-ui-vue3/src/views/doctorstation/index.vue index f1582dd8..18a44eeb 100644 --- a/openhis-ui-vue3/src/views/doctorstation/index.vue +++ b/openhis-ui-vue3/src/views/doctorstation/index.vue @@ -161,6 +161,9 @@ + + + @@ -214,6 +217,7 @@ import PrescriptionInfo from './components/prescription/prescriptionInfo.vue'; import eprescriptionlist from './components/eprescriptionlist.vue'; import HospitalizationDialog from './components/hospitalizationDialog.vue'; import tcmAdvice from './components/tcm/tcmAdvice.vue'; +import inspectionApplication from './components/inspection/inspectionApplication.vue'; import { formatDate, formatDateStr } from '@/utils/index'; import useUserStore from '@/store/modules/user'; import { nextTick } from 'vue'; @@ -263,6 +267,7 @@ const registerTime = ref(formatDate(new Date())); const patientDrawerRef = ref(); const prescriptionRef = ref(); const tcmRef = ref(); +const inspectionRef = ref(); const emrRef = ref(); const diagnosisRef = ref(); const waitCount = ref(0); @@ -396,6 +401,9 @@ function handleClick(tab) { case 'tcm': tcmRef.value.getDiagnosisInfo(); break; + case 'inspection': + // 检验tab点击处理逻辑可以在这里添加 + break; case 'eprescription': eprescriptionRef.value.getList(); break; @@ -453,6 +461,7 @@ function handleCardClick(item, index) { nextTick(() => { prescriptionRef.value.getListInfo(); tcmRef.value.getListInfo(); + inspectionRef.value.getList(); diagnosisRef.value.getList(); eprescriptionRef.value.getList(); // emrRef.value.getDetail(item.encounterId); diff --git a/openhis-ui-vue3/src/views/triageandqueuemanage/api.js b/openhis-ui-vue3/src/views/triageandqueuemanage/api.js new file mode 100644 index 00000000..4c48b29e --- /dev/null +++ b/openhis-ui-vue3/src/views/triageandqueuemanage/api.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +// 查询叫号语音设置 +export function getCallNumberVoiceConfig() { + return request({ + url: '/CallNumberVoice/get', + method: 'get' + }) +} + +// 新增叫号语音设置 +export function addCallNumberVoiceConfig(data) { + return request({ + url: '/CallNumberVoice/add', + method: 'post', + data: data + }) +} + +// 修改叫号语音设置 +export function updateCallNumberVoiceConfig(data) { + return request({ + url: '/CallNumberVoice/update', + method: 'put', + data: data + }) +} \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/triageandqueuemanage/callnumbervoice/index.vue b/openhis-ui-vue3/src/views/triageandqueuemanage/callnumbervoice/index.vue new file mode 100644 index 00000000..e5452acd --- /dev/null +++ b/openhis-ui-vue3/src/views/triageandqueuemanage/callnumbervoice/index.vue @@ -0,0 +1,754 @@ + + + + + \ No newline at end of file diff --git a/发版记录/2025-12-24/~$ Microsoft Word 文档.docx b/发版记录/2025-12-24/~$ Microsoft Word 文档.docx new file mode 100644 index 0000000000000000000000000000000000000000..a29e778b942c51d643c3ab72cfb73e0d7a99a166 GIT binary patch literal 162 ccmZQANG#4yWFQf+G88Z*G88jp14&u~03ebCD*ylh literal 0 HcmV?d00001 diff --git a/迁移记录-DB变更记录/2025-12-30 add_column_sys_notice_publish_status.sql b/迁移记录-DB变更记录/2025-12-30 add_column_sys_notice_publish_status.sql new file mode 100644 index 00000000..09cc9678 --- /dev/null +++ b/迁移记录-DB变更记录/2025-12-30 add_column_sys_notice_publish_status.sql @@ -0,0 +1,8 @@ +-- 添加公告/通知发布状态字段 +ALTER TABLE sys_notice ADD COLUMN publish_status VARCHAR(1) DEFAULT '0'; + +-- 添加字段注释 +COMMENT ON COLUMN sys_notice.publish_status IS '发布状态(0未发布 1已发布)'; + +-- 更新现有数据为已发布状态 +UPDATE sys_notice SET publish_status = '1' WHERE publish_status IS NULL; diff --git a/迁移记录-DB变更记录/2025-12-30 add_table_sys_notice_read.sql b/迁移记录-DB变更记录/2025-12-30 add_table_sys_notice_read.sql new file mode 100644 index 00000000..88e13290 --- /dev/null +++ b/迁移记录-DB变更记录/2025-12-30 add_table_sys_notice_read.sql @@ -0,0 +1,26 @@ +-- 公告/通知已读记录表 +CREATE TABLE IF NOT EXISTS sys_notice_read ( + read_id BIGINT PRIMARY KEY, + notice_id BIGINT NOT NULL, + user_id BIGINT NOT NULL, + read_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT uk_notice_user UNIQUE (notice_id, user_id) +); + +COMMENT ON TABLE sys_notice_read IS '公告/通知已读记录表'; +COMMENT ON COLUMN sys_notice_read.read_id IS '阅读ID'; +COMMENT ON COLUMN sys_notice_read.notice_id IS '公告/通知ID'; +COMMENT ON COLUMN sys_notice_read.user_id IS '用户ID'; +COMMENT ON COLUMN sys_notice_read.read_time IS '阅读时间'; + +-- 创建序列 +CREATE SEQUENCE IF NOT EXISTS sys_notice_read_read_id_seq +INCREMENT 1 +MINVALUE 1 +MAXVALUE 99999999 +START 200 +CACHE 1; + +-- 索引 +CREATE INDEX IF NOT EXISTS idx_notice_read_notice_id ON sys_notice_read(notice_id); +CREATE INDEX IF NOT EXISTS idx_notice_read_user_id ON sys_notice_read(user_id); diff --git a/迁移记录-DB变更记录/202512241430add_table_call_number_voice.sql b/迁移记录-DB变更记录/202512241430add_table_call_number_voice.sql new file mode 100644 index 00000000..cde7a4cf --- /dev/null +++ b/迁移记录-DB变更记录/202512241430add_table_call_number_voice.sql @@ -0,0 +1,50 @@ +CREATE TABLE call_number_voice ( + id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, + play_count INT NOT NULL CHECK (play_count BETWEEN 1 AND 5), + call_prefix VARCHAR(20), + call_suffix VARCHAR(50), + speed VARCHAR(10) NOT NULL CHECK (speed IN ('较慢', '正常', '较快')), + volume INT NOT NULL CHECK (volume BETWEEN 0 AND 100), + interval_seconds INT NOT NULL, + cycle_broadcast BOOLEAN NOT NULL DEFAULT false, + create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + update_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + -- 核心约束:循环播放与间隔的逻辑关联 + CONSTRAINT chk_cycle_interval + CHECK ( + (cycle_broadcast = false AND interval_seconds = 0) + OR + (cycle_broadcast = true AND interval_seconds > 0) + ) +); + +-- 1. 添加表注释(PostgreSQL 语法) +COMMENT ON TABLE call_number_voice IS '叫号语音配置表'; + +-- 2. 逐个添加字段注释(PostgreSQL 语法) +COMMENT ON COLUMN call_number_voice.id IS '主键ID,自增'; +COMMENT ON COLUMN call_number_voice.play_count IS '播放次数(1-5次)'; +COMMENT ON COLUMN call_number_voice.call_prefix IS '叫号前缀(如“请”)'; +COMMENT ON COLUMN call_number_voice.call_suffix IS '叫号后缀(如“到1号窗口就诊”)'; +COMMENT ON COLUMN call_number_voice.speed IS '语速(较慢/正常/较快)'; +COMMENT ON COLUMN call_number_voice.volume IS '音量(0-100%)'; +COMMENT ON COLUMN call_number_voice.interval_seconds IS '播报间隔(秒)'; +COMMENT ON COLUMN call_number_voice.cycle_broadcast IS '是否循环播报(默认关闭)'; +COMMENT ON COLUMN call_number_voice.create_time IS '创建时间(自动填充当前时间)'; +COMMENT ON COLUMN call_number_voice.update_time IS '更新时间(自动更新)'; + +-- 实现update_time自动更新(PostgreSQL需通过触发器) +CREATE OR REPLACE FUNCTION update_call_number_voice_time() +RETURNS TRIGGER AS $$ +BEGIN + NEW.update_time = CURRENT_TIMESTAMP; +RETURN NEW; +END; +$$ LANGUAGE plpgsql; + +CREATE TRIGGER trigger_call_number_voice_update + BEFORE UPDATE ON call_number_voice + FOR EACH ROW + EXECUTE FUNCTION update_call_number_voice_time(); + +INSERT INTO call_number_voice (play_count, call_prefix, call_suffix, speed, volume, interval_seconds, cycle_broadcast) VALUES (2,'请','到诊室就诊','正常',80,10,TRUE); \ No newline at end of file