Commit e9a2336550118e1153e0b906be8ddae745b656ac
1 parent
0dd72f3c1b
Exists in
master
and in
6 other branches
自动生成追访信息
Showing 3 changed files with 19 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TrackDownController.java
View file @
e9a2336
| ... | ... | @@ -15,8 +15,6 @@ |
| 15 | 15 | import javax.servlet.http.HttpServletRequest; |
| 16 | 16 | import javax.servlet.http.HttpServletResponse; |
| 17 | 17 | import java.util.Date; |
| 18 | -import java.util.HashMap; | |
| 19 | -import java.util.Map; | |
| 20 | 18 | |
| 21 | 19 | /** |
| 22 | 20 | * 追访 |
| ... | ... | @@ -41,7 +39,7 @@ |
| 41 | 39 | } |
| 42 | 40 | |
| 43 | 41 | |
| 44 | - /** | |
| 42 | + /** 追访概况查看追访详情 | |
| 45 | 43 | * @param parentId |
| 46 | 44 | * @param trackType 产考TrackDownDateEnums里面的值 0代表所有 |
| 47 | 45 | * @return |
| ... | ... | @@ -53,7 +51,7 @@ |
| 53 | 51 | return trackDownService.info(parentId, trackType,buildType); |
| 54 | 52 | } |
| 55 | 53 | |
| 56 | - /** | |
| 54 | + /** 其他追访模块查看追访详情 | |
| 57 | 55 | * @param parentId |
| 58 | 56 | * @param trackType 产考TrackDownDateEnums里面的值 0代表所有 |
| 59 | 57 | * @return |
| 60 | 58 | |
| ... | ... | @@ -71,13 +69,14 @@ |
| 71 | 69 | return trackDownService.init(); |
| 72 | 70 | } |
| 73 | 71 | |
| 72 | + /** | |
| 73 | + * 获取追访概况数据 | |
| 74 | + * @return | |
| 75 | + */ | |
| 74 | 76 | @ResponseBody |
| 75 | 77 | @TokenRequired |
| 76 | 78 | @RequestMapping(value = "/all", method = RequestMethod.GET) |
| 77 | 79 | public BaseResponse all(Date buildStart, Date buildEnd, Date checkStart, Date checkEnd, Date fmStart, Date fmEnd, String key,Integer type, @RequestParam Integer page, @RequestParam Integer limit, HttpServletRequest request) { |
| 78 | - Map<String,Object> map = new HashMap<>(); | |
| 79 | - | |
| 80 | - // downFacade.all(map); | |
| 81 | 80 | return trackDownService.all(buildStart, buildEnd, checkStart, checkEnd, fmStart, fmEnd, key, page, limit, getUserId(request),type); |
| 82 | 81 | } |
| 83 | 82 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
View file @
e9a2336
| ... | ... | @@ -213,7 +213,7 @@ |
| 213 | 213 | //产后复查次数 |
| 214 | 214 | map.put("fcCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("yn").is(1)), PostReviewModel.class)); |
| 215 | 215 | //产前检查次数(初诊+复诊) |
| 216 | - map.put("checkCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("hospitalId").is(hospitalId).and("yn").is(1)), AntenatalExaminationModel.class) + mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("yn").is(1)), AntExChuModel.class)); | |
| 216 | + map.put("checkCount", getChuzhenCount(parentId) ); | |
| 217 | 217 | |
| 218 | 218 | |
| 219 | 219 | //复诊 |
| 220 | 220 | |
| ... | ... | @@ -250,7 +250,17 @@ |
| 250 | 250 | return RespBuilder.buildSuccess(map); |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | + | |
| 253 | 254 | /** |
| 255 | + * 获取产检次数 | |
| 256 | + */ | |
| 257 | + private long getChuzhenCount(String parentId) { | |
| 258 | + long antexcCount = mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("yn").is(1)), AntExChuModel.class); | |
| 259 | + long antexCount = mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("yn").is(1)), AntenatalExaminationModel.class); | |
| 260 | + return antexcCount + antexCount; | |
| 261 | + } | |
| 262 | + | |
| 263 | + /** | |
| 254 | 264 | * 获取追访列表 |
| 255 | 265 | * |
| 256 | 266 | * @param downQueryRequest 请求对象 |
| ... | ... | @@ -470,7 +480,7 @@ |
| 470 | 480 | } |
| 471 | 481 | } |
| 472 | 482 | //产检次数 |
| 473 | - temp.put("checkCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("hospitalId").is(hospitalId).and("yn").is(1)), AntenatalExaminationModel.class) + mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("yn").is(1)), AntExChuModel.class)); | |
| 483 | + temp.put("checkCount", getChuzhenCount(parentId)); | |
| 474 | 484 | Criteria criteria = Criteria.where("yn").is(1).and("parentId").is(downRecord.getParentId()); |
| 475 | 485 | if (TrackDownDateEnums.C.getId() == downRecord.getTrackType()) { |
| 476 | 486 | criteria.and("trackDownDateType").in(3, 9); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TrackDownServiceImpl.java
View file @
e9a2336
| ... | ... | @@ -395,7 +395,7 @@ |
| 395 | 395 | */ |
| 396 | 396 | private long getChuzhenCount(String patientId) { |
| 397 | 397 | long antexcCount = mongoTemplate.count(Query.query(Criteria.where("parentId").is(patientId).and("yn").is(1)), AntExChuModel.class); |
| 398 | - long antexCount = mongoTemplate.count(Query.query(Criteria.where("parentid").is(patientId).and("yn").is(1)), AntenatalExaminationModel.class); | |
| 398 | + long antexCount = mongoTemplate.count(Query.query(Criteria.where("parentId").is(patientId).and("yn").is(1)), AntenatalExaminationModel.class); | |
| 399 | 399 | return antexcCount + antexCount; |
| 400 | 400 | } |
| 401 | 401 |