public function getInsuranceInfoListAction($state)
 {
     $page_size = $this->request->get('rows');
     $page_num = $this->request->get('page');
     $info_list = null;
     $info_total = 0;
     $user = User::getCurrentUser();
     $user_id = $user['user_id'];
     if ($state == 1 or $state == 2) {
         $info_list = Insurance::getInsuranceInfoList(array('state' => $state, 'user_id' => $user_id), $page_num, $page_size);
         $info_total = Insurance::getInsuranceInfoCount(array('state' => $state, 'user_id' => $user_id));
         foreach ($info_list as &$info) {
             $result = Insurance::getInsuranceFirstResultById($info['result_id']);
             $company = Insurance::getMinDiscount();
             $discount = $company['discount'];
             $gift = $company['gift'];
             $gift2 = $company['gift2'];
             $res_crt = new Criteria($result);
             $total_standard = $res_crt->totalStandard;
             $total_business = $total_standard - $res_crt->standardCompulsoryInsurance;
             $after_discount_compulsory = $res_crt->afterDiscountCompulsoryInsurance;
             $after_discount_business = $total_business * $discount;
             $total_after_discount = $after_discount_compulsory + $after_discount_business;
             $info['min_after_discount'] = round($total_after_discount, 2);
             $gift_money = $res_crt->afterDiscountCompulsoryInsurance * $gift + ($res_crt->standardThird < 0 ? 0 : $res_crt->standardThird) * $discount * $gift + ($total_business - ($res_crt->standardThird < 0 ? 0 : $res_crt->standardThird) - $res_crt->standardOptionalDeductible - $res_crt->standardNotDeductible) * $discount * $gift2;
             $info['gift_money'] = round($gift_money, 2);
         }
     } elseif ($state == 3) {
         $info_list = Insurance::getActualedInsuranceiNfoList(array('user_id' => $user_id), $page_num, $page_size);
         $info_total = Insurance::getActualedInsuranceInfoCount(array('user_id' => $user_id));
     } elseif ($state == 4) {
         $info_list = Insurance::getHasOrderInsuranceInfoList(array('user_id' => $user_id), $page_num, $page_size);
         $info_total = Insurance::getHasOrderInsuranceCount(array('user_id' => $user_id));
     } elseif ($state == 5) {
         $info_list = Insurance::getHasPolicyInsuranceList(array('user_id' => $user_id), $page_num, $page_size);
         $info_total = Insurance::getHasPolicyInsuranceCount(array('user_id' => $user_id));
     }
     $this->view->setVars(array('rows' => $info_list, 'total' => $info_total));
 }