|
|
|
|
@ -82,6 +82,7 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private OcrPictureclassService ocrPictureclassService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private CategoryService categoryService;
|
|
|
|
|
|
|
|
|
|
@ -427,7 +428,13 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
|
|
|
|
|
ocrTaskchildPicture.setPackageid(packageid);
|
|
|
|
|
StringBuffer pcid = new StringBuffer();
|
|
|
|
|
StringBuffer result = new StringBuffer();
|
|
|
|
|
int max = 0;
|
|
|
|
|
for (OcrPicture comp : ocrPicture.getListCom()) {
|
|
|
|
|
double doubleValue = Double.parseDouble(comp.getResult());
|
|
|
|
|
int intValue = (int) doubleValue;
|
|
|
|
|
if (intValue > max) {
|
|
|
|
|
max = intValue;
|
|
|
|
|
}
|
|
|
|
|
if (null == pcid || pcid.toString().length() < 1) {
|
|
|
|
|
pcid.append(comp.getId());
|
|
|
|
|
result.append(comp.getResult());
|
|
|
|
|
@ -439,6 +446,8 @@ public class OcrPictureServiceImpl extends BaseServiceImpl<OcrPictureMybatisDao,
|
|
|
|
|
ocrTaskchildPicture.setOcpictureid(pcid.toString());
|
|
|
|
|
ocrTaskchildPicture.setPictureresult(result.toString());
|
|
|
|
|
ocrTaskchildPicture.setPicturecompare(String.join(",", ocrPicture.getPicturecompareList()));
|
|
|
|
|
ocrPicture.setSimilarityscore(max);
|
|
|
|
|
this.updateById(ocrPicture);
|
|
|
|
|
return ocrTaskchildPictureService.updateById(ocrTaskchildPicture) ? ocrTaskchildPicture : null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|