Commit c76015edfef5b330d9cb56cdeb3ffb87838d3088
1 parent
b764f1d20e
Exists in
master
update
Showing 4 changed files with 11 additions and 6 deletions
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsPatientMapper.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
c76015e
... | ... | @@ -516,8 +516,8 @@ |
516 | 516 | @GetMapping("getAppPatientHospital") |
517 | 517 | public BaseResponse getAppPatientHospital(Integer patientId) { |
518 | 518 | BaseResponse baseResponse = new BaseResponse(); |
519 | - Map<String,String> patientMap=lymsPatientService.getAppPatientHospital(patientId); | |
520 | - baseResponse.setObject(patientMap); | |
519 | + List<Map<String,String>>patientListMap=lymsPatientService.getAppPatientHospital(patientId); | |
520 | + baseResponse.setObject(patientListMap); | |
521 | 521 | return baseResponse; |
522 | 522 | } |
523 | 523 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsPatientMapper.java
View file @
c76015e
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | import org.apache.ibatis.annotations.Select; |
8 | 8 | import org.apache.ibatis.annotations.Update; |
9 | 9 | |
10 | +import java.util.List; | |
10 | 11 | import java.util.Map; |
11 | 12 | |
12 | 13 | /** |
13 | 14 | |
14 | 15 | |
15 | 16 | |
... | ... | @@ -19,12 +20,14 @@ |
19 | 20 | int updatePatientCcnt(@Param("cnt") Integer cnt, @Param("id") Integer id); |
20 | 21 | |
21 | 22 | @Select("select" + |
22 | - " pc.hid,pc.hname \n" + | |
23 | + " ho.hid,ho.hname \n" + | |
23 | 24 | "from\n" + |
24 | 25 | " lyms_patient pa\n" + |
25 | 26 | "left join lyms_pcase pc on pc.pid=pa.id\n" + |
27 | + "left join lyms_hospital ho on ho.hid=pc.hid\n" + | |
26 | 28 | "where pa.id=#{patientId}\n" + |
29 | + "GROUP BY pc.hid\n" + | |
27 | 30 | "order by pc.createdtime desc") |
28 | - Map<String,String> getAppPatientHospital(@Param("patientId") Integer patientId); | |
31 | + List<Map<String,String>> getAppPatientHospital(@Param("patientId") Integer patientId); | |
29 | 32 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsPatientService.java
View file @
c76015e
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 | import com.lyms.talkonlineweb.domain.LymsPatient; |
4 | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | 5 | |
6 | +import java.util.List; | |
6 | 7 | import java.util.Map; |
7 | 8 | |
8 | 9 | /** |
... | ... | @@ -10,6 +11,6 @@ |
10 | 11 | */ |
11 | 12 | public interface LymsPatientService extends IService<LymsPatient> { |
12 | 13 | |
13 | - Map<String,String> getAppPatientHospital(Integer patientId); | |
14 | + List<Map<String,String>> getAppPatientHospital(Integer patientId); | |
14 | 15 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsPatientServiceImpl.java
View file @
c76015e
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
8 | 8 | import org.springframework.stereotype.Service; |
9 | 9 | |
10 | +import java.util.List; | |
10 | 11 | import java.util.Map; |
11 | 12 | |
12 | 13 | /** |
... | ... | @@ -19,7 +20,7 @@ |
19 | 20 | @Autowired |
20 | 21 | private LymsPatientMapper lymsPatientMapper; |
21 | 22 | @Override |
22 | - public Map<String,String> getAppPatientHospital(Integer patientId) { | |
23 | + public List<Map<String,String>> getAppPatientHospital(Integer patientId) { | |
23 | 24 | return lymsPatientMapper.getAppPatientHospital(patientId); |
24 | 25 | } |
25 | 26 | } |