日期:2014-05-17 浏览次数:20974 次
CREATE OR REPLACE PROCEDURE Clerk_HandheldDevices_GetList
(
SCANTIME_IA NVARCHAR2,
SCANTIME_IB NVARCHAR2,
sitename_IN NVARCHAR2,
devicetype_IN NVARCHAR2
)
AS
BEGIN
insert into pda_devicelist(devicemac,sitename,username) SELECT devicemac,sitename,username from pda_devicelist;
insert into pda_scandata_disp( SCANHAWB) SELECT count(SCANHAWB)as SCANHAWB FROM pda_scandata_disp WHERE SCANTIME>=TO_DATE(SCANTIME_IA,'yyyy-mm-dd hh24:mi:ss') and SCANTIME<=TO_DATE(SCANTIME_IB,'yyyy-mm-dd hh24:mi:ss') and scanstation=sitename_IN and devicetype=devicetype_IN;
insert into pda_scandata_sign( SCANHAWB) SELECT count(SCANHAWB)as SCANHAWC from pda_scandata_sign where scantime>=to_date(SCANTIME_IA,'yyyy-mm-dd hh24:mi:ss') and scantime<=to_date(SCANTIME_IB,'yyyy-mm-dd hh24:mi:ss') and scanstation=sitename_IN and devicetype=devicetype_IN;
insert into pda_scandata_sign ( SCANHAWB) SELECT count(SCANHAWB)as SCANHAWD from pda_scandata_sign where scantime>=to_date(SCANTIME_IA,'yyyy-mm-dd hh24:mi:ss') and scantime<=to_date(SCANTIME_IB,'yyyy-mm-dd hh24:mi:ss') and scanstation=sitename_IN and devicetype=devicetype_IN and SCANHAWB='10';
insert into pda_scandata_sign ( SCANHAWB) SELECT count(SCANHAWB)as SCANHAWE from pda_scandata_sign where scantime>=to_date(SCANTIME_IA,'yyyy-mm-dd hh24:mi:ss') and scantime<=to_date(SCANTIME_IB,'yyyy-mm-dd hh24:mi:ss') and scanstation=sitename_IN and devicetype=devicetype_IN and SCANHAWB='11';
RETURN ;
END Clerk_HandheldDevices_GetList;