function act_getCurrentPosition() { $info = array(); $where['x_alixs'] = intval($_POST['axis_x']); $where['y_alixs'] = intval($_POST['axis_y']); $where['floor'] = intval($_POST['floor']); $where['storeId'] = intval($_POST['storeid']); $where['areaId'] = intval($_POST['areaId']); $where['storey'] = intval($_POST['storey']); //$list = PositionModel::getPositionList("*","where x_alixs='$x_alixs' and y_alixs='$y_alixs' and floor='$floor' and storeId={$storeid}"); $list = WhPositionDistributionModel::select($where, 'pName, is_enable, type, z_alixs'); //print_r($list);exit; if ($list) { foreach ($list as $l) { $info[$l['z_alixs']][] = array('name' => $l['pName'], 'enable' => $l['is_enable'], 'type' => $l['type']); } $new_info = array(); foreach ($info as $key => $v) { $pNames = get_filed_array('name', $v); $new_info[$key]['name'] = implode(',', $pNames); $new_info[$key]['enable'] = $v[0]['is_enable']; $new_info[$key]['type'] = $v[0]['type']; } //print_r($new_info);exit; unset($info); return $new_info; } else { self::$errCode = PositionModel::$errCode; self::$errMsg = PositionModel::$errMsg; return false; } }