liusheng
2 天以前 86b103f926cf92fff3d591c6ba07099ad8db3ad1
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -130,15 +130,16 @@
        PatMedRes patMedRes = null;
        // 获取当前登陆人的部门权限
        if (org.springframework.util.CollectionUtils.isEmpty(patMedReq.getDeptcodeList())) {
            Long userId = SecurityUtils.getUserId();
            List<SysDept> sysDepts = sysUserDeptMapper.selectDeptListByUserId(userId);
            List<String> deptCode = new ArrayList<>();
            for (SysDept sysDept : sysDepts) {
                deptCode.add(sysDept.getDeptId().toString());
            }
            patMedReq.setDeptcodeList(deptCode);
            patMedRes = patMedInhospMapper.selectPatMedInhospCount(patMedReq);
//            Long userId = SecurityUtils.getUserId();
//            List<SysDept> sysDepts = sysUserDeptMapper.selectDeptListByUserId(userId);
//            List<String> deptCode = new ArrayList<>();
//            for (SysDept sysDept : sysDepts) {
//                deptCode.add(sysDept.getDeptId().toString());
//            }
//            patMedReq.setDeptcodeList(deptCode);
//            patMedRes = patMedInhospMapper.selectPatMedInhospCount(patMedReq);
        }
        patMedRes = patMedInhospMapper.selectPatMedInhospCount(patMedReq);
        return patMedRes;
    }