Commit 7fe5e20d6a874c35d48d040f7d530cf90f307b38
1 parent
8f9cdf820a
Exists in
master
and in
6 other branches
bug
Showing 2 changed files with 37 additions and 9 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
7fe5e20
... | ... | @@ -434,12 +434,16 @@ |
434 | 434 | return RespBuilder.buildSuccess(pw); |
435 | 435 | } |
436 | 436 | |
437 | - Map<String, Object> m = new HashMap<>(); | |
438 | - m.put("hospitalId", hospitalId); | |
439 | - m.put("hospitalName", couponMapper.getHospitalName(hospitalId)); | |
440 | - m.put("date", ymdDate); | |
441 | - m.put("nowWeight", nowWeight); | |
442 | - dayWeights2.add(m); | |
437 | + if(StringUtils.isNotEmpty(nowWeight)) { | |
438 | + Map<String, Object> m = new HashMap<>(); | |
439 | + m.put("hospitalId", hospitalId); | |
440 | + m.put("hospitalName", couponMapper.getHospitalName(hospitalId)); | |
441 | + m.put("date", ymdDate); | |
442 | + m.put("nowWeight", nowWeight); | |
443 | + dayWeights2.add(m); | |
444 | + patientWeight.setDayWeights2(dayWeights2); | |
445 | + } | |
446 | + | |
443 | 447 | dayWeights.put(DateUtil.getyyyy_MM_dd(new Date()), nowWeight); |
444 | 448 | patientWeight.setCreated(new Date()); |
445 | 449 | patientWeight.setHospitalId(patients.getHospitalId()); |
... | ... | @@ -448,7 +452,6 @@ |
448 | 452 | } |
449 | 453 | patientWeight.setYn("1"); |
450 | 454 | patientWeight.setPid(patients.getPid()); |
451 | - patientWeight.setDayWeights2(dayWeights2); | |
452 | 455 | patientWeight.setDayWeights(dayWeights); |
453 | 456 | patientWeight.setId(null); |
454 | 457 | patientWeightService2.add(patientWeight); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
7fe5e20
... | ... | @@ -30,7 +30,6 @@ |
30 | 30 | import org.springframework.data.mongodb.core.query.Query; |
31 | 31 | import org.springframework.stereotype.Service; |
32 | 32 | import org.springframework.util.Assert; |
33 | -import scala.annotation.target.param; | |
34 | 33 | |
35 | 34 | import javax.servlet.http.HttpServletResponse; |
36 | 35 | import java.sql.PreparedStatement; |
37 | 36 | |
... | ... | @@ -597,13 +596,39 @@ |
597 | 596 | map.put("hospitalName", couponMapper.findHospitalNameById(patient.getHospitalId())); |
598 | 597 | } |
599 | 598 | } |
600 | - map.put("checkTime", "2017-02-22"); | |
599 | + map.put("checkTime", getCheckTime((String) map.get("type"), (String) map.get("user_id"))); | |
601 | 600 | restList.add(map); |
602 | 601 | } |
603 | 602 | Integer count = couponMapper.findUnUsedInfoCount(CollectionUtils.createMap("userIds", userIds)); |
604 | 603 | return RespBuilder.buildSuccess(new PageResult(count, page, limit, restList)); |
605 | 604 | } |
606 | 605 | return RespBuilder.buildSuccess(new PageResult(0, page, limit, null)); |
606 | + } | |
607 | + | |
608 | + /** | |
609 | + * type | |
610 | + * 1=孕妇建档 lyms_patient | |
611 | + * 2=孕妇产检 lyms_antexc(初诊),lyms_antex(复诊) | |
612 | + * 3=产妇建档 lyms_patient | |
613 | + * 4=产妇分娩 lyms_matdeliver | |
614 | + * 5=产妇出院小结 lyms_discharge_abstract_mother | |
615 | + * 6=产妇产后复查 lyms_postreview | |
616 | + * 7=儿童建档 lyms_baby | |
617 | + * 8=儿童保健 lyms_babycheck | |
618 | + */ | |
619 | + private String getCheckTime(String type, String userId) { | |
620 | + if(StringUtils.isNotEmpty(type) && StringUtils.isNotEmpty(userId)) { | |
621 | + if("1".equals(type)) { | |
622 | + Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), Patients.class); | |
623 | + if(patients != null && patients.getBookbuildingDate() != null) { | |
624 | + return DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate()); | |
625 | + } | |
626 | + } else if("2".equals(type)) { | |
627 | + | |
628 | + } | |
629 | + } | |
630 | + | |
631 | + return ""; | |
607 | 632 | } |
608 | 633 | |
609 | 634 | @Override |