Commit 6006c8f4a5863e4b6daa65a776f04a847151145c
1 parent
ddae0550e9
Exists in
master
and in
6 other branches
小程序配置项修改2
Showing 3 changed files with 39 additions and 14 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/CheckItemManageService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CheckItemManageServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CheckItemManageController.java
platform-biz-service/src/main/java/com/lyms/platform/permission/service/CheckItemManageService.java
View file @
6006c8f
1 | 1 | package com.lyms.platform.permission.service; |
2 | 2 | |
3 | +import com.lyms.platform.common.result.BaseResponse; | |
3 | 4 | import com.lyms.platform.permission.model.CheckItemManage; |
4 | 5 | import com.lyms.platform.permission.model.CheckItemManageQuery; |
5 | 6 | |
... | ... | @@ -17,5 +18,7 @@ |
17 | 18 | public Integer updateCheckItemMagage(CheckItemManage checkItemManage); |
18 | 19 | |
19 | 20 | public List<CheckItemManage> queryCheckItemManage(CheckItemManageQuery checkItemManageQuery); |
21 | + | |
22 | + public BaseResponse xcxGetCheckItemManage(String parentId); | |
20 | 23 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CheckItemManageServiceImpl.java
View file @
6006c8f
1 | 1 | package com.lyms.platform.permission.service.impl; |
2 | 2 | |
3 | +import com.lyms.platform.biz.AntExChuModelTemp; | |
4 | +import com.lyms.platform.common.result.BaseResponse; | |
3 | 5 | import com.lyms.platform.permission.dao.master.MasterCheckItemManageMapper; |
4 | 6 | import com.lyms.platform.permission.model.CheckItemManage; |
5 | 7 | import com.lyms.platform.permission.model.CheckItemManageQuery; |
6 | 8 | import com.lyms.platform.permission.service.CheckItemManageService; |
9 | +import com.lyms.platform.pojo.AntenatalExaminationModel; | |
7 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
11 | +import org.springframework.data.mongodb.core.MongoTemplate; | |
12 | +import org.springframework.data.mongodb.core.query.Criteria; | |
13 | +import org.springframework.data.mongodb.core.query.Query; | |
8 | 14 | import org.springframework.stereotype.Service; |
9 | 15 | |
10 | 16 | import java.util.List; |
... | ... | @@ -15,6 +21,9 @@ |
15 | 21 | @Autowired |
16 | 22 | private MasterCheckItemManageMapper checkItemManageMapper; |
17 | 23 | |
24 | + @Autowired | |
25 | + private MongoTemplate mongoTemplate; | |
26 | + | |
18 | 27 | @Override |
19 | 28 | public List<CheckItemManage> getCheckItemManageList() { |
20 | 29 | return checkItemManageMapper.getCheckItemManageList(); |
... | ... | @@ -44,6 +53,27 @@ |
44 | 53 | @Override |
45 | 54 | public List<CheckItemManage> queryCheckItemManage(CheckItemManageQuery checkItemManageQuery) { |
46 | 55 | return checkItemManageMapper.queryCheckItemManage(checkItemManageQuery); |
56 | + } | |
57 | + | |
58 | + @Override | |
59 | + public BaseResponse xcxGetCheckItemManage(String parentId) { | |
60 | + //获取初诊 | |
61 | + List<AntExChuModelTemp> antExChuModelTemps = mongoTemplate.find(Query.query(Criteria.where("parentId").is(parentId)), AntExChuModelTemp.class); | |
62 | + //获取复诊 | |
63 | + List<AntenatalExaminationModel> antenatalExaminationModels = mongoTemplate.find(Query.query(Criteria.where("parentId").is(parentId)), AntenatalExaminationModel.class); | |
64 | + //1.先查询复诊是否为空 | |
65 | + if (antenatalExaminationModels != null && antenatalExaminationModels.size() > 0) { | |
66 | + for (AntenatalExaminationModel examinationModel : antenatalExaminationModels) { | |
67 | + //通过修改时间获取他的最后一次记录 | |
68 | + System.out.println("==========>" + examinationModel.getModified()); | |
69 | + String string = examinationModel.getConfigItemId(); | |
70 | + System.out.println("===========>" + string); | |
71 | + } | |
72 | + | |
73 | + } | |
74 | + | |
75 | + | |
76 | + return null; | |
47 | 77 | } |
48 | 78 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CheckItemManageController.java
View file @
6006c8f
... | ... | @@ -3,7 +3,6 @@ |
3 | 3 | import com.lyms.platform.common.annotation.TokenRequired; |
4 | 4 | import com.lyms.platform.common.base.BaseController; |
5 | 5 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
6 | -import com.lyms.platform.common.result.BaseObjectResponse; | |
7 | 6 | import com.lyms.platform.common.result.BaseResponse; |
8 | 7 | import com.lyms.platform.common.utils.ResultUtils; |
9 | 8 | import com.lyms.platform.common.utils.StringUtils; |
10 | 9 | |
11 | 10 | |
... | ... | @@ -15,16 +14,11 @@ |
15 | 14 | import com.lyms.platform.permission.service.OrganizationService; |
16 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
17 | 16 | import org.springframework.stereotype.Controller; |
18 | -import org.springframework.web.bind.annotation.RequestMapping; | |
19 | -import org.springframework.web.bind.annotation.RequestMethod; | |
20 | -import org.springframework.web.bind.annotation.RequestParam; | |
21 | -import org.springframework.web.bind.annotation.ResponseBody; | |
17 | +import org.springframework.web.bind.annotation.*; | |
22 | 18 | |
23 | 19 | import javax.servlet.http.HttpServletResponse; |
24 | 20 | import java.util.ArrayList; |
25 | -import java.util.HashMap; | |
26 | 21 | import java.util.List; |
27 | -import java.util.Map; | |
28 | 22 | |
29 | 23 | @Controller |
30 | 24 | @RequestMapping("/checkItemManage") |
... | ... | @@ -53,6 +47,7 @@ |
53 | 47 | checkItemManageQuery.setLimit(limit); |
54 | 48 | checkItemManageQuery.setAffiliateId(affiliateId); |
55 | 49 | List<CheckItemManage> checkItemManagesList = checkItemManageService.queryCheckItemManage(checkItemManageQuery); |
50 | + checkItemManageQuery.setCount(checkItemManagesList.size()); | |
56 | 51 | if (StringUtils.isNotEmpty(affiliateId)) { |
57 | 52 | for (CheckItemManage checkItemManage : checkItemManagesList) { |
58 | 53 | ArrayList<String> lists = new ArrayList<>(); |
59 | 54 | |
60 | 55 | |
... | ... | @@ -184,15 +179,12 @@ |
184 | 179 | /** |
185 | 180 | * x小程序获取医院展示项接口 |
186 | 181 | */ |
187 | - | |
188 | - @RequestMapping(value = "/xcxGetCheckItem") | |
182 | + @RequestMapping(value = "/xcxGetCheckItem/{id}", method = RequestMethod.GET) | |
189 | 183 | @ResponseBody |
190 | - public BaseResponse getCheckItem(String parentId) { | |
191 | - //1.通过parentId去查询是否有这条数据 | |
192 | - | |
193 | - List list = new ArrayList(); | |
194 | - return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(list); | |
184 | + public BaseResponse getCheckItem(@PathVariable String parentId) { | |
185 | + return checkItemManageService.xcxGetCheckItemManage(parentId); | |
195 | 186 | } |
187 | + | |
196 | 188 | |
197 | 189 | } |