添加了作者同意用户申请时的wsn数据生成功能
This commit is contained in:
parent
14c012c78f
commit
7b150ee8ac
|
@ -6,6 +6,8 @@
|
|||
@license http://
|
||||
@link http://
|
||||
*/
|
||||
use data\DataService;
|
||||
|
||||
include_once("data/Author.php");
|
||||
class AuthorController extends Zend_Controller_Action
|
||||
{
|
||||
|
@ -149,6 +151,13 @@ class AuthorController extends Zend_Controller_Action
|
|||
$sth = $this->db->prepare($sql);
|
||||
if($sth->execute(array($uuid,$oid)))
|
||||
{
|
||||
//如果是wsn数据则生成数据
|
||||
$dataservice = new DataService();
|
||||
$wsnData = $dataservice->get($uuid);
|
||||
if(isset($wsnData['id']) && !empty($wsnData['id']))
|
||||
{
|
||||
@$dataservice->makeWsnData();
|
||||
}
|
||||
//发送相关邮件给数据中心服务人员
|
||||
$sql="select m.title,a.username from dataorder o left join metadata m on o.uuid=m.uuid left join offlineapp a on o.offlineappid=a.id where o.id=?";
|
||||
$sth = $this->db->prepare($sql);
|
||||
|
@ -2828,7 +2837,7 @@ class AuthorController extends Zend_Controller_Action
|
|||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array(trim($ref)));
|
||||
$row = $sth->fetch();
|
||||
}
|
||||
}
|
||||
$sql="insert into mdref (uuid,refid,reftype) values(?,?,?)";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$ex=$sth->execute(array($uuid,$row['id'],$reftype));
|
||||
|
|
|
@ -101,4 +101,12 @@ class DataService
|
|||
return NULL;
|
||||
}
|
||||
}//获取Wsn数据
|
||||
|
||||
//访问wsn端生成数据的webservice
|
||||
public function makeWsnData()
|
||||
{
|
||||
$url = "http://waterwsn.westgis.ac.cn/down.php";
|
||||
$curl = new Curl();
|
||||
$data = $curl->request($url,array(),"POST");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue