提交 5a3908e9 authored 作者: 窦斌's avatar 窦斌

edit

上级 d5073132
......@@ -64,10 +64,9 @@ class MyTestController extends Controller
$html="<html><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><h1>请输入公司id</h1></html>";
echo $html;exit;
}
$admindata = Admin::where('company_id',$input['company_id'])
->where('admin_groupnew',2)
->where('enable',1)
->select('id','company_name')->get();
$admindata = Admin::whereRaw("((company_id='".$input['company_id']."' and admin_groupnew=2) or admin_groupnew=3) and enable=1")
->select('id','company_name')
->get();
$admindata = CommonService::dataToArray($admindata);
if($admindata){
$time_start = $input['time_start'];
......@@ -81,10 +80,10 @@ class MyTestController extends Controller
$html .= "</tr>";
foreach($admindata as $k => $v){
$order_listnum = OrderList::whereRaw("ser_id='".$v['id']."' and create_time BETWEEN '".$time_start."' and '".$time_end."' and is_delete=1 and get_time != '' and company_id = '".$input['company_id']."'")->count();//接单数量
$order_rejectednum = OrderRejected::whereRaw("or_ser_id='".$v['id']."' and or_creact_time BETWEEN '".$time_start."' and '".$time_end."' and or_show=1")->count();//拒单数量
$order_rejectednum = OrderRejected::leftjoin('orders', 'or_order_num', '=', 'order_num')->whereRaw("or_ser_id='".$v['id']."' and or_creact_time BETWEEN '".$time_start."' and '".$time_end."' and or_show=1 and company_id = '".$input['company_id']."'")->count();//拒单数量
$order_listAllnum = OrderList::whereRaw("ser_id='".$v['id']."' and create_time BETWEEN '2024-08-19' and '".$time_end."' and is_delete=1 and get_time != '' and company_id = '".$input['company_id']."'")->count();//总接单数量
$order_rejectedAllnum = OrderRejected::whereRaw("or_ser_id='".$v['id']."' and or_creact_time BETWEEN '2024-08-19' and '".$time_end."' and or_show=1")->count();//总拒单数量
$sql = "SELECT CAST((SUM(UNIX_TIMESTAMP(feeds_time))-SUM(UNIX_TIMESTAMP(get_time)))/COUNT(id) as SIGNED) as timenum FROM gone_order_list WHERE ser_id='".$v['id']."' and get_time != '' and get_time!='0000-00-00 00:00:00' and feeds_time != '' and feeds_time!='0000-00-00 00:00:00' and create_time BETWEEN '".$time_start."' and '".$time_end."' and is_delete=1 and company_id = '".$input['company_id']."'";
$order_rejectedAllnum = OrderRejected::leftjoin('orders', 'or_order_num', '=', 'order_num')->whereRaw("or_ser_id='".$v['id']."' and or_creact_time BETWEEN '2024-08-19' and '".$time_end."' and or_show=1 and company_id = '".$input['company_id']."'")->count();//总拒单数量
$sql = "SELECT CAST((SUM(UNIX_TIMESTAMP(feeds_time))-SUM(UNIX_TIMESTAMP(get_time)))/COUNT(id) as SIGNED) as timenum FROM gone_order_list WHERE ser_id='".$v['id']."' and get_time != '' and get_time!='0000-00-00 00:00:00' and feeds_time != '' and feeds_time!='0000-00-00 00:00:00' and create_time BETWEEN '".$time_start."' and '".$time_end."' and is_delete=1 and company_id = '".$input['company_id']."'";
$data = DB::select($sql);
$sql1 = "SELECT CAST((SUM(UNIX_TIMESTAMP(get_time))-SUM(UNIX_TIMESTAMP(create_time)))/COUNT(id) as SIGNED) as pdnum FROM gone_order_list WHERE ser_id='".$v['id']."' and get_time != '' and get_time!='0000-00-00 00:00:00' and create_time BETWEEN '".$time_start."' and '".$time_end."' and time(create_time)>='08:30:00' and time(create_time)<='18:00:00' and is_delete=1 and company_id = '".$input['company_id']."'";
$data1 = DB::select($sql1);
......
......@@ -102,7 +102,7 @@ class StatementsListService extends Model
$list_data = DB::table('statements_list as sl')
->leftJoin('company as c', 'c.com_id', '=', 'sl.company_id')
->where('stl_serid', $session['admin_id'])
// ->where('stl_type', '!=', 4)
->where('stl_type', '!=', 4)
->select('stl_wat', 'stl_type', 'com_name', 'stl_startime', 'stl_endtime', 'stl_money', 'stl_id')
->orderByRaw("stl_type asc,stl_endtime desc")
->paginate($show_count);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论