|
@@ -476,6 +476,7 @@ class ApiController extends BaseController
|
|
|
public function sbglRole(){
|
|
|
$staff_num = Input::get('staff_num', '');
|
|
|
$unit_id = Input::get('unit_id', '');
|
|
|
+ $type = Input::get('type', '');
|
|
|
|
|
|
if (!$unit_id) {
|
|
|
return self::errorResponse(ApiEnum::STATUS_CODE_EMPTY);
|
|
@@ -485,11 +486,15 @@ class ApiController extends BaseController
|
|
|
return self::errorResponse(ApiEnum::STATUS_CODE_EMPTY);
|
|
|
}
|
|
|
|
|
|
+ if (!$type) {
|
|
|
+ return self::errorResponse(ApiEnum::STATUS_CODE_EMPTY);
|
|
|
+ }
|
|
|
+
|
|
|
$result['status'] = true;
|
|
|
$result['msg'] = ApiEnum::RETURN_SUCCESS;
|
|
|
$result['data'] = [];
|
|
|
|
|
|
- $people_list = DB::connection('mysql_fwe10')->table('uf_zhxx_sbgl_rygl')->where('ssdw',$unit_id)->where('gh',$staff_num)->where('is_delete',0)->get();
|
|
|
+ $people_list = DB::connection('mysql_fwe10')->table('uf_zhxx_sbgl_rygl')->where('ssdw',$unit_id)->where('gh',$staff_num)->where($type,0)->where('is_delete',0)->get();
|
|
|
|
|
|
if(count($people_list) > 0){
|
|
|
$result['data'] = 1;//有权限
|