Commit 0f69b1d263ee47a84332930ff3ea815f3bc0cdbf
1 parent
60c5c15955
Exists in
master
and in
6 other branches
1
Showing 1 changed file with 20 additions and 12 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java
View file @
0f69b1d
... | ... | @@ -75,6 +75,7 @@ |
75 | 75 | trackDownTypeHandlerMap = new HashMap<>(); |
76 | 76 | trackDownTypeHandlerMap.put(TrackDownDateEnums.A.getId(), new FQTrackDownTypeHandler()); |
77 | 77 | trackDownTypeHandlerMap.put(TrackDownDateEnums.B.getId(), new FQTrackDownTypeHandler()); |
78 | + trackDownTypeHandlerMap.put(TrackDownDateEnums.C.getId(), new CJTrackDownTypeHandler()); | |
78 | 79 | } |
79 | 80 | |
80 | 81 | /** |
81 | 82 | |
82 | 83 | |
... | ... | @@ -249,21 +250,28 @@ |
249 | 250 | @Override |
250 | 251 | public Map build(TrackDownRecord downRecord, MongoTemplate mongoTemplate) { |
251 | 252 | Map<String, Object> temp = new HashMap<>(); |
252 | - temp.put("id", downRecord.getParentId()); | |
253 | - temp.put("pid", downRecord.getPid()); | |
254 | - temp.put("residentsArchiveId", ""); | |
255 | 253 | temp.put("username", downRecord.getUsername()); |
256 | - temp.put("cardNo", downRecord.getCardNo()); | |
254 | + temp.put("age", DateUtil.getAge(downRecord.getBirth())); | |
255 | + temp.put("cardNo", StringUtils.encryCardNo(downRecord.getCardNo())); | |
257 | 256 | temp.put("residenceAddress", CommonsHelper.getFullAddress(downRecord.getProvinceRegisterId(), downRecord.getCityRegisterId(), downRecord.getAreaRegisterId(), downRecord.getAddressRegister(), basicConfigService)); /** 居住地 */ |
258 | 257 | temp.put("phone", StringUtils.encryPhone(downRecord.getPhone())); |
259 | - TrackDown trackDown = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(downRecord.getParentId()).and("yn").is(1)).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class); | |
260 | - temp.put("age", DateUtil.getAge(downRecord.getBirth())); | |
261 | - // 婚检追访结果 | |
262 | - temp.put("result", trackDown == null ? "--" : TrackDownTransferEnums.getName(trackDown.getTrackDownType())); | |
263 | - // 婚检追访时间 | |
264 | - temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getTrackDownDate())); | |
265 | - // 预约时间 | |
266 | - temp.put("yyTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getReservatDate())); | |
258 | + temp.put("id", downRecord.getId()); | |
259 | + temp.put("parentId", downRecord.getParentId()); | |
260 | +// temp.put("dueDate", DateUtil.getyyyy_MM_dd(patient.getDueDate())); | |
261 | +// temp.put("week", DateUtil.getWeekDesc(patient.getLastMenses(), new Date())); /** 孕周 */ | |
262 | + temp.put("cjDate", ""); /** 产检日期 */ | |
263 | + temp.put("yycjDate", ""); /** 预约产检日期 */ | |
264 | + temp.put("cjzfDate", ""); /** 产检追访时间 */ | |
265 | + TrackDown trackDown = mongoTemplate.findOne(Query.query(Criteria.where("yn").is(1).and("parentId").is(downRecord.getParentId())).with(new Sort(Sort.Direction.DESC, "created")), TrackDown.class); | |
266 | + if (trackDown != null) { | |
267 | + temp.put("result", StringUtils.isEmpty(trackDown.getResult()) ? "--" : trackDown.getResult()); // 婚检追访结果 | |
268 | + temp.put("trackDownTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getTrackDownDate())); // 追访时间 | |
269 | + temp.put("yyTime", trackDown == null ? "--" : DateUtil.getyyyy_MM_dd(trackDown.getReservatDate())); // 预约时间 | |
270 | + } else { | |
271 | + temp.put("result", "--"); // 婚检追访结果 | |
272 | + temp.put("trackDownTime", "--"); // 追访时间 | |
273 | + temp.put("yyTime", "--"); // 预约时间 | |
274 | + } | |
267 | 275 | return temp; |
268 | 276 | } |
269 | 277 | } |