From 00912980f1a066f4ff7298872117970bed0ddfe0 Mon Sep 17 00:00:00 2001 From: "WIN-N0D4SD9MOKI\\Administrator" <1419361763@qq.com> Date: Wed, 14 Sep 2022 11:22:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=8A=E6=96=AD=E8=AE=B0=E5=BD=95-=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/api/AppController.java | 4 +++- .../ruoyi/web/controller/api/MpController.java | 15 ++++----------- ruoyi-admin/src/main/resources/application.yml | 4 ++-- .../resources/mapper/system/TRecordMapper.xml | 1 + 4 files changed, 10 insertions(+), 14 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 6da0625..5f1e653 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 @@ -438,6 +438,7 @@ public class AppController extends BaseController } catch (Exception e) { + throw new ServiceException(e.getMessage()); } if (!StringUtils.isEmpty(result)) @@ -648,6 +649,7 @@ public class AppController extends BaseController public JSONObject removeBase64Image(JSONObject jsonObject,Long recordId) { List jsonKeyList = new ArrayList(){{ + add("st_avg_yellow"); add("img_sz"); add("img_sz_yudian"); add("img_sz_yuban"); @@ -657,7 +659,6 @@ public class AppController extends BaseController add("img_sx_vein"); add("sz_avg_red"); add("sz_avg_purple"); - add("st_avg_yellow"); add("sx_vein_avg_purple"); }}; try { @@ -694,6 +695,7 @@ public class AppController extends BaseController for (Map.Entry entry : ((JSONObject) obj).entrySet()) { // 如果key包含在图片 if (imageKeys.contains(entry.getKey())) { + System.out.println(entry.getKey()); String imageStr = null; String imageKey = null; if (entry.getValue() instanceof JSONObject) { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/MpController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/MpController.java index ecb7f64..ba234aa 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/MpController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/MpController.java @@ -62,19 +62,12 @@ public class MpController extends BaseController { //备份历史记录 recordHistoryService.saveHistory(recordId); - - TRecord delRecord = new TRecord(); - delRecord.setId(recordId); - delRecord.setDelFlag("2"); - tRecordService.updateTRecord(delRecord); - - // 重新生成一条记录 - tRecord.setId(null); + tRecord.setId(recordId); tRecord.setDelFlag("0"); tRecord.setStatus("0"); - tRecord.setUpdateResult(null); - tRecord.setUpdateResult2(null); - tRecordService.insertTRecord(tRecord); + tRecord.setUpdateResult(""); + tRecord.setUpdateResult2(""); + tRecordService.updateTRecord(tRecord); AjaxResult success = AjaxResult.success(); success.put("recordId", tRecord.getId()); return success; diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index a7a49f6..322bf03 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -136,8 +136,8 @@ wx: wechatSecret: a494e8b7804d6e9f3cef984161486aec aiPost: - ip: 111.6.25.30 - port: 7001 + ip: 10.10.203.55 + port: 6000 url: /tongue/algo/sm_sx diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml index 163ea6d..11f0c4f 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml @@ -79,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" tr.doctor_id AS doctorId, tr.hospital_id AS hospitalId, tr.STATUS, + tr.ai_result AS aiResult, tr.ai_result2 AS aiResult2, tr.update_result2 AS updateResult2, tr.update_time AS updateTime,