HRMS(Human Resource Management System)

--人员

per_people_f

--人员分配

per_all_assignments_f

--要素

 DECLARE
l_element_name VARCHAR2(240);
l_element_id NUMBER;
l_period_name VARCHAR2(240);
l_period_date DATE;
x_element_type_id NUMBER;
x_effective_start_date DATE;
x_effective_end_date DATE;
x_object_version_number NUMBER;
x_comment_id NUMBER;
x_processing_priority_warning BOOLEAN;
BEGIN
fnd_global.apps_initialize(user_id => 1510,
resp_id => 23991,
resp_appl_id => 800); l_element_name := 'BS交通补贴12';
l_period_name := '9 2016 日历月份'; BEGIN
SELECT ptp.end_date
INTO l_period_date
FROM per_time_periods ptp
WHERE ptp.period_name = l_period_name;
EXCEPTION
WHEN OTHERS THEN
l_period_date := NULL;
END; BEGIN
SELECT petf.element_type_id
INTO l_element_id
FROM pay_element_types_f petf
WHERE petf.element_name = l_element_name
AND l_period_date BETWEEN effective_start_date AND effective_end_date;
EXCEPTION
WHEN OTHERS THEN
l_element_id := NULL;
END; dbms_output.put_line('l_period_date:=' || l_period_date);
dbms_output.put_line('l_element_id:=' || l_element_id); IF (l_element_id IS NULL) THEN
dbms_output.put_line('Create'); pay_element_types_api.create_element_type(p_validate => FALSE,
p_effective_date => l_period_date,
p_classification_id => 118,
p_element_name => l_element_name,
p_input_currency_code => 'CNY',
p_output_currency_code => 'CNY',
p_multiple_entries_allowed_fla => 'Y',
p_processing_type => 'N',
p_business_group_id => 81,
p_element_type_id => x_element_type_id,
p_effective_start_date => x_effective_start_date,
p_effective_end_date => x_effective_end_date,
p_object_version_number => x_object_version_number,
p_comment_id => x_comment_id,
p_processing_priority_warning => x_processing_priority_warning);
-- ELSE
-- pay_element_types_api.update_element_type();
END IF; IF x_processing_priority_warning THEN
dbms_output.put_line('x_processing_priority_warning');
END IF; dbms_output.put_line('x_element_type_id:=' || x_element_type_id);
dbms_output.put_line('x_effective_start_date:=' || x_effective_start_date);
dbms_output.put_line('x_effective_end_date:=' || x_effective_end_date);
dbms_output.put_line('x_element_type_id:=' || x_object_version_number);
dbms_output.put_line('x_comment_id:=' || x_comment_id);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('导入要素异常!');
END;

创建要素

--链接

  /* IF (l_element_link_id IS NULL) THEN

       pay_element_link_api.create_element_link(p_validate                   => FALSE,
p_effective_date => l_period_date,
p_element_type_id => l_element_id,
p_business_group_id => 81,
p_costable_type => 'F',
p_payroll_id => l_payroll_id,
p_people_group_id => l_people_group_id,
p_cost_concat_segments => '01.000000.66010101.0000.00000000.0000.000000.00',
p_balance_concat_segments => '01.000000.22110101.0000.00000000.0000.000000.00',
p_cost_allocation_keyflex_id => 63,
p_balancing_keyflex_id => 76,
p_standard_link_flag => 'N',
p_element_link_id => x_element_link_id,
p_comment_id => x_comment_id,
p_object_version_number => x_object_version_number,
p_effective_start_date => x_effective_start_date,
p_effective_end_date => x_effective_end_date); dbms_output.put_line('x_element_link_id:=' || x_element_link_id);
dbms_output.put_line('x_comment_id:=' || x_comment_id);
dbms_output.put_line('x_element_type_id:=' || x_object_version_number);
dbms_output.put_line('x_effective_start_date:=' || x_effective_start_date);
dbms_output.put_line('x_effective_end_date:=' || x_effective_end_date);
END IF;*/

创建链接

--要素集

 DECLARE
