Входные параметры
Параметр | Тип | Описание |
---|---|---|
ACOLLECTIONID |
INTEGER |
|
ACROPID |
INTEGER |
|
ACLASSID |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
SORTINDEX |
INTEGER |
|
CROPPARAMID |
INTEGER |
|
QUALITYTYPEID |
INTEGER |
|
QUALITYNAME |
VARCHAR(50) |
|
CROPPARAMTYPEID |
INTEGER |
|
CROPID |
INTEGER |
|
QUALITYPARENTID |
INTEGER |
|
USESUBTYPES |
INTEGER |
|
MINVALUE |
DOUBLE PRECISION |
|
MAXVALUE |
DOUBLE PRECISION |
|
QUALITYUNIT |
INTEGER |
|
CLASSID |
INTEGER |
|
DEFAULTVALUE |
NUMERIC(9,2) |
|
READONLY |
INTEGER |
|
REQUIRED |
INTEGER |
|
STORAGETICKET |
INTEGER |
|
EDITING |
INTEGER |
|
Описание
(Нет описания для процедуры QUALITY_GET_COLLECTION)
Определение
CREATE PROCEDURE QUALITY_GET_COLLECTION(
ACOLLECTIONID INTEGER,
ACROPID INTEGER,
ACLASSID INTEGER)
RETURNS (
SORTINDEX INTEGER,
CROPPARAMID INTEGER,
QUALITYTYPEID INTEGER,
QUALITYNAME VARCHAR(50),
CROPPARAMTYPEID INTEGER,
CROPID INTEGER,
QUALITYPARENTID INTEGER,
USESUBTYPES INTEGER,
"MINVALUE" DOUBLE PRECISION,
"MAXVALUE" DOUBLE PRECISION,
QUALITYUNIT INTEGER,
CLASSID INTEGER,
DEFAULTVALUE NUMERIC(9,2),
READONLY INTEGER,
REQUIRED INTEGER,
STORAGETICKET INTEGER,
EDITING INTEGER)
AS
declare variable STATE integer;
declare variable FQUALITYTYPEID integer;
declare variable FQUALITYNAME varchar(50);
declare variable FCROPPARAMID integer;
declare variable FCROPPARAMTYPEID integer;
declare variable FCROPID integer;
declare variable FCLASSID integer;
declare variable FQUALITYPARENTID integer;
declare variable FSTATE integer;
declare variable FUSESUBTYPES integer;
declare variable FMINVALUE double precision;
declare variable FMAXVALUE double precision;
declare variable FQUALITYUNIT integer;
declare variable FSORTINDEX integer;
declare variable FDEFAULTVALUE numeric(9,2);
declare variable FREADONLY integer;
declare variable FREQUIRED integer;
declare variable FSTORAGETICKET integer;
declare variable FEDITING integer;
begin
QUALITYTYPEID = -1;
for
select QUALITYTYPES.QUALITYTYPEID, QUALITYTYPES.QUALITYNAME,
CROPPARAMS.CROPPARAMID, CROPPARAMS.CROPPARAMTYPEID, CROPPARAMS.CROPID,
coalesce(CROPPARAMS.PARENTID,QUALITYTYPES.QUALITYPARENTID) QUALITYPARENTID,
CROPPARAMS.STATE, QUALITYTYPES.USESUBTYPES, QUALITYTYPES.MINVALUE, QUALITYTYPES.MAXVALUE,
QUALITYTYPES.QUALITYUNIT, CROPPARAMS.CLASSID, CROPPARAMS.SORTINDEX, CROPPARAMS.DEFAULTVALUE,
CROPPARAMS.READONLY, CROPPARAMS.REQUIRED, CROPPARAMS.STORAGETICKET, CROPPARAMS.EDITING
from CROPPARAMS
left join QUALITYTYPES on (QUALITYTYPES.QUALITYTYPEID = CROPPARAMS.QUALITYTYPEID)
where (CROPPARAMS.CROPPARAMTYPEID = :ACOLLECTIONID)
and (CROPPARAMS.CROPID in (-1,:ACROPID))
and ((CROPPARAMS.CLASSID is null) or (CROPPARAMS.CLASSID = :ACLASSID))
order by QUALITYTYPES.QUALITYTYPEID, coalesce(CROPPARAMS.CLASSID,-1) , CROPPARAMS.CROPPARAMID
into :FQUALITYTYPEID, :FQUALITYNAME, :FCROPPARAMID, :FCROPPARAMTYPEID, :FCROPID,
:FQUALITYPARENTID, :FSTATE, :FUSESUBTYPES, :FMINVALUE, :FMAXVALUE, :FQUALITYUNIT,
:FCLASSID, :FSORTINDEX, :FDEFAULTVALUE, :FREADONLY, :FREQUIRED, :FSTORAGETICKET,
:FEDITING
do begin
if (:QUALITYTYPEID <> :FQUALITYTYPEID) then begin
if ((:QUALITYTYPEID <> -1) and (:STATE > -1)) then
suspend;
end
QUALITYTYPEID = :FQUALITYTYPEID;
QUALITYNAME = :FQUALITYNAME;
CROPPARAMID = :FCROPPARAMID;
CROPPARAMTYPEID = :FCROPPARAMTYPEID;
CROPID = :FCROPID;
QUALITYPARENTID = :FQUALITYPARENTID;
STATE = :FSTATE;
USESUBTYPES = :FUSESUBTYPES;
MINVALUE = :FMINVALUE;
MAXVALUE = :FMAXVALUE;
QUALITYUNIT = :FQUALITYUNIT;
CLASSID = :FCLASSID;
SORTINDEX = :FSORTINDEX;
DEFAULTVALUE = :FDEFAULTVALUE;
READONLY = :FREADONLY;
REQUIRED = :FREQUIRED;
STORAGETICKET = :FSTORAGETICKET;
EDITING = :FEDITING;
end
if ((:QUALITYTYPEID <> -1) and (:STATE > -1)) then
suspend;
end