Bladeren bron

异常处理-合并所有注单状态查询

彭俊 6 jaren geleden
bovenliggende
commit
12ef5961ff

+ 4 - 2
app/Http/Controllers/Admin/CheckRollingController.php

@@ -157,8 +157,10 @@ class CheckRollingController extends Controller
         $sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
         $type = Request::has('type') ? Request::get('type') : 'zq';
         $where = array();
-        //$where[] = array('money_buy_match.is_rolling', '=', 1);
-        //$where[] = array('money_buy_simplex.roll_ratify', '=', 2);
+        //注单状态为投注
+        $where[] = array('money_buy_simplex.status', '=', 1);
+        //滚球审核状态为为审核
+        $where[] = array('money_buy_simplex.roll_ratify', '=', 2);
         if (!empty($account)) {
             if (empty($sureblur) || $sureblur == 'off') {
                 $where[] = array('money_buy_simplex.account_name', 'like', '%' . $account . '%');

+ 54 - 2
app/Http/Controllers/Admin/SoccerNoteListController.php

@@ -17,7 +17,7 @@ use App\Models;
 use Request;
 
 /**
- *
+ *1
  */
 class SoccerNoteListController extends Controller
 {
@@ -244,7 +244,7 @@ class SoccerNoteListController extends Controller
         $end_time = Request::get('end_time') ? Request::get('end_time') . ' 23:59:59' : '';
         $order_id = Request::get('order_id') ? Request::get('order_id') : '';
         $match_id = Request::get('match_id') ? Request::get('match_id') : '';
-        $status = Request::has('status') ? Request::get('status') : '';
+        // $status = Request::has('status') ? Request::get('status') : '';
         $order_status = Request::has('order_status') ? Request::get('order_status') : '';
         $sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
         $type = Request::has('type') ? Request::get('type') : 'zq';
@@ -276,16 +276,33 @@ class SoccerNoteListController extends Controller
         if (!empty($match_id)) {
             $where[] = array('money_buy_simplex.match_id', $match_id);
         }
+
+        //调整状态查询 1,2,3为订单状态 1投注 2作废 3撤单
+        if($order_status == 1 || $order_status == 2 || $order_status == 3){
+            $where[] = array('money_buy_simplex.status', '=', $order_status);
+        }
+        //4 5为结算状态 4未结算 5已结算
+        if($order_status == 4){
+            $status  = 1;
+            $where[] = array('money_buy_simplex.settle_status', '=', $status);
+        }
+        if($order_status == 5){
+            $status  = 2;
+            $where[] = array('money_buy_simplex.settle_status', '=', $status);
+        }
+        /*
         if ($status != -1) {
             $where[] = array('money_buy_simplex.settle_status', '=', $status);
         }
         if ($order_status != -1) {
             $where[] = array('money_buy_simplex.status', '=', $order_status);
         }
+        */
         $where[] = array('money_buy_simplex.game_code', $type);
         $newapp = new \App\Models\SportsNoteList();
         $data = $newapp->getinfo($list, $page, $where, $type);
 
+
         return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total'], 0, $where);
     }
 
@@ -405,12 +422,29 @@ class SoccerNoteListController extends Controller
         if (!empty($match_id)) {
             $where[] = array('money_buy_simplex.match_id', $match_id);
         }
+
+        //调整状态查询 1,2,3为订单状态 1投注 2作废 3撤单
+        if($order_status == 1 || $order_status == 2 || $order_status == 3){
+            $where[] = array('money_buy_simplex.status', '=', $order_status);
+        }
+        //4 5为结算状态 4未结算 5已结算
+        if($order_status == 4){
+            $status  = 1;
+            $where[] = array('money_buy_simplex.settle_status', '=', $status);
+        }
+        if($order_status == 5){
+            $status  = 2;
+            $where[] = array('money_buy_simplex.settle_status', '=', $status);
+        }
+
+        /*
         if ($status != -1) {
             $where[] = array('money_buy_simplex.settle_status', '=', $status);
         }
         if ($order_status != -1) {
             $where[] = array('money_buy_simplex.status', '=', $order_status);
         }
+        */
         $where[] = array('money_buy_simplex.game_code', $type);
         $newapp = new \App\Models\SportsNoteList();
         $data = $newapp->getinfo($list, $page, $where, $type);
@@ -574,12 +608,30 @@ class SoccerNoteListController extends Controller
         if (!empty($match_id)) {
             $where[] = array('money_buy_simplex.match_id', $match_id);
         }
+
+        //调整状态查询 1,2,3为订单状态 1投注 2作废 3撤单
+        if($order_status == 1 || $order_status == 2 || $order_status == 3){
+            $where[] = array('money_buy_simplex.status', '=', $order_status);
+        }
+        //4 5为结算状态 4未结算 5已结算
+        if($order_status == 4){
+            $status  = 1;
+            $where[] = array('money_buy_simplex.settle_status', '=', $status);
+        }
+        if($order_status == 5){
+            $status  = 2;
+            $where[] = array('money_buy_simplex.settle_status', '=', $status);
+        }
+
+
+        /*
         if ($status != -1) {
             $where[] = array('money_buy_simplex.settle_status', '=', $status);
         }
         if ($order_status != -1) {
             $where[] = array('money_buy_simplex.status', '=', $order_status);
         }
+        */
         $where[] = array('money_buy_simplex.game_code', $type);
         $newapp = new \App\Models\SportsNoteList();
         $data = $newapp->info($list, $page, $where, $type);

+ 17 - 0
app/Http/Controllers/Admin/SoccerStringNoteListController.php

@@ -102,6 +102,22 @@ class SoccerStringNoteListController extends Controller
                 }
             }
         }
