Commit d43f518ab3c6a6e19535a7d3182e2879588f4a4c
1 parent
8fa53b828d
Exists in
master
医生端--回话会话列表获取患者信息
Showing 5 changed files with 61 additions and 4 deletions
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsChatgroupMapper.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsChatgroupService.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsChatgroupServiceImpl.java
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
d43f518
... | ... | @@ -15,10 +15,7 @@ |
15 | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
16 | 16 | import org.springframework.web.bind.annotation.RestController; |
17 | 17 | |
18 | -import java.util.Date; | |
19 | -import java.util.HashMap; | |
20 | -import java.util.List; | |
21 | -import java.util.Map; | |
18 | +import java.util.*; | |
22 | 19 | |
23 | 20 | @RestController |
24 | 21 | @RequestMapping("chat") |
... | ... | @@ -42,6 +39,9 @@ |
42 | 39 | @Autowired |
43 | 40 | private HXService hxService; |
44 | 41 | |
42 | + @Autowired | |
43 | + private LymsTcardService lymsTcardService; | |
44 | + | |
45 | 45 | /** |
46 | 46 | * 添加或删除聊天组 |
47 | 47 | * |
... | ... | @@ -127,5 +127,31 @@ |
127 | 127 | } |
128 | 128 | |
129 | 129 | } |
130 | + | |
131 | + /** | |
132 | + * 医生端--回话会话列表获取患者信息 | |
133 | + * @param froms 发送人员ID | |
134 | + * @param did 问诊医生ID | |
135 | + * @param groupids 群组ID | |
136 | + * @return | |
137 | + */ | |
138 | + @PostMapping("getPinfoBySession") | |
139 | + public BaseResponse getPinfoBySesson(String froms,String did,String groupids){ | |
140 | + BaseResponse baseResponse = new BaseResponse(); | |
141 | + List<Map<String,Object>> psList=new ArrayList<>(); | |
142 | + | |
143 | + String[] fromArr=froms.split(","); | |
144 | + | |
145 | + for (int i = 0; i < fromArr.length; i++) { | |
146 | + List<Map<String,Object>> tmpList=lymsChatgroupService.getPinfoBySesson(fromArr[i],did); | |
147 | + if (tmpList.size()>0) { | |
148 | + psList.add(tmpList.get(0)); | |
149 | + } | |
150 | + } | |
151 | + | |
152 | + baseResponse.setObject(psList); | |
153 | + return baseResponse; | |
154 | + } | |
155 | + | |
130 | 156 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java
View file @
d43f518
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsChatgroupMapper.java
View file @
d43f518
... | ... | @@ -2,11 +2,18 @@ |
2 | 2 | |
3 | 3 | import com.lyms.talkonlineweb.domain.LymsChatgroup; |
4 | 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
5 | +import org.apache.ibatis.annotations.Param; | |
6 | +import org.apache.ibatis.annotations.Select; | |
5 | 7 | |
8 | +import java.util.List; | |
9 | +import java.util.Map; | |
10 | + | |
6 | 11 | /** |
7 | 12 | * @Entity com.lyms.talkonlineweb.domain.LymsChatgroup |
8 | 13 | */ |
9 | 14 | public interface LymsChatgroupMapper extends BaseMapper<LymsChatgroup> { |
10 | 15 | |
16 | + @Select("SELECT p.`id`, `pname`, `idno`, `ppasswd`, `sex`, `birth`, IFNULL(`headimg`,'') headimg, `ccnt`, `islogin`, `openid`, `hxid`, `pid`, `pcid`, `did`, `cid`, `fid`, `stat` FROM lyms_patient p,lyms_tkrecord r WHERE p.`id`=r.`pid` AND p.`idno` = #{froms} AND r.`did`=#{did} ORDER BY r.`createdtime` DESC") | |
17 | + List<Map<String, Object>> getPinfoBySesson(@Param("froms") String froms,@Param("did") String did); | |
11 | 18 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsChatgroupService.java
View file @
d43f518
... | ... | @@ -3,10 +3,20 @@ |
3 | 3 | import com.lyms.talkonlineweb.domain.LymsChatgroup; |
4 | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | 5 | |
6 | +import java.util.List; | |
7 | +import java.util.Map; | |
8 | + | |
6 | 9 | /** |
7 | 10 | * |
8 | 11 | */ |
9 | 12 | public interface LymsChatgroupService extends IService<LymsChatgroup> { |
10 | 13 | |
14 | + /** | |
15 | + * 医生端--回话会话列表获取患者信息 | |
16 | + * @param froms | |
17 | + * @param did | |
18 | + * @return | |
19 | + */ | |
20 | + List<Map<String, Object>> getPinfoBySesson(String froms, String did); | |
11 | 21 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsChatgroupServiceImpl.java
View file @
d43f518
... | ... | @@ -4,8 +4,12 @@ |
4 | 4 | import com.lyms.talkonlineweb.domain.LymsChatgroup; |
5 | 5 | import com.lyms.talkonlineweb.service.LymsChatgroupService; |
6 | 6 | import com.lyms.talkonlineweb.mapper.LymsChatgroupMapper; |
7 | +import org.springframework.beans.factory.annotation.Autowired; | |
7 | 8 | import org.springframework.stereotype.Service; |
8 | 9 | |
10 | +import java.util.List; | |
11 | +import java.util.Map; | |
12 | + | |
9 | 13 | /** |
10 | 14 | * |
11 | 15 | */ |
... | ... | @@ -13,5 +17,12 @@ |
13 | 17 | public class LymsChatgroupServiceImpl extends ServiceImpl<LymsChatgroupMapper, LymsChatgroup> |
14 | 18 | implements LymsChatgroupService{ |
15 | 19 | |
20 | + @Autowired | |
21 | + private LymsChatgroupMapper lymsChatgroupMapper; | |
22 | + | |
23 | + @Override | |
24 | + public List<Map<String, Object>> getPinfoBySesson(String froms, String did) { | |
25 | + return lymsChatgroupMapper.getPinfoBySesson(froms,did); | |
26 | + } | |
16 | 27 | } |