| | |
| | | } |
| | | |
| | | final MallCategory byId = mallCategoryService.getById(aPackage.getCategoryId()); |
| | | if (byId!=null){ |
| | | if (byId != null) { |
| | | aPackage.setCategoryNames(byId.getName()); |
| | | } |
| | | } |
| | |
| | | @GetMapping("getList") |
| | | @ApiOperation(value = "查询体检套餐列表") |
| | | public TableDataInfo getList(@RequestParam(required = false) @ApiParam(value = "性别") String cusSex) { |
| | | List<TjPackage> tjPackageList = null; |
| | | List<TjPackage> list = null; |
| | | if (cusSex == null || cusSex.equals("2")) { |
| | | if (redisCache.hasKey("getTjPackageListBySex")) { |
| | | list = redisCache.getCacheMapValue("getTjPackageListBySex", "getTjPackageListByManAndWoMan"); |
| | | } else { |
| | | tjPackageList = tjPackageService.list(new LambdaQueryWrapper<TjPackage>().eq(TjPackage::getPacStatus,0)); |
| | | } |
| | | // List<TjPackage> tjPackageList = null; |
| | | // List<TjPackage> list = null; |
| | | // if (cusSex == null || cusSex.equals("2")) { |
| | | // if (redisCache.hasKey("getTjPackageListBySex")) { |
| | | // list = redisCache.getCacheMapValue("getTjPackageListBySex", "getTjPackageListByManAndWoMan"); |
| | | // } else { |
| | | // tjPackageList = tjPackageService.list(new LambdaQueryWrapper<TjPackage>().eq(TjPackage::getPacStatus,0)); |
| | | // } |
| | | // } else { |
| | | // if (cusSex.equals("0")) { |
| | | // if (redisCache.hasKey("getTjPackageListBySex")) { |
| | | // list = redisCache.getCacheMapValue("getTjPackageListBySex", "getTjPackageListByMan"); |
| | | // } else { |
| | | // tjPackageList = tjPackageService.getTjPackageListByMan(); |
| | | // } |
| | | // } else { |
| | | // if (redisCache.hasKey("getTjPackageListBySex")) { |
| | | // list = redisCache.getCacheMapValue("getTjPackageListBySex", "getTjPackageListByWoMan"); |
| | | // } else { |
| | | // tjPackageList = tjPackageService.getTjPackageListByWoMan(); |
| | | // } |
| | | // } |
| | | // } |
| | | // asyncService.getTjPackageList(); |
| | | // if (null != list && list.size() > 0) { |
| | | // return getDataTable(list); |
| | | // } else { |
| | | // getTjPackageList(tjPackageList); |
| | | // return getDataTable(tjPackageList); |
| | | // } |
| | | String pacName=""; |
| | | if (cusSex.equals("2")) { |
| | | return getDataTable(tjPackageService.getPacListBySqlAndAll(pacName)); |
| | | |
| | | } else { |
| | | if (cusSex.equals("0")) { |
| | | if (redisCache.hasKey("getTjPackageListBySex")) { |
| | | list = redisCache.getCacheMapValue("getTjPackageListBySex", "getTjPackageListByMan"); |
| | | } else { |
| | | tjPackageList = tjPackageService.getTjPackageListByMan(); |
| | | } |
| | | } else { |
| | | if (redisCache.hasKey("getTjPackageListBySex")) { |
| | | list = redisCache.getCacheMapValue("getTjPackageListBySex", "getTjPackageListByWoMan"); |
| | | } else { |
| | | tjPackageList = tjPackageService.getTjPackageListByWoMan(); |
| | | } |
| | | return getDataTable(tjPackageService.getPacListBySqlAndMan(pacName)); |
| | | }else { |
| | | return getDataTable(tjPackageService.getPacListBySqlAndWomen(pacName)); |
| | | } |
| | | } |
| | | asyncService.getTjPackageList(); |
| | | if (null != list && list.size() > 0) { |
| | | return getDataTable(list); |
| | | } else { |
| | | getTjPackageList(tjPackageList); |
| | | return getDataTable(tjPackageList); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | tjpp.setProId(tjProject.getProId()); |
| | | tjpp.setPacId(tjPackage.getPacId()); |
| | | //判断当前套餐下有没有这个项目 有的话跳过添加 |
| | | LambdaQueryWrapper<TjPackageProject> wqq=new LambdaQueryWrapper<>(); |
| | | wqq.eq(TjPackageProject::getPacId,tjPackage.getPacId()); |
| | | wqq.eq(TjPackageProject::getProId,tjProject.getProId()); |
| | | final TjPackageProject one = ppservice.getOne(wqq); |
| | | if (one!=null){ |
| | | continue; |
| | | } |
| | | ppservice.save(tjpp); |
| | | if (null != tjProject.getPriceNow()) { |
| | | money = money.add(tjProject.getPriceNow()); |