+        
+        //调整状态查询 1,2,3为订单状态 1投注 2作废 3撤单
+        if($order_status == 1 || $order_status == 2 || $order_status == 3){
+            $where[] = array('money_buy_str.status', '=', $order_status);
+        }
+        //4 5为结算状态 4未结算 5已结算
+        if($order_status == 4){
+            $status  = 1;
+            $where[] = array('money_buy_str.settle_status', '=', $status);
+        }
+        if($order_status == 5){
+            $status  = 2;
+            $where[] = array('money_buy_str.settle_status', '=', $status);
+        }
+
+        /*
             
         if ($status != -1) {
             $where[] = array('money_buy_str.settle_status', '=', $status);
@@ -109,6 +125,7 @@ class SoccerStringNoteListController extends Controller
         if ($order_status != -1) {
             $where[] = array('money_buy_str.status', '=', $order_status);
         }
+        */
         $newapp = new \App\Models\MoneyBuyStr();
         $data = $newapp->getinfo($list, $page, $where,$ids);
 

+ 14 - 14
app/Http/Controllers/Admin/SportsSoccerController.php

@@ -10,7 +10,7 @@ use App\Models;
 use Request;
 
 /**
- *
+ *1
  */
 class SportsSoccerController extends Controller
 {
@@ -263,36 +263,36 @@ class SportsSoccerController extends Controller
             }
 
             //查看赛事是否有下注细信息
-            $res = \App\Models\MoneyBuyMatch::where('match_id', $data->match_id)->get()->toArray();
+            $res = \App\Models\MoneyBuyMatch::where('match_id', $id)->get()->toArray();
             if (!empty($res)) {
-                if ($data->status == 0) {
+                if ($data->status == 0) {//有注单的未开始赛事
                     $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 4, 'name' => '作废']);
                 }
-                if ($data->status == 1) {
+                if ($data->status == 1) {//有注单的已开始赛事
                     $match_status = array(['status' => 1, 'name' => '正在进行'], ['status' => 2, 'name' => '已结束'], ['status' => 4, 'name' => '作废']);
                 }
             } else {
-                if ($data->status == 0) {
-                    $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 4, 'name' => '作废'], ['status' => 6, 'name' => '取消']);
+                if ($data->status == 0) {//无注单的未开始赛事
+                    $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 6, 'name' => '取消']);
                 }
-                if ($data->status == 1) {
+                if ($data->status == 1) {//无注单的已开始赛事
                     $match_status = array(['status' => 1, 'name' => '正在进行'], ['status' => 2, 'name' => '已结束'], ['status' => 4, 'name' => '作废'], ['status' => 6, 'name' => '取消']);
                 }
             }
