fix(#790): 请修复 Bug #790:【住院管理-住院医生工作站】用管理员账号打开住院医生工作站会出现报错:Duplicate key 6005 (attempted merging values EncounterAccountDto(encounterId=6005, advanceAmount=0.000000, totalAmount=0, balanceAmount=0.000000, insutype=null) and EncounterAccountDto
This commit is contained in:
@@ -133,9 +133,9 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
List<EncounterAccountDto> list = adviceManageAppMapper.getAmount(AccountType.PERSONAL_CASH_ACCOUNT.getCode(),
|
||||
ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(),
|
||||
ChargeItemStatus.REFUNDED.getValue(), wrapper);
|
||||
// 转换为Map,key = encounter_id
|
||||
// 转换为Map,key = encounter_id(同一encounterId存在多条账户记录时取第一条)
|
||||
Map<Long, EncounterAccountDto> dtoMap
|
||||
= list.stream().collect(Collectors.toMap(EncounterAccountDto::getEncounterId, e -> e));
|
||||
= list.stream().collect(Collectors.toMap(EncounterAccountDto::getEncounterId, e -> e, (existing, replacement) -> existing));
|
||||
regPatientMainInfo.getRecords().forEach(e -> {
|
||||
// 设置费用详情
|
||||
if (dtoMap.containsKey(e.getEncounterId())) {
|
||||
|
||||
Reference in New Issue
Block a user