例如: utctime, times , (year||'-'||month||'-1')::timestamp without time zone ,不需要在最外层加括号或者双引号
+
例如: utctime, times , (year||'-'||month||'-1')::timestamp without time zone ,不需要在最外层加括号或者双引号。如果是制作分类图,则X轴必须是category,请在数据读取SQL中用将所需字段命名为category。
diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php
index 0040163d..001a9e33 100755
--- a/application/default/controllers/DataController.php
+++ b/application/default/controllers/DataController.php
@@ -1977,23 +1977,23 @@ class DataController extends Zend_Controller_Action
$ac = $this->_request->getParam('ac');
if ($ac=='unready') {
//列出没有DOI的数据
- $sql="select m.* from {$this->submd} m where length(m.doi)<3 and m.uuid not in (select uuid from datadoi) order by m.ts_created desc";
+ $sql="select m.* from {$this->submd} m where m.uuid not in (select uuid from datadoi) order by m.ts_created desc";
$this->view->pageID='doi-unready';
} else if ($ac=='prepare') {
//列出有DOI但还未进行提交申请的数据
- $sql="select m.* from {$this->submd} m where length(m.doi)>3 and m.uuid not in (select uuid from datadoi) order by m.ts_created desc";
+ $sql="select m.* from {$this->submd} m where m.uuid not in (select uuid from datadoi) order by m.ts_created desc";
$this->view->pageID='doi-prepare';
} else if ($ac=='unsubmit') {
//列出有DOI并计划提交申请的数据
- $sql="select m.*,d.doi as datadoi,date(d.ts_created) as ts_created from {$this->submd} m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_created is not null and d.ts_submitted is null order by d.ts_created desc";
+ $sql="select m.*,d.doi as datadoi,date(d.ts_created) as ts_created from {$this->submd} m left join datadoi d on m.uuid=d.uuid where d.ts_created is not null and d.ts_submitted is null order by d.ts_created desc";
$this->view->pageID='doi-unsubmit';
} else if ($ac=='submit') {
//列出有DOI并计划提交申请的数据
- $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted from {$this->submd} m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_submitted is not null and d.ts_published is null order by d.ts_submitted desc,d.ts_created desc";
+ $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted from {$this->submd} m left join datadoi d on m.uuid=d.uuid where d.ts_submitted is not null and d.ts_published is null order by d.ts_submitted desc,d.ts_created desc";
$this->view->pageID='doi-submit';
} else if ($ac=='publish' || empty($ac)) {
//默认:列出最新发布的DOI数据
- $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted,date(d.ts_published) as ts_published from {$this->submd} m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_published is not null order by d.ts_published desc,d.ts_submitted desc,d.ts_created desc";
+ $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted,date(d.ts_published) as ts_published from {$this->submd} m left join datadoi d on m.uuid=d.uuid where d.ts_published is not null order by d.ts_published desc,d.ts_submitted desc,d.ts_created desc";
$this->view->pageID='doi-publish';
}
$sth = $this->db->prepare($sql);
@@ -2079,28 +2079,12 @@ class DataController extends Zend_Controller_Action
function listAction()
{
- $sql="select m.uuid,m.title,m.citation,m.doi,d.doi as datadoi,d.ts_published,d.authors,d.publisher,date_part('year',d.ts_published) as publish_year from normalmetadata m
-left join mdstatus s on m.uuid=s.uuid
-left join datadoi d on d.uuid=m.uuid
-where s.status>4
-and m.uuid not in
-(select d.uuid from datasource d left join source s on d.sourceid=s.id
-where s.code in ('heihe','water','hiwater','westee'))
-order by m.title";
+ $sql="select m.uuid,m.title,m.citation,m.doi,d.doi as datadoi,d.ts_published,d.authors,d.publisher,date_part('year',d.ts_published) as publish_year from {$this->submd} m
+ left join mdstatus s on m.uuid=s.uuid
+ left join datadoi d on d.uuid=m.uuid
+ where s.status>4
+ order by m.title";
$this->view->metadata=$this->db->fetchAll($sql);
- $sql="select m.uuid,m.title,m.citation,m.doi,d.doi as datadoi,d.ts_published,d.authors,d.publisher,date_part('year',d.ts_published) as publish_year
- from normalmetadata m left join datadoi d on d.uuid=m.uuid left join mdstatus s on m.uuid=s.uuid where s.status>4 and m.title like '黑河综合遥感联合试验%' order by title";
- $this->view->water=$this->db->fetchAll($sql);
- $sql="select m.uuid,m.title,m.citation ,m.doi,d.doi as datadoi,d.ts_published,d.authors,d.publisher,date_part('year',d.ts_published) as publish_year
- from normalmetadata m left join datadoi d on d.uuid=m.uuid left join mdstatus s on m.uuid=s.uuid where s.status>0 and m.title like '黑河生态水文遥感试验%' order by title";
- $this->view->hiwater=$this->db->fetchAll($sql);
- $sql="select m.uuid,m.title,m.citation ,m.doi,d.doi as datadoi,d.ts_published,d.authors,d.publisher,date_part('year',d.ts_published) as publish_year
- from normalmetadata m left join datadoi d on d.uuid=m.uuid left join mdstatus s on m.uuid=s.uuid left join datasource ds on ds.uuid=m.uuid left join source sr on ds.sourceid=sr.id where sr.code='heihe' and s.status>0 and m.title not like '黑河生态水文遥感试验%' order by title";
- $this->view->heihe=$this->db->fetchAll($sql);
- $sql="select m.uuid,m.title,m.citation ,m.doi,d.doi as datadoi,d.ts_published,d.authors,d.publisher,date_part('year',d.ts_published) as publish_year
- from normalmetadata m left join datadoi d on d.uuid=m.uuid left join mdstatus s on m.uuid=s.uuid left join datasource ds on ds.uuid=m.uuid left join source sr on ds.sourceid=sr.id where sr.code='westee' and s.status>4 order by title";
- $this->view->westee=$this->db->fetchAll($sql);
-
}
//可视化数据
diff --git a/application/default/views/scripts/data/doi.phtml b/application/default/views/scripts/data/doi.phtml
index 3d5f9091..369fc9bd 100644
--- a/application/default/views/scripts/data/doi.phtml
+++ b/application/default/views/scripts/data/doi.phtml
@@ -7,7 +7,6 @@ $this->nav[] = array('link'=>"/data/doi",'title'=>'DOI浏览');
$this->theme->AppendPlus($this,'colorbox');
?>