|
|
@ -1094,16 +1094,19 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
ocrResultDTOList.sort((h1, h2) -> h1.getTag().compareTo(h2.getTag()));
|
|
|
|
ocrResultDTOList.sort((h1, h2) -> h1.getTag().compareTo(h2.getTag()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//============
|
|
|
|
//============
|
|
|
|
responseBody.put("detailList", ocrResultDTOList);
|
|
|
|
if (CollectionUtils.isEmpty(ocrResultDTOList)) {
|
|
|
|
if (ocrResultDTOList.size()==0) {
|
|
|
|
|
|
|
|
//没有匹配结果
|
|
|
|
//没有匹配结果
|
|
|
|
responseBody.put("taskResult",1);
|
|
|
|
responseBody.put("taskResult",1);
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
long count = fieldRightMap.values().stream().filter(o->!o).count();
|
|
|
|
long count = fieldRightMap.values().stream().filter(o->!o).count();
|
|
|
|
//long count = ocrResultDTOList.stream().filter(o -> !o.getRuleValidation()).count();
|
|
|
|
//long count = ocrResultDTOList.stream().filter(o -> !o.getRuleValidation()).count();
|
|
|
|
responseBody.put("taskResult",count>0?0:1);//匹配成功或失败
|
|
|
|
responseBody.put("taskResult",count>0?0:1);//匹配成功或失败
|
|
|
|
|
|
|
|
List<String> haveRateTagList = ocrResultDTOList.stream().filter(o -> o.getOcrPrecisionRate() > 0).map(OcrResultDTO::getTag).collect(Collectors.toList());
|
|
|
|
|
|
|
|
//过滤掉0的值
|
|
|
|
|
|
|
|
ocrResultDTOList = ocrResultDTOList.stream().filter(o->haveRateTagList.contains(o.getTag()) && o.getOcrPrecisionRate()>0).collect(Collectors.toList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
responseBody.put("detailList", ocrResultDTOList);
|
|
|
|
|
|
|
|
//============
|
|
|
|
return responseBody;
|
|
|
|
return responseBody;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|