Commit ab412e45 by jianan

前端对接问题修复78

parent 3e802284
......@@ -517,16 +517,17 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
List<Fortune> fortuneList = fortuneService.lambdaQuery()
.in(Fortune::getExpectedFortuneBizId, filteredExpectedFortuneList1.stream().map(ExpectedFortune::getExpectedFortuneBizId).collect(Collectors.toList()))
.list();
// 2.1 根据保单号和期数建立映射关系
Map<String, Fortune> fortuneMap = fortuneList.stream()
.collect(Collectors.toMap(i -> i.getPolicyNo() + "_" + i.getFortunePeriod(), fortune -> fortune));
// 2.1 已出帐的保单号和期数
Set<String> fortuneSet = fortuneList.stream()
.map(i -> i.getPolicyNo() + "_" + i.getFortunePeriod())
.collect(Collectors.toSet());
// 2.2 校验是否有已出账的记录
List<ExpectedFortune> filteredExpectedFortuneList2 = new ArrayList<>();
for (ExpectedFortune expectedFortune : filteredExpectedFortuneList1) {
String policyNo = expectedFortune.getPolicyNo();
Integer fortunePeriod = expectedFortune.getFortunePeriod();
// 如果有已出账记录,跳过,表示此次该预计出账已出账
if (fortuneMap.get(policyNo + "_" + fortunePeriod) != null) {
if (fortuneSet.contains(policyNo + "_" + fortunePeriod)) {
continue;
}
filteredExpectedFortuneList2.add(expectedFortune);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment