日期:2014-05-17 浏览次数:20966 次
CREATE OR REPLACE PROCEDURE Clerk_HandheldDevices_GetList
(
SCANTIME_IA NVARCHAR2,
SCANTIME_IB NVARCHAR2,
sitename_IN NVARCHAR2,
devicetype_IN NVARCHAR2,
V_CS OUT SYS_REFCURSOR
)
AS
BEGIN
OPEN V_CS FOR
SELECT devicemac,sitename,username from pda_devicelist;
OPEN V_CS FOR
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;
OPEN V_CS FOR
SELECT count(SCANHAWB)as SCANHAWB 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;
OPEN V_CS FOR
SELECT count(SCANHAWB)as SCANHAWB 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';
OPEN V_CS FOR
SELECT count(SCANHAWB)as SCANHAWB 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;