Commit f6e2ade56b6483bc13fec4df89e9d68ffbca4e7a
1 parent
fd22e35bbc
Exists in
master
and in
6 other branches
commit
Showing 1 changed file with 18 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
f6e2ade
| ... | ... | @@ -2208,10 +2208,13 @@ |
| 2208 | 2208 | |
| 2209 | 2209 | |
| 2210 | 2210 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 2211 | - babyQuery.setYn(YnEnums.YES.getId()); | |
| 2211 | + //去掉yn为1的,程序去处理优化查询 | |
| 2212 | +// babyQuery.setYn(YnEnums.YES.getId()); | |
| 2212 | 2213 | babyQuery.setPhoneOrcardNo(cardNo); |
| 2213 | 2214 | //获取最近一次的建档记录 |
| 2214 | 2215 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
| 2216 | + //去掉删除的数据 | |
| 2217 | + removeDeleted(models); | |
| 2215 | 2218 | if (CollectionUtils.isNotEmpty(models)) { |
| 2216 | 2219 | BabyModel babyModel = models.get(0); |
| 2217 | 2220 | |
| ... | ... | @@ -2268,6 +2271,20 @@ |
| 2268 | 2271 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 2269 | 2272 | objectResponse.setErrormsg("成功"); |
| 2270 | 2273 | return objectResponse; |
| 2274 | + } | |
| 2275 | + | |
| 2276 | + /** | |
| 2277 | + * 移除yn为0 的 | |
| 2278 | + * @param babyModels | |
| 2279 | + */ | |
| 2280 | + private void removeDeleted(List<BabyModel> babyModels){ | |
| 2281 | + if(CollectionUtils.isNotEmpty(babyModels)){ | |
| 2282 | + for(int i=0;i<babyModels.size();i++){ | |
| 2283 | + if((YnEnums.NO.getId()+"").equals(babyModels.get(i).getYn()+"")){ | |
| 2284 | + babyModels.remove(i); | |
| 2285 | + } | |
| 2286 | + } | |
| 2287 | + } | |
| 2271 | 2288 | } |
| 2272 | 2289 | |
| 2273 | 2290 | public void exportChilds(BabyManageRequest request, Integer userId, HttpServletResponse httpServletResponse) { |