|
|
|
@ -105,6 +105,36 @@ class Information extends CI_Controller
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//复制节点结构到任意站点的节点下面。-- lmr
|
|
|
|
|
//is_id 信息结构ID,
|
|
|
|
|
public function copy_by_is_id($src_is_id, $dest_is_id)
|
|
|
|
|
{
|
|
|
|
|
$data = array();
|
|
|
|
|
if ($src_is_id == $dest_is_id || empty($src_is_id) || empty($dest_is_id)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//源节点结构
|
|
|
|
|
$src = $this->InfoStructures_model->Detail($src_is_id);
|
|
|
|
|
$src_path = $this->Information_model->get_list_by_path($src->is_path, false, $src->is_sitecode);
|
|
|
|
|
foreach ($src_path as $item) {
|
|
|
|
|
if ($item->is_id === $src->is_id) {
|
|
|
|
|
unset($item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//目标节点结构
|
|
|
|
|
$dest = $this->InfoStructures_model->Detail($dest_is_id);
|
|
|
|
|
$dest_path = $this->Information_model->get_list_by_path($dest->is_path, false, $dest->is_sitecode);
|
|
|
|
|
print_r($src);
|
|
|
|
|
print_r($src_path);
|
|
|
|
|
print_r($dest);
|
|
|
|
|
print_r($dest_path);
|
|
|
|
|
|
|
|
|
|
//返回状态
|
|
|
|
|
$data[] = array('name' => 'ok', 'value' => 'copy_by_is_id() success!');
|
|
|
|
|
echo json_encode($data);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function delete($is_id)
|
|
|
|
|
{
|
|
|
|
|
//查询结构信息
|
|
|
|
|