Commit 1a5de227cc8fb554588971ee8c72d693908fec5f
1 parent
1bf6e45900
Exists in
master
update code
Showing 2 changed files with 18 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
1a5de22
| ... | ... | @@ -2161,7 +2161,6 @@ | 
| 2161 | 2161 | babyQuery.setHospitalId(hospitalId); | 
| 2162 | 2162 | |
| 2163 | 2163 | babyQuery.setYn(YnEnums.YES.getId()); | 
| 2164 | - Date currentDate = DateUtil.formatDate(new Date()); | |
| 2165 | 2164 | |
| 2166 | 2165 | if (StringUtils.isNotEmpty(request.getBirth())) | 
| 2167 | 2166 | { | 
| 2168 | 2167 | |
| 2169 | 2168 | |
| ... | ... | @@ -2172,14 +2171,13 @@ | 
| 2172 | 2171 | } | 
| 2173 | 2172 | if (request.getMonthAgeStart() != null) | 
| 2174 | 2173 | { | 
| 2175 | - Date start = DateUtil.addMonth(currentDate, -request.getMonthAgeStart()); | |
| 2176 | - babyQuery.setCheckDateEnd(start); | |
| 2174 | + babyQuery.setCheckMonthStart(request.getMonthAgeStart()); | |
| 2177 | 2175 | } | 
| 2178 | 2176 | if (request.getMonthAgeEnd() != null) | 
| 2179 | 2177 | { | 
| 2180 | - Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -request.getMonthAgeEnd() - 1), 1); | |
| 2181 | - babyQuery.setCheckDateStart(end); | |
| 2178 | + babyQuery.setCheckMonthEnd(request.getMonthAgeEnd()); | |
| 2182 | 2179 | } | 
| 2180 | + | |
| 2183 | 2181 | List<BabyGrowthCountResult> result = new ArrayList<>(); | 
| 2184 | 2182 | |
| 2185 | 2183 | Map<String,List<BabyGrowthCountResult>> mapItems = getCountGroupItemMaps(); | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java
View file @
1a5de22
| 1 | 1 | package com.lyms.platform.operate.web.utils; | 
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.biz.service.BabyCheckService; | 
| 4 | +import com.lyms.platform.common.enums.YnEnums; | |
| 5 | +import com.lyms.platform.common.utils.DateUtil; | |
| 4 | 6 | import com.lyms.platform.common.utils.ExceptionUtils; | 
| 7 | +import com.lyms.platform.common.utils.StringUtils; | |
| 5 | 8 | import com.lyms.platform.operate.web.result.BabyGrowthCountResult; | 
| 6 | 9 | import com.lyms.platform.query.BabyCheckModelQuery; | 
| 7 | 10 | import org.apache.commons.collections.CollectionUtils; | 
| 8 | 11 | |
| 9 | 12 | |
| ... | ... | @@ -47,17 +50,27 @@ | 
| 47 | 50 | @Override | 
| 48 | 51 | public List<BabyGrowthCountResult> call() throws Exception { | 
| 49 | 52 | |
| 53 | + BabyCheckModelQuery babyCheckModelQuery = new BabyCheckModelQuery(); | |
| 54 | + babyCheckModelQuery.setYn(YnEnums.YES.getId()); | |
| 55 | + BabyCheckModelQuery babyQuery = new BabyCheckModelQuery(); | |
| 56 | + babyCheckModelQuery.setHospitalId(babyQuery.getHospitalId()); | |
| 57 | + | |
| 58 | + babyQuery.setYn(YnEnums.YES.getId()); | |
| 59 | + babyQuery.setBirthStart(babyQuery.getBirthStart()); | |
| 60 | + babyQuery.setBirthEnd(babyQuery.getBirthEnd()); | |
| 61 | + babyQuery.setCheckMonthEnd(babyQuery.getCheckMonthEnd()); | |
| 62 | + | |
| 50 | 63 | if (CollectionUtils.isNotEmpty(growths)) | 
| 51 | 64 | { | 
| 52 | 65 | for(BabyGrowthCountResult grouwth : growths) | 
| 53 | 66 | { | 
| 54 | 67 | if ("身长".equals(type)) | 
| 55 | 68 | { | 
| 56 | - babyQuery.setHeightEvaluate(grouwth.getEvaluate()); | |
| 69 | + babyCheckModelQuery.setHeightEvaluate(grouwth.getEvaluate()); | |
| 57 | 70 | } | 
| 58 | 71 | else if ("体重".equals(type)) | 
| 59 | 72 | { | 
| 60 | - babyQuery.setWeightEvaluate(grouwth.getEvaluate()); | |
| 73 | + babyCheckModelQuery.setWeightEvaluate(grouwth.getEvaluate()); | |
| 61 | 74 | } | 
| 62 | 75 | grouwth.setTypeName(type); | 
| 63 | 76 | int count = babyCheckService.queryBabyCheckCount(babyQuery); |