Commit a19c0c4dc271821f27a26e2c8e803578297e715a

Authored by Administrator
1 parent c4e8a2854f

修改儿保检查bug

Showing 1 changed file with 15 additions and 28 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ a19c0c4
... ... @@ -762,7 +762,7 @@
762 762 Criteria pCriteria = Criteria.where("yn").ne("0").and("hospitalId").in(hospital);
763 763 if (org.apache.commons.lang.StringUtils.isNotBlank(queryNo)) {
764 764 pCriteria.orOperator(Criteria.where("mcertNo").regex(queryNo), Criteria.where("name").regex(queryNo),
765   - Criteria.where("fphone").regex(queryNo), Criteria.where("vcCardNo").regex(queryNo));
  765 + Criteria.where("fphone").regex(queryNo), Criteria.where("vcCardNo").regex(queryNo), Criteria.where("mname").regex(queryNo));
766 766 flag = true;
767 767 }
768 768 if (flag) {
... ... @@ -798,6 +798,9 @@
798 798 if (null != waskSon) {
799 799 criteria.and("waskSon").is(waskSon);
800 800 }
  801 + if (null != checkMonthAge && null != endCheckMonthAge) {
  802 + criteria.and("checkMonth").gte(checkMonthAge).lte(endCheckMonthAge);
  803 + }
801 804 PageResult pageResult = findMongoPage(BabyCheckModel.class, new Query(criteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit);
802 805 List<BabyCheckModel> babyCheckModelList = (List<BabyCheckModel>) pageResult.getGrid();
803 806 List<Map<String, Object>> list = new ArrayList();
804 807  
... ... @@ -829,20 +832,10 @@
829 832 map.put("weight", babyCheckModel.getWeight());
830 833 list.add(map);
831 834 }
832   - if (null != checkMonthAge && null != endCheckMonthAge) {
833   - List<Map<String, Object>> list1 = new ArrayList<>();
834   - for (Map<String, Object> mapList : list) {
835   - if ((int) mapList.get("monthAge") >= checkMonthAge && (int) mapList.get("monthAge") <= endCheckMonthAge) {
836   - list1.add(mapList);
837   - }
838   - }
839   - pageResult.setGrid(list1);
840   - return RespBuilder.buildSuccess(pageResult);
841   - } else {
842   - pageResult.setGrid(list);
843   - return RespBuilder.buildSuccess(pageResult);
844   - }
  835 + pageResult.setGrid(list);
  836 + return RespBuilder.buildSuccess(pageResult);
845 837  
  838 +
846 839 }
847 840  
848 841 /**
... ... @@ -864,7 +857,7 @@
864 857 Criteria pCriteria = Criteria.where("yn").ne("0").and("hospitalId").in(hospitalIds);
865 858 if (org.apache.commons.lang.StringUtils.isNotBlank(queryNo)) {
866 859 pCriteria.orOperator(Criteria.where("mcertNo").regex(queryNo), Criteria.where("name").regex(queryNo),
867   - Criteria.where("fphone").regex(queryNo), Criteria.where("vcCardNo").regex(queryNo));
  860 + Criteria.where("fphone").regex(queryNo), Criteria.where("vcCardNo").regex(queryNo), Criteria.where("mname").regex(queryNo));
868 861 flag = true;
869 862 }
870 863 if (flag) {
... ... @@ -899,6 +892,9 @@
899 892 if (null != waskSon) {
900 893 criteria.and("waskSon").is(waskSon);
901 894 }
  895 + if (null != checkMonthAge && null != endCheckMonthAge) {
  896 + criteria.and("checkMonth").gte(checkMonthAge).lte(endCheckMonthAge);
  897 + }
902 898 PageResult pageResult = findMongoPage(BabyCheckModel.class, new Query(criteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit);
903 899 List<BabyCheckModel> babyCheckModelList = (List<BabyCheckModel>) pageResult.getGrid();
904 900 List<Map<String, Object>> list = new ArrayList();
... ... @@ -930,19 +926,10 @@
930 926 map.put("weight", babyCheckModel.getWeight());
931 927 list.add(map);
932 928 }
933   - if (null != checkMonthAge && null != endCheckMonthAge) {
934   - List<Map<String, Object>> list1 = new ArrayList<>();
935   - for (Map<String, Object> mapList : list) {
936   - if ((int) mapList.get("monthAge") >= checkMonthAge && (int) mapList.get("monthAge") <= endCheckMonthAge) {
937   - list1.add(mapList);
938   - }
939   - }
940   - pageResult.setGrid(list1);
941   - return RespBuilder.buildSuccess(pageResult);
942   - } else {
943   - pageResult.setGrid(list);
944   - return RespBuilder.buildSuccess(pageResult);
945   - }
  929 +
  930 + pageResult.setGrid(list);
  931 + return RespBuilder.buildSuccess(pageResult);
  932 +
946 933  
947 934 }
948 935