loadCase($appUid); $criteria = Cases::getTransferHistoryCriteria($fields['APP_NUMBER']); $dataSet = GulliverBasePeer::doSelectRs($criteria); $totalCount = $dataSet->getRecordCount(); $start = $_REQUEST['start']; $limit = $_REQUEST['limit']; $criteria->setLimit($limit); $criteria->setOffset($start); $dataSet = GulliverBasePeer::doSelectRs($criteria); $dataSet->setFetchmode(ResultSet::FETCHMODE_ASSOC); $result = new stdClass(); $process = []; while ($dataSet->next()) { $result = $dataSet->getRow(); $result['ID_HISTORY'] = $result['PRO_UID'] . '_' . $result['APP_UID'] . '_' . $result['TAS_UID']; // Apply mask $dateInitLabel = applyMaskDateEnvironment($result['DEL_INIT_DATE'],'', false); $dateDelLabel = applyMaskDateEnvironment($result['DEL_DELEGATE_DATE'],'', false); $disableActionLabel = applyMaskDateEnvironment($result['APP_DISABLE_ACTION_DATE'],'', false); $enableActionLabel = applyMaskDateEnvironment($result['APP_ENABLE_ACTION_DATE'],'', false); $dateEndLabel = '-'; // @todo the query for get this '-' needs an update if ($result['DEL_FINISH_DATE'] != "-") { $dateEndLabel = applyMaskDateEnvironment($result['DEL_FINISH_DATE'],'', false); } // Apply the timezone $result['DEL_INIT_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateInitLabel); $result['DEL_DELEGATE_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateDelLabel); $result['DEL_FINISH_DATE_LABEL'] = DateTime::convertUtcToTimeZone($dateEndLabel); $result['APP_DISABLE_ACTION_DATE_LABEL'] = DateTime::convertUtcToTimeZone($disableActionLabel); $result['APP_ENABLE_ACTION_DATE_LABEL'] = DateTime::convertUtcToTimeZone($enableActionLabel); $process[] = $result; } $response = new stdclass(); $response->data = $process; $response->totalCount = $totalCount; echo G::json_encode($response); break; case '': //!dataInput $idHistory = $_REQUEST['idHistory']; //!dataSytem $idHistoryArray = explode('*', $idHistory); $_REQUEST['PRO_UID'] = $idHistoryArray[0]; $_REQUEST['APP_UID'] = $idHistoryArray[1]; $_REQUEST['TAS_UID'] = $idHistoryArray[2]; $_REQUEST['DYN_UID'] = ''; ?>
|
|