添加判断是否存在wsn数据的函数

This commit is contained in:
wlx 2013-09-26 05:10:30 +00:00
parent 74ed000c6c
commit 39720be5ad
1 changed files with 10 additions and 1 deletions

View File

@ -75,7 +75,16 @@ class Offlineapp
";
$rs = $this->db->query($sql);
return $rs->fetchAll();
}//
}//
//判断是否存在wsn数据申请
public function hasWsnData($id)
{
$sql="select count(d.id) as wsn from dataorder d left join dataservice s on d.uuid=s.uuid where d.offlineappid=$id and s.service_type in (1,2) and position('waterwsn' in s.service_url)>0 and d.selection is not null";
$rs=$this->db->query($sql);
$row=$rs->fetch();
return $row['wsn'];
}
//重置申请表
public function resetAppForm($id)