修复数据分类问题
This commit is contained in:
parent
6265948c41
commit
6a38e0bcca
|
@ -373,10 +373,8 @@ class ServiceController extends Zend_Controller_Action
|
||||||
error_reporting(1);
|
error_reporting(1);
|
||||||
if (!empty($uuid))
|
if (!empty($uuid))
|
||||||
{
|
{
|
||||||
$sql="select x.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.south,m.east,m.west,m.north,m.timebegin,m.timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype,
|
$sql="select g.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.south,m.east,m.west,m.north,date(m.timebegin) as timebegin,date(m.timeend) as timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype
|
||||||
cc.name as category, cc.name_zh as category_zh
|
|
||||||
from metadata m left join xml x on m.id=x.id left join thumbnail t on x.id=t.id
|
from metadata m left join xml x on m.id=x.id left join thumbnail t on x.id=t.id
|
||||||
left join category c on c.id=m.id left join categorycode cc on c.code=cc.code
|
|
||||||
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
|
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=?";
|
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=?";
|
||||||
|
@ -387,7 +385,14 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$reference.=($k+1).'. '.str_replace(array("\r\n", "\n", "\r"),'',$refer['reference'])."\r\n";
|
$reference.=($k+1).'. '.str_replace(array("\r\n", "\n", "\r"),'',$refer['reference'])."\r\n";
|
||||||
}
|
}
|
||||||
$row['reference']=$reference;
|
$row['reference']=$reference;
|
||||||
|
$sql="select cc.name as category, cc.name_zh from metadata m left join category c on m.id=c.id left join categorycode cc on c.code=cc.code where m.uuid=".$this->db->quote($uuid);
|
||||||
|
$cat=$this->db->fetchAll($sql);
|
||||||
|
$row['category_zh']='';
|
||||||
|
foreach($cat as $category)
|
||||||
|
{
|
||||||
|
$row['category_zh'].=$category['name_zh'].' ';
|
||||||
|
}
|
||||||
$sql="select u.uselimit from mdlimit ml left join metadata m on ml.uuid=m.uuid left join uselimit u on ml.lid=u.id where m.uuid=?";
|
$sql="select u.uselimit from mdlimit ml left join metadata m on ml.uuid=m.uuid left join uselimit u on ml.lid=u.id where m.uuid=?";
|
||||||
$sql=$this->db->quoteInto($sql,$uuid);
|
$sql=$this->db->quoteInto($sql,$uuid);
|
||||||
$limits=$this->db->fetchAll($sql);
|
$limits=$this->db->fetchAll($sql);
|
||||||
|
@ -458,10 +463,8 @@ class ServiceController extends Zend_Controller_Action
|
||||||
//error_reporting(1);
|
//error_reporting(1);
|
||||||
if (!empty($uuid))
|
if (!empty($uuid))
|
||||||
{
|
{
|
||||||
$sql="select x.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.south,m.east,m.west,m.north,m.timebegin,m.timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype,
|
$sql="select g.data,m.title,m.citation,m.suppinfo,m.doi,m.filesize,m.fileformat,m.south,m.east,m.west,m.north,date(m.timebegin) as timebegin,date(m.timeend) as timeend,m.title_en,m.uuid,m.description,g.id,m.projection,t.filetype
|
||||||
cc.name as category, cc.name_zh as category_zh
|
|
||||||
from xml x left join metadata m on m.id=x.id left join thumbnail t on x.id=t.id
|
from xml x left join metadata m on m.id=x.id left join thumbnail t on x.id=t.id
|
||||||
left join category c on c.id=m.id left join categorycode cc on c.code=cc.code
|
|
||||||
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
|
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=?";
|
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.uuid=?";
|
||||||
|
@ -472,7 +475,14 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$reference.=($k+1).'. '.str_replace(array("\r\n", "\n", "\r"),'',$refer['reference'])."\r\n";
|
$reference.=($k+1).'. '.str_replace(array("\r\n", "\n", "\r"),'',$refer['reference'])."\r\n";
|
||||||
}
|
}
|
||||||
$row['reference']=$reference;
|
$row['reference']=$reference;
|
||||||
|
$sql="select cc.name as category, cc.name_zh from metadata m left join category c on m.id=c.id left join categorycode cc on c.code=cc.code where m.uuid=".$this->db->quote($uuid);
|
||||||
|
$cat=$this->db->fetchAll($sql);
|
||||||
|
$row['category_zh']='';
|
||||||
|
foreach($cat as $category)
|
||||||
|
{
|
||||||
|
$row['category_zh'].=$category['name_zh'].' ';
|
||||||
|
}
|
||||||
$sql="select u.uselimit from mdlimit ml left join metadata m on ml.uuid=m.uuid left join uselimit u on ml.lid=u.id where m.uuid=?";
|
$sql="select u.uselimit from mdlimit ml left join metadata m on ml.uuid=m.uuid left join uselimit u on ml.lid=u.id where m.uuid=?";
|
||||||
$sql=$this->db->quoteInto($sql,$uuid);
|
$sql=$this->db->quoteInto($sql,$uuid);
|
||||||
$limits=$this->db->fetchAll($sql);
|
$limits=$this->db->fetchAll($sql);
|
||||||
|
|
Loading…
Reference in New Issue