fix
Showing
1 changed file
with
3 additions
and
33 deletions
| ... | @@ -7,6 +7,7 @@ use App\Helper\Response; | ... | @@ -7,6 +7,7 @@ use App\Helper\Response; |
| 7 | use App\Models\Legal\Company; | 7 | use App\Models\Legal\Company; |
| 8 | use App\Models\Legal\Contract; | 8 | use App\Models\Legal\Contract; |
| 9 | use App\Models\Legal\StakeholderIncomeByPayer; | 9 | use App\Models\Legal\StakeholderIncomeByPayer; |
| 10 | use App\Models\Legal\StakeholderIncomeSyncAppDetails; | ||
| 10 | use App\Models\Legal\StakeholderSongCollate; | 11 | use App\Models\Legal\StakeholderSongCollate; |
| 11 | 12 | ||
| 12 | /** | 13 | /** |
| ... | @@ -21,7 +22,7 @@ class MusicianWithdrawService extends Service | ... | @@ -21,7 +22,7 @@ class MusicianWithdrawService extends Service |
| 21 | */ | 22 | */ |
| 22 | public function walletDetail() | 23 | public function walletDetail() |
| 23 | { | 24 | { |
| 24 | $income_by_payer = StakeholderIncomeByPayer::query()->where(['serial_no'=>$this->request->input('busi_id'), 'sync_status'=>1])->first(); | 25 | $income_by_payer = StakeholderIncomeSyncAppDetails::query()->where(['serial_no'=>$this->request->input('busi_id'), 'sync_status'=>1])->first(); |
| 25 | if (empty($income_by_payer)) return Response::error(ErrorCode::ORDER_NO_FOUND); | 26 | if (empty($income_by_payer)) return Response::error(ErrorCode::ORDER_NO_FOUND); |
| 26 | 27 | ||
| 27 | $collate = StakeholderSongCollate::query()->with('song:id,name,singer')->where([ | 28 | $collate = StakeholderSongCollate::query()->with('song:id,name,singer')->where([ |
| ... | @@ -57,37 +58,6 @@ class MusicianWithdrawService extends Service | ... | @@ -57,37 +58,6 @@ class MusicianWithdrawService extends Service |
| 57 | } else { | 58 | } else { |
| 58 | return Response::error(); | 59 | return Response::error(); |
| 59 | } | 60 | } |
| 60 | |||
| 61 | } | ||
| 62 | |||
| 63 | |||
| 64 | /** | ||
| 65 | * 发票信息 - 通过流水号 | ||
| 66 | * @return \Illuminate\Http\JsonResponse | ||
| 67 | */ | ||
| 68 | public function receiptInfo() | ||
| 69 | { | ||
| 70 | $receipt = []; | ||
| 71 | |||
| 72 | StakeholderIncomeByPayer::query()->with('company:company_id,receipt_type,receipt_name,receipt_no,receipt_tel,receipt_address,receipt_bank,receipt_bank_no') | ||
| 73 | ->where(['identifier'=>$this->identifier->identifier, 'sync_status'=>1])->whereIn('serial_no', $this->request->input('serial_no'))->select(['id', 'company_id', 'serial_no', 'busi_id'])->get()->map(function ($item) use (&$receipt) { | ||
| 74 | |||
| 75 | if (!empty($item->company->company_id)) { | ||
| 76 | $receipt[$item->company->company_id] = [ | ||
| 77 | 'receipt_type'=>$item->company->receipt_type, | ||
| 78 | 'receipt_name'=>$item->company->receipt_name, | ||
| 79 | 'receipt_no' =>$item->company->receipt_no, | ||
| 80 | 'receipt_tel' =>$item->company->receipt_tel, | ||
| 81 | 'receipt_address'=>$item->company->receipt_address, | ||
| 82 | 'receipt_bank'=>$item->company->receipt_bank, | ||
| 83 | 'receipt_bank_no'=>$item->company->receipt_bank_no, | ||
| 84 | ]; | ||
| 85 | } | ||
| 86 | |||
| 87 | return $receipt; | ||
| 88 | }); | ||
| 89 | |||
| 90 | return Response::success(array_values($receipt)); | ||
| 91 | } | 61 | } |
| 92 | 62 | ||
| 93 | /** | 63 | /** |
| ... | @@ -98,7 +68,7 @@ class MusicianWithdrawService extends Service | ... | @@ -98,7 +68,7 @@ class MusicianWithdrawService extends Service |
| 98 | { | 68 | { |
| 99 | $withdraw_status = ''; | 69 | $withdraw_status = ''; |
| 100 | 70 | ||
| 101 | $query = StakeholderIncomeByPayer::query()->where(['sync_status'=>1, 'identifier'=>$this->identifier->identifier]) | 71 | $query = StakeholderIncomeSyncAppDetails::query()->where(['sync_status'=>1, 'identifier'=>$this->identifier->identifier]) |
| 102 | ->whereIn('serial_no', $this->request->input('busi_id')); | 72 | ->whereIn('serial_no', $this->request->input('busi_id')); |
| 103 | 73 | ||
| 104 | switch ($this->request->input('type')) { | 74 | switch ($this->request->input('type')) { | ... | ... |
-
Please register or sign in to post a comment