Commit 81be241d by 傅伟强-富德

Update 部门对于服务人员设置

1 parent 76392d7a
Showing with 30 additions and 1 deletions
-- "a/\351\203\250\351\227\250\345\257\271\344\272\216\346\234\215\345\212\241\344\272\272\345\221\230\350\256\276\347\275\256"
参数:
参数:
p_dept_no,
p_service_no
1:参数为空校验
2:获取部门所在的机构:
select bi.branch_code
from department_info di ,branch_info bi,branch_code_relation bcr
where di.dept_no = p_dept_no
and di.branch_code = bcr.relative_branch_code
and bcr.branch_code = bi.branch_code
and bi.branch_level = p_branch_level;
3.判断人员是否在机构下
2.1:判断机构等级:2级分公司和3级机构
select bi.branch_level
from branch_info bi
where bi.branch_code = p_branch_code;
2.1.1:如果是2级机构则表明是经代保单,需要对比在同一2级机构下即可
2.1.2:如果是3级机构需要对比是否为同一三级机构
判断是否在同一机构sql:
select bi.branch_code
from branch_code_relation bcr, branch_info bi
where bcr.relative_branch_code = p_branch_code
and bcr.branch_code = bi.branch_code
and bi.branch_level = p_branch_level
and bcr.relative_grade < 1;
2.2:判断人员类型是否可以进行服务
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!