|
@@ -204,13 +204,15 @@ public class ScanResultActivity extends BaseActivity implements ScanResultView {
|
204
|
204
|
|
205
|
205
|
// Search if all data problem document not have any group
|
206
|
206
|
if (!dataResultRfid.getPassed()) {
|
207
|
|
- if (Stream.of(problemsList).allMatch(v -> v.getDataDocumentType().getGroup() == null)) {
|
208
|
|
- groupList.add(new DataGroup(1, "No Group", "No Group Document", true));
|
209
|
|
- } else {
|
210
|
|
- groupList = Stream.of(problemsList)
|
211
|
|
- .map(v -> v.getDataDocumentType().getGroup())
|
212
|
|
- .distinctBy(DataGroup::getId)
|
213
|
|
- .collect(Collectors.toList());
|
|
207
|
+ if (problemsList.size() != 0){
|
|
208
|
+ if (Stream.of(problemsList).allMatch(v -> v.getDataDocumentType().getGroup() == null)) {
|
|
209
|
+ groupList.add(new DataGroup(1, "No Group", "No Group Document", true));
|
|
210
|
+ } else {
|
|
211
|
+ groupList = Stream.of(problemsList)
|
|
212
|
+ .map(v -> v.getDataDocumentType().getGroup())
|
|
213
|
+ .distinctBy(DataGroup::getId)
|
|
214
|
+ .collect(Collectors.toList());
|
|
215
|
+ }
|
214
|
216
|
}
|
215
|
217
|
}
|
216
|
218
|
|