From cf743a197fc0146b4cec72ed80f6bc53c1ae3c64 Mon Sep 17 00:00:00 2001 From: changpengfei Date: Fri, 10 Sep 2021 20:49:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=BE=A4=E7=BB=84=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=8C=BB=E7=94=9F=E5=92=8C=E6=82=A3=E8=80=85=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ChatGroupController.java | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java index 734c09b..b6bdbc5 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java @@ -3,19 +3,26 @@ package com.lyms.talkonlineweb.controller; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.lyms.talkonlineweb.domain.LymsChatgroup; +import com.lyms.talkonlineweb.domain.LymsDoctor; import com.lyms.talkonlineweb.domain.LymsMessage; +import com.lyms.talkonlineweb.domain.PatientInfo; import com.lyms.talkonlineweb.result.BaseResponse; import com.lyms.talkonlineweb.service.LymsChatgroupService; +import com.lyms.talkonlineweb.service.LymsDoctorService; import com.lyms.talkonlineweb.service.LymsMessageService; +import com.lyms.talkonlineweb.service.PatientInfoService; import com.lyms.talkonlineweb.util.HXService; import lombok.extern.log4j.Log4j2; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.HashMap; import java.util.List; +import java.util.Map; @RestController @RequestMapping("chat") @@ -28,6 +35,12 @@ public class ChatGroupController { private LymsMessageService lymsMessageService; @Autowired + private PatientInfoService patientInfoService; + + @Autowired + private LymsDoctorService lymsDoctorService; + + @Autowired private HXService hxService; /** * 添加或删除聊天组 @@ -69,4 +82,26 @@ public class ChatGroupController { baseResponse.setErrorcode(f==true?0:1); return baseResponse; } + + @GetMapping("getPatDoc") + public BaseResponse getPatDoc(LymsChatgroup chatgroup){ + log.info(">>>>>>>>>>chatgroup:"+chatgroup); + BaseResponse baseResponse=new BaseResponse(); + Map rs=new HashMap<>(); + + chatgroup=lymsChatgroupService.getOne(Wrappers.query(chatgroup)); + LymsDoctor doctor=new LymsDoctor(); + doctor=lymsDoctorService.getOne(Wrappers.query(doctor).eq("dlogin",chatgroup.getTarget())); + + PatientInfo patientInfo=new PatientInfo(); + patientInfo.setDid(doctor.getDpid()); + patientInfo.setIdno(chatgroup.getFromp()); + List pLst=patientInfoService.list(Wrappers.query(patientInfo)); + + rs.put("doctor",doctor); + rs.put("patient",pLst); + baseResponse.setObject(rs); + + return baseResponse; + } } -- 1.8.3.1