diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index e0424ed8..f52df5bc 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -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);