--短信源表创建源表触发器
create or replace trigger "TRG_UMP_SOURCE_VIP"
after insert on T_UMP_SOURCE_VIP
for each row
declare
begin
insert into t_ump_source_temp
(ID,
CONTENT,
TELEPHONE,
SERVICE_TYPE,
UNION_ID,
INSERT_TIME)
values
(:new.ID,
:new.CONTENT,
:new.TELEPHONE,
:new.SERVICE_TYPE,
:new.UNION_ID,
:new.SEND_TIME);
end TRG_UMP_SOURCE_VIP;
--判断报表凭证是否已生成
create or replace trigger checkStartVoucher before update on ct_dls_deparstartfinrpt for each row
declare num number;
begin
select count(v.fid) into num from t_gl_voucher v
inner join T_BOT_Relation relation on relation.fsrcobjectid = :OLD.fid
and v.fid = relation.fdestobjectid;
if num >= 1 then
raise_application_error(-20001, '该报表凭证已经生成!');
end if;
end;