コード例 #1
0
ファイル: RunController.php プロジェクト: Crocodile26/php-1
 public function listAction()
 {
     $p = $this->urlParam();
     $limit = $this->limit($p);
     $condition = implode($this->searchConditions(), ' and ');
     $list = Loan::all($condition, $limit, ['base', 'branch', 'user', 'other']);
     $count = $list['count'];
     $list = $list['list'];
     $page = $this->page($count, $limit[0], $p);
     $this->view->setVars(['list' => $list, 'page' => $page]);
 }
コード例 #2
0
 /**
  * 逾期列表
  * 超过一个月未还款
  */
 public function overdueAction()
 {
     $p = $this->urlParam();
     $limit = $this->limit($p);
     $conditions = $this->searchConditions();
     $conditions[] = '{Loan}.return_num < {Loan}.deadline';
     //$dawn = strtotime(date('Y-m-d 00:00:00', strtotime('-1 month')));
     $now = strtotime(date('Y-m-d 00:00:00'));
     $conditions[] = '{Loan}.next_repay_time < ' . $now;
     $condition = implode($conditions, ' and ');
     $list = Loan::all($condition, $limit, ['base', 'branch', 'user', 'repay']);
     foreach ($list['list'] as &$row) {
         $row['overdue_days'] = ceil(($now - $row['next_repay_time']) / (3600 * 24));
     }
     $page = $this->page($list['count'], $limit[0], $p);
     $this->view->setVars(['list' => $list['list'], 'page' => $page]);
 }
コード例 #3
0
ファイル: RcController.php プロジェクト: Crocodile26/php-1
 /**
  * 案件列表
  */
 public function listAction()
 {
     $p = $this->urlParam();
     $limit = $this->limit($p);
     $post = $this->request->get();
     if (isset($post['deal']) and $post['deal'] == 1) {
         $condition = implode($this->searchConditions(), ' and ');
         $list = Loan::all($condition, $limit);
         $deal = true;
     } else {
         $condition = implode($this->searchConditions(), ' and ');
         $list = LoanSketch::rclist($condition, $limit);
         $deal = false;
     }
     $count = $list['count'];
     $list = $list['list'];
     $page = $this->page($count, $limit[0], $p);
     $this->view->setVars(['list' => $list, 'page' => $page, 'deal' => $deal]);
 }