master
周文涛 2 years ago
parent 835b1be4f8
commit 508d2afba3

@ -105,7 +105,8 @@ public class OcrIdentifyDetailController extends JeecgController<OcrIdentifyDeta
if (!thumbnailFile.exists()) { if (!thumbnailFile.exists()) {
ImageUtils.compressImage(file.getAbsolutePath(), outputImagePath, maxWidth, maxHeight); ImageUtils.compressImage(file.getAbsolutePath(), outputImagePath, maxWidth, maxHeight);
} }
String imagePreviewUrl="http://47.103.213.109:8072/files"+record.getImageUrl()+","+"http://47.103.213.109:8072/files"+outputImagePath; record.setThumbnailImagePreviewUrl("http://47.103.213.109:8072/files"+outputImagePath);
String imagePreviewUrl="http://47.103.213.109:8072/files"+record.getImageUrl();
record.setImagePreviewUrl(imagePreviewUrl); record.setImagePreviewUrl(imagePreviewUrl);
} }
}else{ }else{

@ -91,10 +91,14 @@ public class OcrIdentifyDetail implements Serializable {
@ApiModelProperty(value = "更新日期") @ApiModelProperty(value = "更新日期")
private java.util.Date updateTime; private java.util.Date updateTime;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "图片预览地址") @ApiModelProperty(value = "图片预览地址")
private String imagePreviewUrl; private String imagePreviewUrl;
@TableField(exist = false)
@ApiModelProperty(value = "缩率图片预览地址")
private String thumbnailImagePreviewUrl;
///=========================================== ///===========================================
/*字段校验成功对象.*//* /*字段校验成功对象.*//*
@TableField(exist = false) @TableField(exist = false)

@ -456,21 +456,6 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
//匹配成功. //匹配成功.
updateWrapper.set(OcrIdentify::getTaskResult, 1); updateWrapper.set(OcrIdentify::getTaskResult, 1);
} }
// }else if (configRuleTypeMap.containsKey(OcrConstant.ruleCheckOrChar)){
// Map<String, String> fieldMap = configRuleTypeMap.get(OcrConstant.ruleCheckSplitChar);
// //获取成功的字段.
// List<String> successFields = ocrResults.stream().filter(o -> o.getRuleValidation()).map(c->c.getTag()).collect(Collectors.toList());
//
// updateWrapper.set(OcrIdentify::getErrorMsg, errorMsg);
// updateWrapper.set(OcrIdentify::getTaskResult, 0);
//
// fieldMapFor: for (String s : fieldMap.keySet()) {
// if (successFields.contains(s)) {
// updateWrapper.set(OcrIdentify::getTaskResult, 1);
// break fieldMapFor;
// }
// }
// }
String taskResultInfo = JSONArray.toJSONString(ocrResults); String taskResultInfo = JSONArray.toJSONString(ocrResults);
updateWrapper.set(OcrIdentify::getStatus,"1"); updateWrapper.set(OcrIdentify::getStatus,"1");
updateWrapper.set(OcrIdentify::getEndTime,new Date()); updateWrapper.set(OcrIdentify::getEndTime,new Date());

Loading…
Cancel
Save