对同步的新数据增加评审状态

This commit is contained in:
wlx 2012-05-21 11:33:31 +00:00
parent 0783878a26
commit 1492b6dccf
1 changed files with 6 additions and 1 deletions

View File

@ -51,7 +51,12 @@ class Admin_DataController extends Zend_Controller_Action
$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);
$this->db->query($sql);
//对所有的新数据增加评审状态
$sql="insert into mdstatus (uuid,status,ts_accepted,userid) select uuid,1,now(),?
from watergn where uuid not in (select uuid from mdstatus)";
$userid = Zend_Auth::getInstance()->getIdentity()->id;
$this->db->query($sql,array($userid));
//同步黑河遥感实验的元数据
$sql="select uuid,data,source from watergn where schemaid='iso19115'";
$rs=$this->db->fetchAll($sql);