修改了重置申请表的功能,添加了修改状态代码的部分
This commit is contained in:
parent
74a5e3f5fc
commit
eb98d79dfc
|
@ -75,15 +75,15 @@ 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'];
|
||||
}//
|
||||
|
||||
//判断是否存在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'];
|
||||
}
|
||||
|
||||
//重置申请表
|
||||
|
@ -100,7 +100,7 @@ class Offlineapp
|
|||
@unlink($row['applicationform']);
|
||||
}
|
||||
|
||||
if($this->db->exec("UPDATE offlineapp SET applicationform=NULL WHERE id=$id")>0)
|
||||
if($this->db->exec("UPDATE offlineapp SET applicationform=NULL,status=2 WHERE id=$id")>0 && $this->db->exec("UPDATE dataorder SET status=2 WHERE offlineappid=$id"))
|
||||
{
|
||||
@$this->events()->trigger('offlineapp.AppFormReseted', $this, compact('id'));
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue