Envio temporal
This commit is contained in:
21
workflow/engine/classes/class.formBatchRouting.php
Normal file
21
workflow/engine/classes/class.formBatchRouting.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
class FormBatchRouting extends Form
|
||||
{
|
||||
public function getVars($bWhitSystemVars = true)
|
||||
{
|
||||
$aFields = array ();
|
||||
if ($bWhitSystemVars) {
|
||||
$aAux = G::getSystemConstants();
|
||||
foreach ($aAux as $sName => $sValue) {
|
||||
$aFields[] = array ("sName" => $sName, "sType" => "system");
|
||||
}
|
||||
}
|
||||
foreach ($this->fields as $k => $v) {
|
||||
if (($v->type != "title") && ($v->type != "subtitle") && ($v->type != "file") && ($v->type != "button") && ($v->type != "reset") && ($v->type != "submit") && ($v->type != "listbox") && ($v->type != "checkgroup") && ($v->type != "grid") && ($v->type != "javascript")) {
|
||||
$aFields[] = array ('sName' => trim( $k ),'sType' => trim( $v->type ));
|
||||
}
|
||||
}
|
||||
return $aFields;
|
||||
}
|
||||
}
|
||||
|
||||
43
workflow/engine/classes/class.library.php
Normal file
43
workflow/engine/classes/class.library.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
class Library
|
||||
{
|
||||
public static function getCasesNumRec($userUid)
|
||||
{
|
||||
$cnn = Propel::getConnection("workflow");
|
||||
$stmt = $cnn->createStatement();
|
||||
|
||||
//Number of records active
|
||||
$criteria = new Criteria("workflow");
|
||||
|
||||
//SELECT
|
||||
$criteria->addSelectColumn(CaseConsolidatedPeer::CON_STATUS);
|
||||
//FROM
|
||||
//WHERE
|
||||
$criteria->add(CaseConsolidatedPeer::CON_STATUS, "ACTIVE");
|
||||
|
||||
$activeNumRec = CaseConsolidatedPeer::doCount($criteria);
|
||||
|
||||
//Number of records
|
||||
$numRec = 0;
|
||||
|
||||
$sql = "SELECT COUNT(APP_CACHE_VIEW.TAS_UID) AS NUMREC
|
||||
FROM CASE_CONSOLIDATED
|
||||
LEFT JOIN APP_CACHE_VIEW ON (CASE_CONSOLIDATED.TAS_UID = APP_CACHE_VIEW.TAS_UID)
|
||||
WHERE APP_CACHE_VIEW.USR_UID = '$userUid' AND
|
||||
APP_CACHE_VIEW.DEL_THREAD_STATUS = 'OPEN' AND
|
||||
APP_CACHE_VIEW.APP_STATUS = 'TO_DO'";
|
||||
|
||||
$rsSql = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rsSql->next()) {
|
||||
$row = $rsSql->getRow();
|
||||
|
||||
$numRec = $row["NUMREC"];
|
||||
}
|
||||
|
||||
$numRec = ($activeNumRec > 0)? $numRec : 0;
|
||||
|
||||
return $numRec;
|
||||
}
|
||||
}
|
||||
|
||||
19
workflow/engine/classes/model/CaseConsolidated.php
Normal file
19
workflow/engine/classes/model/CaseConsolidated.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseCaseConsolidated.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'CASE_CONSOLIDATED' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class CaseConsolidated extends BaseCaseConsolidated {
|
||||
|
||||
} // CaseConsolidated
|
||||
23
workflow/engine/classes/model/CaseConsolidatedPeer.php
Normal file
23
workflow/engine/classes/model/CaseConsolidatedPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseCaseConsolidatedPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/CaseConsolidated.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'CASE_CONSOLIDATED' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class CaseConsolidatedPeer extends BaseCaseConsolidatedPeer {
|
||||
|
||||
} // CaseConsolidatedPeer
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'CASE_CONSOLIDATED' table to 'workflow' DatabaseMap object.
|
||||
*
|
||||
*
|
||||
*
|
||||
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package workflow.classes.model.map
|
||||
*/
|
||||
class CaseConsolidatedMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.CaseConsolidatedMapBuilder';
|
||||
|
||||
/**
|
||||
* The database map.
|
||||
*/
|
||||
private $dbMap;
|
||||
|
||||
/**
|
||||
* Tells us if this DatabaseMapBuilder is built so that we
|
||||
* don't have to re-build it every time.
|
||||
*
|
||||
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||
*/
|
||||
public function isBuilt()
|
||||
{
|
||||
return ($this->dbMap !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the databasemap this map builder built.
|
||||
*
|
||||
* @return the databasemap
|
||||
*/
|
||||
public function getDatabaseMap()
|
||||
{
|
||||
return $this->dbMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* The doBuild() method builds the DatabaseMap
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function doBuild()
|
||||
{
|
||||
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||
|
||||
$tMap = $this->dbMap->addTable('CASE_CONSOLIDATED');
|
||||
$tMap->setPhpName('CaseConsolidated');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('DYN_UID', 'DynUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('REP_TAB_UID', 'RepTabUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('CON_STATUS', 'ConStatus', 'string', CreoleTypes::VARCHAR, true, 20);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // CaseConsolidatedMapBuilder
|
||||
684
workflow/engine/classes/model/om/BaseCaseConsolidated.php
Normal file
684
workflow/engine/classes/model/om/BaseCaseConsolidated.php
Normal file
File diff suppressed because it is too large
Load Diff
582
workflow/engine/classes/model/om/BaseCaseConsolidatedPeer.php
Normal file
582
workflow/engine/classes/model/om/BaseCaseConsolidatedPeer.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1930,6 +1930,32 @@
|
||||
</vendor>
|
||||
</index>
|
||||
</table>
|
||||
<table name="CASE_CONSOLIDATED">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="CASE_CONSOLIDATED"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="18"/>
|
||||
<parameter name="Avg_row_length" value="106"/>
|
||||
<parameter name="Data_length" value="1956"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="2048"/>
|
||||
<parameter name="Data_free" value="40"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2015-16-03 11:50:00"/>
|
||||
<parameter name="Update_time" value="2015-16-03 11:50:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value=""/>
|
||||
</vendor>
|
||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
|
||||
<column name="DYN_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="REP_TAB_UID" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="CON_STATUS" type="VARCHAR" size="20" required="true" default="ACTIVE"/>
|
||||
</table>
|
||||
<table name="STAGE">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="STAGE"/>
|
||||
|
||||
@@ -880,6 +880,21 @@ CREATE TABLE `CASE_TRACKER_OBJECT`
|
||||
KEY `indexCaseTrackerObject`(`PRO_UID`, `CTO_UID_OBJ`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- CASE_CONSOLIDATED
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `CASE_CONSOLIDATED`;
|
||||
|
||||
|
||||
CREATE TABLE `CASE_CONSOLIDATED`
|
||||
(
|
||||
`TAS_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`DYN_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`REP_TAB_UID` VARCHAR(32) default '' NOT NULL,
|
||||
`CON_STATUS` VARCHAR(20) default 'ACTIVE' NOT NULL,
|
||||
PRIMARY KEY (`TAS_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- STAGE
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -29,6 +29,10 @@ $G_TMP_MENU->AddIdRawOption('FOLDERS', '', G::LoadTranslation('ID_CASES_MENU_FOL
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_START_CASE', 'casesStartPage?action=startCase',
|
||||
G::LoadTranslation('ID_NEW_CASE'), '');
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$G_TMP_MENU->AddIdRawOption('CASE_CONSOLIDATED_1', 'casesConsolidatedListExtJs?action=consolidated', 'Batch Routing', '');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_INBOX', 'casesListExtJs?action=todo', G::LoadTranslation('ID_INBOX'),
|
||||
'icon-cases-inbox.png');
|
||||
$G_TMP_MENU->AddIdRawOption('CASES_DRAFT', 'casesListExtJs?action=draft', G::LoadTranslation('ID_DRAFT'),
|
||||
|
||||
335
workflow/engine/methods/cases/casesConsolidatedListExtJs.php
Normal file
335
workflow/engine/methods/cases/casesConsolidatedListExtJs.php
Normal file
File diff suppressed because it is too large
Load Diff
953
workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
Normal file
953
workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
Normal file
File diff suppressed because it is too large
Load Diff
156
workflow/engine/src/ProcessMaker/Services/Api/Consolidated.php
Normal file
156
workflow/engine/src/ProcessMaker/Services/Api/Consolidated.php
Normal file
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Services\Api;
|
||||
|
||||
use \ProcessMaker\Services\Api;
|
||||
use \Luracast\Restler\RestException;
|
||||
|
||||
|
||||
/**
|
||||
* Consolidated Api Controller
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @protected
|
||||
*/
|
||||
class Consolidated extends Api
|
||||
{
|
||||
/**
|
||||
* Get Consolidated
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /:tas_uid
|
||||
*/
|
||||
public function doGet($tas_uid)
|
||||
{
|
||||
try {
|
||||
$consolidated = new \ProcessMaker\BusinessModel\Consolidated();
|
||||
return $consolidated->get($tas_uid);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Post Consolidated
|
||||
*
|
||||
* @param array $request_data
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
*/
|
||||
public function doPost($request_data)
|
||||
{
|
||||
try {
|
||||
$consolidated = new \ProcessMaker\BusinessModel\Consolidated();
|
||||
return $consolidated->post($request_data);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get for Generate Consolidated
|
||||
*
|
||||
* @param string $pro_uid {@min 1} {@max 32}
|
||||
* @param string $tas_uid {@min 1} {@max 32}
|
||||
* @param string $dyn_uid {@min 1} {@max 32}
|
||||
* @return string
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /generate/:pro_uid/:tas_uid/:dyn_uid
|
||||
*/
|
||||
public function doGetGenerateConsolidated($pro_uid, $tas_uid, $dyn_uid)
|
||||
{
|
||||
try {
|
||||
$consolidated = new \ProcessMaker\BusinessModel\Consolidated();
|
||||
return $consolidated->getDataGenerate($pro_uid, $tas_uid, $dyn_uid);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Cases Consolidated
|
||||
*
|
||||
* @param string $tas_uid {@min 1} {@max 32}
|
||||
* @param string $dyn_uid {@min 1} {@max 32}
|
||||
* @param string $pro_uid {@min 1} {@max 32}
|
||||
* @param string $start {@from path}
|
||||
* @param string $limit {@from path}
|
||||
* @param string $search {@from path}
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url GET /cases/:tas_uid/:dyn_uid/:pro_uid
|
||||
*/
|
||||
public function doGetCasesConsolidated($tas_uid, $dyn_uid, $pro_uid, $start = '', $limit = '', $search = '')
|
||||
{
|
||||
try {
|
||||
$usr_uid = $this->getUserId();
|
||||
$consolidated = new \ProcessMaker\BusinessModel\Consolidated();
|
||||
$consolidated->getDataGrid($tas_uid, $dyn_uid, $pro_uid, $usr_uid, $start, $limit, $search);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Cases Consolidated
|
||||
*
|
||||
* @param string $tas_uid {@min 1} {@max 32}
|
||||
* @param string $dyn_uid {@min 1} {@max 32}
|
||||
* @param string $pro_uid {@min 1} {@max 32}
|
||||
* @param array $request_data
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url PUT /cases/:tas_uid/:dyn_uid/:pro_uid
|
||||
*/
|
||||
public function doPutCasesConsolidated($tas_uid, $dyn_uid, $pro_uid, $request_data)
|
||||
{
|
||||
try {
|
||||
$usr_uid = $this->getUserId();
|
||||
$consolidated = new \ProcessMaker\BusinessModel\Consolidated();
|
||||
return $consolidated->putDataGrid($tas_uid, $dyn_uid, $pro_uid, $usr_uid, $request_data);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Post Derivate
|
||||
*
|
||||
* @param string $app_uid {@min 1} {@max 32}
|
||||
* @param string $app_number
|
||||
* @param string $del_index
|
||||
* @return array
|
||||
*
|
||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||
* @copyright Colosa - Bolivia
|
||||
*
|
||||
* @url POST /derivate/:app_uid/:app_number/:del_index
|
||||
*/
|
||||
public function doPostDerivate($app_uid, $app_number, $del_index)
|
||||
{
|
||||
try {
|
||||
$usr_uid = $this->getUserId();
|
||||
$consolidated = new \ProcessMaker\BusinessModel\Consolidated();
|
||||
return $consolidated->postDerivate($app_uid, $app_number, $del_index, $usr_uid);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,4 +99,7 @@ debug = 1
|
||||
email = "ProcessMaker\Services\Api\EmailServer"
|
||||
|
||||
[alias: light]
|
||||
light = "ProcessMaker\Services\Api\Light"
|
||||
light = "ProcessMaker\Services\Api\Light"
|
||||
|
||||
[alias: consolidated]
|
||||
list = "ProcessMaker\Services\Api\Consolidated"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<div id="toolTipTab" style="display: none; position: absolute; z-index: 5000; border: 1px solid #A6A6A6; padding: 0.20em; background: #F1F1F1; color: #3E3E3E; font: normal 12px helvetica, arial, verdana, sans-serif;"></div>
|
||||
<div id="cases-grid"></div>
|
||||
|
||||
1100
workflow/engine/templates/cases/casesListConsolidated.js
Normal file
1100
workflow/engine/templates/cases/casesListConsolidated.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user