瀏覽代碼

小高薪

cqp 2 月之前
父節點
當前提交
00d054b982

+ 1 - 1
app/Service/AuxiliaryAccountService.php

@@ -139,7 +139,7 @@ class AuxiliaryAccountService extends Service
             $v['entrust2_amount'] = $v['entrust_type'] == 2 ?  $v['total_amount'] : 0;
         }
         ///分组
-        $fee_type_list = Fee::Clear($user,$data)->where('del_time',0)->select("title","id","parent_id")->get()->toArray();
+        $fee_type_list = Fee::TopClear($user,$data)->where('del_time',0)->select("title","id","parent_id")->get()->toArray();
 
         return [true,$this->groupListByRoot($list,$fee_type_list)];
     }

+ 1 - 1
app/Service/CalendarService.php

@@ -148,7 +148,7 @@ class CalendarService extends Service
     public function calendarCommon($data,$user, $field = []){
         if(empty($field)) $field = Calendar::$field;
 
-        $model = Calendar::Clear($user,$data);
+        $model = Calendar::TopClear($user,$data);
         $model = $model->where('del_time',0)
             ->select($field)
             ->orderby('id', 'desc');

+ 1 - 1
app/Service/DeviceService.php

@@ -105,7 +105,7 @@ class DeviceService extends Service
 
     public function deviceCommon($data,$user, $field = []){
         if(empty($field)) $field = Device::$field;
-        $model = Device::Clear($user,$data);
+        $model = Device::TopClear($user,$data);
         $model = $model->where('del_time',0)
             ->select($field)
             ->orderby('id', 'desc');

+ 1 - 1
app/Service/DeviceWorkService.php

@@ -581,7 +581,7 @@ class DeviceWorkService extends Service
             $model->where('crt_time','<=',$return[1]);
         }
         if (!empty($data['item_title'])) {
-            $models = Item::Clear($user,$data);
+            $models = Item::TopClear($user,$data);
             $id = $models->where('del_time',0)
                 ->where('title', 'LIKE', '%'.$data['item_title'].'%')
                 ->pluck('id')

+ 2 - 2
app/Service/ExpenseClaimsService.php

@@ -248,13 +248,13 @@ class ExpenseClaimsService extends Service
         $employee_ids = collect($data)->pluck('employee_id')->unique()->values()->all();
         $fee_ids = collect($data)->pluck('fee_id')->unique()->values()->all();
 
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_key_list = $item->whereIn('id',$item_ids)->pluck('title','id');
 
         $item = Employee::TopClear($user, $data);
         $employee_key_list = $item->whereIn('id',$employee_ids)->pluck('title','id');
 
-        $item = Fee::Clear($user, $data);
+        $item = Fee::TopClear($user, $data);
         $fee_key_list = $item->whereIn('id',$fee_ids)->pluck('title','id');
 
         $fileUploadService = new FileUploadService();

+ 1 - 1
app/Service/ItemService.php

@@ -210,7 +210,7 @@ class ItemService extends Service
     public function itemCommon($data,$user, $field = []){
         if(empty($field)) $field = Item::$field;
 
-        $model = Item::Clear($user,$data);
+        $model = Item::TopClear($user,$data);
         $model = $model->where('del_time',0)
             ->select($field)
             ->orderby('id', 'desc');

+ 1 - 1
app/Service/PersonWorkService.php

@@ -563,7 +563,7 @@ class PersonWorkService extends Service
             $model->where('crt_time','<=',$return[1]);
         }
         if (!empty($data['item_title'])) {
-            $models = Item::Clear($user,$data);
+            $models = Item::TopClear($user,$data);
             $id = $models->where('del_time',0)
                 ->where('title', 'LIKE', '%'.$data['item_title'].'%')
                 ->pluck('id')

+ 13 - 13
app/Service/StatisticService.php

@@ -50,10 +50,10 @@ class StatisticService extends Service
         $item_ids = $dataCollection->pluck('item_id')->unique()->values()->all();
         $employee_ids = $dataCollection->pluck('employee_id')->unique()->values()->all();
 
-        $employee = Employee::Clear($user, $data);
+        $employee = Employee::TopClear($user, $data);
         $employee_key_list = $employee->wherein('id', $employee_ids)->pluck("title", "id")->toArray();
 
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_title_key_list = $item->wherein('id', $item_ids)->pluck("title", "id")->toArray();
         $item_code_key_list = $item->wherein('id', $item_ids)->pluck("code", "id")->toArray();
         $collect = collect($month_employee_list);
@@ -187,7 +187,7 @@ class StatisticService extends Service
         $collect = collect($item_month_list);
         $item_month_list = collect($item_month_list)->sortBy('month')->values()->all();
         $items = collect($item_month_list)->pluck('item_id')->unique()->values()->all();
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_title_key_list = $item->wherein('id', $items)->pluck("title", "id")->toArray();
         $item_code_key_list = $item->wherein('id', $items)->pluck("code", "id")->toArray();
 
@@ -342,13 +342,13 @@ class StatisticService extends Service
 
         $item_month_list = collect($item_month_list)->sortBy('month')->values()->all();
         $items = collect($item_month_list)->pluck('item_id')->unique()->values()->all();
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_title_key_list = $item->wherein('id', $items)->pluck("title", "id")->toArray();
         $item_code_key_list = $item->wherein('id', $items)->pluck("code", "id")->toArray();
 
         $employee_ids = collect($item_month_list)->pluck('employee_id')->unique()->values()->all();
 
-        $employee = Employee::Clear($user, $data);
+        $employee = Employee::TopClear($user, $data);
         $employee_key_list = $employee->wherein('id', $employee_ids)->pluck("title", "id")->toArray();
 
         $item_month_list = collect($item_month_list)->transform(function ($item, $index) use ($item_title_key_list, $item_code_key_list, $employee_key_list, &$total_work_min, &$all_salary, &$employee_count) {
@@ -464,13 +464,13 @@ class StatisticService extends Service
         }
         $item_month_list = collect($item_month_list)->sortBy('month')->values()->all();
         $items = collect($item_month_list)->pluck('item_id')->unique()->values()->all();
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_title_key_list = $item->wherein('id', $items)->pluck("title", "id")->toArray();
         $item_code_key_list = $item->wherein('id', $items)->pluck("code", "id")->toArray();
 
         $device_ids = collect($item_month_list)->pluck('device_id')->unique()->values()->all();
 
-        $device = Device::Clear($user, $data);
+        $device = Device::TopClear($user, $data);
         $device_key_list = $device->wherein('id', $device_ids)->pluck("title", "id")->toArray();
         $device_original_value_key_list = $device->wherein('id', $device_ids)->pluck("original_value", "id")->toArray();
 
@@ -576,7 +576,7 @@ class StatisticService extends Service
             return [false, $month_start];
         }
         //第一步确定项目
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_list = $item->where('del_time', 0)
             ->where(function ($query) use ($month_start, $month_end) {
                 $query->where('start_time', '<=', $month_start)
@@ -829,7 +829,7 @@ class StatisticService extends Service
                 "entrust_type"
             )->get()->toArray();
         //需要根据分类去汇总
-        $fee = Fee::Clear($user, $data);
+        $fee = Fee::TopClear($user, $data);
         $fee = $fee->where('del_time', 0)->orderBy("sort", 'desc')->get()->toArray();
         return $this->groupListByRoot($expense_list, $fee);
     }
@@ -924,7 +924,7 @@ class StatisticService extends Service
         //项目编码、项目名称、项目状态、凭证日期、凭证种类、凭证号数、凭证摘要、会计凭证归集金额、N个一级费用类型、委内、委外
 
         //确认所有项目
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_list = $item->where('del_time', 0)
             ->where(function ($query) use ($month_start, $month_end) {
                 $query->where('start_time', '<=', $month_start)
@@ -937,7 +937,7 @@ class StatisticService extends Service
         //获取该区间内所有项目人工费、折旧费
         $item_salary = $this->auxiliaryEmployee($user, $data, $month_start, $month_end);
         $device_depreciation = $this->auxiliaryDevice($user, $data, $month_start, $month_end);
-        $fee = Fee::Clear($user, $data);
+        $fee = Fee::TopClear($user, $data);
         $fee = $fee->where('del_time', 0)->orderBy("sort", 'desc')->get()->toArray();
         $auxiliary = AuxiliaryAccountDetails::Clear($user, $data);
         $auxiliary_list = $auxiliary->where("voucher_date", ">=", $month_start)->where("voucher_date", "<", $month_end)
@@ -1306,13 +1306,13 @@ class StatisticService extends Service
         $item_month_list = collect($item_month_list)->sortBy('month')->values()->all();
         $items = collect($item_month_list)->pluck('item_id')->unique()->values()->all();
         $employee_ids = collect($item_month_list)->pluck('employee_id')->unique()->values()->all();
-        $employee = Employee::Clear($user, $data);
+        $employee = Employee::TopClear($user, $data);
         $employee_list = $employee->wherein('id', $employee_ids)->select("major", "title", "id")->get()->toArray();
         $employee_key_list = [];
         foreach ($employee_list as $v) {
             $employee_key_list[$v['id']] = $v;
         }
-        $item = Item::Clear($user, $data);
+        $item = Item::TopClear($user, $data);
         $item_title_key_list = $item->wherein('id', $items)->pluck("title", "id")->toArray();
         $item_code_key_list = $item->wherein('id', $items)->pluck("code", "id")->toArray();
         //项目编码、项目名称、姓名、人员类别、应出勤工时、研发出勤工时、研发工时占比、归集工资总额、归集社保金额、归集公积金、研发工资总额、研发社保金额、研发公积金