mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-30 13:37:45 +00:00
add new methods getDocumentsInReception() and getDocumentsInRevision()
This commit is contained in:
parent
bbcff75b00
commit
761247fe0d
|
@ -2726,6 +2726,44 @@ class SeedDMS_Core_DMS {
|
|||
return $transition;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Return all documents waiting for or in reception
|
||||
*
|
||||
* This function retrieves all documents and its version which are waiting for
|
||||
* reception
|
||||
*
|
||||
* @return object instance of {@link SeedDMS_Core_DocumentContent} or false
|
||||
*/
|
||||
function getDocumentsInReception() { /* {{{ */
|
||||
if (!$this->db->createTemporaryTable("ttreceiptid") || !$this->db->createTemporaryTable("ttcontentid")) {
|
||||
return false;
|
||||
}
|
||||
$queryStr =
|
||||
"SELECT `tblDocumentRecipients`.* FROM `tblDocumentRecipients` LEFT JOIN `ttreceiptid` ON `tblDocumentRecipients`.`receiptID` = `ttreceiptid`.`receiptID` LEFT JOIN `tblDocumentReceiptLog` ON `ttreceiptid`.`maxLogID` = `tblDocumentReceiptLog`.`receiptLogID` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion`=`tblDocumentRecipients`.`version` AND `ttcontentid`.`document`=`tblDocumentRecipients`.`documentID` WHERE `tblDocumentReceiptLog`.`status`=0 AND `ttcontentid`.`maxVersion` IS NOT NULL";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
|
||||
return $resArr;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Return all documents waiting for or in revision
|
||||
*
|
||||
* This function retrieves all documents and its version which are waiting for
|
||||
* revision or already in revision
|
||||
*
|
||||
* @return object instance of {@link SeedDMS_Core_DocumentContent} or false
|
||||
*/
|
||||
function getDocumentsInRevision() { /* {{{ */
|
||||
if (!$this->db->createTemporaryTable("ttrevisionid") || !$this->db->createTemporaryTable("ttcontentid")) {
|
||||
return false;
|
||||
}
|
||||
$queryStr =
|
||||
"SELECT `tblDocumentRevisors`.* FROM `tblDocumentRevisors` LEFT JOIN `ttrevisionid` ON `tblDocumentRevisors`.`revisionID` = `ttrevisionid`.`revisionID` LEFT JOIN `tblDocumentRevisionLog` ON `ttrevisionid`.`maxLogID` = `tblDocumentRevisionLog`.`revisionLogID` LEFT JOIN `ttcontentid` ON `ttcontentid`.`maxVersion`=`tblDocumentRevisors`.`version` AND `ttcontentid`.`document`=`tblDocumentRevisors`.`documentID` WHERE `tblDocumentRevisionLog`.`status` in (0, -3) AND `ttcontentid`.`maxVersion` IS NOT NULL";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
|
||||
return $resArr;
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Returns document content which is not linked to a document
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user