fix:修复bug - 获取用户审批状态

This commit is contained in:
weifashi
2023-09-15 18:57:00 +08:00
parent ba8e7b3fbb
commit 9fee5c61a6
4 changed files with 47 additions and 29 deletions

View File

@@ -2937,21 +2937,4 @@ class Base
return $newArray;
}
/**
* 获取用户审批状态
*
* @param [type] $userid
* @return string
*/
public static function getUserApprovalStatus($userid) {
$data['userid'] = $userid;
$url = env('FLOW_URL') ?: 'http://approve';
$ret = Ihttp::ihttp_get($url.'/api/v1/workflow/process/getUserApprovalStatus?'.http_build_query($data));
$procdef = json_decode($ret['ret'] == 1 ? $ret['data'] : '{}', true);
if (isset($procdef['status']) && $procdef['status'] == 200) {
return isset($procdef['data']["proc_def_name"]) ? $procdef['data']["proc_def_name"] : '';
} else {
return '';
}
}
}