l_element_name VARCHAR2(240);
l_element_id NUMBER;
l_period_name VARCHAR2(240);
l_period_date DATE;
l_assign_number VARCHAR2(240);
l_assignment_id NUMBER;
l_payroll_id NUMBER;
l_payroll VARCHAR2(240);
l_element_link_id NUMBER;
l_element_entry_id NUMBER;
l_people_group_id NUMBER;
x_element_link_id NUMBER;
x_effective_start_date DATE;
x_effective_end_date DATE;
x_object_version_number NUMBER;
x_comment_id NUMBER;
x_element_entry_id NUMBER;
x_create_warning BOOLEAN;
BEGIN fnd_global.apps_initialize(user_id => 1510,
resp_id => 23991,
resp_appl_id => 800); l_element_name := 'BS_FJJ_非计件日工';
l_period_name := '9 2016 日历月份';
l_assign_number := ''; BEGIN
SELECT ptp.end_date
INTO l_period_date
FROM per_time_periods ptp
WHERE ptp.period_name = l_period_name;
EXCEPTION
WHEN OTHERS THEN
l_period_date := NULL;
END; BEGIN
SELECT petf.element_type_id
INTO l_element_id
FROM pay_element_types_f petf
WHERE petf.element_name = l_element_name
AND l_period_date BETWEEN effective_start_date AND effective_end_date;
EXCEPTION
WHEN OTHERS THEN
l_element_id := NULL;
END; dbms_output.put_line('l_period_date:=' || l_period_date);
dbms_output.put_line('l_element_id:=' || l_element_id); BEGIN
SELECT paaf.payroll_id,
paaf.assignment_id,
paaf.people_group_id
INTO l_payroll_id,
l_assignment_id,
l_people_group_id
FROM per_all_assignments_f paaf
WHERE paaf.assignment_number = l_assign_number
AND l_period_date BETWEEN paaf.effective_start_date AND paaf.effective_end_date;
EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('没有分配信息');
WHEN too_many_rows THEN
dbms_output.put_line('存在多条分配信息');
END; dbms_output.put_line('l_payroll_id:=' || l_payroll_id);
dbms_output.put_line('l_assignment_id:=' || l_assignment_id);
dbms_output.put_line('l_people_group_id:=' || l_people_group_id); IF l_payroll_id IS NOT NULL THEN
BEGIN
SELECT pap.payroll_name
INTO l_payroll
FROM pay_all_payrolls_f pap
WHERE pap.payroll_id = l_payroll_id
AND l_period_date BETWEEN pap.effective_start_date AND pap.effective_end_date;
EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('没有有效工资单');
WHEN too_many_rows THEN
dbms_output.put_line('存在多工资单');
END; dbms_output.put_line('l_payroll:=' || l_payroll);
END IF; --IF l_payroll_id IS NULL THEN IF (l_element_id IS NOT NULL) THEN l_element_link_id := NULL;
BEGIN
SELECT pelf.element_link_id
INTO l_element_link_id
FROM pay_element_links_f pelf
WHERE pelf.element_type_id = l_element_id
AND pelf.payroll_id = l_payroll_id
--AND pelf.people_group_id = l_people_group_id
AND l_period_date BETWEEN pelf.effective_start_date AND pelf.effective_end_date
AND cuxhrpkg.show_record('PAY_PEOPLE_GROUPS',
NULL,
pelf.business_group_id,
pelf.people_group_id,
to_char(l_period_date,
'YYYYMMDD'),
'') = 'TRUE'
AND cuxhrpkg.show_ass(l_assignment_id,
pelf.people_group_id,
l_period_date) = 'TRUE'; EXCEPTION
WHEN OTHERS THEN
l_element_link_id := NULL;
END; dbms_output.put_line('l_element_link_id:=' || l_element_link_id); IF (l_element_link_id IS NOT NULL) THEN
BEGIN
SELECT ee.element_entry_id
--ee.object_version_number
INTO l_element_entry_id
-- l_object_version_number
FROM pay_element_entries_f ee,
pay_element_types_f et,
pay_element_links_f el
WHERE el.element_link_id = ee.element_link_id
AND el.element_link_id = l_element_link_id
AND el.element_type_id = et.element_type_id
AND ee.assignment_id = l_assignment_id
AND l_period_date BETWEEN ee.effective_start_date AND ee.effective_end_date
AND l_period_date BETWEEN el.effective_start_date AND el.effective_end_date
AND l_period_date BETWEEN et.effective_start_date AND et.effective_end_date
AND et.multiple_entries_allowed_flag = 'N'
AND ee.entry_type = 'E';
EXCEPTION
WHEN OTHERS THEN
l_element_entry_id := NULL;
END; dbms_output.put_line('l_element_entry_id:=' || l_element_entry_id);
END IF;
END IF; -- IF (l_element_id IS NOT NULL) THEN
IF (l_element_entry_id IS NULL) THEN
pay_element_entry_api.create_element_entry(p_effective_date => l_period_date,
p_business_group_id => 81,
p_assignment_id => l_assignment_id,
p_element_link_id => l_element_link_id,
p_entry_type => 'E',
p_creator_type => 'F',
p_cost_allocation_keyflex_id => NULL,
-- p_input_value_id1 => l_input_id, p_effective_start_date => x_effective_start_date,
p_effective_end_date => x_effective_end_date,
p_element_entry_id => x_element_entry_id,
p_object_version_number => x_object_version_number,
p_create_warning => x_create_warning); dbms_output.put_line('x_effective_start_date:=' || x_effective_start_date);
dbms_output.put_line('x_effective_end_date:=' || x_effective_end_date);
dbms_output.put_line('x_element_entry_id:=' || x_element_entry_id);
dbms_output.put_line('x_object_version_number:=' || x_object_version_number); END IF;
--dbms_output.put_line('l_payroll:=' || l_payroll);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('导入要素异常!');
END;

创建要素集

