Ver Fonte

更新数据

linwu há 6 meses atrás
pai
commit
07ee7e79fd
3 ficheiros alterados com 444 adições e 18 exclusões
  1. 441 15
      app/mainapp/controller/Screen.php
  2. 2 2
      public/bi/index.html
  3. 1 1
      public/bi/js/index.js

+ 441 - 15
app/mainapp/controller/Screen.php

@@ -26,7 +26,7 @@ class Screen extends BaseController
         $res     = [];
 
         //街道数据
-        $comjobs_community = ComjobsModel::field("count(community),community")->group('community')->column('count(community)', 'community');
+        /*$comjobs_community = ComjobsModel::field("count(community),community")->group('community')->column('count(community)', 'community');
         $community         = RensheCode::getList('community')->toArray();
         $broker_town       = BrokerModel::field("count(town),town")->group('town')->column('count(town)', 'town');
         foreach ($community as &$v) {
@@ -48,21 +48,394 @@ class Screen extends BaseController
             'code'         => '',
             'count'        => $comjobs_community[''] ?? 0,
             'broker_count' => $broker_town[''] ?? 0,
+        ];*/
+        $community = [
+            [
+                "id"=> 2,
+                "name"=> "青阳街道",
+                "code"=> "350582001",
+                "count"=> 639,
+                "broker_count"=> 8
+            ],
+            [
+                "id"=> 3,
+                "name"=> "梅岭街道",
+                "code"=> "350582002",
+                "count"=> 5487,
+                "broker_count"=> 5
+            ],
+            [
+                "id"=> 4,
+                "name"=> "西园街道",
+                "code"=> "350582003",
+                "count"=> 81,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 5,
+                "name"=> "罗山街道",
+                "code"=> "350582004",
+                "count"=> 542,
+                "broker_count"=> 1
+            ],
+            [
+                "id"=> 6,
+                "name"=> "新塘街道",
+                "code"=> "350582005",
+                "count"=> 273,
+                "broker_count"=> 1
+            ],
+            [
+                "id"=> 7,
+                "name"=> "灵源街道",
+                "code"=> "350582006",
+                "count"=> 257,
+                "broker_count"=> 2
+            ],
+            [
+                "id"=> 8,
+                "name"=> "安海镇",
+                "code"=> "350582101",
+                "count"=> 526,
+                "broker_count"=> 94
+            ],
+            [
+                "id"=> 9,
+                "name"=> "磁灶镇",
+                "code"=> "350582102",
+                "count"=> 201,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 10,
+                "name"=> "陈埭镇",
+                "code"=> "350582103",
+                "count"=> 735,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 11,
+                "name"=> "东石镇",
+                "code"=> "350582104",
+                "count"=> 2784,
+                "broker_count"=> 2
+            ],
+            [
+                "id"=> 12,
+                "name"=> "深沪镇",
+                "code"=> "350582105",
+                "count"=> 315,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 13,
+                "name"=> "金井镇",
+                "code"=> "350582106",
+                "count"=> 102,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 14,
+                "name"=> "池店镇",
+                "code"=> "350582107",
+                "count"=> 1024,
+                "broker_count"=> 1
+            ],
+            [
+                "id"=> 15,
+                "name"=> "内坑镇",
+                "code"=> "350582109",
+                "count"=> 72,
+                "broker_count"=> 1
+            ],
+            [
+                "id"=> 17,
+                "name"=> "龙湖镇",
+                "code"=> "350582110",
+                "count"=> 99,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 18,
+                "name"=> "永和镇",
+                "code"=> "350582111",
+                "count"=> 175,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 19,
+                "name"=> "英林镇",
+                "code"=> "350582112",
+                "count"=> 54,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 20,
+                "name"=> "紫帽镇",
+                "code"=> "350582113",
+                "count"=> 105,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 21,
+                "name"=> "西滨镇",
+                "code"=> "350582114",
+                "count"=> 9,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 22,
+                "name"=> "经济开发区",
+                "code"=> "350582501",
+                "count"=> 167,
+                "broker_count"=> 0
+            ],
+            [
+                "id"=> 0,
+                "name"=> "其他",
+                "code"=> "",
+                "count"=> 289,
+                "broker_count"=> 1
+            ]
         ];
         $res['community'] = $community;
 
         //岗位类别
-        $comjobs_cate = ComjobsModel::field("count(cateid),cateid")->group('cateid')->column('count(cateid)', 'cateid');
+        /*$comjobs_cate = ComjobsModel::field("count(cateid),cateid")->group('cateid')->column('count(cateid)', 'cateid');
         $cateids      = array_keys($comjobs_cate);
         $cate         = ComjobsCateModel::where('id', 'in', $cateids)->select()->toArray();
         foreach ($cate as &$v) {
             $v['count'] = $comjobs_cate[$v['id']];
             unset($v);
-        }
+        }*/
+        $cate = [
+            [
+                "id"=> 26,
+                "pid"=> 0,
+                "title"=> "生产管理",
+                "priority"=> 22,
+                "code"=> "2022803",
+                "count"=> 363
+            ],
+            [
+                "id"=> 27,
+                "pid"=> 0,
+                "title"=> "送餐员",
+                "priority"=> 0,
+                "code"=> "4030200",
+                "count"=> 102
+            ],
+            [
+                "id"=> 28,
+                "pid"=> 0,
+                "title"=> "物流",
+                "priority"=> 2,
+                "code"=> "2023002",
+                "count"=> 33
+            ],
+            [
+                "id"=> 29,
+                "pid"=> 0,
+                "title"=> "仓储",
+                "priority"=> 3,
+                "code"=> "4020600",
+                "count"=> 246
+            ],
+            [
+                "id"=> 30,
+                "pid"=> 0,
+                "title"=> "司机",
+                "priority"=> 4,
+                "code"=> "6300505",
+                "count"=> 69
+            ],
+            [
+                "id"=> 31,
+                "pid"=> 0,
+                "title"=> "家政保洁",
+                "priority"=> 5,
+                "code"=> "4090801",
+                "count"=> 75
+            ],
+            [
+                "id"=> 32,
+                "pid"=> 0,
+                "title"=> "家政保姆(照顾小孩)",
+                "priority"=> 6,
+                "code"=> "4100106",
+                "count"=> 12
+            ],
+            [
+                "id"=> 33,
+                "pid"=> 0,
+                "title"=> "家政保姆(照顾正常老人)",
+                "priority"=> 7,
+                "code"=> "4100106",
+                "count"=> 3
+            ],
+            [
+                "id"=> 35,
+                "pid"=> 0,
+                "title"=> "家政月嫂",
+                "priority"=> 9,
+                "code"=> "4100106",
+                "count"=> 3
+            ],
+            [
+                "id"=> 36,
+                "pid"=> 0,
+                "title"=> "酒店餐饮服务员",
+                "priority"=> 10,
+                "code"=> "4030200",
+                "count"=> 42
+            ],
+            [
+                "id"=> 37,
+                "pid"=> 0,
+                "title"=> "酒店餐饮保洁",
+                "priority"=> 11,
+                "code"=> "4030200",
+                "count"=> 6
+            ],
+            [
+                "id"=> 38,
+                "pid"=> 0,
+                "title"=> "保安",
+                "priority"=> 12,
+                "code"=> "4070501",
+                "count"=> 126
+            ],
+            [
+                "id"=> 39,
+                "pid"=> 0,
+                "title"=> "水电工",
+                "priority"=> 13,
+                "code"=> "6310103",
+                "count"=> 87
+            ],
+            [
+                "id"=> 40,
+                "pid"=> 0,
+                "title"=> "工程师",
+                "priority"=> 14,
+                "code"=> "6310103",
+                "count"=> 77
+            ],
+            [
+                "id"=> 41,
+                "pid"=> 0,
+                "title"=> "大学生实习(兼职)",
+                "priority"=> 15,
+                "code"=> "4000000",
+                "count"=> 115
+            ],
+            [
+                "id"=> 42,
+                "pid"=> 0,
+                "title"=> "餐饮后厨",
+                "priority"=> 16,
+                "code"=> "4030200",
+                "count"=> 87
+            ],
+            [
+                "id"=> 43,
+                "pid"=> 0,
+                "title"=> "生活\/ 服务业",
+                "priority"=> 17,
+                "code"=> "4000000",
+                "count"=> 2166
+            ],
+            [
+                "id"=> 44,
+                "pid"=> 0,
+                "title"=> "市场\/媒介\/广告\/设计",
+                "priority"=> 18,
+                "code"=> "4000000",
+                "count"=> 252
+            ],
+            [
+                "id"=> 45,
+                "pid"=> 0,
+                "title"=> "发货员",
+                "priority"=> 19,
+                "code"=> "4000000",
+                "count"=> 130
+            ],
+            [
+                "id"=> 46,
+                "pid"=> 0,
+                "title"=> "车间工人",
+                "priority"=> 20,
+                "code"=> "6180101",
+                "count"=> 125
+            ],
+            [
+                "id"=> 47,
+                "pid"=> 0,
+                "title"=> "采购",
+                "priority"=> 21,
+                "code"=> "6180102",
+                "count"=> 27
+            ],
+            [
+                "id"=> 48,
+                "pid"=> 0,
+                "title"=> "缝纫工",
+                "priority"=> 22,
+                "code"=> "6050103",
+                "count"=> 30
+            ],
+            [
+                "id"=> 49,
+                "pid"=> 0,
+                "title"=> "销售",
+                "priority"=> 23,
+                "code"=> "6050401",
+                "count"=> 57
+            ],
+            [
+                "id"=> 54,
+                "pid"=> 0,
+                "title"=> "普工",
+                "priority"=> 24,
+                "code"=> "",
+                "count"=> 300
+            ],
+            [
+                "id"=> 55,
+                "pid"=> 0,
+                "title"=> "行政\/文员",
+                "priority"=> 20,
+                "code"=> "",
+                "count"=> 26
+            ]
+        ];
         $res['cate'] = $cate;
 
         //岗位类型
