实现离线申请待处理的分平台控制

This commit is contained in:
wlx 2014-06-11 07:06:54 +00:00
parent 9a2b70f1a9
commit 18e4f5ab5a
3 changed files with 5 additions and 143 deletions

View File

@ -28,146 +28,6 @@ class Admin_DownController extends Zend_Controller_Action
//其他连接
}
//新离线数据申请管理
function offlineappsAction()
{
$this->view->navIn = $ac = $this->_getParam('ac');
$this->view->offlineAppId = $offlineappid = $this->_getParam('offlineappid');
$submit = $this->_getParam('submit');
$search = $this->_getParam('search');
if(empty($ac))
{
$this->view->navIn = $ac = "notreceived";
}
if($ac == "view")
{
if(empty($offlineappid))
{
view::Post($this,"参数错误",-1);
return true;
}
$offlineapp = new Offlineapp();
if(view::isXmlHttpRequest() !== true)
{
$this->_helper->viewRenderer('offlineapps-view');
$this->view->data = $offlineapp->getOneAppInfo($offlineappid);
}else{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$this->jsonexit($offlineapp->getOneAppInfo($offlineappid));
}
return true;
}
if($ac == "notreceived")
{
$this->_helper->viewRenderer('offlineapps-notreceived');
$offlineapp = new Offlineapp();
$data = $offlineapp->fetchNotReceived();
view::addPaginator($data,$this,20);
return true;
}//未接收的
if($ac == "nopdf")
{
$this->_helper->viewRenderer('offlineapps-nopdf');
$offlineapp = new Offlineapp();
$data = $offlineapp->fetchNoPdf();
view::addPaginator($data,$this,20);
return true;
}//没有上传申请表的
if($ac == "notpassed")
{
$this->_helper->viewRenderer('offlineapps-notpassed');
$offlineapp = new Offlineapp();
$data = $offlineapp->fetchNotApprove();
view::addPaginator($data,$this,20);
return true;
}
//接收
if($ac == "receive")
{
$offlineapp = new Offlineapp();
$statue = $offlineapp->receive($offlineappid);
if($statue !== true)
{
view::Post($this,$statue);
}else{
view::Post($this,"接收成功",-1);
}
return true;
}
//发送给作者
if($ac == "toauthor")
{
$this->_helper->viewRenderer('offlineapps-toauthor');
if(empty($submit))
{
}else{
$offlineapp = new Offlineapp();
}
return true;
}
//拒绝
if($ac == "deny")
{
$this->_helper->viewRenderer('offlineapps-deny');
if(empty($offlineappid))
{
view::Post($this,"参数错误",-1);
return true;
}
if(empty($submit))
{
$offlineapp = new Offlineapp();
$this->view->data = $offlineapp->getOneAppInfo($offlineappid);
$mail = new Mail();
$data = array(
'user' => $this->view->data[0]['username'],
'datalist' => $this->view->data[0]['datalist'],
);
$mail->loadTemplate("offline-deny",$data);
$this->view->mail_body = $mail->body;
$this->view->mail_subject = $mail->subject;
}
return;
}
//重置申请表
if($ac == "resetappform")
{
if(empty($offlineappid))
{
view::Post($this,"参数错误",-1);
return true;
}
$offlineapp = new Offlineapp();
$statue = $offlineapp->resetAppForm($offlineappid);
if($statue !== true)
{
view::Post($this,$statue);
}else{
view::Post($this,"重置成功",-1);
}
return true;
}
}
//离线数据申请管理
function offlineappAction()
{
@ -185,6 +45,7 @@ class Admin_DownController extends Zend_Controller_Action
$status =(int)$this->_getParam('status');
$ac = $this->_getParam('ac');
$q = $this->_getParam('q');
$submd=$this->view->config->sub->metadata;
if($ac == "pending")
{

View File

@ -29,7 +29,6 @@
<div style="overflow:hidden">
<div class="pull-left">
<a href="/admin/down/offlineapp/reset/-1" onclick="return confirm('是否重置该申请?')" class="btn btn-info">重置1年前的所有未收到申请表的记录</a>
<a href="/admin/down/offlineapp/status/4" class="btn btn-info">已收到的申请</a>
<a href="/admin/down/offlineapp/status/-1" class="btn btn-info">已拒绝的申请</a>
<a href="/admin/down/offlineapp/ac/pending" class="btn btn-info">待处理的申请</a>

View File

@ -18,9 +18,11 @@ class Dataorder
}
public function fetchAllOfflineApp($statu=0,$q=""){
$config = \Zend_Registry::get('config');
$submd=$config->sub->metadata;
$wheresql = array();
$wheresql[]=" d.uuid in (select uuid from $submd) ";
if ($statu==4)
$wheresql[] = " (o.ts_approved is null and o.pdflink is not null and d.status=4) ";
elseif ($statu==-1)