"localhost:/firebird/data/ILICHEVSK2.FDB". Процедуры Previous topic Chapter index Next topic

ACN_30OPER

 

Входные параметры

Параметр

Тип

Описание

OPERATIONID

INTEGER

 

DIRT

NUMERIC(9,2)

 

HUMIDITY

NUMERIC(9,2)

 

DOP

INTEGER

 

NET

INTEGER

 

 

Выходные параметры

Параметр

Тип

Описание

DIRT5

NUMERIC(9,2)

 

HUM5

NUMERIC(9,2)

 

NET5

INTEGER

 

NET17I

INTEGER

 

HUM17I

NUMERIC(9,2)

 

DIRT17I

NUMERIC(9,2)

 

NET17O

INTEGER

 

HUM17O

NUMERIC(9,2)

 

DIRT17O

NUMERIC(9,2)

 

NET3K

INTEGER

 

HUM3K

NUMERIC(9,2)

 

DIRT3K

NUMERIC(9,2)

 

NETW

INTEGER

 

HUMW

NUMERIC(9,2)

 

DIRTW

NUMERIC(9,2)

 

NETI

INTEGER

 

HUMI

NUMERIC(9,2)

 

DIRTI

NUMERIC(9,2)

 

NET45

INTEGER

 

HUM45

NUMERIC(9,2)

 

DIRT45

NUMERIC(9,2)

 

NET46

INTEGER

 

HUM46

NUMERIC(9,2)

 

DIRT46

NUMERIC(9,2)

 

 

Описание

(Нет описания для процедуры ACN_30OPER)

 

Определение

CREATE PROCEDURE ACN_30OPER(
    OPERATIONID INTEGER,
    DIRT NUMERIC(9,2),
    HUMIDITY NUMERIC(9,2),
    DOP INTEGER,
    NET INTEGER)
RETURNS (
    DIRT5 NUMERIC(9,2),
    HUM5 NUMERIC(9,2),
    NET5 INTEGER,
    NET17I INTEGER,
    HUM17I NUMERIC(9,2),
    DIRT17I NUMERIC(9,2),
    NET17O INTEGER,
    HUM17O NUMERIC(9,2),
    DIRT17O NUMERIC(9,2),
    NET3K INTEGER,
    HUM3K NUMERIC(9,2),
    DIRT3K NUMERIC(9,2),
    NETW INTEGER,
    HUMW NUMERIC(9,2),
    DIRTW NUMERIC(9,2),
    NETI INTEGER,
    HUMI NUMERIC(9,2),
    DIRTI NUMERIC(9,2),
    NET45 INTEGER,
    HUM45 NUMERIC(9,2),
    DIRT45 NUMERIC(9,2),
    NET46 INTEGER,
    HUM46 NUMERIC(9,2),
    DIRT46 NUMERIC(9,2))
AS
begin

  if (:operationid in (5,13,19,23,70) ) then
  begin
    Net5 = coalesce(:net,0);
    Hum5 = coalesce(:humidity,0);
    Dirt5 = coalesce(:dirt,0);
  end

  if (:operationid = 22)  then begin
    if (DOP in (41,141) ) then  begin
      Net3k = coalesce(:net,0);
      Hum3k = coalesce(:humidity,0);
      Dirt3k = coalesce(:dirt,0);
    end
    else
      if (DOP in (39,40)) then  begin
      NetW = coalesce(:net,0);
      HumW = coalesce(:humidity,0);
      DirtW = coalesce(:dirt,0);
    end
  end

  if (:operationid = 17)  then
  if (:net < 0) then
  begin
    Net17o = coalesce(:net*(-1),0);
    Hum17o = coalesce(:humidity,0);
    Dirt17o = coalesce(:dirt,0);
  end
  else
  begin
    Net17i = coalesce(:net,0);
    Hum17i = coalesce(:humidity,0);
    Dirt17i = coalesce(:dirt,0);
  end

  if ((:operationid in(1,4,18)) and :net <> 0) then
  begin
    NetI = coalesce(:net,0);
    HumI = coalesce(:humidity,0);
    DirtI = coalesce(:dirt,0);
  end

  if (:operationid = 45) then
  begin
    Net45 = coalesce(:net,0);
    Hum45 = coalesce(:humidity,0);
    Dirt45 = coalesce(:dirt,0);
  end

  if (:operationid = 46) then
  begin
    Net46 = coalesce(:net,0);
    Hum46 = coalesce(:humidity,0);
    Dirt46 = coalesce(:dirt,0);
  end
  suspend;
end

 

     Previous topic Chapter index Next topic