|
|
@@ -646,8 +646,8 @@ class EmployeeService extends Service
|
|
|
if(mb_strlen($data['password']) < 6) return [false, '密码长度不得小于6位长度'];
|
|
|
if(empty($data['role'])) return [false, '角色不能为空'];
|
|
|
}
|
|
|
- if(empty($data['man_type'])) return [false,'是否为技术研究人员不能为空'];
|
|
|
- if(! isset(Employee::Man_Type[$data['man_type']])) return [false,'是否为技术研究人员不存在'];
|
|
|
+ if(empty($data['man_type'])) return [false,'是否技术人员不能为空'];
|
|
|
+ if(! isset(Employee::Man_Type[$data['man_type']])) return [false,'是否技术人员不存在'];
|
|
|
if(! isset($data['entrust_type'])) return [false,'委托方式不能为空'];
|
|
|
if(! isset(Employee::WT_Type[$data['entrust_type']])) return [false,'委托方式不存在'];
|
|
|
$data['top_depart_id'] = $user['top_depart_id'];
|
|
|
@@ -854,7 +854,10 @@ class EmployeeService extends Service
|
|
|
|
|
|
$update = $msg['data'][0];
|
|
|
$model = new Depart();
|
|
|
- $model->where('id',$data['id'])->update($update);
|
|
|
+ $model->where('id',$data['id'])->update([
|
|
|
+ 'title' => $update['title'],
|
|
|
+ 'code' => $update['code'],
|
|
|
+ ]);
|
|
|
|
|
|
return [true, ''];
|
|
|
}
|
|
|
@@ -989,7 +992,6 @@ class EmployeeService extends Service
|
|
|
|
|
|
foreach ($data['data'] as $key => $value){
|
|
|
$top_depart_id = $user['top_depart_id'];
|
|
|
- $parent_id = $value['parent_id'];
|
|
|
if(empty($value['parent_id'])) {
|
|
|
$parent_id = $top_depart_id;
|
|
|
$data['data'][$key]['parent_id'] = $parent_id;
|