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));