create or replace procedure save_certr(certIds in varchar2,appids in varchar2)
is
sys_id varchar2(50);
cursor zizhi is select * from t_en_arc_qualification@bmrpdblink n where n.certid=certIds;
begin
--保存证书信息
sys_id:=sys_guid();
insert into t_en_app_dy_qualificationcert
(
id,
certauthority,
certdeadline,
certstatus,
certcopy_num,
appid,
gmtauth,
identifier,
memo,
name,
cert_original_num,
certreviewunit,
cert_copy_num,
certtype,
certscans,
certscanscode,
certstatusoperator,
othercertreviewunit,
reviewtime,
certstatusaltertime,
approval_date
) select
sys_id,
CERT_AUTHORITY as certauthority,
CERT_DEADLINE as certdeadline,
CERT_STATUS_OPERATOR as certstatus,
CERT_COPY_NUM as certcopy_num,
appids,
GMT_AUTHORITY as gmtauth,
identifier,
memo,
name,
cert_original_num,
CERT_REVIEW_UNIT as certreviewunit,
cert_copy_num,
CERT_TYPE as certtype,
CERT_SCANS as certscans,
CERT_SCANS_CODE as certscanscode,
CERT_STATUS_OPERATOR as certstatusoperator,
OTHER_CERT_REVIEW_UNIT as othercertreviewunit,
CERT_REVIEW_TIME as reviewtime,
CERT_STATUS_ALTER_TIME as certstatusaltertime,
GMT_AUTHORITY as approval_date
from t_en_arc_qualificationcert@bmrpdblink cert where cert.id=certIds;
--保存证书资质信息
for cur_2 in zizhi loop
insert into t_en_app_dy_qualification
(
id,
approval_date,
is_main_resource,
professional_name,
qualification_deadline,
qualification_level_name,
series_code,
status,
appdycertid,
professional_code,
qualification_level_code,
seriesname
)values(
sys_guid(),
cur_2.approval_date,
cur_2.is_main_resource,
cur_2.professional_name,
cur_2.qualification_deadline,
cur_2.qualification_level_name,
cur_2.series_code,
cur_2.status,
sys_id,
cur_2.professional_code,
cur_2.qualification_level_code,
cur_2.SERIES_NAME
);
end loop;
end;
is
sys_id varchar2(50);
cursor zizhi is select * from t_en_arc_qualification@bmrpdblink n where n.certid=certIds;
begin
--保存证书信息
sys_id:=sys_guid();
insert into t_en_app_dy_qualificationcert
(
id,
certauthority,
certdeadline,
certstatus,
certcopy_num,
appid,
gmtauth,
identifier,
memo,
name,
cert_original_num,
certreviewunit,
cert_copy_num,
certtype,
certscans,
certscanscode,
certstatusoperator,
othercertreviewunit,
reviewtime,
certstatusaltertime,
approval_date
) select
sys_id,
CERT_AUTHORITY as certauthority,
CERT_DEADLINE as certdeadline,
CERT_STATUS_OPERATOR as certstatus,
CERT_COPY_NUM as certcopy_num,
appids,
GMT_AUTHORITY as gmtauth,
identifier,
memo,
name,
cert_original_num,
CERT_REVIEW_UNIT as certreviewunit,
cert_copy_num,
CERT_TYPE as certtype,
CERT_SCANS as certscans,
CERT_SCANS_CODE as certscanscode,
CERT_STATUS_OPERATOR as certstatusoperator,
OTHER_CERT_REVIEW_UNIT as othercertreviewunit,
CERT_REVIEW_TIME as reviewtime,
CERT_STATUS_ALTER_TIME as certstatusaltertime,
GMT_AUTHORITY as approval_date
from t_en_arc_qualificationcert@bmrpdblink cert where cert.id=certIds;
--保存证书资质信息
for cur_2 in zizhi loop
insert into t_en_app_dy_qualification
(
id,
approval_date,
is_main_resource,
professional_name,
qualification_deadline,
qualification_level_name,
series_code,
status,
appdycertid,
professional_code,
qualification_level_code,
seriesname
)values(
sys_guid(),
cur_2.approval_date,
cur_2.is_main_resource,
cur_2.professional_name,
cur_2.qualification_deadline,
cur_2.qualification_level_name,
cur_2.series_code,
cur_2.status,
sys_id,
cur_2.professional_code,
cur_2.qualification_level_code,
cur_2.SERIES_NAME
);
end loop;
end;