-        $comjobs_type = ComjobsModel::field("count(wtype) count,wtype")->group('wtype')->select();
+//        $comjobs_type = ComjobsModel::field("count(wtype) count,wtype")->group('wtype')->select();
+        $comjobs_type = [
+            [
+                "count" => 2405,
+                "wtype" => 1,
+            ],
+            [
+                "count" => 1157,
+                "wtype" => 2,
+            ],
+            [
+                "count" => 306,
+                "wtype" => 3,
+            ],
+            [
+                "count" => 124,
+                "wtype" => 4,
+            ],
+            [
+                "count" => 567,
+                "wtype" => 5,
+            ],
+        ];
         $res['type']  = $comjobs_type;
 
         //岗位数据
@@ -92,7 +465,7 @@ class Screen extends BaseController
         $res['comjobs']['hot'] = $comjobs_hot_data;
 
         //学历
-        $user_education = UserModel::field("count(education),education")->group('education')->column('count(education)', 'education');
+        /*$user_education = UserModel::field("count(education),education")->group('education')->column('count(education)', 'education');
         $education_data = ['' => '未知', 1 => '初中及以下', 2 => '高中', 3 => '中技', 4 => '中专', 5 => '大专', 6 => '本科', 7 => '硕士', 8 => '博士'];
         $education      = [];
         foreach ($education_data as $k => $v) {
@@ -103,11 +476,49 @@ class Screen extends BaseController
                 $item['count'] = $user_education[$k];
             }
             $education[] = $item;
-        }
+        }*/
+        $education = [
+            [
+                "name"=> "未知",
+                "count"=> 11401
+            ],
+            [
+                "name"=> "初中及以下",
+                "count"=> 480
+            ],
+            [
+                "name"=> "高中",
+                "count"=> 308
+            ],
+            [
+                "name"=> "中技",
+                "count"=> 80
+            ],
+            [
+                "name"=> "中专",
+                "count"=> 204
+            ],
+            [
+                "name"=> "大专",
+                "count"=> 384
+            ],
+            [
+                "name"=> "本科",
+                "count"=> 284
+            ],
+            [
+                "name"=> "硕士",
+                "count"=> 20
+            ],
+            [
+                "name"=> "博士",
+                "count"=> 16
+            ]
+        ];
         $res['eduction'] = $education;
 
         //年龄分布
