|
@@ -1730,7 +1730,7 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
$id = $data['id'];
|
|
|
// 1:通栏;2:组件;
|
|
|
if($data['type_id'] == 1){
|
|
|
- $sector_place = SectorPlace::where('sector_type', $data['type'])->first();
|
|
|
+ $sector_place = SectorPlace::where('id','!=',$id)->where('sector_type', $data['type'])->first();
|
|
|
if(!empty($sector_place)){
|
|
|
return Result::error('通栏版式类别编号已存在!');
|
|
|
}
|
|
@@ -1748,7 +1748,8 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
if(empty($sector_type)){
|
|
|
return Result::error('通栏版式类别不存在!');
|
|
|
}
|
|
|
- $component = SectorPlace::where('sector_type', $data['sector_type'])
|
|
|
+ $component = SectorPlace::where('id','!=',$id)
|
|
|
+ ->where('sector_type', $data['sector_type'])
|
|
|
->where('component_type', $data['type'])
|
|
|
->where('type_id',2)
|
|
|
->first();
|