Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

内部版: 一个人组织架构目前只有一个 #704

Open
wklken opened this issue Sep 27, 2022 · 6 comments
Open

内部版: 一个人组织架构目前只有一个 #704

wklken opened this issue Sep 27, 2022 · 6 comments
Assignees
Labels
Layer: saas SaaS module related Sign: help wanted Extra attention is needed Type: bug Something isn't working

Comments

@wklken
Copy link
Collaborator

wklken commented Sep 27, 2022

应该有多个, 但是目前只展示了一个, 需要定位处理下

@wklken wklken added Type: bug Something isn't working Layer: saas SaaS module related labels Sep 27, 2022
@wklken wklken self-assigned this Sep 27, 2022
@wklken
Copy link
Collaborator Author

wklken commented Sep 27, 2022

审计对接群

@wklken
Copy link
Collaborator Author

wklken commented Oct 19, 2022

select * from departments_department_profiles where profile_id=3820;

发现部门-人关系表, 的确只有一条
image

@wklken
Copy link
Collaborator Author

wklken commented Oct 19, 2022

image

测试环境是正常的, 代表 数据查询到展示 => ok;

结论: 数据写入有问题

有可能是数据源就没有数据(外部同步), 或者有数据在合并处理的时候存在bug导致只入库了一个关系

@wklken wklken added the Sign: help wanted Extra attention is needed label Oct 19, 2022
@wklken
Copy link
Collaborator Author

wklken commented Oct 19, 2022

代码

            # 2. add profile & department relation
            try:
                department = Department.objects.get(
                    enabled=True, category_id=self.category.id, code=self._get_department_code(staff.group_id)
                )
            except ObjectDoesNotExist:
                logger.warning("the department<%s> of staff<%s> from tof is missing", staff.group_id, username)
                continue

的确只存了一个关系

@wklken
Copy link
Collaborator Author

wklken commented Oct 19, 2022

看到注解了, 数据源接口就只能拉到一个

# 当前从 xxx 中获取的数据中,用户只有单个部门的关联数据
# 所以当存在新的关联关系后,需要解绑原有的关系

@wklken
Copy link
Collaborator Author

wklken commented Oct 19, 2022

疑似bug

人-> 部门, 只能拿到一个;

但是如果一个人属于多个部门, 部门-人应该是能拿到的?

@nannan00 nannan00 mentioned this issue Nov 10, 2022
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: saas SaaS module related Sign: help wanted Extra attention is needed Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant