From e93fe95ed6ad2132e1be22ff0f3b3a106a110358 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Fri, 6 Sep 2013 07:56:41 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E7=94=B3=E8=AF=B7=E8=A1=A8=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E4=BD=8D=E7=BD=AE=E7=A7=BB=E5=8A=A8=E5=88=B0offlineap?= =?UTF-8?q?p=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DownController.php | 7 ++++++- application/default/controllers/ServiceController.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/application/admin/controllers/DownController.php b/application/admin/controllers/DownController.php index a0745912..aa239746 100644 --- a/application/admin/controllers/DownController.php +++ b/application/admin/controllers/DownController.php @@ -526,6 +526,10 @@ class Admin_DownController extends Zend_Controller_Action //$this->_redirect('/admin/down/offlineapp/'.$page); } + //如果是wsn数据则生成数据 + $dataservice = new DataService(); + @$dataservice->makeWsnData(); + $sql="update dataorder set status=5,ts_approved=now() where offlineappid=?"; $this->db->query($sql,array($finish)); $sql="update offlineapp set ts_approved=now() where id=? and ts_approved is null"; @@ -545,6 +549,7 @@ class Admin_DownController extends Zend_Controller_Action // deal with ftp.westgis.ac.cn, use g6 to add path // todo ... } + //deal with ftp1&ftp2 account, for offline data if ($has_ftp1 || $has_ftp2) { $password=md5('westdc'.$row['userid'].rand(1000,9999)); @@ -774,7 +779,7 @@ class Admin_DownController extends Zend_Controller_Action $this->jsonexit($statu); return true; }else{ - $sql = "UPDATE dataorder SET applicationform='{$statu['file']}' WHERE offlineappid=$id"; + $sql = "UPDATE offlineapp SET applicationform='{$statu['file']}' WHERE id=$id"; if($this->db->exec($sql)) { $this->jsonexit(array("success"=>1)); diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php index d6ed1e95..446dd0a6 100644 --- a/application/default/controllers/ServiceController.php +++ b/application/default/controllers/ServiceController.php @@ -1588,7 +1588,7 @@ class ServiceController extends Zend_Controller_Action $this->jsonexit($statu); return true; }else{ - $sql = "UPDATE dataorder SET applicationform='{$statu['file']}' WHERE offlineappid=$id AND userid=$uid AND status IN (3,4)"; + $sql = "UPDATE offlineapp SET applicationform='{$statu['file']}' WHERE id=$id AND userid=$uid"; if($this->db->exec($sql)) { $this->jsonexit(array("success"=>1));