Commit 523e2cc86aa226479a33763aabeaf7a98f6fcb54
1 parent
bbbb09b2d9
Exists in
master
and in
6 other branches
修复bug
Showing 2 changed files with 29 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/query/ChargeRecordQuery.java
View file @
523e2cc
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | import org.springframework.data.mongodb.core.query.Criteria; |
9 | 9 | |
10 | 10 | import java.util.Date; |
11 | +import java.util.List; | |
11 | 12 | |
12 | 13 | /** |
13 | 14 | * Created by Administrator on 2016/6/21 0021. |
... | ... | @@ -17,6 +18,8 @@ |
17 | 18 | |
18 | 19 | private String id; |
19 | 20 | |
21 | + private List<String> ids; | |
22 | + | |
20 | 23 | private Integer yn; |
21 | 24 | |
22 | 25 | //医院id |
23 | 26 | |
... | ... | @@ -39,7 +42,14 @@ |
39 | 42 | private Date createdStart; |
40 | 43 | private Date createdEnd; |
41 | 44 | |
45 | + public List<String> getIds() { | |
46 | + return ids; | |
47 | + } | |
42 | 48 | |
49 | + public void setIds(List<String> ids) { | |
50 | + this.ids = ids; | |
51 | + } | |
52 | + | |
43 | 53 | //结算状态 |
44 | 54 | private Integer status; |
45 | 55 | |
... | ... | @@ -52,6 +62,10 @@ |
52 | 62 | } |
53 | 63 | if (null != id) { |
54 | 64 | condition = condition.and("id", id, MongoOper.IS); |
65 | + } | |
66 | + | |
67 | + if (null != ids) { | |
68 | + condition = condition.and("id", ids, MongoOper.IN); | |
55 | 69 | } |
56 | 70 | |
57 | 71 | if (null != hospitalId) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java
View file @
523e2cc
... | ... | @@ -1122,6 +1122,21 @@ |
1122 | 1122 | } |
1123 | 1123 | chargeRecordQuery.setCreatedStart(startTime); |
1124 | 1124 | chargeRecordQuery.setCreatedEnd(endTime); |
1125 | + if (request.getInterpretDoctorId() != null) { | |
1126 | + String interpretDoctorId = request.getInterpretDoctorId(); | |
1127 | + List<HealthChargeModel> models = mongoTemplate.find(Query.query(Criteria.where("doctorId").is(interpretDoctorId). | |
1128 | + and("healthType").is("5").and("status").is("2")), HealthChargeModel.class); | |
1129 | + ArrayList<String> list = new ArrayList<>(); | |
1130 | + if (CollectionUtils.isEmpty(models)) { | |
1131 | + return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(listData).setPageInfo(chargeRecordQuery.getPageInfo()); | |
1132 | + } | |
1133 | + for (HealthChargeModel model : models){ | |
1134 | + list.add(model.getChargeRecordId()); | |
1135 | + } | |
1136 | + if (list.size() > 0) { | |
1137 | + chargeRecordQuery.setIds(list); | |
1138 | + } | |
1139 | + } | |
1125 | 1140 | |
1126 | 1141 | List<ChargeRecordModel> list = chargeRecordService.queryChargeRecordList(chargeRecordQuery); |
1127 | 1142 | if (CollectionUtils.isNotEmpty(list)) { |