彭俊 6 år sedan
förälder
incheckning
28f8492af3

+ 3 - 3
app/Http/Controllers/Admin/MoneyListController.php

@@ -31,9 +31,9 @@ class MoneyListController extends Controller {
 		$dt->addColsFields('id', array('width' => 80));
 		/*$dt->addColsFields('account_name', array('templet' => '#usermoneyRecord', 'width' => 110));*/
 		$dt->addColsFields('money_time', array('templet' => '#orderid_time','width' => 240));
-		$dt->addColsFields('change_cash', array('templet' => '#money_aftercash','width' => 290));
-		$dt->addColsFields('systemuser_ordertype', array('templet' => '#systemuser_ordertype','sort'=>false,'width' => 160));
-		$dt->addColsFields('trade_desc', array('templet' => '#ordertype','sort'=>false));
+		$dt->addColsFields('change_cash', array('templet' => '#money_aftercash','width' => 250));
+		$dt->addColsFields('systemuser_ordertype', array('templet' => '#systemuser_ordertype','sort'=>false,'width' => 130));
+		$dt->addColsFields('trade_desc', array('templet' => '#ordertype','sort'=>false, 'width' => 230));
 		$dt->addColsFields('game_view', array('templet' => '#game','width' => 100,'sort'=>false,'align' => 'left'));
 
 		return view('admin.moneylist/index', $dt->render($request));

+ 3 - 3
app/Http/Controllers/Admin/RegulationController.php

@@ -24,9 +24,9 @@ class RegulationController extends Controller
         $dt = \App\Lib\DataTable\DataTable::init ();
         $dt->setDataSource ('/admin/money/getUser');
         $dt->setLang ('money');
-        $dt->addColsFields ('id', array('sort' => false,'width' => 100));
-        $dt->addColsFields ('account_name', array('sort' => false,'templet' => '#userRegulation', 'width' => 140));
-        $dt->addColsFields ('cash', array('sort' => false,'width' => 120));
+        $dt->addColsFields ('id', array('sort' => false,'width' => 300));
+        $dt->addColsFields ('account_name', array('sort' => false,'templet' => '#userRegulation', 'width' => 340));
+        $dt->addColsFields ('cash', array('sort' => false,'width' => 320));
 //		$dt->addColsFields('add_money');
         // $dt->addColsFields ('add_money', array('sort' => false, 'templet' => '#add_money'));
         // $dt->addColsFields ('cut_money', array('sort' => false, 'templet' => '#cut_money'));

+ 6 - 2
app/Http/Controllers/Admin/SoccerStringNoteListController.php

@@ -15,7 +15,7 @@ Use App\Lib\Settlement\SettlementWinFail;
 use App\Models;
 use Request;
 
-/**
+/**1
  *
  */
 class SoccerStringNoteListController extends Controller
@@ -31,6 +31,7 @@ class SoccerStringNoteListController extends Controller
         $request['order_id'] = isset($req->order_id) ? trim($req->order_id) :null ;
         $request['status'] = isset($req->status) ? trim($req->status) : '-1';
         $request['match_id'] = isset($req->match_id) ? trim($req->match_id) : '';
+        $request['game_code'] = isset($req->game_code) ? trim($req->game_code) : '';
         $request['order_status'] = isset($req->order_status) ? trim($req->order_status) : '-1';
 
         $dt = \App\Lib\DataTable\DataTable::init();
@@ -341,9 +342,12 @@ class SoccerStringNoteListController extends Controller
     function moneycount()
     {
         $where = Request::has('where') ? Request::get('where') : '';
+        $match_id = Request::has('match_id') ? Request::get('match_id') : '';
+        $game_code = Request::has('game_code') ? Request::get('game_code') : '';
+
         $db = new \App\Models\MoneyBuyStr();
 
-        $data = $db->MoneyCount($where);
+        $data = $db->MoneyCount($where,$match_id,$game_code);
         return responseToJson($data);
     }
 

+ 6 - 6
app/Http/Controllers/Admin/SportsfootController.php

@@ -452,13 +452,13 @@ class SportsfootController extends Controller {
         $dt->setDataSource('/admin/sportsfoot/outcomeinfo');
         $dt->setLang('sportsfoot');
         $dt->addColsFields('newtime', array('templet' => '#newtime', 'sort' => false, 'width' => 200));
-        $dt->addColsFields('totime', array('templet' => '#totime', 'sort' => false, 'width' => 80));
-        $dt->addColsFields('home_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
-		$dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 70));
+        $dt->addColsFields('totime', array('templet' => '#totime', 'sort' => false, 'width' => 155));
+        $dt->addColsFields('home_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 90));
+		$dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 90));
 		$dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 70));
