|
@@ -152,7 +152,7 @@ public class ReportRelationServiceImpl extends ServiceImpl<ReportRelationMapper,
|
|
|
new LambdaQueryWrapper<ReportRelation>().eq(ReportRelation::getReportId, reportId).eq(ReportRelation::getHospId, hospId)
|
|
|
);
|
|
|
if (!list.isEmpty()) {
|
|
|
- baseMapper.deleteBatchIds(list);
|
|
|
+ baseMapper.deleteBatchIds(list.stream().map(ReportRelation::getId).collect(Collectors.toList()));
|
|
|
}
|
|
|
List<ReportRelation> reportRelations = relationCodes.stream().map(code -> {
|
|
|
ReportRelation reportRelation = new ReportRelation();
|
|
@@ -183,7 +183,9 @@ public class ReportRelationServiceImpl extends ServiceImpl<ReportRelationMapper,
|
|
|
.eq(ReportRelation::getHospId, hospId)
|
|
|
);
|
|
|
if (CollUtil.isNotEmpty(relations)) {
|
|
|
- throw new CostException(500, "编码为:" + StrUtil.join(StrUtil.COMMA, relation) + "已被绑定");
|
|
|
+ throw new CostException(500, "编码为:" +
|
|
|
+ StrUtil.join(StrUtil.COMMA, relations.stream().map(ReportRelation::getRelationCode).collect(Collectors.toList())) +
|
|
|
+ "已被其他项目代码绑定");
|
|
|
}
|
|
|
}
|
|
|
}
|