|
|
|
@ -2,6 +2,8 @@ |
|
|
|
|
|
|
|
namespace app\common\model; |
|
|
|
|
|
|
|
use app\common\dm\Dm; |
|
|
|
|
|
|
|
class Pass extends BaseModel |
|
|
|
{ |
|
|
|
public static $unit = [1 => '>', 2 => '<', 3 => '=', 4 => '≥', 5 => '<=', 6 => '!=']; |
|
|
|
@ -65,4 +67,17 @@ class Pass extends BaseModel |
|
|
|
if ($result['code'] != 1) return ['status' => 0, 'msg' => $result['msg']]; |
|
|
|
return ['status' => 1]; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取统计组ID |
|
|
|
* @param $dataType // 1 返回字符串 2 返回数组 |
|
|
|
* @return array|string |
|
|
|
*/ |
|
|
|
public static function getGroupIds($dataType) |
|
|
|
{ |
|
|
|
$dm = new Dm(); |
|
|
|
$groupRes = $dm->select('bt_passenger_monitor_group',null,'"groupId"'); |
|
|
|
$groupIdArr = array_column($groupRes,'groupId') ?: []; |
|
|
|
return $dataType == 2 ? $groupIdArr : implode(",",$groupIdArr); |
|
|
|
} |
|
|
|
} |