Commit 8b02368ee6adee71c14ece16738c43001ff7e27b
1 parent
577008ec8a
Exists in
master
and in
6 other branches
1
Showing 1 changed file with 12 additions and 12 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
View file @
8b02368
| ... | ... | @@ -113,14 +113,14 @@ |
| 113 | 113 | //如果是产筛请求 |
| 114 | 114 | if (null != downQueryRequest.getTrackType() && TrackDownDateEnums.D.getId() == downQueryRequest.getTrackType()) { |
| 115 | 115 | downRecordQuery.setLastMensesStart(DateUtil.addDay(DateUtil.formatDate(new Date()), -140)); |
| 116 | - downRecordQuery.setTrackTypes(Arrays.asList(3,8)); | |
| 117 | - }else if(null != downQueryRequest.getTrackType() && TrackDownDateEnums.C.getId() == downQueryRequest.getTrackType()){ | |
| 118 | - downRecordQuery.setTrackTypes(Arrays.asList(3,9)); | |
| 119 | - }else if(null != downQueryRequest.getTrackType() && TrackDownDateEnums.F.getId() == downQueryRequest.getTrackType()){ | |
| 120 | - downRecordQuery.setTrackTypes(Arrays.asList(6,11)); | |
| 121 | - }else if(null != downQueryRequest.getTrackType() && TrackDownDateEnums.G.getId() == downQueryRequest.getTrackType()){ | |
| 122 | - downRecordQuery.setTrackTypes(Arrays.asList(7,10)); | |
| 123 | - }else{ | |
| 116 | + downRecordQuery.setTrackTypes(Arrays.asList(3, 8)); | |
| 117 | + } else if (null != downQueryRequest.getTrackType() && TrackDownDateEnums.C.getId() == downQueryRequest.getTrackType()) { | |
| 118 | + downRecordQuery.setTrackTypes(Arrays.asList(3, 9)); | |
| 119 | + } else if (null != downQueryRequest.getTrackType() && TrackDownDateEnums.F.getId() == downQueryRequest.getTrackType()) { | |
| 120 | + downRecordQuery.setTrackTypes(Arrays.asList(6, 11)); | |
| 121 | + } else if (null != downQueryRequest.getTrackType() && TrackDownDateEnums.G.getId() == downQueryRequest.getTrackType()) { | |
| 122 | + downRecordQuery.setTrackTypes(Arrays.asList(7, 10)); | |
| 123 | + } else { | |
| 124 | 124 | downRecordQuery.setTrackType(downQueryRequest.getTrackType()); |
| 125 | 125 | } |
| 126 | 126 | /*else if(null != downQueryRequest.getTrackType() && TrackDownDateEnums.E.getId() == downQueryRequest.getTrackType()){ |
| 127 | 127 | |
| 128 | 128 | |
| 129 | 129 | |
| ... | ... | @@ -347,14 +347,14 @@ |
| 347 | 347 | |
| 348 | 348 | temp.put("residenceAddress", CommonsHelper.getFullAddress(downRecord.getProvinceRegisterId(), downRecord.getCityRegisterId(), downRecord.getAreaRegisterId(), downRecord.getAddressRegister(), basicConfigService)); /** 居住地 */ |
| 349 | 349 | temp.put("phone", StringUtils.encryPhone(downRecord.getPhone())); |
| 350 | - TrackDown trackDown = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getResidentsArchiveId()).and("yn").is(1).and("trackDownType").is(downRecord.getTrackType())).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class); | |
| 350 | + List<TrackDown> trackDown = mongoTemplate.find(Query.query(Criteria.where("parentId").is(downRecord.getResidentsArchiveId()).and("yn").is(1).and("trackDownType").is(downRecord.getTrackType())).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class); | |
| 351 | 351 | temp.put("age", DateUtil.getAge(downRecord.getBirth())); |
| 352 | 352 | // 婚检追访结果 |
| 353 | - temp.put("result", trackDown == null ? "--" : trackDown.getResult()); | |
| 353 | + temp.put("result", CollectionUtils.isEmpty(trackDown) ? "--" : trackDown.get(0).getResult()); | |
| 354 | 354 | // 婚检追访时间 |
| 355 | - temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getTrackDownDate())); | |
| 355 | + temp.put("trackDownTime", CollectionUtils.isEmpty(trackDown) ? "--" : DateUtil.getyyyy_MM_dd(trackDown.get(0).getTrackDownDate())); | |
| 356 | 356 | // 预约时间 |
| 357 | - temp.put("yyTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getReservatDate())); | |
| 357 | + temp.put("yyTime", CollectionUtils.isEmpty(trackDown)? "--" : DateUtil.getyyyy_MM_dd(trackDown.get(0).getReservatDate())); | |
| 358 | 358 | return temp; |
| 359 | 359 | } |
| 360 | 360 | } |