コード例 #1
0
ファイル: Checkout.php プロジェクト: kenlong/example
 /**
  * 获取datawindw结构
  *
  */
 public function getStruct_card()
 {
     $action = new CheckoutCardAction();
     $result = $action->getStruct();
     return $result;
 }
コード例 #2
0
ファイル: Report.php プロジェクト: kenlong/example
 private function getStation($code)
 {
     $dao = new StocksDao();
     $table = StocksIndexAction::getTableNameByCode($code);
     if (!$table) {
         return false;
     }
     rsort($table);
     $result = $dao->findAll("code = '{$code}' ", $table[0])->toResultSet();
     if (!$result) {
         return false;
     }
     $row = sizeof($result) - 1;
     $rtn['code'] = $code;
     $rtn['factoryNo'] = $result[$row]['factoryNo'];
     $rtn['goodsName'] = $result[$row]['goodsName'];
     $rtn['spec'] = $result[$row]['spec'];
     $rtn['madeIn'] = $result[$row]['madeIn'];
     //如果在库存,则写上当前库
     $currentstocks = new StocksManagerAction();
     $curren = $currentstocks->queryCurrentStocks("code = '{$code}'");
     if ($curren) {
         $rtn["location"] = '在库[' . $curren[0]['place'] . ']';
     } else {
         //写上用途/去向
         switch ($result[$row]['billType']) {
             case '调拨出库':
                 $rtn['location'] = "调拨到[" . $result[$row]['toplace'] . "]途中";
                 break;
             case '安装领表':
                 $checkout = new CheckoutCardAction();
                 //print_r($result);
                 $install = $checkout->query("clientNo = '" . $result[$row]['clientNo'] . "'");
                 if ($install) {
                     $rtn["location"] = "安装到[" . $result[$row]['client'] . "]";
                 } else {
                     $rtn['location'] = "安装到[" . $result[$row]['client'] . "]途中";
                 }
                 break;
             default:
                 $rtn['location'] = '内部移库途中';
         }
     }
     return $rtn;
 }