ÎҵĴ洢¹ý³ÌÏÖÔÚÊÇÕâÑùÈçÏ£º
(
plateid in Varchar2,
platecolor in Varchar2,
platetype in Varchar2,
crossingtime in Date,
crossingname in Varchar2,
aspectname in Varchar2,
wayname in Varchar2,
speed in Varchar2,
illegaltype in Number,
blackstate in Number,
filepath1 in Varchar2,
filepath2 in Varchar2,
filepath3 in Varchar2,
filepath4 in Varchar2,
result_blackstate out Number,
result_plateid out Varchar
)
as
v_count number;
begin
select count(*) into v_count from tb_plate where plateid=plateid ;
if v_count>0
then
result_plateid:=plateid;
else
insert into sysadmin.tb_plate(ID,plateid,platecolor,platetype) values(plate_id.nextval,plateid,platecolor,platetype);
end if;
if illegaltype>1 and blackstate!=3
then
insert into sysadmin.tb_illegalcar(
id,
plateid,
crossingtime,
crossingname,
aspectname,
wayname,
speed,
illegaltype,
blackstate,
filepath1,
filepath2,
filepath3,
filepath4)
values(
ILLEGALCAR_ID.nextval,
plateid,
to_date(crossingtime,'YYYY-MM-DD HH24:MI:SS'),
crossingname ,