From bcfb19feccc2fb4efe4f9b8440934e3ccdf61fe8 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 25 Oct 2011 08:48:51 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=8C=E6=AD=A5=E6=97=B6?= =?UTF-8?q?=E6=9C=AA=E5=90=8C=E6=AD=A5source=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index bbac219e..af7364cd 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -35,7 +35,7 @@ class Admin_DataController extends Zend_Controller_Action //$uuid=$this->_request->getParam('uuid'); if ($source=="geonetwork" && empty($uuid) ) { //从geonetwork向WESTDC同步 - $sql="select uuid,data from geonetworkmetadata where schemaid='iso19115'"; + $sql="select uuid,data,source from geonetworkmetadata where schemaid='iso19115'"; $rs=$this->db->fetchAll($sql); foreach($rs as $gmd) { $this->import($gmd->data); @@ -45,12 +45,12 @@ class Admin_DataController extends Zend_Controller_Action } elseif ($source=="watergn" && empty($uuid) ) { //首先删除所有的黑河试验数据 //$sql="delete from metadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80'"; - $sql="delete from metadata where uuid in (select uuid from heihegn)"; + $sql="delete from metadata where uuid in (select uuid from watergn)"; $this->db->query($sql); $sql="delete from responsible where id not in (select distinct(resid) from role)"; $this->db->query($sql); //同步黑河遥感实验的元数据 - $sql="select uuid,data,source from heihegn where schemaid='iso19115'"; + $sql="select uuid,data,source from watergn where schemaid='iso19115'"; $rs=$this->db->fetchAll($sql); foreach($rs as $gmd) { $this->import($gmd->data); @@ -68,7 +68,7 @@ class Admin_DataController extends Zend_Controller_Action $sql="select m.uuid,m.source,x.data from metadata m left join xml x on m.id=x.id where m.uuid in (select uuid from geonetworkmetadata)"; $rs=$this->db->fetchAll($sql); foreach($rs as $gmd) { - $sql="update geonetworkmetadata set source='".$gmd->source."',data=".$this->db->quote($gmd->data)." where uuid='".$gmd->uuid."'"; + $sql="update geonetworkmetadata set source='".$gmd->source."',data=".$this->db->quote($gmd->data)." where uuid='".$gmd->uuid."'"; $this->db->exec($sql); } $this->view->msg='成功同步WESTDC元数据到GEONETWORK!';