Commit 2be9e6d2fa829926bb1a1fe96d112a5f0c62b76f
1 parent
8da7840dd8
Exists in
master
and in
6 other branches
年龄查询bug修改
Showing 2 changed files with 58 additions and 7 deletions
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
2be9e6d
... | ... | @@ -224,6 +224,28 @@ |
224 | 224 | */ |
225 | 225 | private Boolean isNull; |
226 | 226 | |
227 | + | |
228 | + private Date startAge; | |
229 | + | |
230 | + private Date endAge; | |
231 | + | |
232 | + | |
233 | + public Date getStartAge() { | |
234 | + return startAge; | |
235 | + } | |
236 | + | |
237 | + public void setStartAge(Date startAge) { | |
238 | + this.startAge = startAge; | |
239 | + } | |
240 | + | |
241 | + public Date getEndAge() { | |
242 | + return endAge; | |
243 | + } | |
244 | + | |
245 | + public void setEndAge(Date endAge) { | |
246 | + this.endAge = endAge; | |
247 | + } | |
248 | + | |
227 | 249 | public Integer getEndCase() { |
228 | 250 | return endCase; |
229 | 251 | } |
... | ... | @@ -523,8 +545,6 @@ |
523 | 545 | } |
524 | 546 | |
525 | 547 | |
526 | - | |
527 | - | |
528 | 548 | public Integer[] getOrServiceStatus() { |
529 | 549 | return orServiceStatus; |
530 | 550 | } |
... | ... | @@ -825,7 +845,7 @@ |
825 | 845 | } |
826 | 846 | |
827 | 847 | if (null != endCase) { |
828 | - condition=condition.and("endCase",endCase,MongoOper.IS); | |
848 | + condition = condition.and("endCase", endCase, MongoOper.IS); | |
829 | 849 | } |
830 | 850 | |
831 | 851 | |
... | ... | @@ -850,7 +870,7 @@ |
850 | 870 | condition = condition.and("liveType", liveType, MongoOper.IS); |
851 | 871 | } |
852 | 872 | |
853 | - if (null != deliverOrg) { | |
873 | + if (null != deliverOrg) { | |
854 | 874 | condition = condition.and("deliverOrg", deliverOrg, MongoOper.IS); |
855 | 875 | } |
856 | 876 | |
... | ... | @@ -1056,6 +1076,26 @@ |
1056 | 1076 | } |
1057 | 1077 | } |
1058 | 1078 | |
1079 | + //母亲年龄查询 | |
1080 | + /* if (null != startAge && null != endAge) { | |
1081 | + if (null != c) { | |
1082 | + c = c.where("mbirth").gte(startAge).lte(endAge); | |
1083 | + } else { | |
1084 | + c = Criteria.where("mbirth").gte(startAge).lte(endAge); | |
1085 | + } | |
1086 | + }*/ | |
1087 | + | |
1088 | + if (null != startAge) { | |
1089 | + c = Criteria.where("mbirth").lte(startAge); | |
1090 | + } | |
1091 | + | |
1092 | + if (null != endAge) { | |
1093 | + if (null != c) { | |
1094 | + c = c.gte(endAge); | |
1095 | + } else { | |
1096 | + c = Criteria.where("mbirth").gte(endAge); | |
1097 | + } | |
1098 | + } | |
1059 | 1099 | |
1060 | 1100 | if (-1 != yn) { |
1061 | 1101 | condition = condition.and("yn", yn, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
2be9e6d
... | ... | @@ -2232,6 +2232,13 @@ |
2232 | 2232 | } |
2233 | 2233 | babyModelQuery.setDataStatus(false); |
2234 | 2234 | babyModelQuery.setDeformityKey(newBabyManagerRequest.getDeformityKey()); |
2235 | + //新加根据母亲年龄查询 | |
2236 | + if (null != newBabyManagerRequest.getStartAge() && null != newBabyManagerRequest.getEndAge()) { | |
2237 | + Date start = DateUtil.getBeforeAge(newBabyManagerRequest.getStartAge()); | |
2238 | + Date end = DateUtil.getBeforeAge(newBabyManagerRequest.getEndAge()+1); | |
2239 | + babyModelQuery.setStartAge(start); | |
2240 | + babyModelQuery.setEndAge(end); | |
2241 | + } | |
2235 | 2242 | babyModelQuery.setDueType(StringUtils.isEmpty(newBabyManagerRequest.getDueType()) ? null : newBabyManagerRequest.getDueType()); |
2236 | 2243 | babyModelQuery.setParentId(StringUtils.isEmpty(newBabyManagerRequest.getPatientId()) ? null : newBabyManagerRequest.getPatientId()); |
2237 | 2244 | if (!newBabyManagerRequest.isExcel()) { |
... | ... | @@ -2276,8 +2283,11 @@ |
2276 | 2283 | MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); |
2277 | 2284 | matDeliverQuery.setYn(YnEnums.YES.getId()); |
2278 | 2285 | matDeliverQuery.setParentIdList(parentIdList); |
2279 | - matDeliverQuery.setStartAge(newBabyManagerRequest.getStartAge()); | |
2280 | - matDeliverQuery.setEndAge(newBabyManagerRequest.getEndAge()); | |
2286 | + | |
2287 | + | |
2288 | + /*matDeliverQuery.setStartAge(newBabyManagerRequest.getStartAge()); | |
2289 | + matDeliverQuery.setEndAge(newBabyManagerRequest.getEndAge());*/ | |
2290 | + | |
2281 | 2291 | List<MaternalDeliverModel> maternalDeliverModelList = matDeliverService.query(matDeliverQuery); |
2282 | 2292 | List<NewBabyManagerQueryModel> newBabyManagerQueryModelList = new ArrayList<>(); |
2283 | 2293 | for (MaternalDeliverModel maternalDeliverModel : maternalDeliverModelList) { |
... | ... | @@ -2754,7 +2764,7 @@ |
2754 | 2764 | List<Map<String, Object>> list = new CopyOnWriteArrayList<>(); |
2755 | 2765 | String cacheKey = query.toString(); |
2756 | 2766 | Object o = cacheExcelData.get(cacheKey); |
2757 | - if (o != null){ | |
2767 | + if (o != null) { | |
2758 | 2768 | list = (List<Map<String, Object>>) o; |
2759 | 2769 | } else { |
2760 | 2770 | list = getMapList(childbirthManagerRequest, query); |
... | ... | @@ -2768,6 +2778,7 @@ |
2768 | 2778 | |
2769 | 2779 | /** |
2770 | 2780 | * 获取maplist 数据 |
2781 | + * | |
2771 | 2782 | * @param childbirthManagerRequest |
2772 | 2783 | * @param query |
2773 | 2784 | * @return |