From 389f4ea02f9dae5741bfce51e3734f7dd951572c Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Thu, 8 Sep 2022 17:21:00 +0800 Subject: [PATCH] =?UTF-8?q?AI=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/api/AppController.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index f5c4788..0629298 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -17,7 +17,6 @@ import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.http.HttpUtils; -import com.ruoyi.framework.config.ServerConfig; import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.req.*; import com.ruoyi.system.domain.resp.PatientHistoryRecordResp; @@ -70,13 +69,12 @@ public class AppController extends BaseController @Resource private ITImageService imageService; - @Autowired - private ServerConfig serverConfig; - @Value("${aiPost.ip}") private String ip; + @Value("${aiPost.port}") private String port; + @Value("${aiPost.url}") private String url; @@ -102,7 +100,6 @@ public class AppController extends BaseController */ @ApiOperation("医院列表") @GetMapping("/hospital/list") - @Log(title = "查询医院列表", businessType = BusinessType.OTHER) public AjaxResult hospitalList() { List tHospitals = tHospitalService.selectTHospitalList(new THospital()); @@ -439,13 +436,21 @@ public class AppController extends BaseController if (!StringUtils.isEmpty(result)) { JSONObject data = JSONObject.parseObject(result); - if(data.getInteger("code") != 200){ + Integer code = data.getInteger("code"); + if(code != 200 && code != 204){ TRecord tRecord1 = new TRecord(); tRecord1.setId(recordId); tRecord1.setStatus("0"); tRecordService.updateTRecord(tRecord1); throw new ServiceException(data.getString("msg")); } + if (code == 204) { + TRecord tRecord1 = new TRecord(); + tRecord1.setId(recordId); + tRecord1.setStatus("0"); + tRecordService.updateTRecord(tRecord1); + return AjaxResult.error(code, data.getString("msg")); + } jsonObject = removeBase64Image(data,recordId); tRecord.setUploadTime(start); tRecord.setAiResultReturnTime(end);