Quellcode durchsuchen

add
创建长期记忆体

lifang vor 3 Monaten
Ursprung
Commit
b2ef8219da

+ 6 - 7
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizClinicRoomServiceImpl.java

@@ -479,19 +479,18 @@ public class BizClinicRoomServiceImpl implements IBizClinicRoomService {
         BizAiAgentParamVO result = new BizAiAgentParamVO();
         result.setAppId(aLiYunProperties.getAppId());
         result.setApiKey(aLiYunProperties.getApiKey());
-//        BizClinicRoomPO clinicRoom = baseRepository.selectById(source.getClinicId());
-//        if(ObjectUtil.isNull(clinicRoom)){
-//            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "手术信息不存在");
-//        }
-        BizClinicRoomPO clinicRoom=new BizClinicRoomPO();
+        BizClinicRoomPO clinicRoom = baseRepository.selectById(source.getClinicId());
+        if(ObjectUtil.isNull(clinicRoom)){
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001, "手术信息不存在");
+        }
         if(StrUtil.isNotEmpty(clinicRoom.getMemoryId())){
             result.setMemoryId(clinicRoom.getMemoryId());
         }else {
             try{
                 String memoryId = aLiYunService.createMemory();
                 result.setMemoryId(memoryId);
-//                clinicRoom.setMemoryId(memoryId);
-//                baseRepository.updateById(clinicRoom);
+                clinicRoom.setMemoryId(memoryId);
+                baseRepository.updateById(clinicRoom);
             }catch (Exception e){
 
             }