| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Services;
- use App\Order;
- use App\OrderIssue;
- use App\Traits\ServiceAppAop;
- class SettlementIndemnityFeeService implements \App\Interfaces\SettlementBillDetailInterface
- {
- const TYPE = '理赔费';
- use ServiceAppAop;
- use \App\Traits\SettlementBillServiceTrait;
- public function getSql($owner_id, $counting_month): \Illuminate\Database\Eloquent\Builder
- {
- list($start, $end) = $this->getStartAndEnd($counting_month);
- return OrderIssue::query()
- ->with('order.shop')
- ->whereIn('order_id', Order::query()
- ->select('id')
- ->where('owner_id', $owner_id)
- ->whereBetween('created_at', [$start, $end]))
- ->whereBetween('created_at', [$start, $end])
- ->whereNotNull('baoshi_indemnity_money');
- }
- public function get(array $kvPairs)
- {
- return $this->getSql($kvPairs['owner_id'], $kvPairs['counting_month'])->paginate($kvPairs['paginateParams']['paginate'] ?? 50);
- }
- public function switchType($type)
- {
- // TODO: Implement switchType() method.
- }
- public function buildExport($details): array
- {
- // TODO: Implement buildExport() method.
- }
- public function add(array $model)
- {
- // TODO: Implement add() method.
- }
- public function getTotalFee($owner_id, $counting_month)
- {
- // TODO: Implement getTotalFee() method.
- }
- }
|