|
@@ -332,15 +332,21 @@ class ApiController extends BaseController
|
|
|
//网格化巡检权限
|
|
|
public function getRole(){
|
|
|
$staff_num = Input::get('staff_num', '');
|
|
|
+ $depart = Input::get('depart', '');
|
|
|
+
|
|
|
if (!$staff_num) {
|
|
|
return self::errorResponse(ApiEnum::STATUS_CODE_EMPTY);
|
|
|
}
|
|
|
|
|
|
+ if (!$depart) {
|
|
|
+ return self::errorResponse(ApiEnum::STATUS_CODE_EMPTY);
|
|
|
+ }
|
|
|
+
|
|
|
$result['status'] = true;
|
|
|
$result['msg'] = ApiEnum::RETURN_SUCCESS;
|
|
|
$result['data'] = 2;//无权限
|
|
|
|
|
|
- $people = DB::connection('mysql_fwe10')->table('uf_zhxx_qlczgry')->where('zgrgh',$staff_num)->where('is_delete',0)->get();
|
|
|
+ $people = DB::connection('mysql_fwe10')->table('uf_zhxx_qlczgry')->where('zgrgh',$staff_num)->where('dwmc',$depart)->where('is_delete',0)->get();
|
|
|
|
|
|
if(count($people) > 0){
|
|
|
$result['data'] = 1;//有权限
|