Входные параметры
Параметр | Тип | Описание |
---|---|---|
BEGINDATE |
DATE |
|
OWNERID |
INTEGER |
|
TRSUBTYPE |
INTEGER |
|
AOPERATIONID |
INTEGER |
|
CROPID |
INTEGER |
|
CLASSID |
INTEGER |
|
ISALL |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
TRANSPORTPLANID |
INTEGER |
|
PLANQUANTITY |
INTEGER |
|
PLANWEIGHT |
INTEGER |
|
Описание
(Нет описания для процедуры TRANSPORTPLAN_GETPLAN)
Определение
CREATE PROCEDURE TRANSPORTPLAN_GETPLAN(
BEGINDATE DATE,
OWNERID INTEGER,
TRSUBTYPE INTEGER,
AOPERATIONID INTEGER,
CROPID INTEGER,
CLASSID INTEGER,
ISALL INTEGER)
RETURNS (
TRANSPORTPLANID INTEGER,
PLANQUANTITY INTEGER,
PLANWEIGHT INTEGER)
AS
BEGIN
FOR
select
case
when :isall is null then
transportplanid
end,
sum(planquantity),
sum(planweight)
from transportplans tp
left join quality on (tp.qualityid = quality.qualityid)
where plandate = :begindate
and (ownerid = :ownerid or (:ownerid = -1))
and tp.operationid = :aoperationid
and (cropid = :cropid or (:cropid = -1))
and (classid = :classid or (:classid = -1))
and transportsubtypeid = :trsubtype
and :trsubtype<>-1
and state = 0
group by
transportplanid
INTO :transportplanid,
:planquantity,
:planweight
DO
BEGIN
SUSPEND;
END
END