Commit 638f942a9c069a006b2d64da71cb73a668b569ae
1 parent
f8003dd374
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 28 additions and 9 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyHealthFacade.java
View file @
638f942
| ... | ... | @@ -167,7 +167,7 @@ |
| 167 | 167 | String areaId,String streetId) { |
| 168 | 168 | boolean flag = false; |
| 169 | 169 | // List<String> hospital = groupsFacade.findGroupHospital(userId, false); |
| 170 | - int[] monthArr = {0, 3, 4, 8, 12, 18, 24, 30, 36, 48, 60, 72};//月龄 | |
| 170 | + int[] monthArr = {1, 3, 6, 8, 12, 18, 24, 30, 36, 48, 60, 72};//月龄 | |
| 171 | 171 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 172 | 172 | Criteria criteria = Criteria.where("yn").ne(0).and("hospitalId").is(hospitalId); |
| 173 | 173 | if(StringUtils.isNotEmpty(provinceId)){ |
| ... | ... | @@ -226,7 +226,7 @@ |
| 226 | 226 | row.put("feedType", feedType); |
| 227 | 227 | for (int i = 0; i < monthArr.length; i++) { |
| 228 | 228 | Map<String, Object> mapAge = new HashMap<>(); |
| 229 | - if (monthArr[i] == babyCheckModel.getCheckMonth().intValue()) { | |
| 229 | + if (monthArr[i] == babyCheckModel.getTcType()) { | |
| 230 | 230 | mapAge.put("height", babyCheckModel.getHeight()); |
| 231 | 231 | mapAge.put("heightEvaluate", babyCheckModel.getHeightEvaluate()); |
| 232 | 232 | mapAge.put("weight", babyCheckModel.getWeight()); |
| 233 | 233 | |
| 234 | 234 | |
| 235 | 235 | |
| 236 | 236 | |
| ... | ... | @@ -1066,21 +1066,40 @@ |
| 1066 | 1066 | } |
| 1067 | 1067 | |
| 1068 | 1068 | |
| 1069 | - public BaseResponse babystatListPrint(String checkTime, String queryNo, Integer startCheckMonthAge, Integer endCheckMonthAge, String nextDate, Integer highRisk, Integer waskSon, String checkDoctorId, Integer page, Integer limit, Integer userId, String level) { | |
| 1069 | + public BaseResponse babystatListPrint(String checkTime, String queryNo, Integer startCheckMonthAge, | |
| 1070 | + Integer endCheckMonthAge, String nextDate, Integer highRisk, | |
| 1071 | + Integer waskSon, String checkDoctorId, Integer page, Integer limit, | |
| 1072 | + Integer userId, String level,Date queryStartBirth, | |
| 1073 | + Date queryEndtBirth,String provinceId,String cityId, | |
| 1074 | + String areaId,String streetId) { | |
| 1070 | 1075 | boolean flag = false; |
| 1071 | 1076 | // List<String> hospital = groupsFacade.findGroupHospital(userId, false); |
| 1072 | - final int[] monthArr = {0, 3, 4, 8, 12, 18, 24, 30, 36, 48, 60, 72};//月龄 | |
| 1077 | + final int[] monthArr = {1, 3, 6, 8, 12, 18, 24, 30, 36, 48, 60, 72};//月龄 | |
| 1073 | 1078 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 1074 | 1079 | Criteria criteria = Criteria.where("yn").ne(0).and("hospitalId").is(hospitalId); |
| 1075 | - Criteria pCriteria = Criteria.where("yn").ne(0).and("hospitalId").is(hospitalId); | |
| 1080 | + if(StringUtils.isNotEmpty(provinceId)){ | |
| 1081 | + criteria.and("provinceId").is(provinceId); | |
| 1082 | + } | |
| 1083 | + if(StringUtils.isNotEmpty(cityId)){ | |
| 1084 | + criteria.and("cityId").is(cityId); | |
| 1085 | + } | |
| 1086 | + if(StringUtils.isNotEmpty(areaId)){ | |
| 1087 | + criteria.and("areaId").is(areaId); | |
| 1088 | + } | |
| 1089 | + if(StringUtils.isNotEmpty(streetId)){ | |
| 1090 | + criteria.and("streetId").is(streetId); | |
| 1091 | + } | |
| 1092 | + if(null!=queryStartBirth&&null!=queryEndtBirth){ | |
| 1093 | + criteria.and("birth").gte(queryStartBirth).lte(queryEndtBirth); | |
| 1094 | + } | |
| 1076 | 1095 | if (org.apache.commons.lang.StringUtils.isNotBlank(queryNo)) { |
| 1077 | - pCriteria.orOperator(Criteria.where("mcertNo").regex(queryNo), Criteria.where("name").regex(queryNo), | |
| 1096 | + criteria.orOperator(Criteria.where("mcertNo").regex(queryNo), Criteria.where("name").regex(queryNo), | |
| 1078 | 1097 | Criteria.where("fphone").regex(queryNo), Criteria.where("vcCardNo").regex(queryNo), Criteria.where("mname").regex(queryNo)); |
| 1079 | 1098 | flag = true; |
| 1080 | 1099 | } |
| 1081 | 1100 | limit=100; |
| 1082 | 1101 | |
| 1083 | - PageResult pageResult = findMongoPage(BabyModel.class, new Query(pCriteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit); | |
| 1102 | + PageResult pageResult = findMongoPage(BabyModel.class, new Query(criteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit); | |
| 1084 | 1103 | |
| 1085 | 1104 | int lastPage=pageResult.getLastPage(); |
| 1086 | 1105 | |
| ... | ... | @@ -1088,7 +1107,7 @@ |
| 1088 | 1107 | |
| 1089 | 1108 | for ( page = 0; page < lastPage; page++) { |
| 1090 | 1109 | long ptime=System.currentTimeMillis(); |
| 1091 | - pageResult = findMongoPage(BabyModel.class, new Query(pCriteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit); | |
| 1110 | + pageResult = findMongoPage(BabyModel.class, new Query(criteria).with(new Sort(Sort.Direction.DESC, "created")), page, limit); | |
| 1092 | 1111 | |
| 1093 | 1112 | List<BabyModel> babykModelsList = (List<BabyModel>) pageResult.getGrid(); |
| 1094 | 1113 | |
| ... | ... | @@ -1129,7 +1148,7 @@ |
| 1129 | 1148 | row.put("feedType", feedType); |
| 1130 | 1149 | for (int i = 0; i < monthArr.length; i++) { |
| 1131 | 1150 | Map<String, Object> mapAge = new HashMap<>(); |
| 1132 | - if (monthArr[i] == babyCheckModel.getCheckMonth().intValue()) { | |
| 1151 | + if (monthArr[i] == babyCheckModel.getTcType()) { | |
| 1133 | 1152 | mapAge.put("height", babyCheckModel.getHeight()); |
| 1134 | 1153 | mapAge.put("heightEvaluate", babyCheckModel.getHeightEvaluate()); |
| 1135 | 1154 | mapAge.put("weight", babyCheckModel.getWeight()); |