作者 lyh

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

/node_modules
/public/hot
/public/storage
/public/.user.ini
/storage
/vendor
/uploads
composer.json
composer.lock
.env
.env.backup
.phpunit.result.cache
... ...
... ... @@ -17,6 +17,7 @@ class AsideGlobalException extends Exception
{
$this->code = $code;
$this->message = $message;
if (empty($this->message)) {
$this->message = Code::fromValue($code)->description;
}
... ...
<?php
namespace App\Http\Controllers\Aside\Manage;
use App\Enums\Common\Code;
use App\Http\Controllers\Aside\BaseController;
use Illuminate\Http\Request;
use App\Http\Logic\Aside\Manage\HrLogic;
class HrController extends BaseController
{
public function list(Request $request, HrLogic $logic)
{
$list = $logic->getList($this->param);
return $this->response('success', Code::SUCCESS, $list);
}
public function info(Request $request, HrLogic $logic){
$request->validate([
'id'=>'required'
],[
'id.required' => 'ID不能为空'
]);
$data = $logic->getInfo($this->param['id']);
//print_r($data);exit;
return $this->success($data);
}
public function save(Request $request, HrLogic $logic){
$data = $logic->save($this->param);
return $this->success($data);
}
public function parm_desciption(HrLogic $logic){
$data = $logic->parms();
return $this->success($data);
}
}
... ...
<?php
namespace App\Http\Logic\Aside\Manage;
use App\Http\Logic\Aside\BaseLogic;
use App\Models\Manage\ManageHr;
/**
* Class ManageHrLogic
* @package App\Http\Logic\Aside\Manage
* @author zgj
* @date 2023/5/30
*/
class HrLogic extends BaseLogic
{
public function __construct()
{
parent::__construct();
$this->model = new ManageHr();
}
public function save($param){
foreach ($this->model::specielField() as $v){
$param = $this->setJson($v,$param);
}
return parent::save($param);
}
public function getInfo($id){
$data = parent::getInfo($id);
foreach ($this->model::specielField() as $v){
$data[$v] = json_decode($data[$v],true);
}
return $data;
}
//数组转json存储
public function setJson($str,$param){
if(isset($param[$str]) && is_array($param[$str])){
$param[$str] = json_encode($param[$str]);
}else{
$param[$str] = '';
}
return $param;
}
public function parms(){
$data['belong_group'] = $this->model::belongGroup();
$data['education'] = $this->model::education();
$data['entry_position'] = $this->model::entryPosition();
$data['p_level'] = $this->model::pLevel();
$data['dangyuan'] = $this->model::dangyuan();
$data['dangzhibu'] = $this->model::dangzhibu();
return $data;
}
}
... ...
... ... @@ -145,9 +145,7 @@ class Logic
$this->model[$name] = $value;
}
}
$res = $this->model->save();
if($res){
//清缓存
if($this->is_cache && !empty($param['id'])){
... ...
<?php
namespace App\Models\Aside;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ManageHrLogModel extends Model
{
protected $table = 'gl_manage_hr_log';
use HasFactory;
}
... ...
<?php
namespace App\Models\Aside;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Base;
class ManageHrModel extends Base
{
protected $table = 'gl_manage_hrs';
//use HasFactory;
protected $guarded = ['updated_at'];
/**
* 归属小组
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function belongGroup()
{
return [
1 => 'KA组',
2 => 'A组',
3 => 'B组',
4 => 'C组',
5 => 'D组',
6 => 'E组',
7 => 'F组',
8 => 'G组',
9 => 'H组',
10 => 'GA组',
11=> 'GB组',
12 => 'GC组',
13 => '前端组',
14 => '后端组',
15 => '黑格组',
16 => '售后组',
0 => '其他',
];
}
/**
* 学历
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function education()
{
return [
1 => '专科',
2 => '本科',
3 => '研究生及以上',
0 => '其他',
];
}
/**
* 入职岗位
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function entryPosition()
{
return [
1 => '优化师',
2 => '优化师助理',
3 => '优化顾问',
4 => '项目经理',
5 => '平面设计',
6 => '技术经理',
7 => '技术主管',
8 => '技术总监',
9 => '渠道经理',
10 => '前端研发',
11=> '后端研发',
12 => '行政财务',
13 => '品牌营销',
14 => '销售经理',
15 => '销售主管',
16 => '售后技术',
17 => '售后服务',
18 => '外贸销售',
19 => '渠道助理',
20 => '黑格运营',
21 => '运营',
22 => '短视频剪辑师',
23 => '人事',
24 => '采购',
0 => '其他',
];
}
/**
* 级别序列
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function pLevel()
{
return [
0 => '实习期/试用期(P0)',
1 => '初级(P1)',
2 => '初级(P2)',
3 => '初级(P3)',
4 => '中级(P4)',
5 => '中级(P5)',
6 => '中级(P6)',
7 => '高级(P7)',
8 => '高级(P8)',
9 => '高级(P9)',
10 => '高级(P10)',
11=> '职务初级(M1)',
12 => '职务初级(M2)',
13 => '职务初级(M3)',
14 => '职务中级(M4)',
15 => '职务中级(M5)',
16 => '职务中级(M6)',
17 => '职务高级(M7)',
18 => '职务高级(M8)',
19 => '职务高级(M9)',
20 => '职务高级(M10)',
];
}
/**
* 是否党员
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function dangyuan()
{
return [
0 => '群众',
1 => '预备党员',
2 => '正式党员',
];
}
/**
* 是否有党支部
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function dangzhibu()
{
return [
0 => '无',
1 => '是',
2 => '否',
];
}
}
... ...
<?php
namespace App\Models\Manage;
use App\Models\Base;
class ManageHr extends Base
{
protected $table = 'gl_manage_hr';
/**
* 特殊字段
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function specielField(){
return ['photo_gallery','id_card_gallery','certificate_gallery','career_history','learning_history'];
}
/**
* 归属小组
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function belongGroup()
{
return [
1 => 'KA组',
2 => 'A组',
3 => 'B组',
4 => 'C组',
5 => 'D组',
6 => 'E组',
7 => 'F组',
8 => 'G组',
9 => 'H组',
10 => 'GA组',
11=> 'GB组',
12 => 'GC组',
13 => '前端组',
14 => '后端组',
15 => '黑格组',
16 => '售后组',
0 => '其他',
];
}
/**
* 学历
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function education()
{
return [
1 => '专科',
2 => '本科',
3 => '研究生及以上',
0 => '其他',
];
}
/**
* 入职岗位
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function entryPosition()
{
return [
1 => '优化师',
2 => '优化师助理',
3 => '优化顾问',
4 => '项目经理',
5 => '平面设计',
6 => '技术经理',
7 => '技术主管',
8 => '技术总监',
9 => '渠道经理',
10 => '前端研发',
11=> '后端研发',
12 => '行政财务',
13 => '品牌营销',
14 => '销售经理',
15 => '销售主管',
16 => '售后技术',
17 => '售后服务',
18 => '外贸销售',
19 => '渠道助理',
20 => '黑格运营',
21 => '运营',
22 => '短视频剪辑师',
23 => '人事',
24 => '采购',
0 => '其他',
];
}
/**
* 级别序列
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function pLevel()
{
return [
0 => '实习期/试用期(P0)',
1 => '初级(P1)',
2 => '初级(P2)',
3 => '初级(P3)',
4 => '中级(P4)',
5 => '中级(P5)',
6 => '中级(P6)',
7 => '高级(P7)',
8 => '高级(P8)',
9 => '高级(P9)',
10 => '高级(P10)',
11=> '职务初级(M1)',
12 => '职务初级(M2)',
13 => '职务初级(M3)',
14 => '职务中级(M4)',
15 => '职务中级(M5)',
16 => '职务中级(M6)',
17 => '职务高级(M7)',
18 => '职务高级(M8)',
19 => '职务高级(M9)',
20 => '职务高级(M10)',
];
}
/**
* 是否党员
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function dangyuan()
{
return [
0 => '群众',
1 => '预备党员',
2 => '正式党员',
];
}
/**
* 是否有党支部
* @return string[]
* @author zgj
* @date 2023/5/31
*/
public static function dangzhibu()
{
return [
0 => '无',
1 => '是',
2 => '否',
];
}
}
... ...
此 diff 太大无法显示。
... ... @@ -5,7 +5,8 @@
use \Illuminate\Support\Facades\Route;
use \App\Http\Controllers\Aside;
//必须登录验证的路由组
Route::middleware(['aloginauth'])->group(function () {
Route::get('/', [Aside\IndexController::class, 'index'])->name('admin.home.white');
Route::get('/get_menu', [Aside\IndexController::class, 'get_menu'])->name('admin.get_menu.white');
... ... @@ -45,6 +46,7 @@ Route::middleware(['aloginauth'])->group(function () {
Route::any('/read', [Aside\User\ProjectDeptController::class, 'read'])->name('admin.group_info');
});
});
//ai指令
... ... @@ -176,6 +178,7 @@ Route::middleware(['aloginauth'])->group(function () {
Route::get('/delete_list', [Aside\Domain\DomainInfoController::class, 'delete_list'])->name('admin.domain_delete_list'); // 删除列表
Route::any('/restore', [Aside\Domain\DomainInfoController::class, 'restore'])->name('admin.domain_restore'); // 恢复
Route::get('/log', [Aside\Domain\DomainInfoLogController::class, 'lists'])->name('admin.domain_log_lists'); // 日志
});
//图片操作
Route::prefix('images')->group(function () {
... ...