修改了后台操作中相关申请表字段的读取
This commit is contained in:
parent
e93fe95ed6
commit
b2b627c8db
|
@ -200,9 +200,9 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||
$mail->send();
|
||||
|
||||
$sql="SELECT applicationform FROM dataorder WHERE offlineappid=$start";
|
||||
$row=$this->db->fetchRow($sql,array($start));
|
||||
$filecontent=file_get_contents($this->view->config->offline->savepath."/".$row['applicationform']);
|
||||
$sql="select applicationform as pdflink from offlineapp where id=?";
|
||||
$row=$this->db->fetchRow($sql,array($start));
|
||||
$filecontent=file_get_contents($this->view->config->offline->savepath."/".$row['pdflink']);
|
||||
|
||||
//对每条数据的管理员用户发送相应的邮件通知,同一用户的邮件需要合并
|
||||
//需要取出对应数据的标题、uuid,以及对应的作者的email(一条数据可能有多个作者,一次申请可能有多条数据对应同一个作者)
|
||||
|
|
|
@ -40,7 +40,7 @@ class Dataorder
|
|||
$wheresql = "";
|
||||
}
|
||||
|
||||
$sql = "select distinct(o.*),d.id as orderid,d.status as datastatus,d.applicationform from ".$this->tbl_Offlineapp." o
|
||||
$sql = "select distinct(o.*),d.id as orderid,d.status as datastatus from ".$this->tbl_Offlineapp." o
|
||||
left join ".$this->tbl_Dataorder." d on o.id = d.offlineappid
|
||||
$wheresql
|
||||
order by o.ts_created desc";
|
||||
|
|
|
@ -69,7 +69,7 @@ class Offlineapp
|
|||
//获取一个申请的详细信息
|
||||
public function getOneAppInfo($id)
|
||||
{
|
||||
$sql = "SELECT off.*,o.status,o.applicationform FROM offlineapp off
|
||||
$sql = "SELECT off.*,o.status FROM offlineapp off
|
||||
LEFT JOIN dataorder o ON off.id=o.offlineappid
|
||||
WHERE off.id = $id
|
||||
";
|
||||
|
@ -80,23 +80,18 @@ class Offlineapp
|
|||
//重置申请表
|
||||
public function resetAppForm($id)
|
||||
{
|
||||
$sql = "SELECT * FROM dataorder WHERE offlineappid=$id";
|
||||
$sql = "SELECT * FROM offlineapp WHERE id=$id";
|
||||
$rs = $this->db->query($sql);
|
||||
$rows = $rs->fetchAll();
|
||||
$row = $rs->fetch();
|
||||
|
||||
$ids = array();
|
||||
|
||||
foreach($rows as $v)
|
||||
if(file_exists($row['applicationform']))
|
||||
{
|
||||
$ids[] = $v['id'];
|
||||
@unlink($row['applicationform']);
|
||||
}
|
||||
|
||||
if(file_exists($rows[0]['applicationform']))
|
||||
{
|
||||
@unlink($rows[0]['applicationform']);
|
||||
}
|
||||
|
||||
if($this->db->exec("UPDATE dataorder SET applicationform=NULL WHERE offlineappid=$id")>0)
|
||||
if($this->db->exec("UPDATE offlineapp SET applicationform=NULL WHERE id=$id")>0)
|
||||
{
|
||||
@$this->events()->trigger('offlineapp.AppFormReseted', $this, compact('id'));
|
||||
return true;
|
||||
|
@ -138,7 +133,7 @@ class Offlineapp
|
|||
public function fetchNoPdf()
|
||||
{
|
||||
$opt = $this->offLineAppMakeQuery(array(
|
||||
'where' => ' o.offlineappid != -1 AND o.status=4 AND (o.applicationform IS NULL OR o.applicationform=\'\') '
|
||||
'where' => ' o.offlineappid != -1 AND o.status=4 AND (off.applicationform IS NULL OR off.applicationform=\'\') '
|
||||
));
|
||||
$dbh = new dbh();
|
||||
//echo $dbh->select($opt,true);exit();
|
||||
|
@ -148,7 +143,7 @@ class Offlineapp
|
|||
public function fetchNotApprove()
|
||||
{
|
||||
$opt = $this->offLineAppMakeQuery(array(
|
||||
'where' => ' o.offlineappid != -1 AND o.status=4 AND (o.applicationform IS NOT NULL || o.applicationform!=\'\') '
|
||||
'where' => ' o.offlineappid != -1 AND o.status=4 AND (off.applicationform IS NOT NULL || off.applicationform!=\'\') '
|
||||
));
|
||||
$dbh = new dbh();
|
||||
return $dbh->select($opt);
|
||||
|
|
Loading…
Reference in New Issue