master
周文涛 2 years ago
parent d9d1665378
commit 3a80503761

@ -211,7 +211,6 @@ public class ApiController {
@ApiOperation(value = "刷新任务", notes = "任务完结通知") @ApiOperation(value = "刷新任务", notes = "任务完结通知")
@PostMapping("/restartTask") @PostMapping("/restartTask")
@Async
public Result restartTask(@RequestBody JSONObject jsonObject) throws InterruptedException { public Result restartTask(@RequestBody JSONObject jsonObject) throws InterruptedException {
System.out.println(jsonObject.toJSONString()); System.out.println(jsonObject.toJSONString());
//获取已执行完的任务 //获取已执行完的任务

@ -153,6 +153,8 @@ public class HandleTransInit implements ApplicationRunner {
JSONObject semanticResponseJson =null; JSONObject semanticResponseJson =null;
while (check==0){ while (check==0){
try { try {
log.info("----------------------请求参数");
log.info(requestBody.toJSONString());
semanticResponseJson = RestUtil.post(OcrConstant.api_test2_identify_url, requestBody); semanticResponseJson = RestUtil.post(OcrConstant.api_test2_identify_url, requestBody);
//semanticResponseJson = JSONObject.parseObject("{\"img_path\":\"https://h5.mcnetmart.com/tmp/images/dc_demo1.png\",\"ocr_time\":3.4992809295654297,\"task_id\":\"1697133769514909698_1\",\"message\":\"成功\",\"semantic_result\":{\"ocr_res\":[[[[136.0,98.0],[276.0,70.0],[281.0,93.0],[141.0,121.0]],[\"深圳康瑞医院\",0.9387677311897278]],[[[139.0,120.0],[284.0,92.0],[288.0,109.0],[142.0,136.0]],[\"Shenzhen Kangrui hospual\",0.9168243408203125]],[[[171.0,284.0],[260.0,268.0],[264.0,292.0],[175.0,308.0]],[\"赵思杰\",0.9619879126548767]],[[[191.0,311.0],[247.0,301.0],[251.0,323.0],[195.0,333.0]],[\"妇产科\",0.9429848790168762]],[[[189.0,346.0],[259.0,332.0],[263.0,350.0],[193.0,364.0]],[\"主治医师\",0.8993821144104004]],[[[198.0,375.0],[263.0,364.0],[267.0,381.0],[201.0,393.0]],[\"202015\",0.9382884502410889]]],\"其他\":[{\"area\":[[139.0,120.0],[284.0,92.0],[288.0,109.0],[142.0,136.0]],\"end\":24,\"ocrText\":\"Shenzhen Kangrui hospual\",\"probability\":0.9846151031007864,\"start\":0,\"text\":\"Shenzhen Kangrui hospual\"},{\"area\":[[189.0,346.0],[259.0,332.0],[263.0,350.0],[193.0,364.0]],\"end\":4,\"ocrText\":\"主治医师\",\"probability\":0.9848503723946322,\"start\":0,\"text\":\"主治医师\"},{\"area\":[[198.0,375.0],[263.0,364.0],[267.0,381.0],[201.0,393.0]],\"end\":6,\"ocrText\":\"202015\",\"probability\":0.9731923600763821,\"start\":0,\"text\":\"202015\"}],\"医院名称\":[{\"area\":[[136.0,98.0],[276.0,70.0],[281.0,93.0],[141.0,121.0]],\"end\":6,\"ocrText\":\"深圳康瑞医院\",\"probability\":0.9856892892579268,\"start\":0,\"text\":\"深圳康瑞医院\"}],\"姓名\":[{\"area\":[[171.0,284.0],[260.0,268.0],[264.0,292.0],[175.0,308.0]],\"end\":3,\"ocrText\":\"赵思杰\",\"probability\":0.9996551423001598,\"start\":0,\"text\":\"赵思杰\"}],\"时间\":[],\"科室\":[{\"area\":[[191.0,311.0],[247.0,301.0],[251.0,323.0],[195.0,333.0]],\"end\":3,\"ocrText\":\"妇产科\",\"probability\":0.9983404968615517,\"start\":0,\"text\":\"妇产科\"}]},\"nlu_time\":16.85913324356079,\"identifyId\":\"1697133769514909698\"}"); //semanticResponseJson = JSONObject.parseObject("{\"img_path\":\"https://h5.mcnetmart.com/tmp/images/dc_demo1.png\",\"ocr_time\":3.4992809295654297,\"task_id\":\"1697133769514909698_1\",\"message\":\"成功\",\"semantic_result\":{\"ocr_res\":[[[[136.0,98.0],[276.0,70.0],[281.0,93.0],[141.0,121.0]],[\"深圳康瑞医院\",0.9387677311897278]],[[[139.0,120.0],[284.0,92.0],[288.0,109.0],[142.0,136.0]],[\"Shenzhen Kangrui hospual\",0.9168243408203125]],[[[171.0,284.0],[260.0,268.0],[264.0,292.0],[175.0,308.0]],[\"赵思杰\",0.9619879126548767]],[[[191.0,311.0],[247.0,301.0],[251.0,323.0],[195.0,333.0]],[\"妇产科\",0.9429848790168762]],[[[189.0,346.0],[259.0,332.0],[263.0,350.0],[193.0,364.0]],[\"主治医师\",0.8993821144104004]],[[[198.0,375.0],[263.0,364.0],[267.0,381.0],[201.0,393.0]],[\"202015\",0.9382884502410889]]],\"其他\":[{\"area\":[[139.0,120.0],[284.0,92.0],[288.0,109.0],[142.0,136.0]],\"end\":24,\"ocrText\":\"Shenzhen Kangrui hospual\",\"probability\":0.9846151031007864,\"start\":0,\"text\":\"Shenzhen Kangrui hospual\"},{\"area\":[[189.0,346.0],[259.0,332.0],[263.0,350.0],[193.0,364.0]],\"end\":4,\"ocrText\":\"主治医师\",\"probability\":0.9848503723946322,\"start\":0,\"text\":\"主治医师\"},{\"area\":[[198.0,375.0],[263.0,364.0],[267.0,381.0],[201.0,393.0]],\"end\":6,\"ocrText\":\"202015\",\"probability\":0.9731923600763821,\"start\":0,\"text\":\"202015\"}],\"医院名称\":[{\"area\":[[136.0,98.0],[276.0,70.0],[281.0,93.0],[141.0,121.0]],\"end\":6,\"ocrText\":\"深圳康瑞医院\",\"probability\":0.9856892892579268,\"start\":0,\"text\":\"深圳康瑞医院\"}],\"姓名\":[{\"area\":[[171.0,284.0],[260.0,268.0],[264.0,292.0],[175.0,308.0]],\"end\":3,\"ocrText\":\"赵思杰\",\"probability\":0.9996551423001598,\"start\":0,\"text\":\"赵思杰\"}],\"时间\":[],\"科室\":[{\"area\":[[191.0,311.0],[247.0,301.0],[251.0,323.0],[195.0,333.0]],\"end\":3,\"ocrText\":\"妇产科\",\"probability\":0.9983404968615517,\"start\":0,\"text\":\"妇产科\"}]},\"nlu_time\":16.85913324356079,\"identifyId\":\"1697133769514909698\"}");
if (semanticResponseJson!=null) { if (semanticResponseJson!=null) {

Loading…
Cancel
Save