liusheng
7 小时以前 a11465387cb67853ef9252a679c43ef2ff75d718
smartor/src/main/java/com/smartor/service/impl/ServiceSLTDHealthcareRecordServiceImpl.java
@@ -264,10 +264,7 @@
            // 处理用户与部门的关系
            List businessDepts = (List<?>) dataItem.get("businessDepts");
            if (CollectionUtils.isEmpty(businessDepts)) {
                continue;
            }
            if (CollectionUtils.isNotEmpty(businessDepts)) {
            List<List<String>> deptInfoList = new ArrayList<>();
            List<List<String>> hospInfoList = new ArrayList<>();
            log.info("------businessDepts是否有值:{}", businessDepts.size());
@@ -275,7 +272,6 @@
                if (businessDept instanceof Map) {
                    Map<String, Object> businessDeptMap = (Map<String, Object>) businessDept;
                    log.info("------businessDeptMap是否有值:{}", businessDeptMap);
//                    Long hisDeptId = (Long) personnelDeptMap.get("deptId");
                    String hisDeptId = getStringValue(businessDeptMap, "deptId");
                    log.info("------hisDeptId是否有值:{}, reqVO.getOrgId()的值为:{}", hisDeptId, reqVO.getCampusId());
                    //在这里,hisDeptId就是deptCode
@@ -318,16 +314,17 @@
            sysUser.setHospInfo(gson.toJson(hospInfoList));
            sysUser.setDeptInfo(gson.toJson(deptInfoList));
            sysUser2Mapper.updateUser(sysUser);
            }
            //设置一个默认角色(医生角色)
            List<SysUserRole> userRoleList = new ArrayList();
            SysUserRole sur = new SysUserRole();
            sur.setUserId(sysUser.getUserId());
            sur.setRoleId(3L);
            sur.setRoleId(4L);
            sur.setOrgid(sysUser.getOrgid());
            //先查询一下,是否存在
            SysUserRole sysUserRole = sysUserRoleMapper.selectUserRoleByRoleIdAndUserId(3L, sysUser.getUserId());
            SysUserRole sysUserRole = sysUserRoleMapper.selectUserRoleByRoleIdAndUserId(4L, sysUser.getUserId());
            if (ObjectUtils.isNotEmpty(sysUserRole)) continue;
            userRoleList.add(sur);