-		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 110));
-		$dt->addColsFields('sxalfcourt', array('templet' => '#sxalfcourt', 'sort' => false, 'width' => 300));
-        $dt->addColsFields('statusmatch', array('templet' => '#statusmatch', 'sort' => false, 'width' => 150,'align' => 'left'));
+		$dt->addColsFields('csnum', array('templet' => '#csnum', 'sort' => false, 'width' => 100));
+		$dt->addColsFields('sxalfcourt', array('templet' => '#sxalfcourt', 'sort' => false, 'width' => 210));
+        $dt->addColsFields('statusmatch', array('templet' => '#statusmatch', 'sort' => false, 'width' => 100,'align' => 'left'));
 		$dt->addColsFields('operation', array('templet' => '#status', 'sort' => false, 'width' => 300));
         // $arr[] = 'view';
 		// if (checkRriv('/admin/sportsfoot/edit')) {

+ 1 - 1
app/Http/Controllers/Admin/UserController.php

@@ -1273,7 +1273,7 @@ class UserController extends Controller
         foreach ($data as $value) {
             $row = array();
             $row[] = $value['id'];
-            $row[] = $value['account'];
+            $row[] = $value['account'].$value['group_name'];
             $row[] = $value['cash'];
             $row[] = $value['name'];
             $row[] = $value['register_time'];

+ 5 - 5
app/Http/Controllers/Admin/WagentController.php

@@ -51,11 +51,11 @@ class WagentController extends Controller {
         $dt = \App\Lib\DataTable\DataTable::init();
         $dt->setDataSource('/admin/wagent/zjrecordinfo');
         $dt->setLang('wagent');
-        $dt->addColsFields('agent_name', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
-        $dt->addColsFields('ordernumber', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
-        $dt->addColsFields('credit', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
-        $dt->addColsFields('agent_money_before', array('templet' => '#newtime', 'sort' => false, 'width' => 100));
-        $dt->addColsFields('agent_money_after', array('templet' => '#newtime', 'sort' => false, 'width' => 100));
+        $dt->addColsFields('agent_name', array('templet' => '#newtime', 'sort' => false, 'width' => 200));
+        $dt->addColsFields('ordernumber', array('templet' => '#newtime', 'sort' => false, 'width' => 230));
+        $dt->addColsFields('credit', array('templet' => '#newtime', 'sort' => false, 'width' => 120));
+        $dt->addColsFields('agent_money_before', array('templet' => '#newtime', 'sort' => false, 'width' => 120));
+        $dt->addColsFields('agent_money_after', array('templet' => '#newtime', 'sort' => false, 'width' => 120));
         $dt->enableCheckBox();
 		return view('admin.wagent/zjrecord', $dt->render($request));
 	}

+ 25 - 10
app/Models/MoneyBuyStr.php

@@ -9,6 +9,7 @@
 namespace App\Models;
 
 use Illuminate\Support\Facades\DB;
+use \App\Models\MoneyBuyMatch as MoneyBuyMatchModel;
 
 class MoneyBuyStr extends BaseModel
 {
@@ -212,18 +213,32 @@ class MoneyBuyStr extends BaseModel
     }
 
     //投注金额汇总统计
-    function MoneyCount($where = '')
+    function MoneyCount($where = '',$match_id='',$game_code='')
     {
-        $data = array();
-        $data['all_money'] = $this->where('status', '1')->sum('money');
-        $data['all_prize_money'] = $this->where('status', '1')->sum('prize_money');
-        $data['alraedy_prize_money'] = $this->where('settle_status', '2')->where('status', '1')->sum('gain_money');
-        if (!empty($where) && is_array($where)) {
-            $data['all_money'] = $this->where($where)->where('status', '1')->sum('money');
-            $data['all_prize_money'] = $this->where($where)->where('status', '1')->sum('prize_money');
-            $data['alraedy_prize_money'] = $this->where($where)->where('settle_status', '2')->where('status', '1')->sum('gain_money');
+        if(empty($match_id)){
+            $data = array();
+            $data['all_money'] = $this->where('status', '1')->sum('money');
+            $data['all_prize_money'] = $this->where('status', '1')->sum('prize_money');
+            $data['alraedy_prize_money'] = $this->where('settle_status', '2')->where('status', '1')->sum('gain_money');
+            if (!empty($where) && is_array($where)) {
+                $data['all_money'] = $this->where($where)->where('status', '1')->sum('money');
+                $data['all_prize_money'] = $this->where($where)->where('status', '1')->sum('prize_money');
+                $data['alraedy_prize_money'] = $this->where($where)->where('settle_status', '2')->where('status', '1')->sum('gain_money');
+            }
         }
-
+        //追加 如果有赛事id+球类代码 则查询该赛事下所有串式投注
+        if(!empty($game_code) and !empty($match_id)){
+            $where = ['game_code'=>$game_code,'match_id'=>$match_id,'bet_type'=>2];
+            $moneyBuyMatch = new MoneyBuyMatchModel();
+            $str_order_ids = $moneyBuyMatch->getByAttrs($where)->toArray();
+           
+            if(empty($str_order_ids)){
+                $data['all_money'] = 0;
+                $data['all_prize_money'] = 0;
+                $data['alraedy_prize_money'] = 0;
+            }
+        }
+       
         return $data;
     }
 

+ 6 - 5
app/Models/SportsNoteList.php

@@ -974,7 +974,7 @@ class SportsNoteList extends BaseModel
                 $models->status = '1';
                 try {
                     DB::beginTransaction();//开启事务
-                    $this->where('id', $orders[$i]['id'])->update(['status' => '2']);
+                    $this->where('id', $orders[$i]['id'])->update(['status' => '2','use_mark'=>'注单所属赛事作废']);
                     \App\Models\Account_detailed::where('account_identity', $orders[$i]->account_identity)->update(['available_cash' => $new_available_cash, 'cash' => $new_available_cash]);
                     $models->save();
 
@@ -1141,7 +1141,7 @@ class SportsNoteList extends BaseModel
     }
     public static function getOrderData($time=60){
 
-        $time = 180;
+        $time = 100;
         $db = new \App\Models\Setinfo();
         //获取设定需审核时间 秒
         $handle_time =  $db->getInfo(1003)['infocontent']?:90;
@@ -1154,9 +1154,10 @@ class SportsNoteList extends BaseModel
 
         //拼接查询条件
         $where = [
-            ['money_time','>',date('Y-m-d H:i:s',$time_unx_s)],
-            ['money_time','<',date('Y-m-d H:i:s',$time_unx_e)],
-            ['roll_ratify','=',2]
+            ['money_time','>',date('Y-m-d H:i:s',$time_unx_s)],//查询开始时间 大于 当前时间-审核延迟时间-执行间隔时间(默认60秒)
+            ['money_time','<',date('Y-m-d H:i:s',$time_unx_e)],//查询结束时间 小于 当前时间-审核延迟时间
+            ['roll_ratify','=',2],//查询  时间段内未审核 滚球投注 注单
+            ['status','=',1],//查询 时间段内注单 投注状态
         ];
         //获取 待处理订单数据
         $order_data = self::join('money_buy_match','money_buy_match.order_id','=','money_buy_simplex.order_id')

+ 2 - 2
resources/lang/zh-cn/sportsfoot.php

@@ -65,8 +65,8 @@ return array(
 	'area_id' => '联赛所属地区',
 	'hot' => '热度',
 	
-	'home_team' => '主队',
-    'guest_team' => '客队',
+	'home_team' => '主队名称',
+    'guest_team' => '客队名称',
     'lg_id' => '联赛ID',
     'sg_id' => '子联赛ID',
     'operation'=>'操作',

+ 2 - 2
resources/views/admin/Sportsbq/outcome.blade.php

@@ -28,11 +28,11 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=bq&match_id=@{{d.match_id}}"> 单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=bq&match_id=@{{d.match_id}}&game_code=bq"> 单式</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}"> 串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=bq"> 串式</a></span>
     </script>
 
     <script type="text/html" id="statusmatch">

+ 2 - 2
resources/views/admin/Sportswq/outcome.blade.php

@@ -21,11 +21,11 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=wq&match_id=@{{d.match_id}}">单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=wq&match_id=@{{d.match_id}}&game_code=wq">单式</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}">串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=wq">串式</a></span>
     </script>
 
     <script type="text/html" id="statusmatch">

+ 2 - 2
resources/views/admin/sportsbk/outcome.blade.php

@@ -131,11 +131,11 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=lq&match_id=@{{d.match_id}}"> 单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=lq&match_id=@{{d.match_id}}&game_code=lq"> 单式</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}"> 串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=lq"> 串式</a></span>
     </script>
 
     <script type="text/html" id="matchstatus">

+ 2 - 2
resources/views/admin/sportsfoot/outcome.blade.php

@@ -20,11 +20,11 @@
     </script>
 
     <script type="text/html" id="dsnum">
-        <span><a href="/admin/SoccerNoteList/notelist?type=zq&match_id=@{{d.match_id}}"> 单式</a></span>
+        <span><a href="/admin/SoccerNoteList/notelist?type=zq&match_id=@{{d.match_id}}&game_code=zq"> 单式</a></span>
     </script>
 
     <script type="text/html" id="csnum">
-        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}"> 串式</a></span>
+        <span><a href="/admin/SoccerStringNoteList/notelist?match_id=@{{d.match_id}}&game_code=zq"> 串式</a></span>
     </script>
 
     <script type="text/html" id="status">

+ 8 - 2
resources/views/sports/sports_stringnotelist.blade.php

@@ -75,7 +75,7 @@
     <div class="layui-row">
         <div class="layui-col-xs12">
             <form class="layui-form rewrite" eventType="eventForm"  action="" method="get">
-            <input type="hidden" name="match_id" id="match_id" value="{$match_id}">
+            <!-- <input type="hidden" name="match_id" id="match_id" value="{$match_id}"> -->
                 <div class="layui-form-item">
 
                     <div class="layui-inline">
@@ -83,6 +83,8 @@
                         <div class="layui-input-inline">
                             <input type="text" name="account" id="account" eventType="event-query"  value="{{ $account }}" lay-verify="required" autocomplete="off" class="layui-input">
                             <input type="hidden" name="match_id" id="match_id" eventType="event-query"  value="{{ $match_id }}" lay-verify="required" autocomplete="off" class="layui-input">
+                            <input type="hidden" name="game_code" id="game_code" eventType="event-query"  value="{{ $game_code }}" lay-verify="required" autocomplete="off" class="layui-input">
+
                         </div>
                         <div class="layui-input-inline checkbox">
                             <input type="checkbox" name="sureblur" id="form_sureblur" lay-skin="switch" lay-text="精确|模糊" @if(!isset($sureblurs) || $sureblurs=='on') checked @endif  class="layui-input" eventType=event-query>
@@ -232,10 +234,14 @@
     }else{
     $('.layui-table-page').after('<div id="statistics"></div>');
     }
+    var match_id = document.getElementById('match_id').value;
+    var game_code = document.getElementById('game_code').value;
+
+    // res.extras
     $.ajax({
     type: 'get',
     url: '/admin/SoccerStringNoteList/moneycount',
-    data: {where:res.extras},
+    data: {where:res.extras,match_id:match_id,game_code:game_code},
     dataType: 'json',
     //async: false,
     success: function (data) {