Commit 04a3893aef11cef6487bf94d7b6d066d9e55ca61
1 parent
d151f411a7
Exists in
master
and in
1 other branch
科室疾病
Showing 1 changed file with 17 additions and 5 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DepartController.java
View file @
04a3893
... | ... | @@ -2,13 +2,11 @@ |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
4 | 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
5 | -import com.lyms.talkonlineweb.domain.LymsDepartill; | |
6 | -import com.lyms.talkonlineweb.domain.LymsDict; | |
7 | -import com.lyms.talkonlineweb.domain.LymsHdepart; | |
8 | -import com.lyms.talkonlineweb.domain.LymsHospital; | |
5 | +import com.lyms.talkonlineweb.domain.*; | |
9 | 6 | import com.lyms.talkonlineweb.result.BaseResponse; |
10 | 7 | import com.lyms.talkonlineweb.service.LymsDepartillService; |
11 | 8 | import com.lyms.talkonlineweb.service.LymsHdepartService; |
9 | +import com.lyms.talkonlineweb.service.LymsIllnessService; | |
12 | 10 | import com.lyms.talkonlineweb.util.Constant; |
13 | 11 | import com.lyms.talkonlineweb.util.JwtUtils; |
14 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
15 | 13 | |
... | ... | @@ -47,10 +45,24 @@ |
47 | 45 | BaseResponse baseResponse=new BaseResponse(); |
48 | 46 | Page<LymsHdepart> page=new Page<>(current,size); |
49 | 47 | Page<LymsHdepart> departPage=lymsHdepartService.page(page, Wrappers.query(depart).orderByDesc("updated_time","createdtime")); |
50 | - | |
48 | + addIll(departPage); | |
51 | 49 | baseResponse.setObject(departPage); |
52 | 50 | |
53 | 51 | return baseResponse; |
52 | + } | |
53 | + | |
54 | + public void addIll(Page<LymsHdepart> departPage){ | |
55 | + departPage.getRecords().forEach(e->{ | |
56 | + Map param=new HashMap(); | |
57 | + param.put("did",e.getDid()); | |
58 | + List<LymsDepartill> iLst=lymsDepartillService.listByMap(param); | |
59 | + iLst.forEach(i->{ | |
60 | + if(e.getIlls()==null){ | |
61 | + e.setIlls(""); | |
62 | + } | |
63 | + e.setIlls(e.getIlls()+i.getIid()+","); | |
64 | + }); | |
65 | + }); | |
54 | 66 | } |
55 | 67 | |
56 | 68 |