HR(人事管理)的更多相关文章

  1. 评点SAP HR功能及人力资源管理软件

    评点SAP HR功能及人力资源管理软件   本文导航 第1页:my SAP 人力资源软件 第2页:my SAP HR协同功能 第3页:组织结构管理 第4页:mySAPTM HR的战略功能 第5页:集成 ...

  2. BW知识问答锦集2

    PM面试分为BW.BO两部分,根据顾问的简历和应聘的岗位所侧重的问题不同. BW包括基础知识.增量.增强.LO抽取.数据源. BO包括 CR.CR.WEBI.UNI. 一. 基础知识 技术面试 1. ...

  3. HR面试:过五关斩六将后,小心阴沟翻船!(史上最全、避坑宝典)

    文章很长,建议收藏起来,慢慢读! 疯狂创客圈为小伙伴奉上以下珍贵的学习资源: 疯狂创客圈 经典图书 : <Netty Zookeeper Redis 高并发实战> 面试必备 + 大厂必备 ...

  4. 记2016腾讯 TST 校招面试经历,电面、笔试写代码、技术面、hr面,共5轮

    (出处:http://www.cnblogs.com/linguanh/) 前序: 距离  2016 腾讯 TST 校招面试结束已经5天了,3月27日至今,目前还在等待消息.从投简历到两轮电面,再到被 ...

  5. Html --用简单的<hr>实现多样化分割效果

    最基本的:<hr width=300 size=1 color=#5151A2 align=center noshade>. <!--其中 width 规定线条的长度,还可以是百分比 ...

  6. <hr>标签不止创建html水平线也可以画圆噢

    看到上面这张图,第一反应是用photoshop类似作图软件画出来的,但那是华丽丽的错觉.一个简单的<hr>标签就能完成漂亮的效果,而不仅仅是创建html水平线.想知道怎么实现吗?Let's ...

  7. Oracle Database 创建HR模式

    其实Oracle是自带演示模式的,我还一直在跪舔外面的培训机构的sql文件 首先以system 用户登陆SQL 输入: alter user hr account unlock identified ...

  8. Oracle解锁与加锁(HR用户为例)

    SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jul 14 18:12:38 2009   Copyright (c) 1982, 2002, Ora ...

  9. 腾讯WEB前端开发面试经历,一面二面HR面,面面不到!

    [一面]~=110分钟  2014/09/24 11:20  星期三 进门静坐30分钟做题. 填空题+大题+问答题 >>填空题何时接触电脑 何时接触前端运算符 字符串处理        延 ...

随机推荐

  1. U盘启动格式

    U盘的几种启动模式:USB-HDD.USB-ZIP.USB-HDD+.USB-ZIP+.USB-CDROM 1.  USB-HDD 硬盘仿真模式,DOS启动后显示C:盘,HP U盘格式化工具制作的U盘 ...

  2. tomcat 默认项目设置

    正常情况下,我们启动tomcat后,直接输入“http://localhost:端口/“ 后,默认访问道是webapp目录下的ROOT应用. 我们要通过上述方式访问自己的应用,有俩种方式. 第一:把自 ...

  3. HDU 1213 How Many Tables (并查集,常规)

    并查集基本知识看:http://blog.csdn.net/dellaserss/article/details/7724401 题意:假设一张桌子可坐无限多人,小明准备邀请一些朋友来,所有有关系的朋 ...

  4. noip2003提高组题解

    这一年的前三题虽然难度不高,但是第二题极为繁琐,想在考场上用较短的时间拿到第二题的分数难上加难.所以必须要调整策略,争取拿其他三题的分数.第四题是比较普通的搜索题,分数比较好拿,但是很容易想成树形DP ...

  5. poj 3469 Dual Core CPU

    题目描述:由于越来越多的计算机配置了双核CPU,TinySoft公司的首席技术官员,SetagLilb,决定升级他们的产品-SWODNIW.SWODNIW包含了N个模块,每个模块必须运行在某个CPU中 ...

  6. Oracle中HWM与数据库性能的探讨

    Oracle中HWM与数据库性能的探讨 一.什么是高水位 HWM(high water mark),高水标记,这个概念在segment的存储内容中是比较重要的.简单来说,HWM就是一个segment中 ...

  7. Eclipse小技巧<一>

    Eclipse是一款特别好用的开源开发工具,基于插件的特性使其能够进行各种语言的开发.非常喜欢eclipse里的编码风格,感觉这个开发工具十分灵活,又有很多开发的小技巧能够提高开发效率,每次学到一个t ...

  8. [SharePoint 2010]关于基于声明(Claims)的用户认证模式

    转:http://blog.csdn.net/zw_2011/article/details/7417132 SharePoint 2010在用户认证模式上,较之以前的版本有了非常大的改变.在Shar ...

  9. 解决32位plsql客户端连接不64位Oracle11g上数据库

    一.解决方案 因为本人安装的是64位的Oracle,plsql 是32位的故连接不上.网上有方法能连接. 1. 文件下载 下载PLSQL_Developer地址 http://pan.baidu.co ...

  10. 11g 重建EM 报ORA-20001: SYSMAN already exists

    今天在安装11g(11.1.0.7.0)数据库之后,通过emca -config dbcontrol db -repos create 命令手工创建em的时候报错,查看日志后发现有以下错误 CONFI ...