Commit 273c64b59e8be68ab7a02656acc31fb576ec8cc6
1 parent
8783b5ad1a
Exists in
master
and in
6 other branches
第一轮测试bug修改,产筛预约时间
Showing 1 changed file with 31 additions and 20 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
View file @
273c64b
| ... | ... | @@ -169,7 +169,7 @@ |
| 169 | 169 | //查询分娩追访记录 |
| 170 | 170 | TrackDown tc = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId).and("trackDownDateType").is(trackType).and("yn").is(1)).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class); |
| 171 | 171 | if (tc != null) { |
| 172 | - map.put("nextCheckTime", tc.getReservatDate()==null?"--": DateUtil.getyyyy_MM_dd(tc.getReservatDate())); // 预约预约时间 | |
| 172 | + map.put("nextCheckTime", tc.getReservatDate() == null ? "--" : DateUtil.getyyyy_MM_dd(tc.getReservatDate())); // 预约预约时间 | |
| 173 | 173 | map.put("yyfsDate", DateUtil.getyyyy_MM_dd(tc.getReservatDate())); /** 预约访视日期 */ |
| 174 | 174 | } |
| 175 | 175 | // map.put("fcCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("trackDownDateType").is(TrackDownDateEnums.G.getId()).and("yn").is(1)), TrackDown.class)); /** 复查次数 */ |
| ... | ... | @@ -187,7 +187,7 @@ |
| 187 | 187 | if (examinationModel.getNextCheckTime() != null) { |
| 188 | 188 | map.put("nextCheckTime", DateUtil.getyyyy_MM_dd(examinationModel.getNextCheckTime())); //预约产检日期 |
| 189 | 189 | } |
| 190 | - }else{ | |
| 190 | + } else { | |
| 191 | 191 | //初诊 |
| 192 | 192 | AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(parentId)).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); |
| 193 | 193 | if (antExChuModel != null) { |
| ... | ... | @@ -419,6 +419,7 @@ |
| 419 | 419 | temp.put("week", DateUtil.getWeekDesc(patients.getLastMenses(), new Date())); /** 孕周 */ |
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | + //产检次数 | |
| 422 | 423 | temp.put("checkCount", mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId).and("hospitalId").is(hospitalId)), AntenatalExaminationModel.class) + mongoTemplate.count(Query.query(Criteria.where("parentId").is(parentId)), AntExChuModel.class)); |
| 423 | 424 | |
| 424 | 425 | TrackDown trackDown = mongoTemplate.findOne(Query.query(Criteria.where("yn").is(1).and("parentId").is(downRecord.getParentId()).and("trackDownDateType").is(downRecord.getTrackType())).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class); |
| 425 | 426 | |
| 426 | 427 | |
| ... | ... | @@ -432,26 +433,36 @@ |
| 432 | 433 | temp.put("yyTime", "--"); // 预约预约时间 |
| 433 | 434 | } |
| 434 | 435 | |
| 435 | - //如果是产前筛查去预约结果 | |
| 436 | - if (downRecord.getTrackType() == TrackDownDateEnums.C.getId()||downRecord.getTrackType() == TrackDownDateEnums.I.getId()) { | |
| 436 | + //如果是产前检查取预约结果 | |
| 437 | + // if (downRecord.getTrackType() == TrackDownDateEnums.C.getId()||downRecord.getTrackType() == TrackDownDateEnums.I.getId()) { | |
| 437 | 438 | |
| 438 | - | |
| 439 | - //复诊 | |
| 440 | - AntenatalExaminationModel examinationModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), AntenatalExaminationModel.class); | |
| 441 | - if (examinationModel != null) { | |
| 442 | - temp.put("cjDate", DateUtil.getyyyy_MM_dd(examinationModel.getCheckDate())); /** 产检日期 */ | |
| 443 | - if (examinationModel.getNextCheckTime() != null) { | |
| 444 | - temp.put("yyTime", DateUtil.getyyyy_MM_dd(examinationModel.getNextCheckTime())); /** 预约产检日期 */ | |
| 439 | + //复诊 | |
| 440 | + AntenatalExaminationModel examinationModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), AntenatalExaminationModel.class); | |
| 441 | + if (examinationModel != null) { | |
| 442 | + temp.put("cjDate", DateUtil.getyyyy_MM_dd(examinationModel.getCheckDate())); /** 产检日期 */ | |
| 443 | + if (examinationModel.getNextCheckTime() != null) { | |
| 444 | + temp.put("yyTime", DateUtil.getyyyy_MM_dd(examinationModel.getNextCheckTime())); /** 预约产检日期 */ | |
| 445 | + } | |
| 446 | + } else { | |
| 447 | + //初诊 | |
| 448 | + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); | |
| 449 | + if (antExChuModel != null) { | |
| 450 | + temp.put("cjDate", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); /** 产检日期 */ | |
| 451 | + if (antExChuModel.getNextCheckTime() != null) { | |
| 452 | + temp.put("yyTime", DateUtil.getyyyy_MM_dd(antExChuModel.getNextCheckTime())); /** 预约产检日期 */ | |
| 445 | 453 | } |
| 446 | - }else{ | |
| 447 | - //初诊 | |
| 448 | - AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); | |
| 449 | - if (antExChuModel != null) { | |
| 450 | - temp.put("cjDate", DateUtil.getyyyy_MM_dd(antExChuModel.getCheckTime())); /** 产检日期 */ | |
| 451 | - if (antExChuModel.getNextCheckTime() != null) { | |
| 452 | - temp.put("yyTime", DateUtil.getyyyy_MM_dd(antExChuModel.getNextCheckTime())); /** 预约产检日期 */ | |
| 453 | - } | |
| 454 | - } | |
| 454 | + } | |
| 455 | + } | |
| 456 | + // } | |
| 457 | + | |
| 458 | + //如果是产筛追访列表,查询产筛预约时间 | |
| 459 | + if (downRecord.getTrackType() == TrackDownDateEnums.D.getId() || downRecord.getTrackType() == TrackDownDateEnums.H.getId()) {//产前筛查 | |
| 460 | + try { | |
| 461 | + //申请产筛单 | |
| 462 | + SieveApplyOrderModel sieveModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), SieveApplyOrderModel.class); | |
| 463 | + temp.put("yyTime", sieveModel.getCheckDate()); | |
| 464 | + } catch (Exception e) { | |
| 465 | + e.printStackTrace(); | |
| 455 | 466 | } |
| 456 | 467 | } |
| 457 | 468 | return temp; |