当前位置: 首页>>代码示例>>PHP>>正文


PHP AFS::checkAFSYear方法代码示例

本文整理汇总了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;
 }
开发者ID:armic,项目名称:erpts,代码行数:64,代码来源:RPTOPBatchRecords.php

示例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();
                     								}
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:OwnerListTest.php


注:本文中的AFS::checkAFSYear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。