Commit 976d50f6efee5f3cf995ea879480826b27187b2a
1 parent
fbf53eb3a5
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 5 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MicroelementFacade.java
View file @
976d50f
... | ... | @@ -175,10 +175,10 @@ |
175 | 175 | if (start != null && end != null) |
176 | 176 | { |
177 | 177 | Date currentDate = new Date(); |
178 | - Date start1 = DateUtil.addMonth(currentDate, -start); | |
179 | - Date end2 = DateUtil.addDay(DateUtil.addMonth(currentDate, -end - 1), 1); | |
180 | - query.setBirthStart(end2); | |
181 | - query.setBirthEnd(start1); | |
178 | + Date endDate = DateUtil.addMonth(currentDate, -start); | |
179 | + Date startDate = DateUtil.addDay(DateUtil.addMonth(currentDate, -end - 1), 1); | |
180 | + query.setBirthStart(startDate); | |
181 | + query.setBirthEnd(endDate); | |
182 | 182 | } |
183 | 183 | System.out.println(query.convertToQuery().convertToMongoQuery().toString()); |
184 | 184 | List<MicroelementModel> models = microelementService.queryMicroelementList(query); |
... | ... | @@ -198,7 +198,7 @@ |
198 | 198 | data.put("vcCardNo",babyModel.getVcCardNo()); |
199 | 199 | data.put("mcardNo",babyModel.getMcertNo()); |
200 | 200 | data.put("microelements", model.getMicroelements()); |
201 | - data.put("age", DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
201 | + data.put("age", com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date()))); | |
202 | 202 | data.put("mname", babyModel.getMname()); |
203 | 203 | data.put("created", DateUtil.getyyyy_MM_dd(model.getCreated())); |
204 | 204 | dataList.add(data); |