| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.extra.pinyin.PinyinUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.hosp.domain.DictHosp; |
| | | import com.ltkj.hosp.domain.DictSfxm; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjOrder; |
| | | import com.ltkj.hosp.service.IDictHospService; |
| | | import com.ltkj.hosp.service.IDictSfxmService; |
| | | import com.ltkj.hosp.service.TjAsyncService; |
| | |
| | | * 查询收费项目列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:sfxm:list')") |
| | | @GetMapping("/list") |
| | | @PostMapping("/list") |
| | | @ApiOperation(value = "查询") |
| | | public TableDataInfo list(DictSfxm dictSfxm) { |
| | | public TableDataInfo list(@RequestBody DictSfxm dictSfxm) { |
| | | startPage(); |
| | | String pym = dictSfxm.getPym(); |
| | | if(null !=pym && !"".equals(pym)) { |
| | | if(null !=pym && !pym.isEmpty()) { |
| | | pym=dictSfxm.getPym().toUpperCase(Locale.ROOT); |
| | | dictSfxm.setPym(pym); |
| | | } |
| | | List<DictSfxm> list = dictSfxmService.selectDictSfxmList(dictSfxm); |
| | | if (null != list && list.size() > 0) { |
| | | if (null != list && !list.isEmpty()) { |
| | | for (DictSfxm sfxm : list) { |
| | | DictHosp hosp = dictHospService.getById(sfxm.getYqid()); |
| | | if (null != hosp) { |
| | |
| | | @ApiOperation(value = "按照项目编码树形查询") |
| | | public AjaxResult getList() { |
| | | if(redisCache.hasKey("getDictSfxms")){ |
| | | List<DictSfxm> getDictSfxms = redisCache.getCacheList("getDictSfxms"); |
| | | List<DictSfxm> getDictSfxms = redisCache.getCacheObject("getDictSfxms"); |
| | | return AjaxResult.success(getDictSfxms); |
| | | } |
| | | List<DictSfxm> dictSfxms = getDictSfxms(); |
| | |
| | | List<DictSfxm> sfx = dictSfxmService.getSjDictSfxmList(service.getId()); |
| | | if (null != sfx && sfx.size() > 0) { |
| | | List<DictSfxm> sfxmList = sfx.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | if (null != sfxmList && sfxmList.size() > 0) { |
| | | for (DictSfxm sfxm : sfxmList) { |
| | | DictHosp hosp = dictHospService.getById(sfxm.getYqid()); |
| | | if (null != hosp) { |
| | | sfxm.setYqName(hosp.getHospAreaName()); |
| | | } |
| | | } |
| | | } |
| | | Collections.reverse(sfxmList); |
| | | map.put("date", sfxmList); |
| | | map.put("total", sfx.size()); |
| | |
| | | } |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | |
| | | // /** |
| | | // * 查询收费项目列表 |
| | | // */ |
| | | // @PostMapping("/getSfxmList") |
| | | // @ApiOperation(value = "查询") |
| | | // public AjaxResult getSfxmList(@ApiParam(value = "页码数(默认1)") @RequestParam(defaultValue = "1") Integer page, |
| | | // @ApiParam(value = "显示条数(默认10)") @RequestParam(defaultValue = "10") Integer pageSize, |
| | | // @ApiParam(value = "拼音码") @RequestParam(required = false) String pym, |
| | | // @ApiParam(value = "名称") @RequestParam(required = false) String xmmc, |
| | | // @ApiParam(value = "id") @RequestParam(required = false) String id) { |
| | | // Map<String, Object> map = new HashMap<>(); |
| | | // List<DictSfxm> collect = null; |
| | | // LambdaQueryWrapper<DictSfxm> wq=new LambdaQueryWrapper<>(); |
| | | // if(null !=pym && !"".equals(pym)) { |
| | | // pym=pym.toUpperCase(Locale.ROOT); |
| | | // wq.like(DictSfxm::getPym,pym); |
| | | // } |
| | | // if(null !=xmmc && !"".equals(xmmc)) { |
| | | // wq.like(DictSfxm::getXmmc,xmmc); |
| | | // } |
| | | // if(null !=id && !"".equals(id)) { |
| | | // wq.like(DictSfxm::getId,id); |
| | | // } |
| | | // List<DictSfxm> list = dictSfxmService.list(wq); |
| | | // if (null != list && list.size() > 0) { |
| | | // for (DictSfxm sfxm : list) { |
| | | // DictHosp hosp = dictHospService.getById(sfxm.getYqid()); |
| | | // if (null != hosp) { |
| | | // sfxm.setYqName(hosp.getHospAreaName()); |
| | | // } |
| | | // } |
| | | // } |
| | | // collect = list.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | // if (null != collect) { |
| | | // map.put("total", collect.size()); |
| | | // } else { |
| | | // map.put("total", 0); |
| | | // } |
| | | // map.put("list", collect); |
| | | // return AjaxResult.success(map); |
| | | // } |
| | | } |