master
周文涛 2 years ago
parent a7986f6d13
commit 2a72c19af5

@ -1,5 +1,7 @@
package org.jeecg.common.constant;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
@ -47,9 +49,4 @@ public class OcrConstant {
//目前仅支持的字段中文名
public static List<String> SUPPORTED_FIELD_NAMES= Arrays.asList("医院名称","医生名称","科室","时间");
public static void main(String[] args) {
for (int i = 0; i < 100; i++) {
System.out.println(new Random().nextInt(10));
}
}
}

@ -975,7 +975,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
if (StringUtils.isNotBlank(time)) {
sourceJson.add(JSONObject.parseObject(String.format("{\"tag\":\"time\", \"inputText\":\"%s\"}", time)));
}
JSONObject semanticResult = JSONObject.parseObject(ocrIdentifyDetail.getSemanticResult());
JSONObject semanticResult = JSONObject.parseObject(ocrIdentifyDetail.getSemanticResult()).getJSONObject("semantic_result");
File file = new File(imgPath);
//当原图片存在时.
if (file.exists()) {

Loading…
Cancel
Save