| | |
| | | //获取当前登陆人 |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | if (!"admin".equals(user.getUserName()) && CollectionUtils.isEmpty(patMedInhosp.getDeptcodes()) && CollectionUtils.isEmpty(patMedInhosp.getHospitaldistrictcodes())) |
| | | //如果在院病区科室同时间为空,返回空 |
| | | if (!"admin".equals(user.getUserName()) && shouldReturnEmpty(patMedInhosp)) { |
| | | return getDataTable2(0, null); |
| | | } |
| | | |
| | | PageUtils.startPageByPost(patMedInhosp.getPageNum(), patMedInhosp.getPageSize()); |
| | | List<PatMedInhosp> list = patMedInhospService.selectPatMedInhospList(patMedInhosp); |
| | |
| | | }); |
| | | return getDataTable2(count, list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询当前登陆人自己(病区、部门)的患者住院记录列表 |
| | |
| | | @PostMapping("/selectPatMedInhospListCount") |
| | | @ApiOperation("查询出、入院看病人次和人数") |
| | | public AjaxResult selectPatMedInhospListCount(PatMedReq patMedReq) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | patMedReq.setOrgid(user.getOrgid()); |
| | | return success(patMedInhospService.selectPatMedInhospListCount(patMedReq)); |
| | | } |
| | | |
| | |
| | | return getDataTable(patMedInhospService.getDocAndPat(patMedInhosp)); |
| | | } |
| | | |
| | | |
| | | private boolean shouldReturnEmpty(PatMedInhosp patMedInhosp) { |
| | | return (patMedInhosp.getCry() == 1 |
| | | && CollectionUtils.isEmpty(patMedInhosp.getLeaveldeptcodes()) |
| | | && CollectionUtils.isEmpty(patMedInhosp.getLeavehospitaldistrictcodes())) |
| | | || (patMedInhosp.getCry() == 0 |
| | | && CollectionUtils.isEmpty(patMedInhosp.getDeptcodes()) |
| | | && CollectionUtils.isEmpty(patMedInhosp.getHospitaldistrictcodes())); |
| | | } |
| | | |
| | | } |