本文整理汇总了PHP中AFS::checkAFSYear方法的典型用法代码示例。如果您正苦于以下问题:PHP AFS::checkAFSYear方法的具体用法?PHP AFS::checkAFSYear怎么用?PHP AFS::checkAFSYear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AFS
的用法示例。
在下文中一共展示了AFS::checkAFSYear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTDListOf
function getTDListOf($id, $type, $year)
{
$owner = new Owner();
eval("\$ownerIDArray = \$owner->selectOwner" . $type . "(" . $id . ");");
if ($ownerIDArray) {
$odArray = "";
foreach ($ownerIDArray as $key => $value) {
eval("\$odID = \$owner->selectOD" . $type . "({$value});");
if ($odID) {
$odArray[] = $odID;
}
}
unset($owner);
if ($odArray) {
$afsArray = "";
foreach ($odArray as $key => $value) {
$afs = new AFS();
$odHistoryRecords = new OdHistoryRecords();
$afsID = $afs->checkAFSYear($value, $year);
$odHistoryArr = $odHistoryRecords->selectSuccOD($value, $year);
if ($odHistoryArr) {
$latestAfs = true;
foreach ($odHistoryArr as $k => $v) {
if ($afs->checkAFSYear($v, $year)) {
$latestAfs = false;
}
}
if ($latestAfs) {
$afsIDArray[] = $afsID;
}
} else {
if ($afsID != "") {
$afsIDArray[] = $afsID;
}
}
}
unset($afs);
if ($afsIDArray) {
$tdRecords = new TDRecords();
$tdIDArray = "";
foreach ($afsIDArray as $tkey => $tvalue) {
$td = new TD();
if ($td->selectRecord("", $tvalue)) {
// added the following if($td->getArchive()!="true") line on September 10, 2005 to..
// ..omit 'cancelled' TDs and other TDs that went through a transaction in..
// ..creating new RPTOPs.
if ($td->getArchive() != "true") {
$tdIDArray[] = $td->getTdID();
}
}
unset($td);
}
$ret = $tdIDArray;
} else {
$ret = false;
}
} else {
$ret = false;
}
} else {
$ret = false;
}
return $ret;
}
示例2: getTDListOf
function getTDListOf($id, $type, $year)
{
echo "<br><br>" . $year . "-" . $id;
$owner = new Owner();
//echo("\$ownerIDArray = \$owner->selectOwner".$type."(".$id.");");
eval("\$ownerIDArray = \$owner->selectOwner" . $type . "(" . $id . ");");
echo "<br>ownerIDArray - ";
print_r($ownerIDArray);
if ($ownerIDArray) {
$odArray = "";
foreach ($ownerIDArray as $key => $value) {
eval("\$odID = \$owner->selectOD" . $type . "({$value});");
if ($odID) {
$odArray[] = $odID;
}
}
echo "<br>odArray - ";
print_r($odArray);
unset($owner);
if ($odArray) {
$afsArray = "";
foreach ($odArray as $key => $value) {
$afs = new AFS();
$odHistoryRecords = new OdHistoryRecords();
$afsID = $afs->checkAFSYear($value, $year);
$afs->selectRecord("", "", $value);
//print_r($value);
$odHistoryArr = $odHistoryRecords->selectSuccOD($value, $year);
if ($odHistoryArr) {
$latestAfs = true;
foreach ($odHistoryArr as $k => $v) {
if ($afs->checkAFSYear($v, $year)) {
$latestAfs = false;
}
echo "<br>latestAfs = " . $latestAfs . "<br>odID = " . $v . "<br>year" . $year . " - " . $afs->getEffectivity();
}
if ($latestAfs) {
$afsIDArray[] = $afsID;
}
} else {
if ($afsID != "") {
$afsIDArray[] = $afsID;
}
}
//if ($latesAfs) $afsIDArray[] = $afsID;
}
echo "<br>afsIDArray - ";
print_r($afsIDArray);
unset($afs);
if ($afsIDArray) {
$tdRecords = new TDRecords();
$tdIDArray = "";
foreach ($afsIDArray as $tkey => $tvalue) {
$td = new TD();
//echo $tvalue;
if ($td->selectRecord("", $tvalue)) {
//echo $td->getTdID();
$tdIDArray[] = $td->getTdID();
}
unset($td);
/*
$afs = new AFS;
$afs->selectRecord($tvalue);
//print_r($afs);
//echo "<br>";
$landArray = $afs->getLandArray();
$plantsTreesArray = $afs->getPlantsTreesArray();
$improvementsBuildingsArray = $afs->getImprovementsBuildingsArray();
$machineriesArray = $afs->getMachineriesArray();
unset($afs);
if ($landArray){
foreach($landArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"Land",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}
if ($plantsTreesArray){
foreach($plantsTreesArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"PlantsTrees",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
unset($td);
}
}
if ($improvementsBuildingsArray){
foreach($improvementsBuildingsArray as $lkey => $lvalue){
//echo($lvalue->getPropertyID()."<br>");
$td = new TD;
if ($td->selectRecord("",$lvalue->getPropertyID(),"ImprovementsBuildings",$year)){
$tdRecords->setArrayList($td);
$tdIDArray[] = $td->getTdID();
}
//.........这里部分代码省略.........