diff --git a/application/module/Order/Manager/Offlineapp.php b/application/module/Order/Manager/Offlineapp.php index aa01cb98..74325e73 100644 --- a/application/module/Order/Manager/Offlineapp.php +++ b/application/module/Order/Manager/Offlineapp.php @@ -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)