查询发票抬头-通过账单流水号
Showing
5 changed files
with
84 additions
and
1 deletions
... | @@ -40,7 +40,7 @@ class ErrorCode | ... | @@ -40,7 +40,7 @@ class ErrorCode |
40 | self::ORDER_WITHDRAW_ERROR => '提现记录有误', | 40 | self::ORDER_WITHDRAW_ERROR => '提现记录有误', |
41 | self::ORDER_MONEY_ERROR => '提现金额有误', | 41 | self::ORDER_MONEY_ERROR => '提现金额有误', |
42 | self::ORDER_NO_FOUND => '未找到订单记录', | 42 | self::ORDER_NO_FOUND => '未找到订单记录', |
43 | self::WITHDRAW_NO_RECORD => '未匹配有效提现记录', | 43 | self::WITHDRAW_NO_RECORD => '未匹配有效账单记录', |
44 | self::WITHDRAW_HANDLE_ERROR => '提现操作失败', | 44 | self::WITHDRAW_HANDLE_ERROR => '提现操作失败', |
45 | self::WITHDRAW_CONFIRM_BILLS_FAIL => '确认账单失败', | 45 | self::WITHDRAW_CONFIRM_BILLS_FAIL => '确认账单失败', |
46 | self::WITHDRAW_APPLY_FAIL => '提现申请失败', | 46 | self::WITHDRAW_APPLY_FAIL => '提现申请失败', | ... | ... |
... | @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Musician; | ... | @@ -5,6 +5,7 @@ namespace App\Http\Controllers\Musician; |
5 | use App\Http\Controllers\Controller; | 5 | use App\Http\Controllers\Controller; |
6 | use App\Http\Requests\Musician\MusicianWithdrawBillConfirmRequest; | 6 | use App\Http\Requests\Musician\MusicianWithdrawBillConfirmRequest; |
7 | use App\Http\Requests\Musician\MusicianWithdrawReceiptByNameRequest; | 7 | use App\Http\Requests\Musician\MusicianWithdrawReceiptByNameRequest; |
8 | use App\Http\Requests\Musician\MusicianWithdrawReceiptByNoRequest; | ||
8 | use App\Http\Requests\Musician\MusicianWithdrawReceiptRequest; | 9 | use App\Http\Requests\Musician\MusicianWithdrawReceiptRequest; |
9 | use App\Http\Requests\Musician\MusicianWithdrawStatusRequest; | 10 | use App\Http\Requests\Musician\MusicianWithdrawStatusRequest; |
10 | use App\Services\MusicianWithdrawService; | 11 | use App\Services\MusicianWithdrawService; |
... | @@ -41,6 +42,15 @@ class MusicianWithdrawController extends Controller | ... | @@ -41,6 +42,15 @@ class MusicianWithdrawController extends Controller |
41 | } | 42 | } |
42 | 43 | ||
43 | /** | 44 | /** |
45 | * @param MusicianWithdrawReceiptByNoRequest $request | ||
46 | * @return mixed | ||
47 | */ | ||
48 | public function receiptByNo(MusicianWithdrawReceiptByNoRequest $request) | ||
49 | { | ||
50 | return $this->musicianWithdrawService->receiptInfoByNo(); | ||
51 | } | ||
52 | |||
53 | /** | ||
44 | * 账单确认 | 54 | * 账单确认 |
45 | * @param MusicianWithdrawBillConfirmRequest $request | 55 | * @param MusicianWithdrawBillConfirmRequest $request |
46 | * @return \Illuminate\Http\JsonResponse | 56 | * @return \Illuminate\Http\JsonResponse | ... | ... |
1 | <?php | ||
2 | |||
3 | namespace App\Http\Requests\Musician; | ||
4 | |||
5 | use Illuminate\Foundation\Http\FormRequest; | ||
6 | |||
7 | class MusicianWithdrawReceiptByNoRequest extends FormRequest | ||
8 | { | ||
9 | /** | ||
10 | * Determine if the user is authorized to make this request. | ||
11 | * | ||
12 | * @return bool | ||
13 | */ | ||
14 | public function authorize() | ||
15 | { | ||
16 | return true; | ||
17 | } | ||
18 | |||
19 | /** | ||
20 | * Get the validation rules that apply to the request. | ||
21 | * | ||
22 | * @return array | ||
23 | */ | ||
24 | public function rules() | ||
25 | { | ||
26 | return [ | ||
27 | 'serial_no' => ['required', 'bail', 'string'], | ||
28 | ]; | ||
29 | } | ||
30 | |||
31 | /** | ||
32 | * @return string[] | ||
33 | */ | ||
34 | public function messages(): array | ||
35 | { | ||
36 | return [ | ||
37 | 'serial_no.required' => '请提供账单流水号', | ||
38 | ]; | ||
39 | } | ||
40 | } |
... | @@ -49,6 +49,35 @@ class MusicianWithdrawService extends Service | ... | @@ -49,6 +49,35 @@ class MusicianWithdrawService extends Service |
49 | } | 49 | } |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * 发票信息 - 通过账号流水号 | ||
53 | * @return \Illuminate\Http\JsonResponse|mixed | ||
54 | */ | ||
55 | public function receiptInfoByNo() | ||
56 | { | ||
57 | $app = StakeholderIncomeSyncApp::query()->where(['serial_no'=>$this->request->serial_no, 'sync_status'=>1, 'withdraw_status'=>1])->first(); | ||
58 | if (empty($app)) return Response::error(ErrorCode::WITHDRAW_NO_RECORD); | ||
59 | |||
60 | if ($receipt = Company::query()->where(['receipt_name'=>$app->company_id])->first()) { | ||
61 | |||
62 | return Response::success([ | ||
63 | 'receipt_type' => $receipt->receipt_type, | ||
64 | 'receipt_name' => $receipt->receipt_name, | ||
65 | 'receipt_no' => $receipt->receipt_no, | ||
66 | 'receipt_tel' => $receipt->receipt_tel, | ||
67 | 'receipt_address' => $receipt->receipt_address, | ||
68 | 'receipt_bank' => $receipt->receipt_bank, | ||
69 | 'receipt_bank_no' => $receipt->receipt_bank_no, | ||
70 | 'receipt_consignee' => $receipt->post_consignee, //收件人 | ||
71 | 'post_address' => $receipt->post_address, //邮寄地址 | ||
72 | 'post_phone' => $receipt->post_phone, //邮寄电话 | ||
73 | ]); | ||
74 | |||
75 | } else { | ||
76 | return Response::success(); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | /** | ||
52 | * 确认账单 | 81 | * 确认账单 |
53 | * @return \Illuminate\Http\JsonResponse | 82 | * @return \Illuminate\Http\JsonResponse |
54 | */ | 83 | */ | ... | ... |
... | @@ -37,6 +37,10 @@ Route::group([], function (){ | ... | @@ -37,6 +37,10 @@ Route::group([], function (){ |
37 | 37 | ||
38 | //提现发票抬头 - 通过公司中文 | 38 | //提现发票抬头 - 通过公司中文 |
39 | Route::post('withdraw/receipt_by_name', 'MusicianWithdrawController@receiptByName'); | 39 | Route::post('withdraw/receipt_by_name', 'MusicianWithdrawController@receiptByName'); |
40 | //提现发票抬头 - 通过账单流水号 | ||
41 | Route::post('withdraw/receipt_by_no', 'MusicianWithdrawController@receiptByNo'); | ||
42 | |||
43 | |||
40 | //账单状态修改 | 44 | //账单状态修改 |
41 | Route::post('withdraw/bill_confirm', 'MusicianWithdrawController@billConfirm'); | 45 | Route::post('withdraw/bill_confirm', 'MusicianWithdrawController@billConfirm'); |
42 | //账单状态修改 | 46 | //账单状态修改 | ... | ... |
-
Please register or sign in to post a comment