-            if ($data->status == 2) {
+            if ($data->status == 2) {//已结束
                 $match_status = array(['status' => 2, 'name' => '已结束'], ['status' => 4, 'name' => '作废']);
             }
-            if ($data->status == 3) {
+            if ($data->status == 3) {//已结算
                 $match_status = array(['status' => 3, 'name' => '已结算'], ['status' => 5, 'name' => '待结算']);
             }
-            if ($data->status == 4) {
+            if ($data->status == 4) {//已作废
                 $match_status = array(['status' => 4, 'name' => '作废'], ['status' => 6, 'name' => '取消']);
             }
-            if ($data->status == 5) {
-                $match_status = array(['status' => 5, 'name' => '待结算'], ['status' => 4, 'name' => '作废']);
+            if ($data->status == 5) {//待结算
+                $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'],['status' => 5, 'name' => '待结算'], ['status' => 4, 'name' => '作废']);
             }
-            if ($data->status == 6) {
-                $match_status = array(['status' => 6, 'name' => '取消']);
+            if ($data->status == 6) {//已取消
+                $match_status = array(['status' => 0, 'name' => '未开始'], ['status' => 1, 'name' => '正在进行'], ['status' => 2, 'name' => '已结束'],['status' => 6, 'name' => '取消']);
             }
 
             $name_chinese = \App\Models\SoccerLeague::where('id', $data->lg_id)->first();

+ 1 - 0
app/Http/Controllers/Admin/SportsfootController.php

@@ -186,6 +186,7 @@ class SportsfootController extends Controller {
 		//验证是否是首次添加危险球
 		$typenum = $req->type_num;
 
+
 		if(empty($matchid)  || empty($timep) || empty($rtype))  return json_encode(['status'=>2,'msg'=>'设置数据异常']);
 		$model = \App\Models\Stzqresult::where('match_id', $matchid)->select("warn_more","start_time","status")->first()->toArray();
 		// if($model['status'] != 2) return json_encode(['status'=>3,'msg'=>'赛事未结束,不能设置危险球']);

+ 1 - 1
resources/lang/zh-cn/sportsnotelist.php

@@ -27,7 +27,7 @@ return array(
     'money_time' => '下注时间',
     'prize' => '开奖号码',
     'settle_status' => '结算状态',
-    'game_status' => '结算状态',
+    'game_status' => '开奖状态',
     'match_status' => '状态',
     'member_type' => '会员类型',
     'edit' => '修改',

+ 5 - 0
resources/lang/zh-cn/status.php

@@ -394,17 +394,22 @@ return array(
 			'2' => '禁用',
 		),
 	),
+	//结算状态
 	'ifsettlement' => array(
 		'status' => array(
 			'1' => '未结算',
 			'2' => '已结算',
 		),
 	),
+	//注单状态
 	'order_status' => array(
 		'status' => array(
 			'1' => '投注',
 			'2' => '作废',
 			'3' => '撤销',
+			//合并结算状态
+			'4' => '未结算',
+			'5' => '已结算',
 		),
 	),
 	'notelist_type' => array(

+ 2 - 0
resources/views/sports/sports_notelist.blade.php

@@ -101,6 +101,7 @@
                         </div>
                     </div>
 
+                    <!--
                     <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('sportsnotelist.ifsettlement') }}</label>
                         <div class="layui-input-inline" style="">
@@ -116,6 +117,7 @@
                             </select>
                         </div>
                     </div>
+                    -->
 
                     <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('sportsnotelist.order_status') }}</label>

+ 4 - 0
resources/views/sports/sports_search.blade.php

@@ -227,7 +227,9 @@
                             <input type="text" name="match_id" id="match_id" eventType="event-query"  value="{{ $match_id }}" lay-verify="required" autocomplete="off" class="layui-input">
                         </div>
                     </div>
+
                     @if(!isset($check))
+                    <!--
                     <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('sportsnotelist.ifsettlement') }}</label>
                         <div class="layui-input-inline" style="">
@@ -243,6 +245,7 @@
                             </select>
                         </div>
                     </div>
+                     -->
 
                     <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('sportsnotelist.order_status') }}</label>
@@ -260,6 +263,7 @@
                         </div>
                     </div>
                     @endif
+
                     <div class="layui-inline">
                         <a class="layui-btn layui-btn-sm lay-btn-diy"   data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
                         <a  class="layui-btn   layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>

+ 3 - 0
resources/views/sports/sports_stringnotelist.blade.php

@@ -110,6 +110,7 @@
                         </div>
                     </div>
 
+                    <!--
                     <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('sportsnotelist.ifsettlement') }}</label>
                         <div class="layui-input-inline" style="width: 100px">
@@ -125,6 +126,8 @@
                             </select>
                         </div>
                     </div>
+                    -->
+                    
                     <div class="layui-inline">
                         <label class="layui-form-label">{{ trans('sportsnotelist.order_status') }}</label>
                         <div class="layui-input-inline" style="width: 100px">