人事管理系统Oracle触发器代码Word文档格式.doc
- 文档编号:13163898
- 上传时间:2022-10-07
- 格式:DOC
- 页数:3
- 大小:20.50KB
人事管理系统Oracle触发器代码Word文档格式.doc
《人事管理系统Oracle触发器代码Word文档格式.doc》由会员分享,可在线阅读,更多相关《人事管理系统Oracle触发器代码Word文档格式.doc(3页珍藏版)》请在冰豆网上搜索。
new.Wresult<
=59then
:
new.Wstatus:
='
不及格'
;
elsif:
=60and:
=69then
:
及格'
;
new.Wresult>
=70and:
=89then
:
良好'
new.Wresult>
=90and:
=100then
优秀'
;
endif;
end;
---创建加班费可以在录入数据时自动计算其加班费进行加班费的结算
createorreplacetriggerOvertime_trigger
beforeinsertonOvertime
if:
new.OverType='
一般'
then
:
new.OverCost:
=:
new.OverTime*10;
elsif:
节假'
endif;
-创建触发器LateCost_trigger在录入数据时对员工迟到进行自动扣费计算
createorreplacetriggerLateCost_trigger
beforeinsertonAttendRecord
new.Noattend:
new.LeaveTime+:
new.EveTime+:
new.Awaywork;
--迟到3次以及3次以上扣费120
if:
new.Latetime>
=3then
new.LateCost:
=120;
--迟到2次扣费80
elsif:
new.Latetime=2then
=80;
--迟到1次扣费40
elsif:
new.Latetime=1then
=40;
--迟到0次扣费0
new.Latetime=0then
=0;
endif;
--录入员工培训考核成绩得总评和考核等级
createorreplacetriggerTR
beforeinsertonTrainresult
:
new.Trresult:
new.Trattendence*0.3+:
new.Trtest*0.7;
if:
new.Trresult>
=0and:
new.Trresult<
:
new.Tstatus:
=60and:
=69then
:
elsif:
=70and:
=89then
=90and:
=100then
end;
--当在员工工作变动时,在修改员工的基本信息时,将变动信息自动插入到工作变动单中
--当员工的工资信息变动时,将变动信息插入到工资变动日志中
--录入加班费
createorreplaceprocedureCaculate_OverCoat
is
updateSalary
setOverCost=
(selectOverCostfromOvertime
whereSalary.Eno=Enoandto_char(OverDate,'
mm’'
)=to_char(GrantDate,'
mm'
));
updateSalarysetOverCost=0whereOverCostisnull;
commit;
end;
--录入福利总额
createorreplaceprocedureCalculate_Welfare
is
updateSalary
setWelfaretotal=
(selectWelfareTotafromWelfare
whereSalary.Eno=Enoandto_char(StatisticMonth,'
updateSalarysetWelfaretotal=0whereWelfaretotalisnull;
commit;
endCalculate_Welfare;
--录入迟到扣费
createorreplaceprocedureCalculate_LateCost
setLateCost=
(selectLateCostfromAttendRecord
)=to_char(Grantdate,'
updateSalarysetLateCost=0whereLateCostisnull;
endCalculate_LateCost;
--录入个人所得税
createorreplaceprocedureCalculate_Tax
--月收入低于1500
setTax=(BasicSalary+OverCost+Welfaretotal-LateCost)*0.03
where(BasicSalary+OverCost+Welfaretotal-LateCost)<
1500;
--月收入在1500和4500之间
setTax=(BasicSalary+OverCost+Welfaretotal-LateCost-1500)*0.1+1500*0.03
where(BasicSalary+OverCost+Welfaretotal-LateCost)>
1500and(BasicSalary+OverCost+Welfaretotal-LateCost)<
=4500;
--实发金额
createorreplaceprocedureCalculate_RealSalary
setRealSalary=(BasicSalary+OverCost+Welfaretotal-LateCost)-Tax;
endCalculate_RealSalary;
/
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 人事管理系统 Oracle 触发器 代码