diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index 0b5f5cf..5dbe905 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -516,8 +516,8 @@ public class PatientController { @GetMapping("getAppPatientHospital") public BaseResponse getAppPatientHospital(Integer patientId) { BaseResponse baseResponse = new BaseResponse(); - Map patientMap=lymsPatientService.getAppPatientHospital(patientId); - baseResponse.setObject(patientMap); + List>patientListMap=lymsPatientService.getAppPatientHospital(patientId); + baseResponse.setObject(patientListMap); return baseResponse; } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsPatientMapper.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsPatientMapper.java index 6fc13e6..9b2aacd 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsPatientMapper.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsPatientMapper.java @@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; +import java.util.List; import java.util.Map; /** @@ -19,13 +20,15 @@ public interface LymsPatientMapper extends BaseMapper { int updatePatientCcnt(@Param("cnt") Integer cnt, @Param("id") Integer id); @Select("select" + - " pc.hid,pc.hname \n" + + " ho.hid,ho.hname \n" + "from\n" + " lyms_patient pa\n" + "left join lyms_pcase pc on pc.pid=pa.id\n" + + "left join lyms_hospital ho on ho.hid=pc.hid\n" + "where pa.id=#{patientId}\n" + + "GROUP BY pc.hid\n" + "order by pc.createdtime desc") - Map getAppPatientHospital(@Param("patientId") Integer patientId); + List> getAppPatientHospital(@Param("patientId") Integer patientId); } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java index 85a3f0a..f637a1c 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java @@ -3,6 +3,7 @@ package com.lyms.talkonlineweb.service; import com.lyms.talkonlineweb.domain.LymsPatient; import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; import java.util.Map; /** @@ -10,5 +11,5 @@ import java.util.Map; */ public interface LymsPatientService extends IService { - Map getAppPatientHospital(Integer patientId); + List> getAppPatientHospital(Integer patientId); } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java index 0ed4631..7cb9809 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java @@ -7,6 +7,7 @@ import com.lyms.talkonlineweb.mapper.LymsPatientMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; import java.util.Map; /** @@ -19,7 +20,7 @@ public class LymsPatientServiceImpl extends ServiceImpl getAppPatientHospital(Integer patientId) { + public List> getAppPatientHospital(Integer patientId) { return lymsPatientMapper.getAppPatientHospital(patientId); } }