-        $user_age_other = UserModel::where('idcard', '')->count();
+        /*$user_age_other = UserModel::where('idcard', '')->count();
         $user_idcard    = UserModel::field('idcard')->where('idcard', '<>', '')->select();
         $user_age       = [
             ['name' => '16-25', 'count' => 0],
@@ -127,23 +538,38 @@ class Screen extends BaseController
             } elseif ($age >= 45) {
                 $user_age[3]['count']++;
             }
-        }
+        }*/
+        $user_age        = [
+            ['name' => '16-25', 'count' => 10981],
+            ['name' => '25-35', 'count' => 0],
+            ['name' => '35-45', 'count' => 0],
+            ['name' => '45以上', 'count' => 0],
+            ['name' => '其他', 'count' => 2196],
+        ];
         $res['user_age'] = $user_age;
 
         //注册相关
-        $user_gender         = UserModel::field("count(gender),gender")->group('gender')->column('count(gender)', 'gender');
+        /*$user_gender         = UserModel::field("count(gender),gender")->group('gender')->column('count(gender)', 'gender');
         $res['people_total'] = array_sum($user_gender);
         $res['people_man']   = $user_gender[1];
         $res['people_woman'] = $user_gender[2];
-        $res['broker_total'] = BrokerModel::count();
+        $res['broker_total'] = BrokerModel::count();*/
+        $res['people_total'] = 13177;
+        $res['people_man']   = 9224;
+        $res['people_woman'] = 3953;
+        $res['broker_total'] = 416;
 
         //岗位相关
-        $res['company_total'] = WorkerModel::where('status', 'in', '4,5')->count();
-        $res['comjobs_total'] = ComjobsModel::where($comjobs_map)->count();
+        /*$res['company_total'] = WorkerModel::where('status', 'in', '4,5')->count();
+        $res['comjobs_total'] = ComjobsModel::where($comjobs_map)->count();*/
+        $res['company_total'] = 420;
+        $res['comjobs_total'] = 4559;
 
         //培训相关
-        $res['train']      = TrainModel::count();
-        $res['train_join'] = TrainJoinModel::count();
+        /*$res['train']      = TrainModel::count();
+        $res['train_join'] = TrainJoinModel::count();*/
+        $res['train']      = 74;
+        $res['train_join'] = 731;
 
         //月注册相关
         $year       = date('Y');
@@ -233,7 +659,7 @@ class Screen extends BaseController
         $comjobs_map[]        = ['status', 'in', '3,4'];
         $res['company_total'] = WorkerModel::where('status', 'in', '4,5')->count();
         $res['comjobs_total'] = ComjobsModel::where($comjobs_map)->count();
-        $res['user_total']  = UserModel::count();
+        $res['user_total']    = UserModel::count();
 
         page_result(0, "", $res);
     }

+ 2 - 2
public/bi/index.html

@@ -174,14 +174,14 @@
                                 <h4 class="company_total"></h4>
                                 <span>
                                     <i class="icon-dot" style="color: #ed3f35;"></i>
-                                    注册公司
+                                    雇主数量
                                 </span>
                             </div>
                             <div class="item">
                                 <h4 class="comjobs_total"></h4>
                                 <span>
                                     <i class="icon-dot" style="color: #eacf19;"></i>
-                                    发布岗位
+                                    发布岗位/任务
                                 </span>
                             </div>
                         </div>

+ 1 - 1
public/bi/js/index.js

@@ -22,7 +22,7 @@
 		setFont();
 	}
 })();
-$.get('https://linggong.jinjianghc.com/mainapp.php/screen/index', (res) => {
+$.get('/mainapp.php/screen/index', (res) => {
 	init(res.data)
 })