Commit 7f185262 by 向延琳

fix:假性离线原因,显示重复的设备号

1 parent 63906f31
...@@ -125,13 +125,13 @@ public class FakeOfflineService extends AbstractCommonService { ...@@ -125,13 +125,13 @@ public class FakeOfflineService extends AbstractCommonService {
.map(FakeOfficeExport::getVin) .map(FakeOfficeExport::getVin)
.filter(vin -> Objects.equals(FakeOfficeReasonEnum.CHANGE_FREQUENTLY.getCode(), reasonMap.get(vin))) .filter(vin -> Objects.equals(FakeOfficeReasonEnum.CHANGE_FREQUENTLY.getCode(), reasonMap.get(vin)))
.collect(Collectors.toList()); .collect(Collectors.toList());
Map<String, List<String>> snMap = Maps.newHashMap(); Map<String, Set<String>> snMap = Maps.newHashMap();
if (CollectionUtil.isNotEmpty(changeFrequentlyVinList)) { if (CollectionUtil.isNotEmpty(changeFrequentlyVinList)) {
List<FakeOfflineChangeFrequently> list = fakeOfflineChangeFrequentlyMapper.listByVin(changeFrequentlyVinList); List<FakeOfflineChangeFrequently> list = fakeOfflineChangeFrequentlyMapper.listByVin(changeFrequentlyVinList);
snMap = list.stream() snMap = list.stream()
.collect(Collectors.groupingBy( .collect(Collectors.groupingBy(
FakeOfflineChangeFrequently::getVin, FakeOfflineChangeFrequently::getVin,
Collectors.mapping(FakeOfflineChangeFrequently::getSn, Collectors.toList()) Collectors.mapping(FakeOfflineChangeFrequently::getSn, Collectors.toSet())
)); ));
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
from t_fake_offline_change_frequently tfocf from t_fake_offline_change_frequently tfocf
<where> <where>
and del_flag = 0 and del_flag = 0
and status = 1
and vin in and vin in
<foreach collection="vinCollection" item="vin" index="index" open="(" close=")" separator=","> <foreach collection="vinCollection" item="vin" index="index" open="(" close=")" separator=",">
#{vin} #{vin}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!