fix(doctorstation): 修复会诊模块数据加载异常处理

- 添加了接口响应空值检查,防止因空响应导致的页面崩溃
- 完善了错误处理逻辑,统一返回空数组避免组件渲染异常
- 增强了网络错误捕获,提供更准确的错误信息提示
- 优化了后端服务异常处理,确保查询失败时返回安全的默认值
- 修复了手术收费模块中的用户卡信息引用错误
- 改进了学生合同号处理逻辑,增加了前置条件验证
This commit is contained in:
2026-02-09 23:47:19 +08:00
parent 6fb5b5993a
commit dba6350493
5 changed files with 133 additions and 27 deletions

View File

@@ -1906,11 +1906,13 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
: outpatientRegistrationAddParam.getYbMdtrtCertType());
iAccountService.save(accountZf);
}
String accountContractNo = outpatientRegistrationAddParam.getAccountFormData().getContractNo();
if (!CommonConstants.BusinessName.DEFAULT_CONTRACT_NO
.equals(outpatientRegistrationAddParam.getAccountFormData().getContractNo())
.equals(accountContractNo)
&& !CommonConstants.BusinessName.DEFAULT_STUDENT_CONTRACT_NO
.equals(outpatientRegistrationAddParam.getAccountFormData().getContractNo())
&& outpatientRegistrationAddParam.getAccountFormData().getContractNo().length() > 11) {
.equals(accountContractNo)
&& accountContractNo.length() > 11
&& accountContractNo.startsWith("STUDENT")) {
// 建立学生自费ACCOUNT
Account accountStudentZf = new Account();
BeanUtils.copyProperties(accountFormData, accountStudentZf);
@@ -1920,8 +1922,9 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
: outpatientRegistrationAddParam.getYbMdtrtCertType());
iAccountService.save(accountStudentZf);
Contract contractYb = contractService.getContract(
outpatientRegistrationAddParam.getAccountFormData().getContractNo().substring("STUDENT".length()));
// 截取医保合同号时,先验证是否以"STUDENT"开头
String ybContractNo = accountContractNo.substring("STUDENT".length());
Contract contractYb = contractService.getContract(ybContractNo);
if (contractYb != null && 1 == contractYb.getYbFlag()) {
// 建立纯医保ACCOUNT
Account accountYb = new Account();