正在显示
11 个修改的文件
包含
146 行增加
和
463 行删除
| @@ -6,9 +6,8 @@ use App\Enums\Common\Code; | @@ -6,9 +6,8 @@ use App\Enums\Common\Code; | ||
| 6 | use App\Http\Controllers\Aside\BaseController; | 6 | use App\Http\Controllers\Aside\BaseController; |
| 7 | use App\Http\Logic\Aside\Domain\DomainInfoLogic; | 7 | use App\Http\Logic\Aside\Domain\DomainInfoLogic; |
| 8 | use App\Http\Requests\Aside\Domain\DomainInfoRequest; | 8 | use App\Http\Requests\Aside\Domain\DomainInfoRequest; |
| 9 | -use App\Models\Aside\Domain\DomainInfo; | 9 | +use App\Models\Domain\DomainInfo; |
| 10 | use Illuminate\Http\JsonResponse; | 10 | use Illuminate\Http\JsonResponse; |
| 11 | -use Illuminate\Support\Facades\Storage; | ||
| 12 | use PhpOffice\PhpSpreadsheet\Spreadsheet; | 11 | use PhpOffice\PhpSpreadsheet\Spreadsheet; |
| 13 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; | 12 | use PhpOffice\PhpSpreadsheet\Writer\Xlsx; |
| 14 | 13 |
| @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Aside\Domain; | @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Aside\Domain; | ||
| 4 | 4 | ||
| 5 | use App\Enums\Common\Code; | 5 | use App\Enums\Common\Code; |
| 6 | use App\Http\Controllers\Aside\BaseController; | 6 | use App\Http\Controllers\Aside\BaseController; |
| 7 | -use App\Models\Aside\Domain\DomainInfoLog; | 7 | +use App\Models\Domain\DomainInfoLog; |
| 8 | use Illuminate\Http\Request; | 8 | use Illuminate\Http\Request; |
| 9 | 9 | ||
| 10 | class DomainInfoLogController extends BaseController | 10 | class DomainInfoLogController extends BaseController |
| @@ -3,21 +3,12 @@ | @@ -3,21 +3,12 @@ | ||
| 3 | namespace App\Http\Logic\Aside\Domain; | 3 | namespace App\Http\Logic\Aside\Domain; |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | -use App\Enums\Common\Code; | ||
| 7 | -use App\Exceptions\AsideGlobalException; | ||
| 8 | -use App\Exceptions\BsideGlobalException; | ||
| 9 | use App\Http\Logic\Aside\BaseLogic; | 6 | use App\Http\Logic\Aside\BaseLogic; |
| 10 | -use App\Http\Logic\Aside\Devops\ServerInformationLogic; | ||
| 11 | -use App\Models\Aside\Domain\DomainInfo; | ||
| 12 | -use App\Models\Aside\Domain\DomainInfoLog; | 7 | +use App\Models\Domain\DomainInfo; |
| 13 | use App\Models\Project\Project; | 8 | use App\Models\Project\Project; |
| 14 | use GuzzleHttp\Client; | 9 | use GuzzleHttp\Client; |
| 15 | use GuzzleHttp\Exception\GuzzleException; | 10 | use GuzzleHttp\Exception\GuzzleException; |
| 16 | -use Illuminate\Database\Eloquent\Builder; | ||
| 17 | -use Illuminate\Database\Eloquent\Collection; | ||
| 18 | -use Illuminate\Database\Eloquent\Model; | ||
| 19 | use Illuminate\Support\Carbon; | 11 | use Illuminate\Support\Carbon; |
| 20 | -use Illuminate\Support\Facades\DB; | ||
| 21 | 12 | ||
| 22 | class DomainInfoLogic extends BaseLogic | 13 | class DomainInfoLogic extends BaseLogic |
| 23 | { | 14 | { |
app/Models/Aside/ManageHrLogModel.php
已删除
100644 → 0
app/Models/Aside/ManageHrModel.php
已删除
100644 → 0
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -namespace App\Models\Aside; | ||
| 4 | - | ||
| 5 | -use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
| 6 | -use Illuminate\Database\Eloquent\Model; | ||
| 7 | -use App\Models\Base; | ||
| 8 | - | ||
| 9 | -class ManageHrModel extends Base | ||
| 10 | -{ | ||
| 11 | - protected $table = 'gl_manage_hrs'; | ||
| 12 | - //use HasFactory; | ||
| 13 | - protected $guarded = ['updated_at']; | ||
| 14 | - /** | ||
| 15 | - * 归属小组 | ||
| 16 | - * @return string[] | ||
| 17 | - * @author zgj | ||
| 18 | - * @date 2023/5/31 | ||
| 19 | - */ | ||
| 20 | - public static function belongGroup() | ||
| 21 | - { | ||
| 22 | - return [ | ||
| 23 | - 1 => 'KA组', | ||
| 24 | - 2 => 'A组', | ||
| 25 | - 3 => 'B组', | ||
| 26 | - 4 => 'C组', | ||
| 27 | - 5 => 'D组', | ||
| 28 | - 6 => 'E组', | ||
| 29 | - 7 => 'F组', | ||
| 30 | - 8 => 'G组', | ||
| 31 | - 9 => 'H组', | ||
| 32 | - 10 => 'GA组', | ||
| 33 | - 11=> 'GB组', | ||
| 34 | - 12 => 'GC组', | ||
| 35 | - 13 => '前端组', | ||
| 36 | - 14 => '后端组', | ||
| 37 | - 15 => '黑格组', | ||
| 38 | - 16 => '售后组', | ||
| 39 | - 0 => '其他', | ||
| 40 | - ]; | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - /** | ||
| 44 | - * 学历 | ||
| 45 | - * @return string[] | ||
| 46 | - * @author zgj | ||
| 47 | - * @date 2023/5/31 | ||
| 48 | - */ | ||
| 49 | - public static function education() | ||
| 50 | - { | ||
| 51 | - return [ | ||
| 52 | - 1 => '专科', | ||
| 53 | - 2 => '本科', | ||
| 54 | - 3 => '研究生及以上', | ||
| 55 | - 0 => '其他', | ||
| 56 | - ]; | ||
| 57 | - } | ||
| 58 | - /** | ||
| 59 | - * 入职岗位 | ||
| 60 | - * @return string[] | ||
| 61 | - * @author zgj | ||
| 62 | - * @date 2023/5/31 | ||
| 63 | - */ | ||
| 64 | - public static function entryPosition() | ||
| 65 | - { | ||
| 66 | - return [ | ||
| 67 | - 1 => '优化师', | ||
| 68 | - 2 => '优化师助理', | ||
| 69 | - 3 => '优化顾问', | ||
| 70 | - 4 => '项目经理', | ||
| 71 | - 5 => '平面设计', | ||
| 72 | - 6 => '技术经理', | ||
| 73 | - 7 => '技术主管', | ||
| 74 | - 8 => '技术总监', | ||
| 75 | - 9 => '渠道经理', | ||
| 76 | - 10 => '前端研发', | ||
| 77 | - 11=> '后端研发', | ||
| 78 | - 12 => '行政财务', | ||
| 79 | - 13 => '品牌营销', | ||
| 80 | - 14 => '销售经理', | ||
| 81 | - 15 => '销售主管', | ||
| 82 | - 16 => '售后技术', | ||
| 83 | - 17 => '售后服务', | ||
| 84 | - 18 => '外贸销售', | ||
| 85 | - 19 => '渠道助理', | ||
| 86 | - 20 => '黑格运营', | ||
| 87 | - 21 => '运营', | ||
| 88 | - 22 => '短视频剪辑师', | ||
| 89 | - 23 => '人事', | ||
| 90 | - 24 => '采购', | ||
| 91 | - 0 => '其他', | ||
| 92 | - ]; | ||
| 93 | - } | ||
| 94 | - | ||
| 95 | - /** | ||
| 96 | - * 级别序列 | ||
| 97 | - * @return string[] | ||
| 98 | - * @author zgj | ||
| 99 | - * @date 2023/5/31 | ||
| 100 | - */ | ||
| 101 | - public static function pLevel() | ||
| 102 | - { | ||
| 103 | - return [ | ||
| 104 | - 0 => '实习期/试用期(P0)', | ||
| 105 | - 1 => '初级(P1)', | ||
| 106 | - 2 => '初级(P2)', | ||
| 107 | - 3 => '初级(P3)', | ||
| 108 | - 4 => '中级(P4)', | ||
| 109 | - 5 => '中级(P5)', | ||
| 110 | - 6 => '中级(P6)', | ||
| 111 | - 7 => '高级(P7)', | ||
| 112 | - 8 => '高级(P8)', | ||
| 113 | - 9 => '高级(P9)', | ||
| 114 | - 10 => '高级(P10)', | ||
| 115 | - 11=> '职务初级(M1)', | ||
| 116 | - 12 => '职务初级(M2)', | ||
| 117 | - 13 => '职务初级(M3)', | ||
| 118 | - 14 => '职务中级(M4)', | ||
| 119 | - 15 => '职务中级(M5)', | ||
| 120 | - 16 => '职务中级(M6)', | ||
| 121 | - 17 => '职务高级(M7)', | ||
| 122 | - 18 => '职务高级(M8)', | ||
| 123 | - 19 => '职务高级(M9)', | ||
| 124 | - 20 => '职务高级(M10)', | ||
| 125 | - ]; | ||
| 126 | - } | ||
| 127 | - /** | ||
| 128 | - * 是否党员 | ||
| 129 | - * @return string[] | ||
| 130 | - * @author zgj | ||
| 131 | - * @date 2023/5/31 | ||
| 132 | - */ | ||
| 133 | - public static function dangyuan() | ||
| 134 | - { | ||
| 135 | - return [ | ||
| 136 | - 0 => '群众', | ||
| 137 | - 1 => '预备党员', | ||
| 138 | - 2 => '正式党员', | ||
| 139 | - ]; | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - /** | ||
| 143 | - * 是否有党支部 | ||
| 144 | - * @return string[] | ||
| 145 | - * @author zgj | ||
| 146 | - * @date 2023/5/31 | ||
| 147 | - */ | ||
| 148 | - public static function dangzhibu() | ||
| 149 | - { | ||
| 150 | - return [ | ||
| 151 | - 0 => '无', | ||
| 152 | - 1 => '是', | ||
| 153 | - 2 => '否', | ||
| 154 | - ]; | ||
| 155 | - } | ||
| 156 | -} |
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -namespace App\Models\Aside; | ||
| 4 | - | ||
| 5 | -use App\Models\Base; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * 模板 头部底部 对所有 客户 | ||
| 9 | - * @author:dc | ||
| 10 | - * @time 2023/4/26 11:21 | ||
| 11 | - * Class TemplateHeaderFooter | ||
| 12 | - * @package App\Models\Aside | ||
| 13 | - */ | ||
| 14 | -class TemplateHeaderFooter extends Base | ||
| 15 | -{ | ||
| 16 | - protected $table = 'gl_aside_template_header_footer'; | ||
| 17 | -} |
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -namespace App\Models\Bside\Statistics; | ||
| 4 | - | ||
| 5 | -use App\Models\Base; | ||
| 6 | -use Illuminate\Database\Eloquent\Builder; | ||
| 7 | -use Illuminate\Database\Eloquent\Collection; | ||
| 8 | -use Illuminate\Database\Eloquent\Model; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * App\Models\Bside\Statistics\TrafficStatistics | ||
| 12 | - * | ||
| 13 | - * @property int $id | ||
| 14 | - * @property int|null $type 类型: | ||
| 15 | - * 1 - 访问来源 | ||
| 16 | - * 2 - 地域分布 | ||
| 17 | - * 3 - 受访页面 | ||
| 18 | - * 4 - 访问终端 | ||
| 19 | - * 5 - 流量趋势 | ||
| 20 | - * @property int|null $year 年 | ||
| 21 | - * @property int|null $month 月 | ||
| 22 | - * @property string|null $top 访问来源|国家|页面TOP15 - 百分比 - json格式 | ||
| 23 | - * @property int|null $innum 询盘量 | ||
| 24 | - * @property float|null $conversion 询盘转化率 | ||
| 25 | - * @property int|null $pvnum 浏览量 | ||
| 26 | - * @property int|null $ipnum 访客量 | ||
| 27 | - * @property int|null $pcnum PC端访问量 | ||
| 28 | - * @property int|null $mbnum 移动端访问量 | ||
| 29 | - * @property \Illuminate\Support\Carbon|null $created_at | ||
| 30 | - * @property \Illuminate\Support\Carbon|null $updated_at | ||
| 31 | - * @method static Builder|TrafficStatistics newModelQuery() | ||
| 32 | - * @method static Builder|TrafficStatistics newQuery() | ||
| 33 | - * @method static Builder|TrafficStatistics query() | ||
| 34 | - * @method static Builder|TrafficStatistics whereConversion($value) | ||
| 35 | - * @method static Builder|TrafficStatistics whereCreatedAt($value) | ||
| 36 | - * @method static Builder|TrafficStatistics whereId($value) | ||
| 37 | - * @method static Builder|TrafficStatistics whereInnum($value) | ||
| 38 | - * @method static Builder|TrafficStatistics whereIpnum($value) | ||
| 39 | - * @method static Builder|TrafficStatistics whereMbnum($value) | ||
| 40 | - * @method static Builder|TrafficStatistics whereMonth($value) | ||
| 41 | - * @method static Builder|TrafficStatistics wherePageview($value) | ||
| 42 | - * @method static Builder|TrafficStatistics wherePcnum($value) | ||
| 43 | - * @method static Builder|TrafficStatistics wherePvnum($value) | ||
| 44 | - * @method static Builder|TrafficStatistics whereTop($value) | ||
| 45 | - * @method static Builder|TrafficStatistics whereType($value) | ||
| 46 | - * @method static Builder|TrafficStatistics whereUpdatedAt($value) | ||
| 47 | - * @method static Builder|TrafficStatistics whereUserSessions($value) | ||
| 48 | - * @method static Builder|TrafficStatistics whereYear($value) | ||
| 49 | - * @mixin \Eloquent | ||
| 50 | - */ | ||
| 51 | -class TrafficStatistics extends Base | ||
| 52 | -{ | ||
| 53 | - protected $table = 'gl_traffic_statistics'; | ||
| 54 | - | ||
| 55 | - /** @var int 访问来源 */ | ||
| 56 | - const TYPE_SOURCE = 1; | ||
| 57 | - /** @var int 地域分布 */ | ||
| 58 | - const TYPE_DISTRIBUTION = 2; | ||
| 59 | - /** @var int 受访页面 */ | ||
| 60 | - const TYPE_PAGE = 3; | ||
| 61 | - /** @var int 访问终端 */ | ||
| 62 | - const TYPE_TERMINAL = 4; | ||
| 63 | - /** @var int 流量趋势 */ | ||
| 64 | - const TYPE_TREND = 5; | ||
| 65 | - /** @var string[] 类型对应字段 */ | ||
| 66 | - const FIELDS = [ | ||
| 67 | - self::TYPE_SOURCE => ['pvnum', 'ipnum', 'top'], | ||
| 68 | - self::TYPE_DISTRIBUTION => ['pvnum', 'ipnum', 'top'], | ||
| 69 | - self::TYPE_PAGE => ['pvnum', 'ipnum', 'top'], | ||
| 70 | - self::TYPE_TERMINAL => ['pvnum', 'ipnum', 'top', 'pcnum', 'mbnum'], | ||
| 71 | - self::TYPE_TREND => ['pvnum', 'ipnum', 'top', 'innum'], | ||
| 72 | - ]; | ||
| 73 | - /** @var string[] 数据库字段对应返回字段 */ | ||
| 74 | - const KEY_VALUE = [ | ||
| 75 | - 'pvnum' => 'pv_count', | ||
| 76 | - 'ipnum' => 'ip_count', | ||
| 77 | - 'pcnum' => 'pc_count', | ||
| 78 | - 'mbnum' => 'mobile_count', | ||
| 79 | - 'innum' => 'in_count', | ||
| 80 | - 'top' => 'lists' | ||
| 81 | - ]; | ||
| 82 | - | ||
| 83 | - /** | ||
| 84 | - * 根据类型获取字段 | ||
| 85 | - * @param int $type | ||
| 86 | - * @return string[] | ||
| 87 | - */ | ||
| 88 | - public function selectFields(int $type = self::TYPE_SOURCE) | ||
| 89 | - { | ||
| 90 | - return self::FIELDS[$type] ?? []; | ||
| 91 | - } | ||
| 92 | - | ||
| 93 | - /** | ||
| 94 | - * 根据类型获取月份列表数据 | ||
| 95 | - * @param int $type | ||
| 96 | - * @param $date | ||
| 97 | - * @return TrafficStatistics[]|Builder[]|Collection | ||
| 98 | - */ | ||
| 99 | - public function getMonthsLists(int $type = self::TYPE_SOURCE, $date = null) | ||
| 100 | - { | ||
| 101 | - $query = $this->query()->where('type', $type); | ||
| 102 | - if ($date != null) { | ||
| 103 | - if (is_array($date)) { | ||
| 104 | - $years = $months = []; | ||
| 105 | - foreach ($date as $value) { | ||
| 106 | - $dd = explode('-', $value); | ||
| 107 | - $year = $dd[0]; | ||
| 108 | - $month = $dd[1]; | ||
| 109 | - if (!in_array($year, $years)) { | ||
| 110 | - $years[] = $year; | ||
| 111 | - } | ||
| 112 | - if (!in_array($month, $months)) { | ||
| 113 | - $months[] = $month; | ||
| 114 | - } | ||
| 115 | - } | ||
| 116 | - $query->whereIn('year', $years) | ||
| 117 | - ->whereIn('month', $months); | ||
| 118 | - } else { | ||
| 119 | - $dd = explode('-', $date); | ||
| 120 | - $year = $dd[0]; | ||
| 121 | - $month = $dd[1]; | ||
| 122 | - $query->where('year', $year) | ||
| 123 | - ->where('month', $month); | ||
| 124 | - } | ||
| 125 | - } else { | ||
| 126 | - $query->where('year', date('Y')) | ||
| 127 | - ->where('month', date('m')); | ||
| 128 | - } | ||
| 129 | - return $query->get(); | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | - /** | ||
| 133 | - * 根据类型获取单条月份数据 | ||
| 134 | - * @param int $type | ||
| 135 | - * @param $year | ||
| 136 | - * @param $month | ||
| 137 | - * @return TrafficStatistics|Builder|Model|object|null | ||
| 138 | - */ | ||
| 139 | - public function getMonth(int $type = self::TYPE_SOURCE, $year = null, $month = null) | ||
| 140 | - { | ||
| 141 | - $year = $year ?? date('Y'); | ||
| 142 | - $month = $month ?? date('m'); | ||
| 143 | - return $this->query()->where('type', $type) | ||
| 144 | - ->where('year', $year) | ||
| 145 | - ->where('month', $month) | ||
| 146 | - ->first(); | ||
| 147 | - } | ||
| 148 | - | ||
| 149 | - /** | ||
| 150 | - * 根据类型获取数据 | ||
| 151 | - * @param int $type | ||
| 152 | - * @param null $year | ||
| 153 | - * @param null $month | ||
| 154 | - * @return TrafficStatistics|Builder|Model|object|null | ||
| 155 | - */ | ||
| 156 | - public function getData(int $type = self::TYPE_SOURCE, $year = null, $month = null) | ||
| 157 | - { | ||
| 158 | - $key_value = self::KEY_VALUE; | ||
| 159 | - $field_arr = []; | ||
| 160 | - foreach ($this->selectFields($type) as $field) { | ||
| 161 | - $field_arr[] = "{$field} as {$key_value[$field]}"; | ||
| 162 | - } | ||
| 163 | - $query = $this->query(); | ||
| 164 | - if ($field_arr) { | ||
| 165 | - $query->selectRaw(implode(',', $field_arr)); | ||
| 166 | - } | ||
| 167 | - return $query->where('type', $type) | ||
| 168 | - ->where('year', $year) | ||
| 169 | - ->where('month', $month) | ||
| 170 | - ->first(); | ||
| 171 | - } | ||
| 172 | - | ||
| 173 | - /** | ||
| 174 | - * 格式化数据 | ||
| 175 | - * @param $value | ||
| 176 | - * @return mixed | ||
| 177 | - */ | ||
| 178 | - public function getListsAttribute($value) | ||
| 179 | - { | ||
| 180 | - return json_decode($value); | ||
| 181 | - } | ||
| 182 | -} |
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -namespace App\Models\Bside\Statistics; | ||
| 4 | - | ||
| 5 | -use App\Models\Base; | ||
| 6 | -use Illuminate\Database\Eloquent\Builder; | ||
| 7 | -use Illuminate\Database\Eloquent\Collection; | ||
| 8 | -use Illuminate\Database\Eloquent\Model; | ||
| 9 | - | ||
| 10 | -/** | ||
| 11 | - * App\Models\Bside\Statistics\TrafficTrends | ||
| 12 | - * | ||
| 13 | - * @property int $id | ||
| 14 | - * @property string|null $day 统计当天日期 | ||
| 15 | - * @property int|null $pvnum 当天的访问次数PV | ||
| 16 | - * @property int|null $ipnum 当天的独立访问IP数量 | ||
| 17 | - * @property \Illuminate\Support\Carbon|null $created_at | ||
| 18 | - * @property \Illuminate\Support\Carbon|null $updated_at | ||
| 19 | - * @method static Builder|TrafficTrends newModelQuery() | ||
| 20 | - * @method static Builder|TrafficTrends newQuery() | ||
| 21 | - * @method static Builder|TrafficTrends query() | ||
| 22 | - * @method static Builder|TrafficTrends whereCreatedAt($value) | ||
| 23 | - * @method static Builder|TrafficTrends whereDay($value) | ||
| 24 | - * @method static Builder|TrafficTrends whereId($value) | ||
| 25 | - * @method static Builder|TrafficTrends whereIpnum($value) | ||
| 26 | - * @method static Builder|TrafficTrends wherePvnum($value) | ||
| 27 | - * @method static Builder|TrafficTrends whereUpdatedAt($value) | ||
| 28 | - * @mixin \Eloquent | ||
| 29 | - */ | ||
| 30 | -class TrafficTrends extends Base | ||
| 31 | -{ | ||
| 32 | - protected $table = 'gl_traffic_trends'; | ||
| 33 | - | ||
| 34 | - /** | ||
| 35 | - * 根据时间获取数据 | ||
| 36 | - * @param string|null $date 日期,格式:Y-m-d | ||
| 37 | - * @return TrafficTrends[]|Builder[]|Collection | ||
| 38 | - */ | ||
| 39 | - public function getDaysLists(string $date = null) | ||
| 40 | - { | ||
| 41 | - $query = $this->query(); | ||
| 42 | - if ($date != null && is_array($date)) { | ||
| 43 | - $query->whereIn('day', $date); | ||
| 44 | - } else { | ||
| 45 | - $query->where('day', $date); | ||
| 46 | - } | ||
| 47 | - return $query->get(); | ||
| 48 | - } | ||
| 49 | - | ||
| 50 | - /** | ||
| 51 | - * @param string|null $date 日期,格式:Y-m-d | ||
| 52 | - * @return TrafficTrends|Builder|Model|object|null | ||
| 53 | - */ | ||
| 54 | - public function getDay(string $date = null) | ||
| 55 | - { | ||
| 56 | - return $this->query()->where('day', $date ?? date('Y-m-d'))->first(); | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | - /** | ||
| 60 | - * 获取当月的IP|PV数量 | ||
| 61 | - * @param string|null $date 日期,格式:Y-m | ||
| 62 | - * @return Builder[]|Collection | ||
| 63 | - */ | ||
| 64 | - public function getMonthsLists(string $date = null) | ||
| 65 | - { | ||
| 66 | - if (!is_null($date)) { | ||
| 67 | - $dd = explode('-', $date); | ||
| 68 | - $year = $dd[0]; | ||
| 69 | - $month = $dd[1]; | ||
| 70 | - } else { | ||
| 71 | - $year = date('Y'); | ||
| 72 | - $month = date('m'); | ||
| 73 | - } | ||
| 74 | - return $this->query() | ||
| 75 | - ->selectRaw('day as date, pvnum as pv_count, ipnum as ip_count') | ||
| 76 | - ->whereYear('day', '=', $year) | ||
| 77 | - ->whereMonth('day', '=', $month) | ||
| 78 | - ->orderBy('day', 'asc') | ||
| 79 | - ->get(); | ||
| 80 | - } | ||
| 81 | -} |
| @@ -16,5 +16,146 @@ class ManageHr extends Base | @@ -16,5 +16,146 @@ class ManageHr extends Base | ||
| 16 | public static function specieField(){ | 16 | public static function specieField(){ |
| 17 | return ['photo_gallery','id_card_gallery','certificate_gallery','career_history','learning_history']; | 17 | return ['photo_gallery','id_card_gallery','certificate_gallery','career_history','learning_history']; |
| 18 | } | 18 | } |
| 19 | + /** | ||
| 20 | + * 归属小组 | ||
| 21 | + * @return string[] | ||
| 22 | + * @author zgj | ||
| 23 | + * @date 2023/5/31 | ||
| 24 | + */ | ||
| 25 | + public static function belongGroup() | ||
| 26 | + { | ||
| 27 | + return [ | ||
| 28 | + 1 => 'KA组', | ||
| 29 | + 2 => 'A组', | ||
| 30 | + 3 => 'B组', | ||
| 31 | + 4 => 'C组', | ||
| 32 | + 5 => 'D组', | ||
| 33 | + 6 => 'E组', | ||
| 34 | + 7 => 'F组', | ||
| 35 | + 8 => 'G组', | ||
| 36 | + 9 => 'H组', | ||
| 37 | + 10 => 'GA组', | ||
| 38 | + 11=> 'GB组', | ||
| 39 | + 12 => 'GC组', | ||
| 40 | + 13 => '前端组', | ||
| 41 | + 14 => '后端组', | ||
| 42 | + 15 => '黑格组', | ||
| 43 | + 16 => '售后组', | ||
| 44 | + 0 => '其他', | ||
| 45 | + ]; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 学历 | ||
| 50 | + * @return string[] | ||
| 51 | + * @author zgj | ||
| 52 | + * @date 2023/5/31 | ||
| 53 | + */ | ||
| 54 | + public static function education() | ||
| 55 | + { | ||
| 56 | + return [ | ||
| 57 | + 1 => '专科', | ||
| 58 | + 2 => '本科', | ||
| 59 | + 3 => '研究生及以上', | ||
| 60 | + 0 => '其他', | ||
| 61 | + ]; | ||
| 62 | + } | ||
| 63 | + /** | ||
| 64 | + * 入职岗位 | ||
| 65 | + * @return string[] | ||
| 66 | + * @author zgj | ||
| 67 | + * @date 2023/5/31 | ||
| 68 | + */ | ||
| 69 | + public static function entryPosition() | ||
| 70 | + { | ||
| 71 | + return [ | ||
| 72 | + 1 => '优化师', | ||
| 73 | + 2 => '优化师助理', | ||
| 74 | + 3 => '优化顾问', | ||
| 75 | + 4 => '项目经理', | ||
| 76 | + 5 => '平面设计', | ||
| 77 | + 6 => '技术经理', | ||
| 78 | + 7 => '技术主管', | ||
| 79 | + 8 => '技术总监', | ||
| 80 | + 9 => '渠道经理', | ||
| 81 | + 10 => '前端研发', | ||
| 82 | + 11=> '后端研发', | ||
| 83 | + 12 => '行政财务', | ||
| 84 | + 13 => '品牌营销', | ||
| 85 | + 14 => '销售经理', | ||
| 86 | + 15 => '销售主管', | ||
| 87 | + 16 => '售后技术', | ||
| 88 | + 17 => '售后服务', | ||
| 89 | + 18 => '外贸销售', | ||
| 90 | + 19 => '渠道助理', | ||
| 91 | + 20 => '黑格运营', | ||
| 92 | + 21 => '运营', | ||
| 93 | + 22 => '短视频剪辑师', | ||
| 94 | + 23 => '人事', | ||
| 95 | + 24 => '采购', | ||
| 96 | + 0 => '其他', | ||
| 97 | + ]; | ||
| 98 | + } | ||
| 19 | 99 | ||
| 100 | + /** | ||
| 101 | + * 级别序列 | ||
| 102 | + * @return string[] | ||
| 103 | + * @author zgj | ||
| 104 | + * @date 2023/5/31 | ||
| 105 | + */ | ||
| 106 | + public static function pLevel() | ||
| 107 | + { | ||
| 108 | + return [ | ||
| 109 | + 0 => '实习期/试用期(P0)', | ||
| 110 | + 1 => '初级(P1)', | ||
| 111 | + 2 => '初级(P2)', | ||
| 112 | + 3 => '初级(P3)', | ||
| 113 | + 4 => '中级(P4)', | ||
| 114 | + 5 => '中级(P5)', | ||
| 115 | + 6 => '中级(P6)', | ||
| 116 | + 7 => '高级(P7)', | ||
| 117 | + 8 => '高级(P8)', | ||
| 118 | + 9 => '高级(P9)', | ||
| 119 | + 10 => '高级(P10)', | ||
| 120 | + 11=> '职务初级(M1)', | ||
| 121 | + 12 => '职务初级(M2)', | ||
| 122 | + 13 => '职务初级(M3)', | ||
| 123 | + 14 => '职务中级(M4)', | ||
| 124 | + 15 => '职务中级(M5)', | ||
| 125 | + 16 => '职务中级(M6)', | ||
| 126 | + 17 => '职务高级(M7)', | ||
| 127 | + 18 => '职务高级(M8)', | ||
| 128 | + 19 => '职务高级(M9)', | ||
| 129 | + 20 => '职务高级(M10)', | ||
| 130 | + ]; | ||
| 131 | + } | ||
| 132 | + /** | ||
| 133 | + * 是否党员 | ||
| 134 | + * @return string[] | ||
| 135 | + * @author zgj | ||
| 136 | + * @date 2023/5/31 | ||
| 137 | + */ | ||
| 138 | + public static function dangyuan() | ||
| 139 | + { | ||
| 140 | + return [ | ||
| 141 | + 0 => '群众', | ||
| 142 | + 1 => '预备党员', | ||
| 143 | + 2 => '正式党员', | ||
| 144 | + ]; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + /** | ||
| 148 | + * 是否有党支部 | ||
| 149 | + * @return string[] | ||
| 150 | + * @author zgj | ||
| 151 | + * @date 2023/5/31 | ||
| 152 | + */ | ||
| 153 | + public static function dangzhibu() | ||
| 154 | + { | ||
| 155 | + return [ | ||
| 156 | + 0 => '无', | ||
| 157 | + 1 => '是', | ||
| 158 | + 2 => '否', | ||
| 159 | + ]; | ||
| 160 | + } | ||
| 20 | } | 161 | } |
-
请 注册 或 登录 后发表评论