|
@@ -254,7 +254,7 @@ class ItemService extends Service
|
|
|
}
|
|
}
|
|
|
list($status, $msg) = $this->checkArrayRepeat($data['man_list'],'data_id','人员');
|
|
list($status, $msg) = $this->checkArrayRepeat($data['man_list'],'data_id','人员');
|
|
|
if(! $status) return [false, $msg];
|
|
if(! $status) return [false, $msg];
|
|
|
-// if(empty($data['device_list'])) return [false, '设备不能为空'];
|
|
|
|
|
|
|
+ if(empty($data['device_list'])) return [false, '设备不能为空'];
|
|
|
if(isset($data['device_list'])){
|
|
if(isset($data['device_list'])){
|
|
|
foreach ($data['device_list'] as $key => $value){
|
|
foreach ($data['device_list'] as $key => $value){
|
|
|
if(empty($value['type'])) return [false, '类型不能为空'];
|
|
if(empty($value['type'])) return [false, '类型不能为空'];
|
|
@@ -263,8 +263,8 @@ class ItemService extends Service
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// list($status, $msg) = $this->checkArrayRepeat($data['device_list'],'data_id','设备');
|
|
|
|
|
-// if(! $status) return [false, $msg];
|
|
|
|
|
|
|
+ list($status, $msg) = $this->checkArrayRepeat($data['device_list'],'data_id','设备');
|
|
|
|
|
+ if(! $status) return [false, $msg];
|
|
|
|
|
|
|
|
if($is_add){
|
|
if($is_add){
|
|
|
$bool = Item::where('code',$data['code'])
|
|
$bool = Item::where('code',$data['code'])
|