Commit 29be2bcf0d4181dd1cdea93427bb58d2bf84c0e3
1 parent
cfb1f946fd
Exists in
master
and in
6 other branches
bug
Showing 1 changed file with 10 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
29be2bc
... | ... | @@ -596,7 +596,7 @@ |
596 | 596 | map.put("hospitalName", couponMapper.findHospitalNameById(patient.getHospitalId())); |
597 | 597 | } |
598 | 598 | } |
599 | - map.put("checkTime", getCheckTime((String) map.get("type"), (String) map.get("user_id"))); | |
599 | + map.put("checkTime", getCheckTime((Integer) map.get("type"), (String) map.get("user_id"))); | |
600 | 600 | restList.add(map); |
601 | 601 | } |
602 | 602 | Integer count = couponMapper.findUnUsedInfoCount(CollectionUtils.createMap("userIds", userIds)); |
603 | 603 | |
... | ... | @@ -616,14 +616,14 @@ |
616 | 616 | * 7=儿童建档 lyms_baby |
617 | 617 | * 8=儿童保健 lyms_babycheck |
618 | 618 | */ |
619 | - private String getCheckTime(String type, String userId) { | |
620 | - if(StringUtils.isNotEmpty(type) && StringUtils.isNotEmpty(userId)) { | |
621 | - if("1".equals(type) || "3".equals(type)) { | |
619 | + private String getCheckTime(Integer type, String userId) { | |
620 | + if(type != null && StringUtils.isNotEmpty(userId)) { | |
621 | + if(type == 1 || type == 3) { | |
622 | 622 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), Patients.class); |
623 | 623 | if(patients != null) { |
624 | 624 | return DateUtil.getyyyy_MM_dd(patients.getCreated()); |
625 | 625 | } |
626 | - } else if("2".equals(type)) { | |
626 | + } else if(type == 2) { | |
627 | 627 | AntExChuModel exChuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), AntExChuModel.class); |
628 | 628 | if(exChuModel != null) { |
629 | 629 | return DateUtil.getyyyy_MM_dd(exChuModel.getCreated()); |
630 | 630 | |
631 | 631 | |
632 | 632 | |
633 | 633 | |
... | ... | @@ -632,27 +632,27 @@ |
632 | 632 | if(antenatalExaminationModel != null) { |
633 | 633 | return DateUtil.getyyyy_MM_dd(antenatalExaminationModel.getCreated()); |
634 | 634 | } |
635 | - } else if("4".equals(type)) { | |
635 | + } else if(type == 4) { | |
636 | 636 | MaternalDeliverModel md = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), MaternalDeliverModel.class); |
637 | 637 | if(md != null && md.getCreated() != null) { |
638 | 638 | return DateUtil.getyyyy_MM_dd(md.getCreated()); |
639 | 639 | } |
640 | - } else if("5".equals(type)) { | |
640 | + } else if(type == 5) { | |
641 | 641 | DischargeAbstractMotherModel dischargeAbstractMotherModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), DischargeAbstractMotherModel.class); |
642 | 642 | if(dischargeAbstractMotherModel != null) { |
643 | 643 | return DateUtil.getyyyy_MM_dd(dischargeAbstractMotherModel.getCreateDate()); |
644 | 644 | } |
645 | - } else if("6".equals(type)) { | |
645 | + } else if(type == 6) { | |
646 | 646 | PostReviewModel p = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), PostReviewModel.class); |
647 | 647 | if(p != null && p.getCreated() != null) { |
648 | 648 | return DateUtil.getyyyy_MM_dd(p.getCreated()); |
649 | 649 | } |
650 | - } else if("7".equals(type)) { | |
650 | + } else if(type == 7) { | |
651 | 651 | BabyModel b = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), BabyModel.class); |
652 | 652 | if(b != null && b.getCreated() != null) { |
653 | 653 | return DateUtil.getyyyy_MM_dd(b.getCreated()); |
654 | 654 | } |
655 | - } else if("8".equals(type)) { | |
655 | + } else if(type == 8) { | |
656 | 656 | BabyCheckModel b = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(userId)).with(new Sort(Sort.Direction.DESC, "created")), BabyCheckModel.class); |
657 | 657 | if(b != null && b.getCreated() != null) { |
658 | 658 | return DateUtil.getyyyy_MM_dd(b.getCreated()); |