|
|
|
@ -72,4 +72,22 @@ class Test extends Base |
|
|
|
return $this->buildFailed(0, $e->getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function apiFinalReport() |
|
|
|
{ |
|
|
|
try { |
|
|
|
$param = $this->request->param(); |
|
|
|
validate()->rule([ |
|
|
|
'report_date|结报日期' => 'require|date', |
|
|
|
'zje|float' => 'require', |
|
|
|
])->check($param); |
|
|
|
$data = (new \app\service\invoice\TempInvoiceService())->tempFinalReport($param['report_date'], $param['zje']); |
|
|
|
if (!is_array($data)) { |
|
|
|
throw new \Exception($data); |
|
|
|
} |
|
|
|
return $this->buildSuccess($data); |
|
|
|
} catch (\Exception $e) { |
|
|
|
return $this->buildFailed(0, $e->getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|