master
周文涛 2 years ago
parent 7e7992a2de
commit 75f786ebb8

@ -172,7 +172,8 @@ public class ApiController {
public JSONObject imgNotify1() { public JSONObject imgNotify1() {
String ss = "{\t\"requestId\":\"10001\",\t\"result\":{\t\t\"ocrResult\":[\t\t\t{\t\t\t\t\"tag\":\"hospitalName\",\t\t\t\t\"inputText\":\"仁和医院\",\t\t\t\t\"ocrText\":\"仁和医院\",\t\t\t\t\"ocrPrecisionRate\":0.8,\t\t\t\t\"sourceImage\":{\t\t\t\t\t\"fileName\":\"test1.png\",\t\t\t\t\t\"path\":\"/usr/local/ocr/test1.png\"\t\t\t\t},\t\t\t\t\"failureReason\":\"\"\t\t\t}\t\t],\t\t\"ruleValidation\":false,\t\t\"retrieveReviewCompliance\":\"80\",\t\t\"imageTagRetrievePercentage\":\"66.6\",\t\t\"failureReason\":\"医生名称不匹配\"\t}}"; String ss = "{\t\"requestId\":\"10001\",\t\"result\":{\t\t\"ocrResult\":[\t\t\t{\t\t\t\t\"tag\":\"hospitalName\",\t\t\t\t\"inputText\":\"仁和医院\",\t\t\t\t\"ocrText\":\"仁和医院\",\t\t\t\t\"ocrPrecisionRate\":0.8,\t\t\t\t\"sourceImage\":{\t\t\t\t\t\"fileName\":\"test1.png\",\t\t\t\t\t\"path\":\"/usr/local/ocr/test1.png\"\t\t\t\t},\t\t\t\t\"failureReason\":\"\"\t\t\t}\t\t],\t\t\"ruleValidation\":false,\t\t\"retrieveReviewCompliance\":\"80\",\t\t\"imageTagRetrievePercentage\":\"66.6\",\t\t\"failureReason\":\"医生名称不匹配\"\t}}";
JSONObject requestBody = JSONObject.parseObject(ss); JSONObject requestBody = JSONObject.parseObject(ss);
JSONObject semanticResponseJson = RestUtil.post("https://192.168.5.179:8080/api/task/image/ocr/callback", requestBody); JSONObject semanticResponseJson = RestUtil.get("https://192.168.5.179:8080/api/task/image/ocr/callback", requestBody);
//semanticResponseJson = RestUtil.post("https://192.168.5.179:8080/api/task/image/ocr/callback", requestBody);
return semanticResponseJson; return semanticResponseJson;
/*String requestId = jsonObject.getString("requestId"); /*String requestId = jsonObject.getString("requestId");
String fileName = jsonObject.getString("fileName"); String fileName = jsonObject.getString("fileName");

Loading…
Cancel
Save