修复同步时未同步source错误
This commit is contained in:
parent
3cbdd0bf71
commit
bcfb19fecc
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue