From: Vladimir Fomichev Date: Wed, 10 Dec 2025 07:14:00 +0000 (+0300) Subject: Убрал дистинкты X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=cd3f84c108890b27eb98fa2173e2647677719e40;p=erp24_rep%2Fyii-erp24%2F.git Убрал дистинкты --- diff --git a/erp24/api3/core/services/ReportService.php b/erp24/api3/core/services/ReportService.php index 2d9d77dd..750100ba 100644 --- a/erp24/api3/core/services/ReportService.php +++ b/erp24/api3/core/services/ReportService.php @@ -977,7 +977,6 @@ class ReportService $allAdminsInPeriod = TimetableFactModel::find() ->select(['admin_id']) - //->distinct() ->where(['store_id' => $data->stores]) ->andWhere($cond) ->andWhere(['>', 'work_time', 0]) @@ -1002,7 +1001,6 @@ class ReportService foreach ($data->stores as $store_id) { $employees = TimetableFactModel::find() ->select(['admin_id', 'shift_id']) - //->distinct() ->where(['store_id' => $store_id]) ->andWhere(['>=', 'date', date("Y-m-d", strtotime($dateStartEnd[0]))]) ->andWhere(['<=', 'date', date("Y-m-d", strtotime($dateStartEnd[1]))]) @@ -1489,7 +1487,6 @@ class ReportService // Для обеих смен нужны уникальные комбинации admin_id и shift_id $allAdminsInPeriod = $allAdminsInPeriodQuery ->select(['admin_id', 'shift_id']) - //->distinct() ->asArray() ->all(); $employeeCountTotal = count($allAdminsInPeriod); @@ -1499,7 +1496,6 @@ class ReportService } else { $allAdminsInPeriod = $allAdminsInPeriodQuery ->select(['admin_id']) - //->distinct() ->asArray() ->all(); $adminIdsInPeriod = ArrayHelper::getColumn($allAdminsInPeriod, 'admin_id');