master
周文涛 2 years ago
parent 4511bb78fe
commit 69dfdfd0a0

@ -401,8 +401,8 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
ocrIdentifyCallbackLogService.save(ocrIdentifyCallbackLog);
if (b) {
updateWrapper.set(OcrIdentify::getNoticeStatus,"1");
update(updateWrapper);
}
update(updateWrapper);
}
@Override
@ -825,8 +825,16 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
//long count = ocrResultDTOList.stream().filter(o -> !o.getRuleValidation()).count();
responseBody.put("taskResult",count>0?0:1);//匹配成功或失败
List<String> haveRateTagList = ocrResultDTOList.stream().filter(o -> o.getTextRate() > 0).map(OcrResultDTO::getTag).collect(Collectors.toList());
List<OcrResultDTO> newResultDTOList=new ArrayList<>();
//过滤掉0的值
ocrResultDTOList = ocrResultDTOList.stream().filter(o->haveRateTagList.contains(o.getTag()) && o.getTextRate()>0).collect(Collectors.toList());
for (OcrResultDTO o : ocrResultDTOList) {
if (haveRateTagList.contains(o.getTag())) {
newResultDTOList.addAll(ocrResultDTOList.stream().filter(oo -> o.getTag().equals(oo.getTag()) && o.getTextRate() > 0).collect(Collectors.toList()));
}else{
newResultDTOList.add(o);
}
}
ocrResultDTOList = newResultDTOList;
}
//获取最小
double min = 0d;

Loading…
Cancel
Save