diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java index 23f4eba3c..c0579990b 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/appservice/impl/InHospitalRegisterAppServiceImpl.java @@ -467,8 +467,8 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS iAccountService.save(newCashAccount); } // 更新或创建非自费账户 - String typeCode = StringUtils.isNotEmpty(inHospitalInfoDto.getTypeCoce()) - ? inHospitalInfoDto.getTypeCoce() + String typeCode = StringUtils.isNotEmpty(inHospitalInfoDto.getTypeCode()) + ? inHospitalInfoDto.getTypeCode() : AccountType.PERSONAL_CASH_ACCOUNT.getCode(); if (contractAccount != null) { contractAccount.setContractNo(inHospitalInfoDto.getContractNo()); @@ -617,11 +617,12 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS accountPersonalCash.setBalanceAmount(inHospitalInfoDto.getBalanceAmount()); // 账户余额 // 自费 if (selfFundedFlag) { + accountPersonalCash.setContractNo(CommonConstants.BusinessName.DEFAULT_CONTRACT_NO); // 自费合同编码 accountPersonalCash.setEncounterFlag(Whether.YES.getValue()); } else { // 生成非自费的账号 Account accountNoSelfFunded = new Account(); - accountNoSelfFunded.setTypeCode(inHospitalInfoDto.getTypeCoce()); // 账户类型 + accountNoSelfFunded.setTypeCode(inHospitalInfoDto.getTypeCode()); // 账户类型 accountNoSelfFunded.setPatientId( inHospitalInfoDto.getPatientId() != null ? inHospitalInfoDto.getPatientId() : patient.getId()); // 患者id accountNoSelfFunded.setEncounterId(encounterReg.getId()); // 住院就诊id diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalInfoDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalInfoDto.java index 8cd19fe11..daf50d16d 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalInfoDto.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/inhospitalcharge/dto/InHospitalInfoDto.java @@ -133,7 +133,7 @@ public class InHospitalInfoDto { /** * 账户类型编码 */ - private String typeCoce; + private String typeCode; /** 账户余额 */ private BigDecimal balanceAmount; diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml index ad707cc1b..2cb8459b9 100755 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/mapper/inhospitalcharge/InHospitalRegisterAppMapper.xml @@ -38,7 +38,7 @@ AND aper.delete_flag = '0' LEFT JOIN adm_account AS aa ON aa.encounter_id = ae.ID AND aa.delete_flag = '0' - AND aa.type_code = '04' + AND aa.encounter_flag = 1 LEFT JOIN adm_encounter AS ambae ON ae.amb_encounter_id = ambae.ID LEFT JOIN adm_organization AS ao ON ao.ID = ambae.organization_id AND ao.delete_flag = '0' @@ -142,7 +142,7 @@ LEFT JOIN adm_account AS aa ON aa.encounter_id = ae.ID AND aa.delete_flag = '0' - AND aa.type_code = #{accountType} + AND aa.encounter_flag = 1 WHERE ae.ID = #{encounterId} diff --git a/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue b/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue index 10eeaf8f4..61fe1e594 100755 --- a/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue +++ b/healthlink-his-ui/src/views/doctorstation/components/tcm/tcmAdvice.vue @@ -707,6 +707,30 @@ async function getListInfo(addNewRow) { } prescription.prescriptionList = groupedData[groupId]; + + // 🔧 BugFix#669: 从分组数据的第一条提取处方头字段回显 + const firstItem = groupedData[groupId]?.[0]; + if (firstItem) { + if (firstItem.accountId !== undefined && firstItem.accountId !== null) { + prescription.accountId = firstItem.accountId; + } + if (firstItem.methodCode !== undefined && firstItem.methodCode !== null) { + prescription.methodCode = firstItem.methodCode; + } + if (firstItem.rateCode !== undefined && firstItem.rateCode !== null) { + prescription.rateCode = firstItem.rateCode; + } + if (firstItem.dispensePerDuration !== undefined && firstItem.dispensePerDuration !== null) { + prescription.dispensePerDuration = firstItem.dispensePerDuration; + } + if (firstItem.chineseHerbsDoseQuantity !== undefined && firstItem.chineseHerbsDoseQuantity !== null) { + prescription.chineseHerbsDoseQuantity = firstItem.chineseHerbsDoseQuantity; + } + if (firstItem.sufferingFlag !== undefined && firstItem.sufferingFlag !== null) { + prescription.sufferingFlag = firstItem.sufferingFlag; + } + } + return prescription; }); diff --git a/healthlink-his-ui/src/views/inHospitalManagement/charge/register/components/awaitList.vue b/healthlink-his-ui/src/views/inHospitalManagement/charge/register/components/awaitList.vue index 3f9482abc..792364ecd 100755 --- a/healthlink-his-ui/src/views/inHospitalManagement/charge/register/components/awaitList.vue +++ b/healthlink-his-ui/src/views/inHospitalManagement/charge/register/components/awaitList.vue @@ -32,8 +32,7 @@