diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/CurrentDayEncounterDto.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/CurrentDayEncounterDto.java index a19db731..24c93272 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/CurrentDayEncounterDto.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/dto/CurrentDayEncounterDto.java @@ -147,10 +147,9 @@ public class CurrentDayEncounterDto { private String operatorName; /** - * 退号操作工号 + * 退号操作工号(用户账号) */ - @JsonSerialize(using = ToStringSerializer.class) - private Long operatorId; + private String operatorId; /** * 退款金额 diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml index ec489fd1..c915f408 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/chargemanage/OutpatientRegistrationAppMapper.xml @@ -96,7 +96,7 @@ T14.bill_date AS return_date, T14.refund_reason AS return_reason, T15."name" AS operator_name, - T14.enterer_id AS operator_id, + T17.user_name AS operator_id, ABS(T14.display_amount) AS refund_amount, T6.contract_no AS contract_no, T16.refund_method AS refund_method @@ -134,6 +134,7 @@ AND T14.status_enum = 3 AND T14.payment_enum = 1 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 ( SELECT reconciliation_id, diff --git a/openhis-ui-vue3/src/store/modules/user.js b/openhis-ui-vue3/src/store/modules/user.js index 5b9afd02..95c79331 100644 --- a/openhis-ui-vue3/src/store/modules/user.js +++ b/openhis-ui-vue3/src/store/modules/user.js @@ -52,7 +52,7 @@ const useUserStore = defineStore( this.roles = ['ROLE_DEFAULT'] } this.id = user.userId - this.name = user.userName + this.name = user.userName // 用户账号(对应数据库的user_name字段,如'admin') this.orgId = user.orgId this.orgName = user.orgName this.nickName = user.nickName diff --git a/openhis-ui-vue3/src/views/charge/outpatientregistration/components/refundDialog.vue b/openhis-ui-vue3/src/views/charge/outpatientregistration/components/refundDialog.vue index 9dbfc1a1..fe8d6b8c 100644 --- a/openhis-ui-vue3/src/views/charge/outpatientregistration/components/refundDialog.vue +++ b/openhis-ui-vue3/src/views/charge/outpatientregistration/components/refundDialog.vue @@ -206,9 +206,10 @@ function submit() { // 获取当前时间作为退号操作日期 const returnDate = formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss'); - // 获取当前用户信息作为操作工号(使用用户管理中的用户编号) - const operatorId = userStore.id || null; - const operatorName = userStore.name || userStore.nickName || ''; + // 获取当前用户信息作为操作工号(使用用户管理中的用户账号) + // userStore.name 对应后端的 userName(用户账号),如 'admin' + const operatorId = userStore.name || null; // 退号操作工号(用户账号) + const operatorName = userStore.nickName || userStore.name || ''; // 退号操作人姓名 // 计算退款总金额 const refundAmount = formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0);