fix(#785): zhaoyun (文件合入)

This commit is contained in:
2026-06-19 05:17:30 +08:00
committed by 华佗
parent 2eca6a7f31
commit 0eeb655492

View File

@@ -45,8 +45,7 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
// 创建 LambdaQueryWrapper
LambdaQueryWrapper<EncounterLocation> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(EncounterLocation::getEncounterId, encounterLocation.getEncounterId())
.eq(EncounterLocation::getFormEnum, encounterLocation.getFormEnum())
// 状态为使用中
.eq(EncounterLocation::getFormEnum, encounterLocation.getFormEnum());
// 查询是否存在记录
EncounterLocation existingRecord = baseMapper.selectOne(queryWrapper);
@@ -168,9 +167,7 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
}
return baseMapper.selectList(queryWrapper);
}
}
.eq(EncounterLocation::getStatusEnum, EncounterActivityStatus.ACTIVE.getValue())
.last("LIMIT 1");
/**
* 根据encounterId和formEnum清理重复的ACTIVE记录保留最早的一条
*
@@ -193,3 +190,4 @@ public class EncounterLocationServiceImpl extends ServiceImpl<EncounterLocationM
}
}
}
}