Merged in marcoAntonioNina/processmaker/dashboards2 (pull request #1835)
Improvement file appDelegation
This commit is contained in:
@@ -153,8 +153,6 @@ class AppDelegation extends BaseAppDelegation
|
||||
if ($this->validate()) {
|
||||
try {
|
||||
$res = $this->save();
|
||||
$inbox = new ListInbox();
|
||||
$inbox->newRow($this->toArray(BasePeer::TYPE_FIELDNAME), $delPreviusUsrUid);
|
||||
} catch (PropelException $e) {
|
||||
throw ($e);
|
||||
}
|
||||
@@ -483,7 +481,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
$calData = $calendar->getCalendarData();
|
||||
|
||||
//Recalculating DueDate with the user calendar if it exist. It allways will take the derivation date like initial date.
|
||||
$iDueDate = $calendar->dashCalculateDate($row['DEL_DELEGATE_DATE'], $fTaskDuration, $fTaskDurationUnit, $calData);
|
||||
$iDueDate = $calendar->dashCalculateDate($row['DEL_DELEGATE_DATE'], $fTaskDuration, $fTaskDurationUnit, $calData);
|
||||
|
||||
//if the task is not started
|
||||
if ($isStarted == 0) {
|
||||
@@ -497,8 +495,8 @@ class AppDelegation extends BaseAppDelegation
|
||||
$oAppDel->setDelQueueDuration( $queueDuration );
|
||||
|
||||
//we are putting negative number if the task is not delayed, and positive number for the time the task is delayed
|
||||
//$delayDuration = $this->getDiffDate( $now, $iDueDate );
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, date("Y-m-d H:i:s"), $calData );
|
||||
//$delayDuration = $this->getDiffDate( $now, $iDueDate );
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, date("Y-m-d H:i:s"), $calData );
|
||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
||||
$oAppDel->setDelDelayDuration( $delayDuration );
|
||||
if ($fTaskDuration != 0) {
|
||||
@@ -528,7 +526,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
if ($dueDate < $finishDate) {
|
||||
$oAppDel->setDelDelayed( 1 );
|
||||
//$delayDuration = $this->getDiffDate( $iFinishDate, $iDueDate );
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, $row['DEL_FINISH_DATE'], $calData );
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, $row['DEL_FINISH_DATE'], $calData );
|
||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
||||
} else {
|
||||
$oAppDel->setDelDelayed( 0 );
|
||||
@@ -540,9 +538,9 @@ class AppDelegation extends BaseAppDelegation
|
||||
if ($row['DEL_INIT_DATE'] != null && $row['DEL_INIT_DATE'] != '') {
|
||||
//$delDuration = $this->getDiffDate( $now, $iInitDate );
|
||||
$delDuration = $calendar->dashCalculateDurationWithCalendar($row['DEL_INIT_DATE'], date("Y-m-d H:i:s"), $calData );//by jen
|
||||
$delDuration = $delDuration / (24 * 60 * 60); //Saving the delDuration in days. The calculateDurationSLA func returns mins.
|
||||
$delDuration = $delDuration / (24 * 60 * 60); //Saving the delDuration in days. The calculateDurationSLA func returns mins.
|
||||
} else {
|
||||
//$delDuration = $this->getDiffDate( $now, $iDelegateDate );
|
||||
//$delDuration = $this->getDiffDate( $now, $iDelegateDate );
|
||||
$delDuration = $calendar->dashCalculateDurationWithCalendar($row['DEL_DELEGATE_DATE'], date("Y-m-d H:i:s"), $calData ); //byJen
|
||||
$delDuration = $delDuration / (24 * 60 * 60); //Saving the delDuration in days. The calculateDurationSLA func returns mins.
|
||||
}
|
||||
@@ -550,7 +548,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
|
||||
//we are putting negative number if the task is not delayed, and positive number for the time the task is delayed
|
||||
//$delayDuration = $this->getDiffDate( $now, $iDueDate );
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, date("Y-m-d H:i:s"), $calData );
|
||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $iDueDate, date("Y-m-d H:i:s"), $calData );
|
||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
||||
$oAppDel->setDelDelayDuration( $delayDuration );
|
||||
if ($fTaskDuration != 0) {
|
||||
|
||||
@@ -1,108 +1,108 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'APPLICATION' 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 ApplicationMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ApplicationMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('APPLICATION');
|
||||
$tMap->setPhpName('Application');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_PARENT', 'AppParent', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_PROC_STATUS', 'AppProcStatus', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('APP_PROC_CODE', 'AppProcCode', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('APP_PARALLEL', 'AppParallel', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_INIT_USER', 'AppInitUser', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_CUR_USER', 'AppCurUser', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_CREATE_DATE', 'AppCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_INIT_DATE', 'AppInitDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('APP_UPDATE_DATE', 'AppUpdateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_DATA', 'AppData', 'string', CreoleTypes::LONGVARCHAR, true, null);
|
||||
|
||||
$tMap->addColumn('APP_PIN', 'AppPin', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_DURATION', 'AppDuration', 'double', CreoleTypes::DOUBLE, false, null);
|
||||
|
||||
$tMap->addColumn('APP_DELAY_DURATION', 'AppDelayDuration', 'double', CreoleTypes::DOUBLE, false, null);
|
||||
|
||||
$tMap->addValidator('APP_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'DRAFT|TO_DO|PAUSED|COMPLETED|CANCELLED', 'Please select a valid status.');
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ApplicationMapBuilder
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'APPLICATION' 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 ApplicationMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.ApplicationMapBuilder';
|
||||
|
||||
/**
|
||||
* 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('APPLICATION');
|
||||
$tMap->setPhpName('Application');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, true, null);
|
||||
|
||||
$tMap->addColumn('APP_PARENT', 'AppParent', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_PROC_STATUS', 'AppProcStatus', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('APP_PROC_CODE', 'AppProcCode', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('APP_PARALLEL', 'AppParallel', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_INIT_USER', 'AppInitUser', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_CUR_USER', 'AppCurUser', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_CREATE_DATE', 'AppCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_INIT_DATE', 'AppInitDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_FINISH_DATE', 'AppFinishDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
$tMap->addColumn('APP_UPDATE_DATE', 'AppUpdateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APP_DATA', 'AppData', 'string', CreoleTypes::LONGVARCHAR, true, null);
|
||||
|
||||
$tMap->addColumn('APP_PIN', 'AppPin', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APP_DURATION', 'AppDuration', 'double', CreoleTypes::DOUBLE, false, null);
|
||||
|
||||
$tMap->addColumn('APP_DELAY_DURATION', 'AppDelayDuration', 'double', CreoleTypes::DOUBLE, false, null);
|
||||
|
||||
$tMap->addValidator('APP_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'DRAFT|TO_DO|PAUSED|COMPLETED|CANCELLED', 'Please select a valid status.');
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // ApplicationMapBuilder
|
||||
|
||||
@@ -130,9 +130,9 @@ class UsersMapBuilder
|
||||
$tMap->addColumn('USR_TOTAL_COMPLETED', 'UsrTotalCompleted', 'int', CreoleTypes::INTEGER, false, null);
|
||||
|
||||
$tMap->addColumn('USR_TOTAL_UNASSIGNED', 'UsrTotalUnassigned', 'int', CreoleTypes::INTEGER, false, null);
|
||||
|
||||
$tMap->addColumn('USR_COST_BY_HOUR', 'UsrCostByHour', 'double', CreoleTypes::DOUBLE, false, 11,2);
|
||||
|
||||
|
||||
$tMap->addColumn('USR_COST_BY_HOUR', 'UsrCostByHour', 'double', CreoleTypes::DOUBLE, false, 11,2);
|
||||
|
||||
$tMap->addColumn('USR_UNIT_COST', 'UsrUnitCost', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||
|
||||
$tMap->addValidator('USR_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|VACATION|CLOSED', 'Please select a valid type.');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -183,17 +183,6 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $usr_ux = 'NORMAL';
|
||||
|
||||
/**
|
||||
* The value for the usr_cost_by_hour field.
|
||||
* @var double
|
||||
*/
|
||||
protected $usr_cost_by_hour = 0;
|
||||
|
||||
/**
|
||||
* The value for the usr_unit_cost field.
|
||||
* @var string
|
||||
*/
|
||||
protected $usr_unit_cost = '';
|
||||
/**
|
||||
* The value for the usr_total_inbox field.
|
||||
* @var int
|
||||
@@ -236,6 +225,18 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $usr_total_unassigned = 0;
|
||||
|
||||
/**
|
||||
* The value for the usr_cost_by_hour field.
|
||||
* @var double
|
||||
*/
|
||||
protected $usr_cost_by_hour = 0;
|
||||
|
||||
/**
|
||||
* The value for the usr_unit_cost field.
|
||||
* @var string
|
||||
*/
|
||||
protected $usr_unit_cost = '';
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -619,28 +620,6 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
|
||||
return $this->usr_ux;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [usr_cost_by_hour] column value.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public function getUsrCostByHour()
|
||||
{
|
||||
|
||||
return $this->usr_cost_by_hour;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [usr_unit_cost] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUsrUnitCost()
|
||||
{
|
||||
|
||||
return $this->usr_unit_cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [usr_total_inbox] column value.
|
||||
@@ -719,6 +698,28 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
return $this->usr_total_unassigned;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [usr_cost_by_hour] column value.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public function getUsrCostByHour()
|
||||
{
|
||||
|
||||
return $this->usr_cost_by_hour;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [usr_unit_cost] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUsrUnitCost()
|
||||
{
|
||||
|
||||
return $this->usr_unit_cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [usr_uid] column.
|
||||
*
|
||||
@@ -1319,44 +1320,6 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
|
||||
} // setUsrUx()
|
||||
|
||||
/**
|
||||
* Set the value of [usr_cost_by_hour] column.
|
||||
*
|
||||
* @param double $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setUsrCostByHour($v)
|
||||
{
|
||||
|
||||
if ($this->usr_cost_by_hour !== $v || $v === 0) {
|
||||
$this->usr_cost_by_hour = $v;
|
||||
$this->modifiedColumns[] = UsersPeer::USR_COST_BY_HOUR;
|
||||
}
|
||||
|
||||
} // setUsrCostByHour()
|
||||
|
||||
/**
|
||||
* Set the value of [usr_unit_cost] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setUsrUnitCost($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->usr_unit_cost !== $v || $v === '') {
|
||||
$this->usr_unit_cost = $v;
|
||||
$this->modifiedColumns[] = UsersPeer::USR_UNIT_COST;
|
||||
}
|
||||
|
||||
} // setUsrUnitCost()
|
||||
|
||||
/**
|
||||
* Set the value of [usr_total_inbox] column.
|
||||
*
|
||||
@@ -1511,6 +1474,44 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
|
||||
} // setUsrTotalUnassigned()
|
||||
|
||||
/**
|
||||
* Set the value of [usr_cost_by_hour] column.
|
||||
*
|
||||
* @param double $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setUsrCostByHour($v)
|
||||
{
|
||||
|
||||
if ($this->usr_cost_by_hour !== $v || $v === 0) {
|
||||
$this->usr_cost_by_hour = $v;
|
||||
$this->modifiedColumns[] = UsersPeer::USR_COST_BY_HOUR;
|
||||
}
|
||||
|
||||
} // setUsrCostByHour()
|
||||
|
||||
/**
|
||||
* Set the value of [usr_unit_cost] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setUsrUnitCost($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->usr_unit_cost !== $v || $v === '') {
|
||||
$this->usr_unit_cost = $v;
|
||||
$this->modifiedColumns[] = UsersPeer::USR_UNIT_COST;
|
||||
}
|
||||
|
||||
} // setUsrUnitCost()
|
||||
|
||||
/**
|
||||
* Hydrates (populates) the object variables with values from the database resultset.
|
||||
*
|
||||
@@ -1580,10 +1581,6 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
|
||||
$this->usr_ux = $rs->getString($startcol + 25);
|
||||
|
||||
$this->usr_cost_by_hour = $rs->getFloat($startcol + 26);
|
||||
|
||||
$this->usr_unit_cost = $rs->getString($startcol + 27);
|
||||
|
||||
$this->usr_total_inbox = $rs->getInt($startcol + 26);
|
||||
|
||||
$this->usr_total_draft = $rs->getInt($startcol + 27);
|
||||
@@ -1598,6 +1595,10 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
|
||||
$this->usr_total_unassigned = $rs->getInt($startcol + 32);
|
||||
|
||||
$this->usr_cost_by_hour = $rs->getFloat($startcol + 33);
|
||||
|
||||
$this->usr_unit_cost = $rs->getString($startcol + 34);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
@@ -1906,10 +1907,10 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
case 32:
|
||||
return $this->getUsrTotalUnassigned();
|
||||
break;
|
||||
case 33:
|
||||
return $this->getUsrCostByHour();
|
||||
break;
|
||||
case 34:
|
||||
case 33:
|
||||
return $this->getUsrCostByHour();
|
||||
break;
|
||||
case 34:
|
||||
return $this->getUsrUnitCost();
|
||||
break;
|
||||
default:
|
||||
@@ -1965,8 +1966,8 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
$keys[30] => $this->getUsrTotalPaused(),
|
||||
$keys[31] => $this->getUsrTotalCompleted(),
|
||||
$keys[32] => $this->getUsrTotalUnassigned(),
|
||||
$keys[33] => $this->getUsrCostByHour(),
|
||||
$keys[34] => $this->getUsrUnitCost(),
|
||||
$keys[33] => $this->getUsrCostByHour(),
|
||||
$keys[34] => $this->getUsrUnitCost(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -2097,10 +2098,10 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
case 32:
|
||||
$this->setUsrTotalUnassigned($value);
|
||||
break;
|
||||
case 26:
|
||||
$this->setUsrCostByHour($value);
|
||||
break;
|
||||
case 27:
|
||||
case 33:
|
||||
$this->setUsrCostByHour($value);
|
||||
break;
|
||||
case 34:
|
||||
$this->setUsrUnitCost($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -2258,12 +2259,12 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
$this->setUsrTotalUnassigned($arr[$keys[32]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[33], $arr)) {
|
||||
$this->setUsrCostByHour($arr[$keys[26]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[34], $arr)) {
|
||||
$this->setUsrUnitCost($arr[$keys[27]]);
|
||||
if (array_key_exists($keys[33], $arr)) {
|
||||
$this->setUsrCostByHour($arr[$keys[33]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[34], $arr)) {
|
||||
$this->setUsrUnitCost($arr[$keys[34]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2409,14 +2410,15 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
$criteria->add(UsersPeer::USR_TOTAL_UNASSIGNED, $this->usr_total_unassigned);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(UsersPeer::USR_COST_BY_HOUR)) {
|
||||
$criteria->add(UsersPeer::USR_COST_BY_HOUR, $this->usr_cost_by_hour);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(UsersPeer::USR_UNIT_COST)) {
|
||||
$criteria->add(UsersPeer::USR_UNIT_COST, $this->usr_unit_cost);
|
||||
if ($this->isColumnModified(UsersPeer::USR_COST_BY_HOUR)) {
|
||||
$criteria->add(UsersPeer::USR_COST_BY_HOUR, $this->usr_cost_by_hour);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(UsersPeer::USR_UNIT_COST)) {
|
||||
$criteria->add(UsersPeer::USR_UNIT_COST, $this->usr_unit_cost);
|
||||
}
|
||||
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
@@ -2533,11 +2535,12 @@ abstract class BaseUsers extends BaseObject implements Persistent
|
||||
$copyObj->setUsrTotalCompleted($this->usr_total_completed);
|
||||
|
||||
$copyObj->setUsrTotalUnassigned($this->usr_total_unassigned);
|
||||
|
||||
$copyObj->setUsrCostByHour($this->usr_cost_by_hour);
|
||||
|
||||
|
||||
$copyObj->setUsrCostByHour($this->usr_cost_by_hour);
|
||||
|
||||
$copyObj->setUsrUnitCost($this->usr_unit_cost);
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setUsrUid(''); // this is a pkey column, so set to default value
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseUsersPeer
|
||||
const CLASS_DEFAULT = 'classes.model.Users';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 33;
|
||||
const NUM_COLUMNS = 35;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -130,6 +130,12 @@ abstract class BaseUsersPeer
|
||||
/** the column name for the USR_TOTAL_UNASSIGNED field */
|
||||
const USR_TOTAL_UNASSIGNED = 'USERS.USR_TOTAL_UNASSIGNED';
|
||||
|
||||
/** the column name for the USR_COST_BY_HOUR field */
|
||||
const USR_COST_BY_HOUR = 'USERS.USR_COST_BY_HOUR';
|
||||
|
||||
/** the column name for the USR_UNIT_COST field */
|
||||
const USR_UNIT_COST = 'USERS.USR_UNIT_COST';
|
||||
|
||||
/** The PHP to DB Name Mapping */
|
||||
private static $phpNameMap = null;
|
||||
|
||||
@@ -141,10 +147,10 @@ abstract class BaseUsersPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('UsrUid', 'UsrUsername', 'UsrPassword', 'UsrFirstname', 'UsrLastname', 'UsrEmail', 'UsrDueDate', 'UsrCreateDate', 'UsrUpdateDate', 'UsrStatus', 'UsrCountry', 'UsrCity', 'UsrLocation', 'UsrAddress', 'UsrPhone', 'UsrFax', 'UsrCellular', 'UsrZipCode', 'DepUid', 'UsrPosition', 'UsrResume', 'UsrBirthday', 'UsrRole', 'UsrReportsTo', 'UsrReplacedBy', 'UsrUx', 'UsrTotalInbox', 'UsrTotalDraft', 'UsrTotalCancelled', 'UsrTotalParticipated', 'UsrTotalPaused', 'UsrTotalCompleted', 'UsrTotalUnassigned', ),
|
||||
BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID, UsersPeer::USR_USERNAME, UsersPeer::USR_PASSWORD, UsersPeer::USR_FIRSTNAME, UsersPeer::USR_LASTNAME, UsersPeer::USR_EMAIL, UsersPeer::USR_DUE_DATE, UsersPeer::USR_CREATE_DATE, UsersPeer::USR_UPDATE_DATE, UsersPeer::USR_STATUS, UsersPeer::USR_COUNTRY, UsersPeer::USR_CITY, UsersPeer::USR_LOCATION, UsersPeer::USR_ADDRESS, UsersPeer::USR_PHONE, UsersPeer::USR_FAX, UsersPeer::USR_CELLULAR, UsersPeer::USR_ZIP_CODE, UsersPeer::DEP_UID, UsersPeer::USR_POSITION, UsersPeer::USR_RESUME, UsersPeer::USR_BIRTHDAY, UsersPeer::USR_ROLE, UsersPeer::USR_REPORTS_TO, UsersPeer::USR_REPLACED_BY, UsersPeer::USR_UX, UsersPeer::USR_TOTAL_INBOX, UsersPeer::USR_TOTAL_DRAFT, UsersPeer::USR_TOTAL_CANCELLED, UsersPeer::USR_TOTAL_PARTICIPATED, UsersPeer::USR_TOTAL_PAUSED, UsersPeer::USR_TOTAL_COMPLETED, UsersPeer::USR_TOTAL_UNASSIGNED, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'USR_USERNAME', 'USR_PASSWORD', 'USR_FIRSTNAME', 'USR_LASTNAME', 'USR_EMAIL', 'USR_DUE_DATE', 'USR_CREATE_DATE', 'USR_UPDATE_DATE', 'USR_STATUS', 'USR_COUNTRY', 'USR_CITY', 'USR_LOCATION', 'USR_ADDRESS', 'USR_PHONE', 'USR_FAX', 'USR_CELLULAR', 'USR_ZIP_CODE', 'DEP_UID', 'USR_POSITION', 'USR_RESUME', 'USR_BIRTHDAY', 'USR_ROLE', 'USR_REPORTS_TO', 'USR_REPLACED_BY', 'USR_UX', 'USR_TOTAL_INBOX', 'USR_TOTAL_DRAFT', 'USR_TOTAL_CANCELLED', 'USR_TOTAL_PARTICIPATED', 'USR_TOTAL_PAUSED', 'USR_TOTAL_COMPLETED', 'USR_TOTAL_UNASSIGNED', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, )
|
||||
BasePeer::TYPE_PHPNAME => array ('UsrUid', 'UsrUsername', 'UsrPassword', 'UsrFirstname', 'UsrLastname', 'UsrEmail', 'UsrDueDate', 'UsrCreateDate', 'UsrUpdateDate', 'UsrStatus', 'UsrCountry', 'UsrCity', 'UsrLocation', 'UsrAddress', 'UsrPhone', 'UsrFax', 'UsrCellular', 'UsrZipCode', 'DepUid', 'UsrPosition', 'UsrResume', 'UsrBirthday', 'UsrRole', 'UsrReportsTo', 'UsrReplacedBy', 'UsrUx', 'UsrTotalInbox', 'UsrTotalDraft', 'UsrTotalCancelled', 'UsrTotalParticipated', 'UsrTotalPaused', 'UsrTotalCompleted', 'UsrTotalUnassigned', 'UsrCostByHour', 'UsrUnitCost', ),
|
||||
BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID, UsersPeer::USR_USERNAME, UsersPeer::USR_PASSWORD, UsersPeer::USR_FIRSTNAME, UsersPeer::USR_LASTNAME, UsersPeer::USR_EMAIL, UsersPeer::USR_DUE_DATE, UsersPeer::USR_CREATE_DATE, UsersPeer::USR_UPDATE_DATE, UsersPeer::USR_STATUS, UsersPeer::USR_COUNTRY, UsersPeer::USR_CITY, UsersPeer::USR_LOCATION, UsersPeer::USR_ADDRESS, UsersPeer::USR_PHONE, UsersPeer::USR_FAX, UsersPeer::USR_CELLULAR, UsersPeer::USR_ZIP_CODE, UsersPeer::DEP_UID, UsersPeer::USR_POSITION, UsersPeer::USR_RESUME, UsersPeer::USR_BIRTHDAY, UsersPeer::USR_ROLE, UsersPeer::USR_REPORTS_TO, UsersPeer::USR_REPLACED_BY, UsersPeer::USR_UX, UsersPeer::USR_TOTAL_INBOX, UsersPeer::USR_TOTAL_DRAFT, UsersPeer::USR_TOTAL_CANCELLED, UsersPeer::USR_TOTAL_PARTICIPATED, UsersPeer::USR_TOTAL_PAUSED, UsersPeer::USR_TOTAL_COMPLETED, UsersPeer::USR_TOTAL_UNASSIGNED, UsersPeer::USR_COST_BY_HOUR, UsersPeer::USR_UNIT_COST, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('USR_UID', 'USR_USERNAME', 'USR_PASSWORD', 'USR_FIRSTNAME', 'USR_LASTNAME', 'USR_EMAIL', 'USR_DUE_DATE', 'USR_CREATE_DATE', 'USR_UPDATE_DATE', 'USR_STATUS', 'USR_COUNTRY', 'USR_CITY', 'USR_LOCATION', 'USR_ADDRESS', 'USR_PHONE', 'USR_FAX', 'USR_CELLULAR', 'USR_ZIP_CODE', 'DEP_UID', 'USR_POSITION', 'USR_RESUME', 'USR_BIRTHDAY', 'USR_ROLE', 'USR_REPORTS_TO', 'USR_REPLACED_BY', 'USR_UX', 'USR_TOTAL_INBOX', 'USR_TOTAL_DRAFT', 'USR_TOTAL_CANCELLED', 'USR_TOTAL_PARTICIPATED', 'USR_TOTAL_PAUSED', 'USR_TOTAL_COMPLETED', 'USR_TOTAL_UNASSIGNED', 'USR_COST_BY_HOUR', 'USR_UNIT_COST', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -154,10 +160,10 @@ abstract class BaseUsersPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'UsrUsername' => 1, 'UsrPassword' => 2, 'UsrFirstname' => 3, 'UsrLastname' => 4, 'UsrEmail' => 5, 'UsrDueDate' => 6, 'UsrCreateDate' => 7, 'UsrUpdateDate' => 8, 'UsrStatus' => 9, 'UsrCountry' => 10, 'UsrCity' => 11, 'UsrLocation' => 12, 'UsrAddress' => 13, 'UsrPhone' => 14, 'UsrFax' => 15, 'UsrCellular' => 16, 'UsrZipCode' => 17, 'DepUid' => 18, 'UsrPosition' => 19, 'UsrResume' => 20, 'UsrBirthday' => 21, 'UsrRole' => 22, 'UsrReportsTo' => 23, 'UsrReplacedBy' => 24, 'UsrUx' => 25, 'UsrTotalInbox' => 26, 'UsrTotalDraft' => 27, 'UsrTotalCancelled' => 28, 'UsrTotalParticipated' => 29, 'UsrTotalPaused' => 30, 'UsrTotalCompleted' => 31, 'UsrTotalUnassigned' => 32, ),
|
||||
BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID => 0, UsersPeer::USR_USERNAME => 1, UsersPeer::USR_PASSWORD => 2, UsersPeer::USR_FIRSTNAME => 3, UsersPeer::USR_LASTNAME => 4, UsersPeer::USR_EMAIL => 5, UsersPeer::USR_DUE_DATE => 6, UsersPeer::USR_CREATE_DATE => 7, UsersPeer::USR_UPDATE_DATE => 8, UsersPeer::USR_STATUS => 9, UsersPeer::USR_COUNTRY => 10, UsersPeer::USR_CITY => 11, UsersPeer::USR_LOCATION => 12, UsersPeer::USR_ADDRESS => 13, UsersPeer::USR_PHONE => 14, UsersPeer::USR_FAX => 15, UsersPeer::USR_CELLULAR => 16, UsersPeer::USR_ZIP_CODE => 17, UsersPeer::DEP_UID => 18, UsersPeer::USR_POSITION => 19, UsersPeer::USR_RESUME => 20, UsersPeer::USR_BIRTHDAY => 21, UsersPeer::USR_ROLE => 22, UsersPeer::USR_REPORTS_TO => 23, UsersPeer::USR_REPLACED_BY => 24, UsersPeer::USR_UX => 25, UsersPeer::USR_TOTAL_INBOX => 26, UsersPeer::USR_TOTAL_DRAFT => 27, UsersPeer::USR_TOTAL_CANCELLED => 28, UsersPeer::USR_TOTAL_PARTICIPATED => 29, UsersPeer::USR_TOTAL_PAUSED => 30, UsersPeer::USR_TOTAL_COMPLETED => 31, UsersPeer::USR_TOTAL_UNASSIGNED => 32, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'USR_USERNAME' => 1, 'USR_PASSWORD' => 2, 'USR_FIRSTNAME' => 3, 'USR_LASTNAME' => 4, 'USR_EMAIL' => 5, 'USR_DUE_DATE' => 6, 'USR_CREATE_DATE' => 7, 'USR_UPDATE_DATE' => 8, 'USR_STATUS' => 9, 'USR_COUNTRY' => 10, 'USR_CITY' => 11, 'USR_LOCATION' => 12, 'USR_ADDRESS' => 13, 'USR_PHONE' => 14, 'USR_FAX' => 15, 'USR_CELLULAR' => 16, 'USR_ZIP_CODE' => 17, 'DEP_UID' => 18, 'USR_POSITION' => 19, 'USR_RESUME' => 20, 'USR_BIRTHDAY' => 21, 'USR_ROLE' => 22, 'USR_REPORTS_TO' => 23, 'USR_REPLACED_BY' => 24, 'USR_UX' => 25, 'USR_TOTAL_INBOX' => 26, 'USR_TOTAL_DRAFT' => 27, 'USR_TOTAL_CANCELLED' => 28, 'USR_TOTAL_PARTICIPATED' => 29, 'USR_TOTAL_PAUSED' => 30, 'USR_TOTAL_COMPLETED' => 31, 'USR_TOTAL_UNASSIGNED' => 32, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, )
|
||||
BasePeer::TYPE_PHPNAME => array ('UsrUid' => 0, 'UsrUsername' => 1, 'UsrPassword' => 2, 'UsrFirstname' => 3, 'UsrLastname' => 4, 'UsrEmail' => 5, 'UsrDueDate' => 6, 'UsrCreateDate' => 7, 'UsrUpdateDate' => 8, 'UsrStatus' => 9, 'UsrCountry' => 10, 'UsrCity' => 11, 'UsrLocation' => 12, 'UsrAddress' => 13, 'UsrPhone' => 14, 'UsrFax' => 15, 'UsrCellular' => 16, 'UsrZipCode' => 17, 'DepUid' => 18, 'UsrPosition' => 19, 'UsrResume' => 20, 'UsrBirthday' => 21, 'UsrRole' => 22, 'UsrReportsTo' => 23, 'UsrReplacedBy' => 24, 'UsrUx' => 25, 'UsrTotalInbox' => 26, 'UsrTotalDraft' => 27, 'UsrTotalCancelled' => 28, 'UsrTotalParticipated' => 29, 'UsrTotalPaused' => 30, 'UsrTotalCompleted' => 31, 'UsrTotalUnassigned' => 32, 'UsrCostByHour' => 33, 'UsrUnitCost' => 34, ),
|
||||
BasePeer::TYPE_COLNAME => array (UsersPeer::USR_UID => 0, UsersPeer::USR_USERNAME => 1, UsersPeer::USR_PASSWORD => 2, UsersPeer::USR_FIRSTNAME => 3, UsersPeer::USR_LASTNAME => 4, UsersPeer::USR_EMAIL => 5, UsersPeer::USR_DUE_DATE => 6, UsersPeer::USR_CREATE_DATE => 7, UsersPeer::USR_UPDATE_DATE => 8, UsersPeer::USR_STATUS => 9, UsersPeer::USR_COUNTRY => 10, UsersPeer::USR_CITY => 11, UsersPeer::USR_LOCATION => 12, UsersPeer::USR_ADDRESS => 13, UsersPeer::USR_PHONE => 14, UsersPeer::USR_FAX => 15, UsersPeer::USR_CELLULAR => 16, UsersPeer::USR_ZIP_CODE => 17, UsersPeer::DEP_UID => 18, UsersPeer::USR_POSITION => 19, UsersPeer::USR_RESUME => 20, UsersPeer::USR_BIRTHDAY => 21, UsersPeer::USR_ROLE => 22, UsersPeer::USR_REPORTS_TO => 23, UsersPeer::USR_REPLACED_BY => 24, UsersPeer::USR_UX => 25, UsersPeer::USR_TOTAL_INBOX => 26, UsersPeer::USR_TOTAL_DRAFT => 27, UsersPeer::USR_TOTAL_CANCELLED => 28, UsersPeer::USR_TOTAL_PARTICIPATED => 29, UsersPeer::USR_TOTAL_PAUSED => 30, UsersPeer::USR_TOTAL_COMPLETED => 31, UsersPeer::USR_TOTAL_UNASSIGNED => 32, UsersPeer::USR_COST_BY_HOUR => 33, UsersPeer::USR_UNIT_COST => 34, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('USR_UID' => 0, 'USR_USERNAME' => 1, 'USR_PASSWORD' => 2, 'USR_FIRSTNAME' => 3, 'USR_LASTNAME' => 4, 'USR_EMAIL' => 5, 'USR_DUE_DATE' => 6, 'USR_CREATE_DATE' => 7, 'USR_UPDATE_DATE' => 8, 'USR_STATUS' => 9, 'USR_COUNTRY' => 10, 'USR_CITY' => 11, 'USR_LOCATION' => 12, 'USR_ADDRESS' => 13, 'USR_PHONE' => 14, 'USR_FAX' => 15, 'USR_CELLULAR' => 16, 'USR_ZIP_CODE' => 17, 'DEP_UID' => 18, 'USR_POSITION' => 19, 'USR_RESUME' => 20, 'USR_BIRTHDAY' => 21, 'USR_ROLE' => 22, 'USR_REPORTS_TO' => 23, 'USR_REPLACED_BY' => 24, 'USR_UX' => 25, 'USR_TOTAL_INBOX' => 26, 'USR_TOTAL_DRAFT' => 27, 'USR_TOTAL_CANCELLED' => 28, 'USR_TOTAL_PARTICIPATED' => 29, 'USR_TOTAL_PAUSED' => 30, 'USR_TOTAL_COMPLETED' => 31, 'USR_TOTAL_UNASSIGNED' => 32, 'USR_COST_BY_HOUR' => 33, 'USR_UNIT_COST' => 34, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -324,6 +330,10 @@ abstract class BaseUsersPeer
|
||||
|
||||
$criteria->addSelectColumn(UsersPeer::USR_TOTAL_UNASSIGNED);
|
||||
|
||||
$criteria->addSelectColumn(UsersPeer::USR_COST_BY_HOUR);
|
||||
|
||||
$criteria->addSelectColumn(UsersPeer::USR_UNIT_COST);
|
||||
|
||||
}
|
||||
|
||||
const COUNT = 'COUNT(USERS.USR_UID)';
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
<column name="APP_UPDATE_DATE" type="TIMESTAMP" required="true"/>
|
||||
<column name="APP_DATA" type="LONGVARCHAR" required="true"/>
|
||||
<column name="APP_PIN" type="VARCHAR" size="32" required="true" default=""/>
|
||||
<column name="APP_DURATION" type="DOUBLE" default="0"/>
|
||||
<column name="APP_DELAY_DURATION" type="DOUBLE" default="0"/>
|
||||
<validator column="APP_STATUS">
|
||||
<rule name="validValues" value="DRAFT|TO_DO|PAUSED|COMPLETED|CANCELLED" message="Please select a valid status." />
|
||||
</validator>
|
||||
|
||||
Reference in New Issue
Block a user