修复信息统计功能,申请查看增加申请时间
This commit is contained in:
parent
504abe8ddf
commit
141a6b3cd2
|
@ -242,8 +242,8 @@ class AuthorController extends Zend_Controller_Action
|
|||
if(preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid))
|
||||
{
|
||||
$sql = "select md.title,d.id as doid,d.uuid,d.authorpermitted,d.status
|
||||
,offa.id as offa_id,offa.username as offa_name,offa.unit as offa_unit,offa.email as offa_email,offa.project as offa_project
|
||||
,ona.id as ona_id,ona.username as ona_name,ona.unit as ona_unit,ona.email as ona_email,ona.project as ona_project
|
||||
,offa.id as offa_id,offa.username as offa_name,offa.unit as offa_unit,offa.email as offa_email,offa.project as offa_project,date(offa.ts_created) as offa_tscreated
|
||||
,ona.id as ona_id,ona.username as ona_name,ona.unit as ona_unit,ona.email as ona_email,ona.project as ona_project, date(ona.ts_created) as ona_tscreated
|
||||
from dataorder d
|
||||
left join metadata md on md.uuid=d.uuid
|
||||
left join mdauthor a on a.uuid=d.uuid
|
||||
|
@ -2968,8 +2968,8 @@ class AuthorController extends Zend_Controller_Action
|
|||
|
||||
if($ac == "time")
|
||||
{
|
||||
$this->_helper->viewRenderer('statics-time');
|
||||
$this->view->datas = $this->getStaticByYear("dataorder");
|
||||
$this->_helper->viewRenderer('statics-time');
|
||||
$this->view->datas = $this->getStaticByYear();
|
||||
|
||||
}
|
||||
|
||||
|
@ -2988,7 +2988,7 @@ class AuthorController extends Zend_Controller_Action
|
|||
LEFT JOIN mdstat s ON md.uuid=s.uuid
|
||||
LEFT JOIN mdauthor a ON md.uuid=a.uuid
|
||||
LEFT JOIN dataorder o ON md.uuid=o.uuid
|
||||
WHERE a.userid=? OR (o.status=0 or o.status=5)
|
||||
WHERE a.userid=? and a.status=1 and (o.status=0 or o.status=5)
|
||||
GROUP BY md.title,md.uuid,s.viewed";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($uid));
|
||||
|
@ -3000,23 +3000,15 @@ class AuthorController extends Zend_Controller_Action
|
|||
/*
|
||||
* getStaticByYear按月份获取统计数据
|
||||
*/
|
||||
public function getStaticByYear($ac,$year=0){
|
||||
|
||||
if(empty($year))
|
||||
{
|
||||
$year = date("Y",time());
|
||||
}
|
||||
public function getStaticByYear($year=0)
|
||||
{
|
||||
$uid=Zend_Auth::getInstance()->getIdentity()->id;
|
||||
|
||||
|
||||
if($ac == "dataorder")
|
||||
{
|
||||
$table = "dataorder";
|
||||
$time_field = "ts_created";
|
||||
$count_field = "id";
|
||||
}
|
||||
|
||||
$sql = "select to_char(o.$time_field, 'YYYY-MM') as d , count(o.$count_field) as c from $table o
|
||||
where o.ts_created between '$year-01-01' and '$year-12-12' group by d";
|
||||
$sql = "select to_char(o.ts_created, 'YYYY-MM') as d , count(o.id) as c from dataorder o
|
||||
where o.status in (0,5) and o.uuid in (select uuid from mdauthor where status=1 and userid=".$uid.")";
|
||||
if ($year>0)
|
||||
$sql.=" and o.ts_created between '$year-01-01' and '$year-12-31' ";
|
||||
$sql.=" group by d order by d desc";
|
||||
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
|
|
|
@ -36,7 +36,7 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
}
|
||||
if(isset($this->offlineorder))
|
||||
{
|
||||
echo "<li><h1>离线申请总数量:".$this->offlineorder."</h1><a href='/author/inauthor/ac/offline'>【查看离线申请】</a></li>";
|
||||
echo "<li><h1>离线申请总数量:".$this->offlineorder."</h1><a href='/author/inauthor/ac/datalist'>【查看离线申请】</a></li>";
|
||||
}
|
||||
if(isset($this->onlineorder))
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
{
|
||||
foreach($this->alldata as $v)
|
||||
{
|
||||
echo "<li><p><a target='_blank' href='/data/".$v['uuid']."'>".$v['title']."</a></p><p>点击:".$v['viewed']." | 下载:".$v['down']."</p></li>";
|
||||
echo "<li><p><a target='_blank' href='/data/".$v['uuid']."'>".$v['title']."</a></p><p>点击:".$v['viewed']." | <a href='/author/inauthor/ac/datalist/uuid/".$v['uuid']."'>下载:".$v['down']."</a></p></li>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,8 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
if(!empty($item['offa_id'])) :
|
||||
?>
|
||||
<li>
|
||||
<p>【离线申请】<?php echo $item['offa_name'];?> (<?php echo $item['offa_email'];?>)</p>
|
||||
<p>【离线申请】<?php echo $item['offa_name'];?> (<?php echo $item['offa_email'];?>)</p>
|
||||
<p>申请时间:<?php echo $item['offa_tscreated'];?></p>
|
||||
<p>单位:<?php echo $item['offa_unit'];?></p>
|
||||
<p>项目:<?php echo $item['offa_project'];?></p>
|
||||
<p><span id="ct_<?php echo $item['doid'];?>">
|
||||
|
@ -54,7 +55,8 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
if(!empty($item['ona_id'])):
|
||||
?>
|
||||
<li>
|
||||
<p>【在线下载记录】<?php echo $item['ona_name'];?> (<?php echo $item['ona_email'];?>)</p>
|
||||
<p>【在线下载记录】<?php echo $item['ona_name'];?> (<?php echo $item['ona_email'];?>)</p>
|
||||
<p>申请时间:<?php echo $item['ona_tscreated'];?></p>
|
||||
<p>单位:<?php echo $item['ona_unit'];?></p>
|
||||
<p>项目:<?php echo $item['ona_project'];?></p>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue