|
@@ -27,7 +27,7 @@ class Signn
|
|
|
}
|
|
|
|
|
|
public function getUnSignNum($sql,$uid){
|
|
|
- return $this->_sign->count(array('where' => $sql.' and status="uncheck" AND (`ownuid`='.$uid.' OR tender IN (SELECT pmid FROM jl_measure_audit WHERE auditoruid='.$uid.' GROUP BY auditoruid))', 'asArray' => TRUE));
|
|
|
+ return $this->_sign->count(array('where' => $sql.' and status="uncheck" AND (`ownuid`='.$uid.' OR tender IN (SELECT pmid FROM jl_measure_audit WHERE auditoruid='.$uid.' GROUP BY auditoruid) OR project IN (SELECT pid FROM jl_project_measure WHERE uid='.$uid.'))', 'asArray' => TRUE));
|
|
|
}
|
|
|
|
|
|
public function getDoingSignNumbyUid($uid, $sql = ' 1'){
|
|
@@ -125,7 +125,7 @@ class Signn
|
|
|
}
|
|
|
|
|
|
public function getUnSignList($sql, $uid, $limit){
|
|
|
- return $this->_sign->find(array('where' => $sql.' and status="uncheck" AND (`ownuid`='.$uid.' OR tender IN (SELECT pmid FROM jl_measure_audit WHERE auditoruid='.$uid.' GROUP BY auditoruid))', 'desc' => 'sid', 'limit' => $limit, 'asArray' => TRUE));
|
|
|
+ return $this->_sign->find(array('where' => $sql.' and status="uncheck" AND (`ownuid`='.$uid.' OR tender IN (SELECT pmid FROM jl_measure_audit WHERE auditoruid='.$uid.' GROUP BY auditoruid) OR project IN (SELECT pid FROM jl_project_measure WHERE uid='.$uid.'))', 'desc' => 'sid', 'limit' => $limit, 'asArray' => TRUE));
|
|
|
}
|
|
|
|
|
|
public function getSignList($sql, $limit){
|
|
@@ -184,7 +184,20 @@ class Signn
|
|
|
return $this->_sign->find(array('select' => 'phaseno', 'where' => $sql.' and tender=?', 'param' => array($pmid), 'groupby' => 'phaseno', 'asArray' => TRUE));
|
|
|
}
|
|
|
|
|
|
- public function delSignbysid($sid){
|
|
|
+ public function delSignbysid($sid,$status){
|
|
|
+ if($status == 'checking'){
|
|
|
+
|
|
|
+ $this->_signaudit->sid = $sid;
|
|
|
+ $this->_signaudit->delete();
|
|
|
+
|
|
|
+ $attlist = $this->getSignAttList($sid);
|
|
|
+ foreach ($attlist as $key => $value) {
|
|
|
+ $this->_signauditatt->said = $value['said'];
|
|
|
+ $this->_signauditatt->delete();
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
$this->_sign->sid = $sid;
|
|
|
$this->_sign->delete();
|
|
|
|