|
|
@@ -243,7 +243,7 @@ class OrganizationService extends Service
|
|
|
public function organizationRule(&$data, $user, $is_add = true){
|
|
|
if(empty($data['code'])) return [false, '编码不能为空'];
|
|
|
if(empty($data['title'])) return [false, '名称不能为空'];
|
|
|
- if(! empty($data['type']) && ! isset(Organization::$type_name[$data['type']])) return [false, '组织类型错误'];
|
|
|
+ if(empty($data['type']) || ! isset(Organization::$type_name[$data['type']])) return [false, '组织类型错误'];
|
|
|
if(! empty($data['founding_time'])) $data['founding_time'] = $this->changeDateToDate($data['founding_time']);
|
|
|
|
|
|
if(! empty($data['unit_list'])){
|