PMCORE-3951
This commit is contained in:
@@ -2561,7 +2561,6 @@ class LdapAdvanced
|
||||
->where('GRP_STATUS', '=', 'ACTIVE')
|
||||
->where('GRP_TITLE', '=', $title)
|
||||
->orderBy('GRP_ID', 'ASC')
|
||||
->get()
|
||||
->first();
|
||||
if (!empty($groupWf)) {
|
||||
return $groupWf->GRP_UID;
|
||||
|
||||
@@ -104,7 +104,6 @@ switch ($function) {
|
||||
$authenticationSource = RbacAuthenticationSource::query()
|
||||
->select(['AUTH_SOURCE_UID', 'AUTH_SOURCE_NAME'])
|
||||
->where('AUTH_SOURCE_NAME', '=', $authSourceName)
|
||||
->get()
|
||||
->first();
|
||||
$row = false;
|
||||
$suggestName = "";
|
||||
@@ -114,7 +113,6 @@ switch ($function) {
|
||||
->select(['AUTH_SOURCE_NAME'])
|
||||
->where('AUTH_SOURCE_NAME', 'LIKE', "%{$authSourceName}%")
|
||||
->orderBy('AUTH_SOURCE_NAME', 'desc')
|
||||
->get()
|
||||
->first();
|
||||
if (!empty($lastAuthenticationSource)) {
|
||||
$name = $lastAuthenticationSource->AUTH_SOURCE_NAME;
|
||||
|
||||
@@ -162,7 +162,6 @@ try {
|
||||
$dateCreate = empty($_REQUEST["UEA_DATE_CREATE"]) ? date("Y-m-d H:i:s") : $_REQUEST["UEA_DATE_CREATE"];
|
||||
|
||||
$userExtendedAttributes = UserExtendedAttributes::where('UEA_ID', '=', $id)
|
||||
->get()
|
||||
->first();
|
||||
if (empty($userExtendedAttributes)) {
|
||||
$userExtendedAttributes = new UserExtendedAttributes();
|
||||
@@ -194,7 +193,6 @@ try {
|
||||
$userExtendedAttributes = UserExtendedAttributes::query()
|
||||
->where('UEA_NAME', '=', trim($name))
|
||||
->where('UEA_ID', '<>', $id)
|
||||
->get()
|
||||
->first();
|
||||
$result = [
|
||||
"valid" => empty($userExtendedAttributes),
|
||||
@@ -208,7 +206,6 @@ try {
|
||||
$userExtendedAttributes = UserExtendedAttributes::query()
|
||||
->where('UEA_ATTRIBUTE_ID', '=', trim($attributeId))
|
||||
->where('UEA_ID', '<>', $id)
|
||||
->get()
|
||||
->first();
|
||||
$result = [
|
||||
"valid" => empty($userExtendedAttributes),
|
||||
@@ -221,7 +218,6 @@ try {
|
||||
$attributeId = empty($_REQUEST["attributeId"]) ? "" : $_REQUEST["attributeId"];
|
||||
$user = User::query()
|
||||
->where("USR_EXTENDED_ATTRIBUTES_DATA", "LIKE", "%\"{$attributeId}\"%")
|
||||
->get()
|
||||
->first();
|
||||
$isUsed = false;
|
||||
$message = "";
|
||||
|
||||
@@ -308,7 +308,6 @@ class Home
|
||||
->where('CAL_ID', '=', $id)
|
||||
->join('ADDITIONAL_TABLES', 'ADDITIONAL_TABLES.ADD_TAB_UID', '=', 'CASE_LIST.ADD_TAB_UID')
|
||||
->join('PROCESS', 'PROCESS.PRO_UID', '=', 'ADDITIONAL_TABLES.PRO_UID')
|
||||
->get()
|
||||
->first();
|
||||
if (!empty($caseList)) {
|
||||
$tableName = $caseList->ADD_TAB_NAME;
|
||||
|
||||
@@ -350,7 +350,6 @@ class TaskSchedulerBM
|
||||
$scheduler = TaskScheduler::select()
|
||||
->where('title', '=', $service['title'])
|
||||
->where('description', '=', $service['description'])
|
||||
->get()
|
||||
->first();
|
||||
if (is_null($scheduler)) {
|
||||
self::registerScheduledTask($service);
|
||||
|
||||
@@ -1154,7 +1154,6 @@ class WebEntry
|
||||
$result = true;
|
||||
$webentry = WebEntryModel::select('WE_HIDE_ACTIVE_SESSION_WARNING', 'WE_AUTHENTICATION')
|
||||
->where('WE_UID', '=', $weUid)
|
||||
->get()
|
||||
->first();
|
||||
if ($webentry->WE_AUTHENTICATION === 'LOGIN_REQUIRED') {
|
||||
$result = intval($webentry->WE_HIDE_ACTIVE_SESSION_WARNING) === 0;
|
||||
|
||||
@@ -93,7 +93,6 @@ class CaseList extends Model
|
||||
'ADDITIONAL_TABLES.ADD_TAB_NAME',
|
||||
'ADDITIONAL_TABLES.PRO_UID'
|
||||
])
|
||||
->get()
|
||||
->first();
|
||||
|
||||
return $caseList;
|
||||
@@ -174,7 +173,7 @@ class CaseList extends Model
|
||||
|
||||
$caseList = CaseList::where('CAL_ID', '=', $id);
|
||||
$caseList->update($attributes);
|
||||
$model = $caseList->get()->first();
|
||||
$model = $caseList->first();
|
||||
if (!is_null($model)) {
|
||||
$model->CAL_COLUMNS = json_decode($model->CAL_COLUMNS);
|
||||
}
|
||||
@@ -189,7 +188,7 @@ class CaseList extends Model
|
||||
public static function deleteSetting(int $id)
|
||||
{
|
||||
$caseList = CaseList::where('CAL_ID', '=', $id);
|
||||
$model = $caseList->get()->first();
|
||||
$model = $caseList->first();
|
||||
if (!is_null($model)) {
|
||||
$caseList->delete();
|
||||
$model->CAL_COLUMNS = json_decode($model->CAL_COLUMNS);
|
||||
@@ -274,7 +273,6 @@ class CaseList extends Model
|
||||
'CASE_LIST.*',
|
||||
'ADDITIONAL_TABLES.ADD_TAB_NAME'
|
||||
])
|
||||
->get()
|
||||
->first();
|
||||
if (empty($model)) {
|
||||
throw new Exception(G::LoadTranslation('ID_DOES_NOT_EXIST'));
|
||||
@@ -322,7 +320,6 @@ class CaseList extends Model
|
||||
|
||||
//the pmtable not exist
|
||||
$table = AdditionalTables::where('ADD_TAB_NAME', '=', $tableName)
|
||||
->get()
|
||||
->first();
|
||||
if ($table === null) {
|
||||
return [
|
||||
@@ -352,7 +349,6 @@ class CaseList extends Model
|
||||
|
||||
//the name of the case list already exist
|
||||
$list = CaseList::where('CAL_NAME', '=', $array['name'])
|
||||
->get()
|
||||
->first();
|
||||
$requestData['duplicateName'] = $requestData['duplicateName'] ?? '';
|
||||
if ($requestData['duplicateName'] !== 'continue') {
|
||||
|
||||
@@ -67,6 +67,6 @@ class Groupwf extends Model
|
||||
public static function getGroupId($grpUid)
|
||||
{
|
||||
$query = Groupwf::select('GRP_ID')->where('GRP_UID', $grpUid);
|
||||
return $query->get()->first()->toArray();
|
||||
return $query->first()->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,7 +495,6 @@ class Process extends Model
|
||||
$process = Process::query()
|
||||
->where($key, $proId)
|
||||
->where('PRO_STATUS', 'ACTIVE')
|
||||
->get()
|
||||
->first();
|
||||
return !empty($process);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class RbacRoles extends Model
|
||||
public static function getRolUidByCode($rolCode)
|
||||
{
|
||||
$query = RbacRoles::select('ROL_UID')->where('ROL_CODE', $rolCode);
|
||||
$query = $query->get()->first();
|
||||
$query = $query->first();
|
||||
|
||||
if (is_null($query)) {
|
||||
return [];
|
||||
|
||||
@@ -18,7 +18,6 @@ class Step extends Model
|
||||
->where('TAS_UID', '=', $tasUid)
|
||||
->where('STEP_TYPE_OBJ', '=', $stepTypeObj)
|
||||
->where('STEP_UID_OBJ', '=', $stepUidObj)
|
||||
->get()
|
||||
->first();
|
||||
return $step;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ class UserConfig extends Model
|
||||
{
|
||||
$userConfig = UserConfig::where('USR_ID', '=', $id)
|
||||
->where('USC_NAME', '=', $name)
|
||||
->get()
|
||||
->first();
|
||||
if (empty($userConfig)) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user