liusheng
8 天以前 c111e3eff1191b29d2d2baf2f485a4bf3a2edc00
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -106,15 +106,15 @@
    @Override
    public PatMedRes selectPatMedOuthospCount(PatMedReq patMedReq) {
        // 获取当前登陆人的部门权限
        if (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);
        }
//        if (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);
//        }
        return patMedOuthospMapper.selectPatMedOuthospCount(patMedReq);
    }