liusheng
2 天以前 6393d6ba70099f1b47f4124e06426f016fb28052
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -116,16 +116,16 @@
    @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);
    }
@@ -284,6 +284,9 @@
        serviceSubtask.setUpdateTime(new Date());
        serviceSubtask.setUpdateBy(serviceTask.getUpdateBy());
        serviceSubtask.setUpdateTime(new Date());
        serviceSubtask.setVisitDeptCode(patMedOuthosp.getDeptcode());
        serviceSubtask.setVisitDeptName(patMedOuthosp.getDeptname());
        serviceSubtask.setUpdateTime(new Date());
        //设置发送时间
        if (serviceTask.getSendDay() == null) serviceTask.setSendDay(1L);
        Date newDate = addDays(patMedOuthosp.getAdmitdate(), serviceTask.getSendDay().intValue());