|
@@ -644,7 +644,16 @@ public class PtlSchemeServiceImpl extends ServiceImpl<PtlSchemeMapper, PtlScheme
|
|
|
eq(PtlScheme::getProductId, productId).eq(PtlScheme::getIsDelete, 0));
|
|
eq(PtlScheme::getProductId, productId).eq(PtlScheme::getIsDelete, 0));
|
|
|
Map<String, PtlScheme> collectPtlSchemes = ptlSchemes.stream().collect(Collectors.toMap(PtlScheme::getId, Function.identity()));
|
|
Map<String, PtlScheme> collectPtlSchemes = ptlSchemes.stream().collect(Collectors.toMap(PtlScheme::getId, Function.identity()));
|
|
|
AssertionUtils.isFail(collectPtlSchemes.isEmpty(), "没有可报价的方案配置信息");
|
|
AssertionUtils.isFail(collectPtlSchemes.isEmpty(), "没有可报价的方案配置信息");
|
|
|
- schemeResultVo.getSchemes().stream().filter(s -> !collectPtlSchemes.containsKey(s.getId()));
|
|
|
|
|
|
|
+ List<String> schemeInfoIds = new ArrayList<>();
|
|
|
|
|
+ for (SchemeResultVo.SchemeInfoVo schemeInfo : schemeResultVo.getSchemes()) {
|
|
|
|
|
+ schemeInfoIds.add(schemeInfo.getId());
|
|
|
|
|
+ }
|
|
|
|
|
+ List<PtlSchemeInfo> ptlSchemeInfos = ptlSchemeInfoMapper.selectList(new LambdaQueryWrapper<PtlSchemeInfo>().in(PtlSchemeInfo::getId, schemeInfoIds));
|
|
|
|
|
+ List<String> schemeIds = new ArrayList<>();
|
|
|
|
|
+ for (PtlSchemeInfo ptlSchemeInfo : ptlSchemeInfos) {
|
|
|
|
|
+ schemeIds.add(ptlSchemeInfo.getSchemeId());
|
|
|
|
|
+ }
|
|
|
|
|
+ schemeResultVo.getSchemes().removeIf(s -> !schemeIds.contains(s.getId()));
|
|
|
return schemeResultVo;
|
|
return schemeResultVo;
|
|
|
}
|
|
}
|
|
|
|
|
|