Commit a4297521 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 2e744739
......@@ -721,11 +721,13 @@ class InvoiceService
$values = $this->apiService->getPlatformDataEntries('invoice_apply_'.$invoiceNumber,'data_values');
$this->apiService->applyElecInvoice($values);
return true;
}catch(\Throwable $exception){
$update = [];
$update['invoice_number'] = $invoice['invoice_number'];
$update['api_response'] = $exception->getMessage();
$this->saveInvoiceRecord($update);
throw $exception;
//SimpleLogs::writeLog($exception->getMessage(),__CLASS__.':'.__FUNCTION__,'error');
//var_dump($exception->getMessage());
}
......
......@@ -23,7 +23,7 @@ class InvoiceController extends Controller
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
try{
$result = $this->invoiceService->getInvoiceRecordList($requestParams);
return Response::success($result,'获取成功');
return Response::success($this->formatKeysfromArray($result),'获取成功');
}catch(\Throwable $exception){
return $this->returnErrorExecptionResponse($exception,$exception->getMessage());
}
......@@ -39,7 +39,23 @@ class InvoiceController extends Controller
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
try{
$result = $this->invoiceService->getInvoiceStatusDetailByInvoiceNumber($requestParams);
return Response::success($result,'状态详情获取成功');
return Response::success($this->formatKeysfromArray($result),'状态详情获取成功');
}catch(\Throwable $exception){
return $this->returnErrorExecptionResponse($exception,$exception->getMessage());
}
}
public function invoiceRequestReset(Request $request)
{
$message = [
'invoiceNumber.required' => "发票流水号不能为空",
];
$this->validateRequest($request, $message);
$requestParams = $this->formatKeysfromArray($request->all(),'toUnderScore');
try{
$result = $this->invoiceService->resetApplyInvoice($requestParams['invoice_number']);
return Response::success($result,'重置请求成功');
}catch(\Throwable $exception){
return $this->returnErrorExecptionResponse($exception,$exception->getMessage());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment