class TDCFinishPreOperation
{
ProdJournalTable prodJournalTable;
ProdJournalRoute prodJournalRoute;
ProdRoute prodRoute, prodRouteLoc;
RouteOprId routeOprId;
ProdJournalCheckPostRoute prodJournalCheckPostRoute;
ProdJournalCreateRoute prodJournalCreate;
ProdParmReportFinished prodParmReportFinished;
}
public ProdParmReportFinished ParmProdParmReportFinished(ProdParmReportFinished _prodParmReportFinished = prodParmReportFinished)
{
prodParmReportFinished = _prodParmReportFinished;
return prodParmReportFinished;
}
public void run()
{
ProdTable prodTable = ProdTable::find(ProdParmReportFinished.ProdId);
RouteOprTable routeOprTableLoc;
int oprNextNum;
select firstOnly RecId, OprId from routeOprTableLoc
join OprNum from prodRoute where routeOprTableLoc.OprId == prodRoute.OprId &&
(routeOprTableLoc.ExecuteBy == NCExecuteBy::Digging ||
routeOprTableLoc.ExecuteBy == NCExecuteBy::Entreprenor) &&
prodRoute.ProdId == prodTable.ProdId &&
prodRoute.OprNum == ProdParmReportFinished.FromOprNum;
if (routeOprTableLoc.RecId)
{
oprNextNum = prodRoute.OprNum;
while select prodRouteLoc order by OprNum where prodRouteLoc.OprNum < oprNextNum &&
prodRouteLoc.ProdId == prodTable.ProdId &&
prodRouteLoc.ProdStatus == ProdStatus::StartedUp
{
this.FinishPreOprDiggEnterprinor(prodRouteLoc.ProdId, prodRouteLoc.OprNum, prodParmReportFinished);
}
}
}
{
ProdJournalTable prodJournalTable;
ProdJournalRoute prodJournalRoute;
ProdRoute prodRoute, prodRouteLoc;
RouteOprId routeOprId;
ProdJournalCheckPostRoute prodJournalCheckPostRoute;
ProdJournalCreateRoute prodJournalCreate;
ProdParmReportFinished prodParmReportFinished;
}
public ProdParmReportFinished ParmProdParmReportFinished(ProdParmReportFinished _prodParmReportFinished = prodParmReportFinished)
{
prodParmReportFinished = _prodParmReportFinished;
return prodParmReportFinished;
}
public void run()
{
ProdTable prodTable = ProdTable::find(ProdParmReportFinished.ProdId);
RouteOprTable routeOprTableLoc;
int oprNextNum;
select firstOnly RecId, OprId from routeOprTableLoc
join OprNum from prodRoute where routeOprTableLoc.OprId == prodRoute.OprId &&
(routeOprTableLoc.ExecuteBy == NCExecuteBy::Digging ||
routeOprTableLoc.ExecuteBy == NCExecuteBy::Entreprenor) &&
prodRoute.ProdId == prodTable.ProdId &&
prodRoute.OprNum == ProdParmReportFinished.FromOprNum;
if (routeOprTableLoc.RecId)
{
oprNextNum = prodRoute.OprNum;
while select prodRouteLoc order by OprNum where prodRouteLoc.OprNum < oprNextNum &&
prodRouteLoc.ProdId == prodTable.ProdId &&
prodRouteLoc.ProdStatus == ProdStatus::StartedUp
{
this.FinishPreOprDiggEnterprinor(prodRouteLoc.ProdId, prodRouteLoc.OprNum, prodParmReportFinished);
}
}
}
No comments:
Post a Comment