Commit cdf778f43dd9e32a349b721c87c79a3ad72a6792
1 parent
b7b370b47c
Exists in
master
and in
6 other branches
儿童报告添加doctorId
Showing 3 changed files with 18 additions and 25 deletions
platform-dal/src/main/java/com/lyms/platform/query/BabyNutritionQuery.java
View file @
cdf778f
... | ... | @@ -36,7 +36,6 @@ |
36 | 36 | private Date nutritiTimeStart; |
37 | 37 | private Date nutritiTimeEnd; |
38 | 38 | |
39 | - private String interpretDoctorId; | |
40 | 39 | |
41 | 40 | private List<String> ids; |
42 | 41 | |
43 | 42 | |
... | ... | @@ -67,11 +66,7 @@ |
67 | 66 | condition = condition.and("hospitalId", hospitalId, MongoOper.IS); |
68 | 67 | } |
69 | 68 | |
70 | - if (null != interpretDoctorId) { | |
71 | - condition = condition.and("interpretDoctorId", interpretDoctorId, MongoOper.IS); | |
72 | - } | |
73 | 69 | |
74 | - | |
75 | 70 | if (null != doctorId) { |
76 | 71 | condition = condition.and("doctorId", doctorId, MongoOper.IS); |
77 | 72 | } |
... | ... | @@ -102,15 +97,6 @@ |
102 | 97 | return new MongoCondition(c.andOperator(condition.getCriteria())).toMongoQuery(); |
103 | 98 | } |
104 | 99 | return condition.toMongoQuery(); |
105 | - } | |
106 | - | |
107 | - | |
108 | - public String getInterpretDoctorId() { | |
109 | - return interpretDoctorId; | |
110 | - } | |
111 | - | |
112 | - public void setInterpretDoctorId(String interpretDoctorId) { | |
113 | - this.interpretDoctorId = interpretDoctorId; | |
114 | 100 | } |
115 | 101 | |
116 | 102 | public Date getCreatedEnd() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyNutritionController.java
View file @
cdf778f
... | ... | @@ -122,10 +122,9 @@ |
122 | 122 | @RequestMapping(value = "/queryBabyNutritionReport/{id}", method = RequestMethod.GET) |
123 | 123 | @ResponseBody |
124 | 124 | @TokenRequired |
125 | - public BaseObjectResponse queryBabyNutritionReport(@PathVariable("id") String id, HttpServletRequest request//, @RequestParam("doctorId") String doctorId | |
125 | + public BaseObjectResponse queryBabyNutritionReport(@PathVariable("id") String id, HttpServletRequest request, @RequestParam("doctorId") String doctorId | |
126 | 126 | ) { |
127 | - //return babyNutritionFacade.queryBabyNutritionReport(id, getUserId(request), doctorId); | |
128 | - return babyNutritionFacade.queryBabyNutritionReport(id, getUserId(request)); | |
127 | + return babyNutritionFacade.queryBabyNutritionReport(id, getUserId(request), doctorId); | |
129 | 128 | } |
130 | 129 | |
131 | 130 | /** |
132 | 131 | |
... | ... | @@ -134,9 +133,9 @@ |
134 | 133 | @RequestMapping(value = "/queryBabyDietReport/{id}", method = RequestMethod.GET) |
135 | 134 | @ResponseBody |
136 | 135 | @TokenRequired |
137 | - public BaseObjectResponse queryBabyDietReport(@PathVariable("id") String id, HttpServletRequest request//, @RequestParam("doctorId")String doctorId | |
136 | + public BaseObjectResponse queryBabyDietReport(@PathVariable("id") String id, HttpServletRequest request, @RequestParam("doctorId")String doctorId | |
138 | 137 | ) { |
139 | - return babyNutritionFacade.queryBabyDietReport(id, getUserId(request)); | |
138 | + return babyNutritionFacade.queryBabyDietReport(id, getUserId(request), doctorId); | |
140 | 139 | } |
141 | 140 | |
142 | 141 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
View file @
cdf778f
... | ... | @@ -242,10 +242,18 @@ |
242 | 242 | babyQuery.setBabyIds(babyIds); |
243 | 243 | babyQuery.setLimit(limit); |
244 | 244 | babyQuery.setPage(page); |
245 | + | |
246 | + ArrayList<String> arrayList = new ArrayList<>(); | |
247 | + | |
245 | 248 | if (StringUtils.isNotEmpty(interpretDoctorId)) { |
246 | - babyQuery.setInterpretDoctorId(interpretDoctorId); | |
249 | + List<HealthChargeModel> models = mongoTemplate.find(Query.query(Criteria.where("doctorId").is(interpretDoctorId).and("healthType").is(5)), HealthChargeModel.class); | |
250 | + if (CollectionUtils.isNotEmpty(models)) { | |
251 | + for (HealthChargeModel model : models) { | |
252 | + arrayList.add(model.getBabyNutritionId()); | |
253 | + } | |
254 | + } | |
247 | 255 | } |
248 | - ArrayList<String> arrayList = new ArrayList<>(); | |
256 | + | |
249 | 257 | if (StringUtils.isNotEmpty(settleStatus)) { |
250 | 258 | List<HealthChargeModel> models = mongoTemplate.find(Query.query(Criteria.where("status").is(Integer.parseInt(settleStatus)).and("healthType").is(5)), HealthChargeModel.class); |
251 | 259 | if (CollectionUtils.isNotEmpty(models)) { |
... | ... | @@ -363,7 +371,7 @@ |
363 | 371 | return null; |
364 | 372 | } |
365 | 373 | |
366 | - public BaseObjectResponse queryBabyNutritionReport(String id, Integer userId) { | |
374 | + public BaseObjectResponse queryBabyNutritionReport(String id, Integer userId, String doctorId) { | |
367 | 375 | |
368 | 376 | |
369 | 377 | Map data = new HashMap(); |
... | ... | @@ -660,7 +668,7 @@ |
660 | 668 | |
661 | 669 | data.put("wlysitems", wlysitems); |
662 | 670 | |
663 | - healthChargeFacade.addHealthCharge(hospitalId, 5, baby.getId(), null, null, userId, model.getInterpretDoctorId(), true, model.getId()); | |
671 | + healthChargeFacade.addHealthCharge(hospitalId, 5, baby.getId(), null, null, userId, doctorId, true, model.getId()); | |
664 | 672 | } |
665 | 673 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
666 | 674 | objectResponse.setData(data); |
... | ... | @@ -1285,7 +1293,7 @@ |
1285 | 1293 | /** |
1286 | 1294 | * 秦皇岛精简版儿童膳食报告 |
1287 | 1295 | */ |
1288 | - public BaseObjectResponse queryBabyDietReport(String id, Integer userId //String doctorId | |
1296 | + public BaseObjectResponse queryBabyDietReport(String id, Integer userId ,String doctorId | |
1289 | 1297 | ) { |
1290 | 1298 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
1291 | 1299 | Map data = new HashMap(); |
... | ... | @@ -1506,7 +1514,7 @@ |
1506 | 1514 | } |
1507 | 1515 | |
1508 | 1516 | |
1509 | - healthChargeFacade.addHealthCharge(hospitalId, 5, baby.getId(), null, null, userId, model.getInterpretDoctorId(), true, model.getId()); | |
1517 | + healthChargeFacade.addHealthCharge(hospitalId, 5, baby.getId(), null, null, userId, doctorId, true, model.getId()); | |
1510 | 1518 | } |
1511 | 1519 | objectResponse.setData(data); |
1512 | 1520 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |