fix(ui): 修复多个功能模块的验证和数据处理问题
- 在医生工作站退费功能中添加患者选择验证 - 统一药品管理中的仓库类型选择逻辑,移除重复代码 - 修复统计管理页面清空按钮的数据重置问题 - 修正西药管理页面处方打印按钮的功能绑定 - 完善库存报表查询的SQL过滤条件实现 - 更新多个控制器接口参数类型以支持业务流程 - 优化退费列表对话框的数据加载和错误处理
This commit is contained in:
@@ -213,10 +213,24 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
return R.fail("收费项的就诊类型未统一");
|
||||
}
|
||||
|
||||
// 获取所有的账户id
|
||||
List<Long> accountIdList = chargeItemList.stream().map(ChargeItem::getAccountId).collect(Collectors.toList());
|
||||
// 获取所有的账户id(过滤掉null值,防止groupingBy时空指针异常)
|
||||
List<Long> accountIdList = chargeItemList.stream()
|
||||
.map(ChargeItem::getAccountId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
// account去重
|
||||
List<Long> distinctAccountIdList = accountIdList.stream().distinct().collect(Collectors.toList());
|
||||
// 检查是否存在accountId为null的收费项
|
||||
long nullAccountIdCount = chargeItemList.stream()
|
||||
.map(ChargeItem::getAccountId)
|
||||
.filter(Objects::isNull)
|
||||
.count();
|
||||
if (nullAccountIdCount > 0) {
|
||||
throw new ServiceException("部分收费项缺少账户信息,请检查收费项数据");
|
||||
}
|
||||
if (distinctAccountIdList.isEmpty()) {
|
||||
throw new ServiceException("未找到有效的账户信息");
|
||||
}
|
||||
List<Account> accountList = iAccountService.list(new LambdaQueryWrapper<Account>()
|
||||
.in(Account::getId, distinctAccountIdList).eq(Account::getEncounterId, prePaymentDto.getEncounterId()));
|
||||
if (accountList.size() != distinctAccountIdList.size()) {
|
||||
@@ -503,9 +517,15 @@ public class PaymentRecServiceImpl implements IPaymentRecService {
|
||||
// }
|
||||
// }
|
||||
|
||||
// 收费详情按照收费批次进行分组
|
||||
// 收费详情按照收费批次进行分组(过滤掉payTransNo为null的记录)
|
||||
Map<String, List<PaymentRecDetail>> payTransNoMap
|
||||
= paymentRecDetails.stream().collect(Collectors.groupingBy(PaymentRecDetail::getPayTransNo));
|
||||
= paymentRecDetails.stream()
|
||||
.filter(detail -> detail.getPayTransNo() != null)
|
||||
.collect(Collectors.groupingBy(PaymentRecDetail::getPayTransNo));
|
||||
|
||||
if (payTransNoMap.isEmpty()) {
|
||||
throw new ServiceException("收费详情缺少批次号信息");
|
||||
}
|
||||
|
||||
com.openhis.financial.model.PaymentResult paymentResult;
|
||||
List<com.openhis.financial.model.PaymentResult> paymentResultList = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user