提交 52f1884d authored 作者: chengye's avatar chengye

test

上级 115f403a
......@@ -54,18 +54,23 @@ class Payment
//作废单据
private function dropNumb($numb,$status)
{
$paymentFk = (new EmPaymentFk())->get(['oafk_numb' => $numb]);
$payment = (new EmPayment())->get(['payment_id' => $paymentFk->payment_id]);
$paymentFk->delete();
$payment->status = $status;
$payment->status = 9;
$payment->save();
//删除payment_invoice表
$delNum = (new EmPaymentInvoice())->where('payment_id', '=', $payment->payment_id)->delete();
Log::record(date('Y-m-d H:i:s').' OA单号:'.$numb. '缴费单已作废');
return json(
[
'code' => 201,
'message' => json_encode($payment->toArray()),
'data' => ''
]);
}
private function checkKey($key)
......@@ -88,4 +93,15 @@ class Payment
return substr_replace($statusCode, $value, $index, 1);
}
public function test(){
$data = request()->get();
if ($data['action'] == 1) {
Log::record(date('Y-m-d H:i:s').' OA单号:'.$data['numb'].' 接口操作:单据状态更新');
return $this->update($data['numb'],$data['status'],$data['mes']);
} else {
return $this->dropNumb($data['numb'],$data['status']);
}
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论