HrController.php
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?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
{
/**
* @remark :获取列表
* @name :list
* @author :lyh
* @method :post
* @time :2023/7/24 11:56
*/
public function list(HrLogic $logic)
{
$lists = $logic->getHrList($this->map,$this->page,$this->row,$this->order);
if(!empty($lists['list'])){
foreach ($lists['list'] as $k => $v){
$v['photo_gallery_link'] = json_decode($v['photo_gallery']);
$v['id_card_gallery_link'] = json_decode($v['id_card_gallery']);
$v['certificate_gallery_link'] = json_decode($v['certificate_gallery']);
$lists['list'][$k] = $v;
}
}
return $this->response('success', Code::SUCCESS, $lists);
}
/**
* @remark :获取详情
* @name :info
* @author :lyh
* @method :post
* @time :2023/9/6 10:04
*/
public function info(Request $request, HrLogic $logic){
$request->validate([
'id'=>'required'
],[
'id.required' => 'ID不能为空'
]);
$info = $logic->getHrInfo($this->param['id']);
$info['photo_gallery_link'] = $info['photo_gallery'];
$info['id_card_gallery_link'] = $info['id_card_gallery'];
$info['certificate_gallery_link'] = $info['certificate_gallery'];
$this->response('success',Code::SUCCESS,$info);
}
/**
* @remark :保存数据
* @name :save
* @author :lyh
* @method :post
* @time :2023/9/6 10:05
*/
public function save(HrLogic $logic){
$logic->hrSave();
return $this->response('success');
}
/**
* @remark :获取所有搜索参数
* @name :deptList
* @author :lyh
* @method :post
* @time :2023/7/22 17:17
*/
public function getSearchParamsList(HrLogic $hrLogic){
$list = $hrLogic->getSearchParams();
$this->response('success',Code::SUCCESS,$list);
}
}